Просмотр исходного кода

Merge branch '2.0' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into 2.0

wangzhinan 1 год назад
Родитель
Сommit
a9d8de22f3
47 измененных файлов с 1062 добавлено и 219 удалено
  1. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerService.java
  2. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  3. 5 1
      business/base-service/src/main/java/com/yihu/jw/team/service/TeamService.java
  4. 2 2
      business/base-service/src/main/java/com/yihu/jw/wlyy/wlyyhttp/WlyyHttpService.java
  5. 57 2
      business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java
  6. 1 1
      business/es-service/src/main/java/com/yihu/jw/es/util/ElasticsearchUtil.java
  7. 0 5
      business/im-service/src/main/java/com/yihu/jw/im/dao/ConsultDao.java
  8. 11 7
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  9. 90 1
      common/common-entity/src/db/2023.sql
  10. 0 12
      common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ConsultDo.java
  11. 58 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseCheckOrgDO.java
  12. 31 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServiceItemPlanDO.java
  13. 4 5
      common/common-entity/src/main/java/com/yihu/jw/entity/rehabilitation/RehabilitationguidanceDO.java
  14. 2 2
      common/common-entity/src/main/java/com/yihu/jw/entity/rehabilitation/RehabilitationguidancePatientDO.java
  15. 0 45
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  16. 105 0
      common/common-util/src/main/java/com/yihu/jw/util/Pair.java
  17. 1 1
      common/common-util/src/main/java/com/yihu/jw/util/http/HttpClientKit.java
  18. 1 1
      common/commons-data-mysql/src/main/java/com/yihu/jw/query/URLHqlQueryParser.java
  19. 1 1
      common/commons-data-mysql/src/main/java/com/yihu/jw/query/URLQueryParser.java
  20. 1 1
      common/commons-data-mysql/src/main/java/com/yihu/jw/query/UpdatePstCallback.java
  21. 105 0
      common/commons-util/src/main/java/com/yihu/jw/ehr/util/Pair.java
  22. 2 1
      starter/elasticsearch-starter/src/main/java/com/yihu/jw/elasticsearch/ElasticSearch7Pool.java
  23. 1 1
      starter/mysql-starter/src/main/java/com/yihu/jw/mysql/query/URLHqlQueryParser.java
  24. 1 1
      starter/mysql-starter/src/main/java/com/yihu/jw/mysql/query/URLQueryParser.java
  25. 1 1
      starter/mysql-starter/src/main/java/com/yihu/jw/mysql/query/UpdatePstCallback.java
  26. 11 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/org/BaseCheckOrgDao.java
  27. 3 3
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/dict/DictHospitalDeptEndpoint.java
  28. 53 4
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/org/BaseOrgEndpoint.java
  29. 52 2
      svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java
  30. 20 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/statistics/EsStatisticsEndpoint.java
  31. 2 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/team/SpecialistTeamEndpoint.java
  32. 0 1
      svr/svr-manage/src/main/java/com/yihu/customer/util/query/URLQueryParser.java
  33. 58 1
      svr/svr-statistics-hlw/src/main/resources/application.yml
  34. 11 2
      svr/svr-statistics-hlw/src/main/resources/bootstrap.yml
  35. 24 2
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/controller/DoorOrderController.java
  36. 3 0
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/dao/ServiceItemPlanDao.java
  37. 9 2
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/DoorOrderService.java
  38. 1 1
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorPrescriptionService.java
  39. 2 2
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorServiceOrderService.java
  40. 2 8
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java
  41. 1 1
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/PatientRehabilitationManageController.java
  42. 200 0
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationManageController.java
  43. 2 1
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/dao/RehabilitationGuidanceDao.java
  44. 81 76
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationGuidanceService.java
  45. 19 10
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java
  46. 26 1
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationManageService.java
  47. 0 4
      svr/svr-visit-behind/src/main/resources/application.yml

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerService.java

@ -72,7 +72,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
            map.put("update_time",DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
            String bannerId = map.get("id").toString();
            String sqlId = "select t.id AS \"id\" from base_banner_doctor t where t.banner_id = '"+bannerId+"'";
            List<Map<String,Object>> listID=hibenateUtils.createSQLQuery(sqlId,0,1);
            List<Map<String,Object>> listID=hibenateUtils.createSQLQuery(sqlId,1,1);
            String bannerGiveId ="";
            if (listID.size()>0){
                bannerGiveId = listID.get(0).get("id").toString();

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -9899,7 +9899,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "\tp.check_reason as \"checkReason\",\n" +
                "\tp.pay_type as \"payType\"\n" +
                "FROM\n" +
                "\twlyy_prescription P\n" +
                "\twlyy_prescription p\n" +
                "WHERE\n" +
                "\t1 = 1 and  p.check_status not in (3,4) ";
        Map<String, Object> params = new HashedMap();

+ 5 - 1
business/base-service/src/main/java/com/yihu/jw/team/service/TeamService.java

@ -174,7 +174,8 @@ public class TeamService {
    }
    //获取专科团队列表
    public Envelop getTeamList(String type,Integer adminTeamId,String teamName, String dept, Integer page, Integer pageSize, String hospital,String recommend, String recommendDoctorName) {
    public Envelop getTeamList(String type,Integer adminTeamId,String teamName, String dept, Integer page, Integer pageSize,
                               String hospital,String recommend, String recommendDoctor, String recommendDoctorName) {
        String countSql = " select count(t.id) ";
        String sql = "SELECT t.id,t.`name`,t.org_code orgCode,t.org_name orgName,t.dept,t.dept_name deptName,t.recommend_doctor recommendDoctor,d.photo," +
                "t.recommend_doctor_name recommendDoctorName,DATE_FORMAT(t.create_time,'%Y-%m-%d %H:%i:%S') createTime,t.intro,t.recommend,d.job_title_name jobTitleName ";
@ -195,6 +196,9 @@ public class TeamService {
        if(StringUtils.isNotEmpty(teamName)){
            filter += " and t.name like '%"+teamName+"%' ";
        }
        if(StringUtils.isNotEmpty(recommendDoctor)){
            filter += " and t.recommend_doctor = '"+recommendDoctor+"' ";
        }
        if(StringUtils.isNotEmpty(recommendDoctorName)){
            filter += " and t.recommend_doctor_name like '%"+recommendDoctorName+"%' ";
        }

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/wlyy/wlyyhttp/WlyyHttpService.java


+ 57 - 2
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -6445,7 +6445,20 @@ public class StatisticsEsService {
            listOfLists.add(list05);
            //数据转换
            List<Map<String, Object>> list = mergeAndSortLists(listOfLists, "1");
            result.put("resultList", list);
            //条件过滤科室
            if (StringUtils.isNotBlank(qvo.getDeptCode())) {
                List<Map<String, Object>> filterDeptList = new ArrayList<>();
                for (Map<String, Object> map : list) {
                    if (qvo.getDeptCode().equals(map.get("deptCode").toString())) {
                        filterDeptList.add(map);
                    }
                }
                result.put("resultList", filterDeptList);
                result.put("resultListSize", filterDeptList.size());
            } else {
                result.put("resultList", list);
                result.put("resultListSize", list.size());
            }
        }
        //查医生
@ -6484,7 +6497,35 @@ public class StatisticsEsService {
            listOfLists.add(list05);
            //数据转换
            List<Map<String, Object>> list = mergeAndSortLists(listOfLists, "2");
            //过滤科室和医生
            if (StringUtils.isNotBlank(qvo.getDeptCode()) || StringUtils.isNotBlank(qvo.getDeptName())) {
                List<Map<String, Object>> filterDoctortList = new ArrayList<>();
                if (StringUtils.isNotBlank(qvo.getDeptCode()) && StringUtils.isNotBlank(qvo.getDoctorName())) {
                    //科室
                    for (Map<String, Object> map : list) {
                        if (qvo.getDeptCode().equals(map.get("deptCode").toString())) {
                            filterDoctortList.add(map);
                        }
                    }
                    //医生
                    for (Map<String, Object> map : filterDoctortList) {
                        if (map.get("doctorName").toString().contains(qvo.getDoctorName())) {
                            filterDoctortList.add(map);
                        }
                    }
                }
                if (StringUtils.isBlank(qvo.getDeptCode()) && StringUtils.isNotBlank(qvo.getDoctorName())) {
                    for (Map<String, Object> map : list) {
                        if (map.get("doctorName").toString().contains(qvo.getDoctorName())) {
                            filterDoctortList.add(map);
                        }
                    }
                }
                result.put("resultList", filterDoctortList);
                result.put("resultListSize", filterDoctortList.size());
            }
            result.put("resultList", list);
            result.put("resultListSize", list.size());
        }
        return result;
    }
@ -7680,6 +7721,19 @@ public class StatisticsEsService {
        return list;
    }
    /**
     * 查询用户基本信息
     */
    public Map<String, Object> getPatientInfo(ScreenQvo qvo) {
        String sql="SELECT id 'patientId',`name` 'patientName',idcard,ssc,birthday,  TIMESTAMPDIFF(YEAR, birthday, CURDATE()) AS age ,mobile,address,phone \n" +
                "FROM base_patient WHERE idcard='"+qvo.getIdcard()+"' AND del='1'";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        if (!list.isEmpty()){
            return list.get(0);
        }
        return null;
    }
    /**
     * 调用i健康的接口查询家庭信息【市民健康】
@ -7694,9 +7748,10 @@ public class StatisticsEsService {
     * 调用i健康就诊情况
     */
    public JSONObject getEventByIjk(ScreenQvo qvo) {
        String param = "?&ssc=" + qvo.getSsc() + "&type=1&page=1&pageSize=20";
        String param = "?&idcard=" + qvo.getIdcard() + "ssc=" + qvo.getSsc() + "&type=1&page=1&pageSize=100";
        JSONObject re = wlyyHttpService.sendWlyyMesGet("getEventList", param);
        return re;
    }
}

+ 1 - 1
business/es-service/src/main/java/com/yihu/jw/es/util/ElasticsearchUtil.java

@ -1310,7 +1310,7 @@ public class ElasticsearchUtil {
            }
        }
        sql.append(groupBy);
        //logger.info("sql:"+sql);
        logger.info("sql:"+sql);
        return excuteEs7(sql.toString(), SaveModel.class, "", "");
    }

+ 0 - 5
business/im-service/src/main/java/com/yihu/jw/im/dao/ConsultDao.java

@ -1,12 +1,9 @@
package com.yihu.jw.im.dao;
import com.yihu.jw.entity.base.im.ConsultDo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
@ -15,8 +12,6 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
public interface ConsultDao extends JpaRepository<ConsultDo, String>, JpaSpecificationExecutor<ConsultDo> {
	ConsultDo findByCode(String code);
	@Query("from ConsultDo a where a.relationCode = ?1")
	ConsultDo findByRelationCode(String outpatientid);

+ 11 - 7
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -2054,15 +2054,20 @@ public class ImService {
     * @return
     */
    public JSONObject getConsultInfoAndPatientInfo(String consult, String patientCode) {
        ConsultDo consultDo = consultDao.getOne(consult);
        BasePatientDO basePatientDO = null;
        if (StringUtils.isEmpty(patientCode)) {
            patientCode = consultDo.getPatient();
        JSONObject result = new JSONObject();
        if(!StringUtils.isEmpty(consult)){
            ConsultDo consultDo = consultDao.findById(consult).orElse(null);
            if (StringUtils.isEmpty(patientCode)) {
                patientCode = consultDo.getPatient();
            }
            result.put("consultDo", consultDo);
        }else {
            result.put("consultDo", null);
        }
        BasePatientDO basePatientDO = null;
        basePatientDO = basePatientDao.getOne(patientCode);
        JSONObject result = new JSONObject();
        JSONObject patientinfoObj = new JSONObject();
        patientinfoObj.put("name", basePatientDO.getName());
        patientinfoObj.put("sex", basePatientDO.getSex());
@ -2073,7 +2078,6 @@ public class ImService {
        Integer age = DateUtil.getAgeForIdcard(basePatientDO.getIdcard());
        patientinfoObj.put("age", age);
        result.put("patientInfo", patientinfoObj);
        result.put("consultDo", consultDo);
        return result;
    }

+ 90 - 1
common/common-entity/src/db/2023.sql

@ -233,4 +233,93 @@ ADD COLUMN `create_user_name` varchar(50) NULL COMMENT '创建人姓名' AFTER `
ALTER TABLE `base`.`wlyy_patient_rehabilitation_plan`
ADD COLUMN `patient_info_code` varchar(255) NULL AFTER `plan_doctor_name`;
=========================== 康复模块[结束]=================================
=========================== 康复模块[结束]=================================
-- ysj 2023-12-01
CREATE TABLE `base_check_org` (
                                  `id` int(50) NOT NULL AUTO_INCREMENT,
                                  `orgCode` varchar(50) DEFAULT NULL COMMENT '机构code',
                                  `check_Date` varchar(50) DEFAULT NULL COMMENT '考核时间',
                                  `check_file` varchar(255) DEFAULT NULL COMMENT '考核文件',
                                  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构考核';
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000001', NULL, 'PROFESSIONAL_STATE', '0', '国家机关、党群组织、企业、事业单位负责人', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000002', NULL, 'PROFESSIONAL_STATE', '1', '专业技术人员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000003', NULL, 'PROFESSIONAL_STATE', '2', '办事人员和有关人员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000004', NULL, 'PROFESSIONAL_STATE', '3', '商业、服务业人员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000005', NULL, 'PROFESSIONAL_STATE', '4', '农、林、牧、渔、水利业生产人员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000006', NULL, 'PROFESSIONAL_STATE', '5', '生产、运输设备操作人员及有关人员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000007', NULL, 'PROFESSIONAL_STATE', '6', '军人', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('1000000008', NULL, 'PROFESSIONAL_STATE', '7', '不便分类的其他从业人员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('1', '0', '1', '汉族', '1', '', '', 'HZ', 'IY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('2', '0', '2', '蒙古族', '1', '', '', 'MGZ', 'ADY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('3', '0', '3', '回族', '1', '', '', 'HZ', 'LY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('4', '0', '4', '藏族', '1', '', '', 'CZ', 'AY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('5', '0', '5', '维吾尔族', '1', '', '', 'WWEZ', 'XGQY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('6', '0', '6', '苗族', '1', '', '', 'MZ', 'AY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('7', '0', '7', '彝族', '1', '', '', 'YZ', 'XY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('8', '0', '8', '壮族', '1', '', '', 'ZZ', 'UY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('9', '0', '9', '布依族', '1', '', '', 'BYZ', 'DWY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('10', '0', '10', '朝鲜族', '1', '', '', 'CXZ', 'FQY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('11', '0', '11', '满族', '1', '', '', 'MZ', 'IY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('12', '0', '12', '侗族', '1', '', '', 'DZ', 'WY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('13', '0', '13', '瑶族', '1', '', '', 'YZ', 'GY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('14', '0', '14', '白族', '1', '', '', 'BZ', 'RY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('15', '0', '15', '土家族', '1', '', '', 'TJZ', 'FPY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('16', '0', '16', '哈尼族', '1', '', '', 'HNZ', 'KNY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('17', '0', '17', '哈萨克族', '1', '', '', 'HSKZ', 'KADY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('18', '0', '18', '傣族', '1', '', '', 'DZ', 'WY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('19', '0', '19', '黎族', '1', '', '', 'LZ', 'TY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('20', '0', '20', '傈僳族', '1', '', '', 'LSZ', 'WWY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('21', '0', '21', '佤族', '1', '', '', 'WZ', 'WY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('22', '0', '22', '畲族', '1', '', '', 'SZ', 'WY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('23', '0', '23', '高山族', '1', '', '', 'GSZ', 'YMY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('24', '0', '24', '拉祜族', '1', '', '', 'LBZ', 'RPY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('25', '0', '25', '水族', '1', '', '', 'SZ', 'IY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('26', '0', '26', '东乡族', '1', '', '', 'DXZ', 'AXY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('27', '0', '27', '纳西族', '1', '', '', 'NXZ', 'XSY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('28', '0', '28', '景颇族', '1', '', '', 'JPZ', 'JHY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('29', '0', '29', '柯尔克孜族', '1', '', '', 'KEKZZ', 'SQDBY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('30', '0', '30', '土族', '1', '', '', 'TZ', 'FY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('31', '0', '31', '达斡尔族', '1', '', '', 'DHEZ', 'DFQY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('32', '0', '32', '仫佬族', '1', '', '', 'MLZ', 'WWY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('33', '0', '33', '羌族', '1', '', '', 'QZ', 'UY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('34', '0', '34', '布朗族', '1', '', '', 'BLZ', 'DYY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('35', '0', '35', '撒拉族', '1', '', '', 'SLZ', 'RRY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('36', '0', '36', '毛南族', '1', '', '', 'MNZ', 'TFY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('37', '0', '37', '仡佬族', '1', '', '', 'GLZ', 'WWY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('38', '0', '38', '锡伯族', '1', '', '', 'XBZ', 'QWY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('39', '0', '39', '阿昌族', '1', '', '', 'ACZ', 'BJY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('40', '0', '40', '普米族', '1', '', '', 'PMZ', 'UOY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('41', '0', '41', '塔吉克族', '1', '', '', 'TJKZ', 'FFDY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('42', '0', '42', '怒族', '1', '', '', 'NZ', 'VY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('43', '0', '43', '乌孜别克族', '1', '', '', 'WZBKZ', 'QBKDY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('44', '0', '44', '俄罗斯族', '1', '', '', 'ELSZ', 'WLAY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('45', '0', '45', '鄂温克族', '1', '', '', 'EWKZ', 'KIDY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('46', '0', '46', '德昂族', '1', '', '', 'DAZ', 'TJY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('47', '0', '47', '保安族', '1', '', '', 'BAZ', 'WPY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('48', '0', '48', '裕固族', '1', '', '', 'YGZ', 'PLY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('49', '0', '49', '京族', '1', '', '', 'JZ', 'YY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('50', '0', '50', '塔塔尔族', '1', '', '', 'TTEZ', 'FFQY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('51', '0', '51', '独龙族', '1', '', '', 'DLZ', 'QDY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('52', '0', '52', '鄂伦春族', '1', '', '', 'ELCZ', 'KWDY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('53', '0', '53', '赫哲族', '1', '', '', 'HZZ', 'FRY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('54', '0', '54', '门巴族', '1', '', '', 'MBZ', 'UCY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('55', '0', '55', '珞巴族', '1', '', '', 'LBZ', 'CY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('56', '0', '56', '基诺族', '1', '', '', 'JNZ', 'AYY', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('57', '0', '99', '其他', '1', '', '', 'QT', 'AW', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('58', '0', '57', '穿青人', '1', '', '57', 'CQZ', 'CQZ', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('59', '0', '58', 'Turkish', '1', '', '', 'teq', 'Turkish', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('60', '0', '59', 'BRITAIN', '1', '', '', 'BRITISH', 'BRITAIN', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('61', '0', '60', 'AUSTRALIAN', '1', '', '', 'AUSTRALIAN', 'AUSTRALIAN', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('62', '0', '61', '/', '1', '', '', '/', '/', '0', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('63', '0', '63', 'Ukrainian', '1', '', '', 'Ukrainian', 'Ukrainian', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('64', '0', '101', '亻革家人', '1', '', '', 'RGJR', '', '', NULL, '', NULL, '', '');
INSERT INTO `base`.`zy_nation_dict` (`ID`, `ORG_ID`, `NATION_CODE`, `NATION_NAME`, `VALID_FLAG`, `USER_CODE`, `CUSTOM_CODE`, `SPELL_CODE`, `WBZX_CODE`, `SORT_NO`, `CREATE_TIME`, `CREATE_OPERATOR`, `MODIFY_TIME`, `MODIFY_OPERATOR`, `REMARK`) VALUES ('65', '0', '62', '山由族', '1', '', '', 'SYZ', 'MMY', '', NULL, '', NULL, '', '');
ALTER TABLE `wlyy_rehabilitation_guidance` MODIFY COLUMN `type` varchar(50);
ALTER TABLE base_service_item_plan
    ADD COLUMN reservation_type TINYINT(1) NULL;

+ 0 - 12
common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ConsultDo.java

@ -15,10 +15,6 @@ import java.util.Date;
@Table(name = "wlyy_consult")
public class ConsultDo extends UuidIdentityEntity {
	// 咨询标识
	private String code;
	// 患者标识
	private String patient;
	// 咨询类型:1三师咨询,2视频咨询,3图文咨询,4公共咨询,
@ -56,14 +52,6 @@ public class ConsultDo extends UuidIdentityEntity {
		this.signCode = signCode;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getSource() {
		return source;
	}

+ 58 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseCheckOrgDO.java

@ -0,0 +1,58 @@
package com.yihu.jw.entity.base.org;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by wsl on 2022/12/8
 */
@Entity
@Table(name = "base_check_org")
public class BaseCheckOrgDO extends IdEntity {
    /**
     * 机构code
     */
    private String orgcode;
    /**
     * 考核时间
     */
    private String checkDate;
    /**
     * 考核文件
     */
    private String checkFile;
    public String getOrgcode() {
        return orgcode;
    }
    public void setOrgcode(String orgcode) {
        this.orgcode = orgcode;
    }
    public String getCheckDate() {
        return checkDate;
    }
    public void setCheckDate(String checkDate) {
        this.checkDate = checkDate;
    }
    public String getCheckFile() {
        return checkFile;
    }
    public void setCheckFile(String checkFile) {
        this.checkFile = checkFile;
    }
}

+ 31 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServiceItemPlanDO.java

@ -29,8 +29,12 @@ public class ServiceItemPlanDO extends UuidIdentityEntityWithCreateTime {
    private String content;//服务完成笔记
    private String appendixs;//附件
    private Integer reservationType;//复诊类型 1线上 2线下
    private String guidanceMessage;//指导留言
    private String followupStatus;//随访状态 0取消 1已完成 2未开始 3进行中 4待审核
    private String planDoctor;//计划负责人
    private String planDoctorName;//计划负责人
    @Column(name = "patient")
    public String getPatient() {
@ -158,4 +162,31 @@ public class ServiceItemPlanDO extends UuidIdentityEntityWithCreateTime {
    public void setFollowupStatus(String followupStatus) {
        this.followupStatus = followupStatus;
    }
    @Column(name = "reservation_type")
    public Integer getReservationType() {
        return reservationType;
    }
    public void setReservationType(Integer reservationType) {
        this.reservationType = reservationType;
    }
    @Transient
    public String getPlanDoctor() {
        return planDoctor;
    }
    public void setPlanDoctor(String planDoctor) {
        this.planDoctor = planDoctor;
    }
    @Transient
    public String getPlanDoctorName() {
        return planDoctorName;
    }
    public void setPlanDoctorName(String planDoctorName) {
        this.planDoctorName = planDoctorName;
    }
}

+ 4 - 5
common/common-entity/src/main/java/com/yihu/jw/entity/rehabilitation/RehabilitationguidanceDO.java

@ -2,7 +2,6 @@ package com.yihu.jw.entity.rehabilitation;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IntegerIdentityEntity;
import com.yihu.jw.entity.iot.gateway.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -23,8 +22,8 @@ public class RehabilitationguidanceDO extends IntegerIdentityEntity {
    private String content;//模板内容
    private String createUser;//创建医生code,该字段为空即系统模板
    private String createUserName;//创建医生名称
    private Integer type;//指导类型0、冠心病,1、脑卒中,2、慢性前列腺,3肺癌
    private String typeName;//指导类型0、冠心病,1、脑卒中,2、慢性前列腺,3肺癌
    private String type;//指导类型 对应专病类型
    private String typeName;//指导类型 对应专病类型名称
    private Integer useCount;//使用次数
    private Date czrq;//操作时间
    private Integer del;//删除标志(1正常,0删除)
@ -85,11 +84,11 @@ public class RehabilitationguidanceDO extends IntegerIdentityEntity {
    }
    @Column(name = "type")
    public Integer getType() {
    public String getType() {
        return type;
    }
    public void setType(Integer type) {
    public void setType(String type) {
        this.type = type;
    }

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/rehabilitation/RehabilitationguidancePatientDO.java

@ -14,8 +14,8 @@ import java.util.Date;
@SequenceGenerator(name="id_generated", sequenceName="seq_wlyy_rehabilitation_guidance_patient")
public class RehabilitationguidancePatientDO extends IntegerIdentityEntity {
    private String patient;
    private String name;
    private String patient;//居民id
    private String name;//居民姓名
    private String article;//模板code
    private String doctor;//模板内容
    private String doctorName;//创建医生code,该字段为空即系统模板

+ 0 - 45
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -227,51 +227,6 @@ public abstract class EnvelopRestEndpoint extends BaseRestEndPoint {
        }else {
            return failed(e.getMessage(),-10000);
        }
       /* if (e.getClass().equals(DataAccessException.class)) {
            e.printStackTrace();//数据库操作失败
            return null;
        } else if (e.getClass().toString().equals(
                NullPointerException.class.toString())) {
            e.printStackTrace();
            //调用了未经初始化的对象或者是不存在的对象!
            return failed("空指针",170004);
        } else if (e.getClass().equals(IOException.class)) {
            e.printStackTrace();
            //IO异常!
            return null;
        } else if (e.getClass().equals(ClassNotFoundException.class)) {
            e.printStackTrace();//指定的类不存在!
            return null;
        } else if (e.getClass().equals(ArithmeticException.class)) {
            e.printStackTrace();//数学运算异常!
            return null;
        } else if (e.getClass().equals(ArrayIndexOutOfBoundsException.class)) {
            e.printStackTrace();
            //数组下标越界!
            return null;
        } else if (e.getClass().equals(IllegalArgumentException.class)) {
            e.printStackTrace();
            //方法的参数错误!
            return null;
        } else if (e.getClass().equals(ClassCastException.class)) {
            e.printStackTrace();//类型强制转换错误!
            return null;
        } else if (e.getClass().equals(SecurityException.class)) {
            e.printStackTrace();//违背安全原则异常!
            return null;
        } else if (e.getClass().equals(SQLException.class)) {
            e.printStackTrace();//操作数据库异常!
            return null;
        } else if (e.getClass().equals(NoSuchMethodError.class)) {
            e.printStackTrace();//方法末找到异常!
            return null;
        } else if (e.getClass().equals(InternalError.class)) {
            e.printStackTrace();//Java虚拟机发生了内部错误
            return null;
        } else {
            e.printStackTrace();//程序内部错误,操作失败!
            return null;
        }*/
    }
    protected MixEnvelop failedMixEnvelopException(Exception e){
        e.printStackTrace();

+ 105 - 0
common/common-util/src/main/java/com/yihu/jw/util/Pair.java

@ -0,0 +1,105 @@
package com.yihu.jw.util;
import javafx.beans.NamedArg;
import java.io.Serializable;
/**
 * yeshijie
 */
public class Pair<K,V> implements Serializable{
    /**
     * Key of this <code>Pair</code>.
     */
    private K key;
    /**
     * Gets the key for this pair.
     * @return key for this pair
     */
    public K getKey() { return key; }
    /**
     * Value of this this <code>Pair</code>.
     */
    private V value;
    /**
     * Gets the value for this pair.
     * @return value for this pair
     */
    public V getValue() { return value; }
    /**
     * Creates a new pair
     * @param key The key for this pair
     * @param value The value to use for this pair
     */
    public Pair(@NamedArg("key") K key, @NamedArg("value") V value) {
        this.key = key;
        this.value = value;
    }
    /**
     * <p><code>String</code> representation of this
     * <code>Pair</code>.</p>
     *
     * <p>The default name/value delimiter '=' is always used.</p>
     *
     *  @return <code>String</code> representation of this <code>Pair</code>
     */
    @Override
    public String toString() {
        return key + "=" + value;
    }
    /**
     * <p>Generate a hash code for this <code>Pair</code>.</p>
     *
     * <p>The hash code is calculated using both the name and
     * the value of the <code>Pair</code>.</p>
     *
     * @return hash code for this <code>Pair</code>
     */
    @Override
    public int hashCode() {
        // name's hashCode is multiplied by an arbitrary prime number (13)
        // in order to make sure there is a difference in the hashCode between
        // these two parameters:
        //  name: a  value: aa
        //  name: aa value: a
        return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
    }
    /**
     * <p>Test this <code>Pair</code> for equality with another
     * <code>Object</code>.</p>
     *
     * <p>If the <code>Object</code> to be tested is not a
     * <code>Pair</code> or is <code>null</code>, then this method
     * returns <code>false</code>.</p>
     *
     * <p>Two <code>Pair</code>s are considered equal if and only if
     * both the names and values are equal.</p>
     *
     * @param o the <code>Object</code> to test for
     * equality with this <code>Pair</code>
     * @return <code>true</code> if the given <code>Object</code> is
     * equal to this <code>Pair</code> else <code>false</code>
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o instanceof Pair) {
            Pair pair = (Pair) o;
            if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
            if (value != null ? !value.equals(pair.value) : pair.value != null) return false;
            return true;
        }
        return false;
    }
}

+ 1 - 1
common/common-util/src/main/java/com/yihu/jw/util/http/HttpClientKit.java

@ -1,6 +1,6 @@
package com.yihu.jw.util.http;
import javafx.util.Pair;
import com.yihu.jw.util.Pair;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;

+ 1 - 1
common/commons-data-mysql/src/main/java/com/yihu/jw/query/URLHqlQueryParser.java

@ -1,6 +1,6 @@
package com.yihu.jw.query;
import javafx.util.Pair;
import com.yihu.jw.ehr.util.Pair;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.Criteria;
import org.hibernate.Session;

+ 1 - 1
common/commons-data-mysql/src/main/java/com/yihu/jw/query/URLQueryParser.java

@ -1,8 +1,8 @@
package com.yihu.jw.query;
import com.yihu.jw.ehr.util.Pair;
import com.yihu.jw.ehr.util.datetime.DateUtil;
import com.yihu.jw.ehr.util.url.URLQueryBuilder;
import javafx.util.Pair;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;

+ 1 - 1
common/commons-data-mysql/src/main/java/com/yihu/jw/query/UpdatePstCallback.java

@ -1,6 +1,6 @@
package com.yihu.jw.query;
import javafx.util.Pair;
import com.yihu.jw.ehr.util.Pair;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.PreparedStatementCallback;

+ 105 - 0
common/commons-util/src/main/java/com/yihu/jw/ehr/util/Pair.java

@ -0,0 +1,105 @@
package com.yihu.jw.ehr.util;
import javafx.beans.NamedArg;
import java.io.Serializable;
/**
 * yeshijie
 */
public class Pair<K,V> implements Serializable{
    /**
     * Key of this <code>Pair</code>.
     */
    private K key;
    /**
     * Gets the key for this pair.
     * @return key for this pair
     */
    public K getKey() { return key; }
    /**
     * Value of this this <code>Pair</code>.
     */
    private V value;
    /**
     * Gets the value for this pair.
     * @return value for this pair
     */
    public V getValue() { return value; }
    /**
     * Creates a new pair
     * @param key The key for this pair
     * @param value The value to use for this pair
     */
    public Pair(@NamedArg("key") K key, @NamedArg("value") V value) {
        this.key = key;
        this.value = value;
    }
    /**
     * <p><code>String</code> representation of this
     * <code>Pair</code>.</p>
     *
     * <p>The default name/value delimiter '=' is always used.</p>
     *
     *  @return <code>String</code> representation of this <code>Pair</code>
     */
    @Override
    public String toString() {
        return key + "=" + value;
    }
    /**
     * <p>Generate a hash code for this <code>Pair</code>.</p>
     *
     * <p>The hash code is calculated using both the name and
     * the value of the <code>Pair</code>.</p>
     *
     * @return hash code for this <code>Pair</code>
     */
    @Override
    public int hashCode() {
        // name's hashCode is multiplied by an arbitrary prime number (13)
        // in order to make sure there is a difference in the hashCode between
        // these two parameters:
        //  name: a  value: aa
        //  name: aa value: a
        return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
    }
    /**
     * <p>Test this <code>Pair</code> for equality with another
     * <code>Object</code>.</p>
     *
     * <p>If the <code>Object</code> to be tested is not a
     * <code>Pair</code> or is <code>null</code>, then this method
     * returns <code>false</code>.</p>
     *
     * <p>Two <code>Pair</code>s are considered equal if and only if
     * both the names and values are equal.</p>
     *
     * @param o the <code>Object</code> to test for
     * equality with this <code>Pair</code>
     * @return <code>true</code> if the given <code>Object</code> is
     * equal to this <code>Pair</code> else <code>false</code>
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o instanceof Pair) {
            Pair pair = (Pair) o;
            if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
            if (value != null ? !value.equals(pair.value) : pair.value != null) return false;
            return true;
        }
        return false;
    }
}

+ 2 - 1
starter/elasticsearch-starter/src/main/java/com/yihu/jw/elasticsearch/ElasticSearch7Pool.java

@ -92,7 +92,8 @@ public class ElasticSearch7Pool {
    }
    public ResultSet restHighLevelClientStream(String sql) throws Exception {
        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.168:9100/","root","jkzlehr");
//        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.55:9200","elastic","elastic");
        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.168:9200/","elastic","elastic");
//        Connection connection = DriverManager.getConnection("jdbc:es://" + hosts, userName, password);
        Statement statement = connection.createStatement();
        ResultSet resultSet = statement.executeQuery(sql);

+ 1 - 1
starter/mysql-starter/src/main/java/com/yihu/jw/mysql/query/URLHqlQueryParser.java

@ -1,6 +1,6 @@
package com.yihu.jw.mysql.query;
import javafx.util.Pair;
import com.yihu.jw.util.Pair;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.*;

+ 1 - 1
starter/mysql-starter/src/main/java/com/yihu/jw/mysql/query/URLQueryParser.java

@ -1,7 +1,7 @@
package com.yihu.jw.mysql.query;
import com.yihu.jw.util.Pair;
import com.yihu.jw.util.date.DateUtil;
import javafx.util.Pair;
import org.springframework.util.StringUtils;
import javax.persistence.EntityManager;

+ 1 - 1
starter/mysql-starter/src/main/java/com/yihu/jw/mysql/query/UpdatePstCallback.java

@ -1,6 +1,6 @@
package com.yihu.jw.mysql.query;
import javafx.util.Pair;
import com.yihu.jw.util.Pair;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.PreparedStatementCallback;

+ 11 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/org/BaseCheckOrgDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.base.dao.org;
import com.yihu.jw.entity.base.org.BaseCheckOrgDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by wsl on 2022/12/8
 */
public interface BaseCheckOrgDao extends PagingAndSortingRepository<BaseCheckOrgDO, String>, JpaSpecificationExecutor<BaseCheckOrgDO> {
}

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/dict/DictHospitalDeptEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.base.endpoint.dict;
import com.yihu.jw.base.service.dict.DictHospitalDeptService;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -12,14 +13,12 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
/**
 * 医院科室字典控制器
 *
@ -50,6 +49,7 @@ public class DictHospitalDeptEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.DictHospitalDept.DELETE)
    @ApiOperation(value = "删除")
    @Transactional
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {

+ 53 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/org/BaseOrgEndpoint.java

@ -6,10 +6,7 @@ import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.hospital.drugstore.service.BaseDrugStoreService;
import com.yihu.jw.restmodel.base.org.BaseOrgVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.*;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
@ -267,4 +264,56 @@ public class BaseOrgEndpoint extends EnvelopRestEndpoint {
        return success("操作成功");
    }
    @PostMapping(value = "/delCheckOrg")
    @ApiOperation(value = "删除机构考核")
    public Envelop delCheckOrg (
            @ApiParam(name = "id", value = "考核id")
            @RequestParam(value = "id", required = false) String id) throws Exception {
        try {
            baseOrgService.delCheckOrg(id);
            return success("操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failedException2(e);
        }
    }
    @GetMapping(value = "/getOrgCheckList")
    @ApiOperation(value = "获取机构考核")
    public ObjEnvelop getOrgCheckList(@ApiParam(name = "orgCode", value = "机构code")
                                      @RequestParam(value = "orgCode", required = false) String orgCode,
                                      @ApiParam(name = "id", value = "考核id")
                                      @RequestParam(value = "id", required = false) String id,
                                      @ApiParam(name = "page" )
                                      @RequestParam(value = "page", required = true) Integer page,
                                      @ApiParam(name = "size")
                                      @RequestParam(value = "size", required = true) Integer size) {
        try {
            JSONObject orgCheckList = baseOrgService.getOrgCheckList(orgCode, id, page, size);
            return success("获取成功!",200,orgCheckList);
        } catch (Exception e) {
            e.printStackTrace();
            return failedObjEnvelopException2(e);
        }
    }
    @PostMapping(value = "/saveOrgCheck")
    @ApiOperation(value = "保存修改机构考核")
    public Envelop saveOrgCheck(@ApiParam(name = "id", value = "考核id")
                                @RequestParam(value = "id", required = false) String id,
                                @ApiParam(name = "orgCode", value = "机构code")
                                @RequestParam(value = "orgCode", required = true) String orgCode,
                                @ApiParam(name = "checkDate", value = "考核时间")
                                @RequestParam(value = "checkDate", required = true) String checkDate,
                                @ApiParam(name = "file", value = "考核文件")
                                @RequestParam(value = "file", required = true) String file){
        try {
            baseOrgService.saveOrgCheck(id, orgCode, checkDate, file);
            return success("保存成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failedException2(e);
        }
    }
}

+ 52 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.base.dao.org.BaseCheckOrgDao;
import com.yihu.jw.base.dao.org.BaseOrgUserDao;
import com.yihu.jw.base.service.org.tree.SimpleTree;
import com.yihu.jw.base.service.org.tree.SimpleTreeNode;
@ -11,16 +12,17 @@ import com.yihu.jw.base.service.org.tree.TreeNode;
import com.yihu.jw.base.service.user.UserService;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.base.util.JavaBeanUtils;
import com.yihu.jw.entity.base.org.BaseCheckOrgDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.org.BaseOrgSaasDO;
import com.yihu.jw.entity.base.org.BaseOrgUserDO;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -54,7 +56,8 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
    @Autowired
    private BaseOrgDao baseOrgDao;
    @Autowired
    private BaseCheckOrgDao baseCheckOrgDao;
    @Autowired
    private BaseOrgSaasService baseOrgSaasService;
@ -407,5 +410,52 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
        return baseOrgDao.findOrgListBySaasId();
    }
    // 保存修改机构考核
    public void saveOrgCheck(String id ,String orgCode,String checkDate,String file){
        BaseCheckOrgDO baseCheckOrgDO = new BaseCheckOrgDO();
        if (org.apache.commons.lang3.StringUtils.isNotBlank(id)) {
            baseCheckOrgDO.setId(Long.parseLong(id));
        }
        baseCheckOrgDO.setCheckFile(file);
        baseCheckOrgDO.setOrgcode(orgCode);
        baseCheckOrgDO.setCheckDate(checkDate);
        baseCheckOrgDao.save(baseCheckOrgDO);
    }
    //获取机构考核
    public JSONObject getOrgCheckList(String orgCode,String id,Integer page,Integer size){
        JSONObject resultObj =new JSONObject();
        if (page == null) {
            page = 0;
        } else if (page > 0) {
            page = page - 1;
        }
        if (size <= 0) {
            size = 10;
        }
        String sql = "select * from base_check_org where orgCode = '"+orgCode+"'";
        String totalSql = "select count(id) from base_check_org where orgCode = '"+orgCode+"'";
        if (org.apache.commons.lang3.StringUtils.isNotBlank(id)){
            sql += " and id = '"+id+"'";
        }
        sql += " limit "+page+","+size;
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        Integer total = jdbcTemplate.queryForObject(totalSql, Integer.class);
        resultObj.put("total",total);
        resultObj.put("list",list);
        return resultObj;
    }
    public void delCheckOrg(String id){
        String sql = "delete from base_check_org where id='"+id+"'";
        jdbcTemplate.execute(sql);
    }
}

Разница между файлами не показана из-за своего большого размера
+ 20 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/statistics/EsStatisticsEndpoint.java


+ 2 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/team/SpecialistTeamEndpoint.java

@ -77,11 +77,12 @@ public class SpecialistTeamEndpoint extends EnvelopRestEndpoint {
                               @RequestParam(required = false) String type,
                               @RequestParam(required = false) Integer adminTeamId,
                               @RequestParam(required = false) String hospital,
                               @RequestParam(required = false) String recommendDoctor,
                               @RequestParam(required = false) String recommendDoctorName,
                               @RequestParam(required = false) Integer page,
                               @RequestParam(required = false) Integer pageSize) {
        try {
            return teamService.getTeamList(type,adminTeamId,teamName,dept,page,pageSize,hospital,recommend,recommendDoctorName);
            return teamService.getTeamList(type,adminTeamId,teamName,dept,page,pageSize,hospital,recommend,recommendDoctor,recommendDoctorName);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败",-1);

+ 0 - 1
svr/svr-manage/src/main/java/com/yihu/customer/util/query/URLQueryParser.java

@ -1,7 +1,6 @@
package com.yihu.customer.util.query;
import com.yihu.customer.util.DateTimeUtil;
import javafx.util.Pair;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;

+ 58 - 1
svr/svr-statistics-hlw/src/main/resources/application.yml

@ -744,7 +744,8 @@ es:
  pwflag: 1 # 1需要密码,0不需要密码
  index: hlw_quota_test
  type: hlw_quota_test
  host: http://172.26.0.55:9200
#  host: http://172.26.0.55:9200
  host: http://172.26.0.168:9200
  tHost: 172.26.0.55:9300
  clusterName: jkzl
  securityUser: elastic:elastic
@ -763,3 +764,59 @@ hibernate:
  show_sql: true
  ejb:
    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy
---
spring:
  profiles: dsyyProd
  datasource:
    driverClassName: com.mysql.cj.jdbc.Driver
    primaryReadWrite:
      url: jdbc:mysql://192.168.101.2:3306/base?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
      username: wlyy
      password: 2oEq3Kf7@zjxl
    primaryRead:
      url: jdbc:mysql://192.168.101.2:3306/base?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
      username: wlyy
      password: 2oEq3Kf7@zjxl
    im: #im库:
      url: jdbc:mysql://192.168.101.2:3306/base?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
      username: wlyy
      password: 2oEq3Kf7@zjxl
  redis:
    host: 192.168.101.2 # Redis server host.
    port: 6379
    password: Kb6wKDQP1W4 # Redis server port.
  followupMessage:
    cron : 0 5 0 * * ?
    jobId : FOLLOWUP_PLAN_JOB
systemConfig:
  msg_push_server: http://127.0.0.1:3000
es:
  pwflag: 0 # 1需要密码,0不需要密码
  index: hlw_quota_prod
  type: hlw_quota_prod
  host:  http://192.168.101.2:9000
  tHost: 192.168.101.2:9300
  clusterName: jkzl
  securityUser: lion:jkzlehr
  user: lion
  password: jkzlehr
wlyy:
  im:
    databaseName: im
quartz:
  name: schedulerFactoryBean_es_prod
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
  show_sql: true
  ejb:
    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy

+ 11 - 2
svr/svr-statistics-hlw/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-statistics-hlw
    name:  svr-statistics-hlw--
  cloud:
    config:
      failFast: true
@ -143,4 +143,13 @@ spring:
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://172.26.0.153:1221}
      label: ${wlyy.spring.config.label:master}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: dsyyProd
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}

+ 24 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/controller/DoorOrderController.java

@ -62,6 +62,25 @@ public class DoorOrderController extends EnvelopRestEndpoint {
    @Autowired
    JdbcTemplate jdbcTemplate;
    /**
     * 修改工单状态
     * 也将开方状态设置成0
     */
    @PostMapping(value = "updateOrderStatusAndTime")
    @ApiOperation(value = " 修改工单状态")
    public Envelop updateOrderInfo(
            @ApiParam(name = "orderId", value = "orderId", required = true) @RequestParam String orderId,
            @ApiParam(name = "status", value = "status", required = false) @RequestParam String status,
            @ApiParam(name = "doctorArrivingTime", value = "doctorArrivingTime", required = false) @RequestParam String doctorArrivingTime
    ) {
        try {
            wlyyDoorServiceOrderService.updateOrderStatusAndTime(orderId, status, doctorArrivingTime);
            return success("修改成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return failed("修改失败");
        }
    }
    @GetMapping(value = "getOgrById")
    @ApiOperation(value = "服务人员列表(医生列表)")
@ -307,7 +326,8 @@ public class DoorOrderController extends EnvelopRestEndpoint {
                    doctorCode, examPaperStatus, page, pageSize, type, name, serverType);
            return success("获取成功", result);
        } catch (Exception e) {
            return failed(e.getMessage());
            e.printStackTrace();
            return failed("查询失败");
        }
    }
@ -332,7 +352,8 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("保存成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            return failed(e.getMessage());
            e.printStackTrace();
            return failed("保存失败");
        }
    }
@ -474,6 +495,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            doorOrderService.refuseOrder(getUID(), orderId, reason);
            return success("操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }

+ 3 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/dao/ServiceItemPlanDao.java

@ -23,6 +23,9 @@ public interface ServiceItemPlanDao extends PagingAndSortingRepository<ServiceIt
    @Query("from ServiceItemPlanDO w where w.planDetailId =?1 and w.status=?2")
    List<ServiceItemPlanDO> findByPlanDetailId(String planDetailId,String status);
    @Query("from ServiceItemPlanDO w where w.planId =?1 and w.relationType=?2 and w.status=?3")
    List<ServiceItemPlanDO> findByPlanIdAndStatus(String planId,String relationType,String status);
    @Modifying
    @Query(value ="UPDATE  base_service_item_plan SET status='1' ,complete_time=?3 WHERE status='0' AND plan_id=?1 AND plan_detail_id=?2 ORDER BY plan_time DESC LIMIT 1", nativeQuery = true)
    void updateState(String planId, String planDetailId, Date date);

+ 9 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/DoorOrderService.java

@ -1047,8 +1047,12 @@ public class DoorOrderService {
            object.put("remark", one.get("remark"));
            object.put("serveDesc", one.get("serve_desc"));
            object.put("hosLevel", one.get("hosLevel"));
            Date date = (Date) one.get("service_time");
            object.put("createTime", DateUtil.dateToStr(date, "yyyy-MM-dd"));
            String date = one.get("service_time")+"";
            if(date.length()>=10){
                object.put("createTime", date.substring(0,10));
            }else {
                object.put("createTime", date);
            }
            object.put("examPaperStatus", one.get("examPaperStatus"));
            object.put("serviceStatus", one.get("serviceStatus"));
            //服务人员
@ -1088,6 +1092,9 @@ public class DoorOrderService {
            ConsultDo consult = consultDao.queryByRelationCode(id);
            if (null != consult) {
                doorServiceOrder.setSessionId(doorServiceOrder.getPatient() + "_" + consult.getId() + "_" + doorServiceOrder.getNumber() + "_" + consult.getType());
                object.put("consultId", consult.getId());
            }else {
                object.put("consultId", "");
            }
            object.put("sessionId", doorServiceOrder.getSessionId());

+ 1 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorPrescriptionService.java

@ -231,7 +231,7 @@ public class WlyyDoorPrescriptionService {
            logger.error("当前工单未关联咨询,工单id:" + orderId);
            return result;
        }
        String response = imUtill.sendTopicIM(sendId, sendName, consult.getCode(), contentType, content, null);
        String response = imUtill.sendTopicIM(sendId, sendName, consult.getId(), contentType, content, null);
        JSONObject resObj = JSONObject.parseObject(response);
        if (resObj.getIntValue("status") == -1) {
            logger.error("上门服务工单消息发送失败:" + resObj.getString("message"));

+ 2 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorServiceOrderService.java

@ -1128,7 +1128,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                " wlyy_door_fee_detail fd " +
                " LEFT JOIN wlyy_door_doctor dd ON fd.order_id = dd.order_id " +
                " WHERE " +
                " fd.order_id = '" + id + "'" +
                " fd.order_id = '" + id + "' and fd.type=1 " +
                " GROUP BY  fd.id";
        List<Map<String, Object>> feeDetailList = new ArrayList<>();
        try {
@ -2261,7 +2261,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                WlyyDoorDoctorStatusDO.Status.serving.getType(),
        });
        if (null == doorDoctorStatusDO) {
            String failMsg = "当前派单的医生不存在或禁止接单,doctor:" + doctor;
            String failMsg = "当前派单的医生不存在或禁止接单" ;
            throw new Exception(failMsg);
        }

+ 2 - 8
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java

@ -96,7 +96,6 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
        try {
            if (StringUtils.isBlank(doctorId)) {
                doctorId = getUID();
                System.out.println("医生id==>getUID()==>" + getUID());
            }
            List<Map<String, Object>> list = rehabilitationInfoService.getRehabilitationPatientCountNew(doctorId);
            return write(200, "请求成功", "data", list);
@ -188,6 +187,7 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
            @ApiParam(name = "idcard", value = "身份证", required = false) @RequestParam(value = "idcard", required = false) String idcard,
            @ApiParam(name = "doctorId", value = "医生id", required = false) @RequestParam(value = "doctorId", required = false) String doctorId,
            @ApiParam(name = "patientId", value = "居民id", required = false) @RequestParam(value = "patientId", required = false) String patientId,
            @ApiParam(name = "diseaseId", value = "专病id", required = false) @RequestParam(value = "diseaseId", required = false) String diseaseId,
            @ApiParam(name = "finishStatus", value = "空全部 1未完成 2已完成", required = false) @RequestParam(value = "finishStatus", required = false) String finishStatus,
            @ApiParam(name = "page", value = "起始页", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
            @ApiParam(name = "pagesize", value = "每页显示数据条数", required = false) @RequestParam(value = "pagesize", required = false, defaultValue = "10") Integer pagesize
@ -195,14 +195,8 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
        try {
            if (StringUtils.isBlank(doctorId)) {
                doctorId = getUID();
                System.out.println("医生id==>getUID()==>" + getUID());
            }
            System.out.println("参数idcard:" + idcard);
            System.out.println("参数patientId:" + patientId);
            System.out.println("参数finishStatus:" + finishStatus);
            System.out.println("参数page:" + page);
            System.out.println("参数pagesize:" + pagesize);
            List<Map<String, Object>> result = rehabilitationInfoService.getRehabilitationPatientPlan(idcard, doctorId, patientId, finishStatus, page, pagesize);
            List<Map<String, Object>> result = rehabilitationInfoService.getRehabilitationPatientPlan(idcard, doctorId, patientId, finishStatus, page, pagesize,diseaseId);
            return write(200, "请求成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();

+ 1 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/PatientRehabilitationManageController.java

@ -648,7 +648,7 @@ public class PatientRehabilitationManageController extends EnvelopRestEndpoint {
    @RequestMapping(value = "selectGuidances", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看指导列表")
    public String selectType(
            @ApiParam(name = "type", value = "康复指导类型", required = false) @RequestParam(value = "type", required = false) Integer type,
            @ApiParam(name = "type", value = "康复指导类型", required = false) @RequestParam(value = "type", required = false) String type,
            @ApiParam(name = "id", value = "康复指导模板id", required = false) @RequestParam(value = "id", required = false) String id,
            @ApiParam(name = "title", value = "康复指导名称", required = false) @RequestParam(value = "title", required = false) String title,
            @ApiParam(name = "planId", value = "计划id", required = false) @RequestParam(value = "planId", required = false) String planId,

+ 200 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationManageController.java

@ -1,8 +1,10 @@
package com.yihu.jw.hospital.module.rehabilitation.controller;
import com.yihu.jw.entity.rehabilitation.RehabilitationguidancePatientDO;
import com.yihu.jw.entity.specialist.rehabilitation.PatientRehabilitationPlanDO;
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationOperateRecordsDO;
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationGuidanceService;
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationManageService;
import com.yihu.jw.hospital.module.rehabilitation.service.SynchronizePatientService;
import com.yihu.jw.restmodel.web.Envelop;
@ -20,7 +22,9 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -36,6 +40,8 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
    private RehabilitationManageService rehabilitationManageService;
    @Autowired
    private SynchronizePatientService synchronizePatientService;
    @Autowired
    private RehabilitationGuidanceService rehabilitationGuidanceService;
    @PostMapping(value = "completePlan")
    @ApiOperation("确认完成服务,填写服务笔记")
@ -76,6 +82,22 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
        }
    }
    @RequestMapping(value = "selectPlanDetailByPlanId", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看其它服务计划")
    public Envelop selectPlanDetailByPlanId(
            @ApiParam(name = "planId", value = "康复计划id", required = true) @RequestParam(value = "planId", required = true) String planId,
            @ApiParam(name = "itemId", value = "执行计划id", required = true) @RequestParam(value = "itemId", required = true) String itemId,
            @ApiParam(name = "searchTask", value = "快速查找任务:(1电话/短信关怀,2康复咨询,3健康监测,4上门服务,5康复指导,6康复随访,7康复复诊)", required = true)
            @RequestParam(value = "searchTask", required = true) String searchTask
    ) {
        try {
            return ListEnvelop.getSuccess("查询成功",rehabilitationManageService.selectPlanDetailByPlan(planId, itemId, searchTask));
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    @GetMapping(value = "findServiceItemPlanDetail")
    @ApiOperation("执行计划详情")
    public Envelop findServiceItemPlanDetail(
@ -106,6 +128,21 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "findLastGuidanceMessage")
    @ApiOperation("查询最新一条指导留言")
    public Envelop findLastGuidanceMessage(
            @ApiParam(name = "planId", value = "康复计划id", required = true)
            @RequestParam(value = "planId", required = true) String planId) {
        try {
            return ObjEnvelop.getSuccess("查询成功",rehabilitationManageService.findLastGuidanceMessage(planId));
        }catch (ServiceException se){
            return Envelop.getError(se.getMessage());
        }catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    @PostMapping(value = "assignExecutor")
    @ApiOperation("计划负责人分配执行人")
    public Envelop assignExecutor(
@ -250,6 +287,169 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
        }
    }
    @RequestMapping(value = "findGuidanceByType", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看指导模板")
    public Envelop findGuidanceByType(@ApiParam(name = "type", value = "康复指导类型", required = true)
                              @RequestParam(value = "type", required = true) String type) {
        try {
            return ObjEnvelop.getSuccess("查询成功",rehabilitationGuidanceService.findByType(type));
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "saveGuidandceTemplate", method = RequestMethod.POST)
    @ApiOperation("康复管理-保存指导模板")
    public Envelop saveGuidandceTemplate(@ApiParam(name = "type", value = "康复指导类型", required = true)
                              @RequestParam(value = "type", required = true) String type,
                              @ApiParam(name = "content", value = "模板内容", required = true)
                              @RequestParam(value = "content", required = true) String content,
                              @ApiParam(name = "typeName", value = "类型名称", required = true)
                              @RequestParam(value = "typeName", required = true) String typeName) {
        try {
            rehabilitationGuidanceService.saveGuidandceTemplate(content,type,typeName,getUID());
            return Envelop.getSuccess("保存成功");
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("保存失败");
        }
    }
    @RequestMapping(value = "selectGuidances", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看指导列表")
    public Envelop selectType(@ApiParam(name = "type", value = "康复指导类型", required = false)
                             @RequestParam(value = "type", required = false) String type,
                             @ApiParam(name = "id", value = "康复指导模板id", required = false)
                             @RequestParam(value = "id", required = false) String id,
                             @ApiParam(name = "title", value = "康复指导名称", required = false)
                             @RequestParam(value = "title", required = false) String title,
                             @ApiParam(name = "planId", value = "计划id", required = false)
                             @RequestParam(value = "planId", required = false) String planId,
                             @ApiParam(name = "page", value = "页码", required = false)
                             @RequestParam(value = "page", required = false, defaultValue ="1") Integer page,
                             @ApiParam(name = "pagesize", value = "每页大小", required = false)
                             @RequestParam(value = "pagesize", required = false,defaultValue = "15") Integer pagesize) {
        try {
            return rehabilitationGuidanceService.select(title,type,id,planId,page,pagesize);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "selectPatientGuidances", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看指导列表")
    public Envelop selectPatientGuidances(@ApiParam(name = "patient", value = "居民code", required = false)
                                         @RequestParam(value = "patient", required = false) String patient,
                                         @ApiParam(name = "article", value = "康复指导模板code", required = false)
                                         @RequestParam(value = "article", required = false) String article,
                                         @ApiParam(name = "doctor", value = "医生code", required = false)
                                         @RequestParam(value = "doctor", required = false) String doctor,
                                         @ApiParam(name = "page", value = "页码", required = false)
                                         @RequestParam(value = "page", required = false) Integer page,
                                         @ApiParam(name = "pagesize", value = "每页大小", required = false)
                                         @RequestParam(value = "pagesize", required = false) Integer pagesize) {
        try {
            return rehabilitationGuidanceService.selectPatientGuidances(patient,doctor,article,page,pagesize);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "selectType", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看指导列表标题")
    public Envelop selectType(@ApiParam(name="planId",value = "根据计划id取该计划对应疾病的指导",required = false)
                             @RequestParam(value = "planId",required = false)String planId) {
        try {
            return ListEnvelop.getSuccess("查询成功",rehabilitationGuidanceService.selectType(planId));
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "selectByRelationCode", method = RequestMethod.GET)
    @ApiOperation("康复管理-根据业务code查找康复指导")
    public Envelop selectByRelationCode(@ApiParam(name = "relationCode", value = "业务关联code", required = false)
                                       @RequestParam(value = "relationCode", required = false) String relationCode,
                                       @ApiParam(name = "patient", value = "居民code", required = false)
                                       @RequestParam(value = "patient", required = false) String patient,
                                       @ApiParam(name = "doctor", value = "医生code", required = false)
                                       @RequestParam(value = "doctor", required = false) String doctor) {
        try {
            return ListEnvelop.getSuccess("查询成功",rehabilitationGuidanceService.selectByRelationCode(patient,doctor,relationCode));
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败");
        }
    }
    /**
     *
     * @param patient 居民code
     * @param doctor 专科医生code
     * @param type 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
     * @param relationCode 业务关联code
     * @param planId 计划id
     * @return
     */
    @RequestMapping(value = "sendSpecialistWeixinMessage", method = RequestMethod.POST)
    @ApiOperation("康复管理-发送微信模板消息")
    public Envelop sendSpecialistWeixinMessage(@ApiParam(name = "patient", value = "居民code", required = true)
                                               @RequestParam(value = "patient", required = true) String patient,
                                               @ApiParam(name = "doctor", value = "医生code", required = true)
                                               @RequestParam(value = "doctor", required = true) String doctor,
                                               @ApiParam(name = "type", value = "发送类型", required = true)
                                               @RequestParam(value = "type", required = true) Integer type,
                                               @ApiParam(name = "relationCode", value = "业务code", required = false)
                                               @RequestParam(value = "relationCode", required = true) String relationCode,
                                               @ApiParam(name = "planId", value = "计划id", required = false)
                                               @RequestParam(value = "planId", required = true) String planId,
                                               @ApiParam(name = "reservationType", value = "复诊类型:1线上,2线下,3远程", required = false)
                                               @RequestParam(value = "reservationType", required = false) Integer reservationType) {
        try {
            rehabilitationGuidanceService.sendSpecialistWeixinMessage(patient,doctor,type,relationCode,planId,reservationType);
            return success("请求成功!");
        }catch (ServiceException se){
            return Envelop.getError(se.getMessage());
        }catch (Exception e) {
            e.printStackTrace();
            return failed("请求失败");
        }
    }
    @RequestMapping(value = "sendGuidance", method = RequestMethod.POST)
    @ApiOperation("康复管理-发送康复指导")
    public Envelop selectType(@ApiParam(name = "json", value = "康复指导json", required = true)
                             @RequestParam(value = "json", required = true) String json,
                             @ApiParam(name = "planId", value = "计划ID", required = true)
                             @RequestParam(value = "planId", required = true) String planId) {
        try {
            com.alibaba.fastjson.JSONArray array = com.alibaba.fastjson.JSONArray.parseArray(json);
            List<RehabilitationguidancePatientDO> rehabilitationguidancePatientDOS = new ArrayList<>();
            for (int i=0;i<array.size();i++){
                com.alibaba.fastjson.JSONObject object = array.getJSONObject(i);
                RehabilitationguidancePatientDO rehabilitationguidancePatientDO = objectMapper.readValue(object.toJSONString(),RehabilitationguidancePatientDO.class);
                rehabilitationguidancePatientDOS.add(rehabilitationguidancePatientDO);
            }
            return ListEnvelop.getSuccess("发送成功",rehabilitationGuidanceService.sendGuidanceToPatient(rehabilitationguidancePatientDOS,planId));
        } catch (ServiceException se){
            return Envelop.getError(se.getMessage());
        }catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("发送失败");
        }
    }
    @PostMapping(value = "appointmentConsultation")
    @ApiOperation(value = "康复管理-预约协诊")
    public ObjEnvelop appointmentConsultation(

+ 2 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/dao/RehabilitationGuidanceDao.java

@ -10,6 +10,7 @@ public interface RehabilitationGuidanceDao extends PagingAndSortingRepository<Re
    @Query("select p from RehabilitationguidanceDO p where p.code = ?1 and p.del=1")
    RehabilitationguidanceDO findByCode(String code);
    @Query("select p from RehabilitationguidanceDO p where p.type = ?1 and p.del=1")
    RehabilitationguidanceDO findByType(String type);
//    Page<RehabilitationguidanceDO> findByCondition(String sql,PageRequest page);
}

+ 81 - 76
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationGuidanceService.java

@ -4,23 +4,25 @@ package com.yihu.jw.hospital.module.rehabilitation.service;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.servicePackage.ServiceItemPlanDO;
import com.yihu.jw.entity.rehabilitation.RehabilitationguidanceDO;
import com.yihu.jw.entity.rehabilitation.RehabilitationguidancePatientDO;
import com.yihu.jw.entity.util.TransforSqlUtl;
import com.yihu.jw.hospital.module.door.dao.ServiceItemPlanDao;
import com.yihu.jw.hospital.module.rehabilitation.dao.RehabilitationGuidanceDao;
import com.yihu.jw.hospital.module.rehabilitation.dao.RehabilitationGuidancePatientDao;
import com.yihu.jw.hospital.task.PushMsgTask;
import com.yihu.jw.hospital.utils.WeiXinAccessTokenUtils;
import com.yihu.jw.hospital.utils.WeiXinOpenIdUtils;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.entity.ServiceException;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
@ -31,7 +33,11 @@ import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.persistence.DynamicSpecifications;
import org.springside.modules.persistence.SearchFilter;
import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -54,11 +60,43 @@ public class RehabilitationGuidanceService {
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private PushMsgTask pushMsgTask;
    @Autowired
    private ServiceItemPlanDao serviceItemPlanDao;
    @Autowired
    private WeiXinAccessTokenUtils weiXinAccessTokenUtils;
    @Autowired
    private WeiXinOpenIdUtils weiXinOpenIdUtils;
    @Autowired
    private RehabilitationManageService rehabilitationManageService;
    //按类型查找
    public RehabilitationguidanceDO findByType(String type){
        return rehabilitationGuidanceDao.findByType(type);
    }
    //保存指导模板
    public void saveGuidandceTemplate(String content,String type,String typeName,String uid){
        RehabilitationguidanceDO guidanceDO = rehabilitationGuidanceDao.findByType(type);
        if(guidanceDO==null){
            guidanceDO = new RehabilitationguidanceDO();
            guidanceDO.setCode(type);
            guidanceDO.setType(type);
            guidanceDO.setTypeName(typeName);
            if(StringUtils.isNotBlank(uid)){
                BaseDoctorDO doctorDO = doctorDao.findByIdAndDel(uid);
                if(doctorDO != null){
                    guidanceDO.setCreateUser(uid);
                    guidanceDO.setCreateUserName(doctorDO.getName());
                }
            }
            guidanceDO.setDel(1);
            guidanceDO.setTitle(typeName);
            guidanceDO.setUseCount(0);
        }
        guidanceDO.setContent(content);
        guidanceDO.setCzrq(new Date());
        rehabilitationGuidanceDao.save(guidanceDO);
    }
    /**
     * 康复指导类型标题
@ -69,7 +107,6 @@ public class RehabilitationGuidanceService {
        String disease = "";
        if (StringUtils.isNoneBlank(planId)) {
            String sql = "select * from wlyy_patient_rehabilitation_plan where id='" + planId + "' ";
            sql = TransforSqlUtl.wlyy_patient_rehabilitation_planAll(sql);
            Map<String, Object> map = jdbcTemplate.queryForMap(sql);
            if (map.get("disease") != null && StringUtils.isNoneBlank(map.get("disease").toString())) {
                disease = map.get("disease").toString();
@ -87,18 +124,16 @@ public class RehabilitationGuidanceService {
    /**
     * 查询康复指导列表
     *
     * @param type
     * @param code
     * @param page
     * @param pagesize
     * @return
     */
    public Page<RehabilitationguidanceDO> select(String title, Integer type, String code, String planId, Integer page, Integer pagesize) {
    public PageEnvelop select(String title, String type, String code, String planId, Integer page, Integer pagesize) {
        String disease = "";
        if (StringUtils.isNoneBlank(planId)) {
            String sql = "select * from wlyy_patient_rehabilitation_plan where id='" + planId + "' ";
            sql = TransforSqlUtl.wlyy_patient_rehabilitation_planAll(sql);
            Map<String, Object> map = jdbcTemplate.queryForMap(sql);
            if (map.get("disease") != null && StringUtils.isNoneBlank(map.get("disease").toString())) {
                disease = map.get("disease").toString();
@ -117,7 +152,7 @@ public class RehabilitationGuidanceService {
            sql.append("and code='" + code + "' ");
            sqlCounts.append("and code='" + code + "' ");
        }
        if (type != null) {
        if (StringUtils.isNoneBlank(type)) {
            sql.append("and type='" + type + "' ");
            sqlCounts.append("and type='" + type + "' ");
        }
@ -137,16 +172,11 @@ public class RehabilitationGuidanceService {
            String contents = temp.getContent();
            temp.setContent(StringEscapeUtils.unescapeJava(contents));
        }
        PageRequest pageRequest = PageRequest.of(page, pagesize);
        if (list.size() <= 0) {
            return new PageImpl(new ArrayList<>(), pageRequest, 0);
        }
        return new PageImpl(list, pageRequest, totalCount);
        return PageEnvelop.getSuccessListWithPage("查询成功",list,page,pagesize,totalCount);
    }
    public Page<RehabilitationguidancePatientDO> selectPatientGuidances(String patient, String doctor, String code, Integer page, Integer pagesize) {
    public PageEnvelop selectPatientGuidances(String patient, String doctor, String article, Integer page, Integer pagesize) {
        if (page >= 1) {
            page--;
        }
@ -163,9 +193,10 @@ public class RehabilitationGuidanceService {
        // 设置查询条件
        Map<String, SearchFilter> filters = new HashMap<String, SearchFilter>();
        // 指定患者
        if (StringUtils.isNoneBlank(code)) {
            filters.put("code", new SearchFilter("code", SearchFilter.Operator.EQ, code));
        if (StringUtils.isNoneBlank(article)) {
            filters.put("article", new SearchFilter("article", SearchFilter.Operator.EQ, article));
        }
        // 指定患者
        if (StringUtils.isNoneBlank(patient)) {
            filters.put("patient", new SearchFilter("patient", SearchFilter.Operator.EQ, patient));
        }
@ -179,7 +210,7 @@ public class RehabilitationGuidanceService {
            BasePatientDO patient1 = patientDao.findById(rehabilitationguidancePatientDO.getPatient()).orElse(null);
            rehabilitationguidancePatientDO.setPhoto(patient1.getPhoto());
        }
        return rehabilitationguidancePatientDOS;
        return PageEnvelop.getSuccessListWithPage("查询成功",rehabilitationguidancePatientDOS.toList(),page,pagesize,rehabilitationguidancePatientDOS.getTotalElements());
    }
    /**
@ -189,7 +220,21 @@ public class RehabilitationGuidanceService {
     * @return
     */
    public List<RehabilitationguidancePatientDO> sendGuidanceToPatient(List<RehabilitationguidancePatientDO> rehabilitationguidancePatientDOS, String planId) throws Exception {
        List<ServiceItemPlanDO> itemPlanDOList =  serviceItemPlanDao.findByPlanIdAndStatus(planId,"5","0");
        if(itemPlanDOList.size()==0){
            throw new ServiceException("该康复计划没有未发送的康复指导");
        }
        Map<String,ServiceItemPlanDO> itemPlanDOMap = itemPlanDOList.stream().collect(Collectors.toMap(ServiceItemPlanDO::getId, (p) -> p));
        for (RehabilitationguidancePatientDO rehabilitationguidancePatientDO : rehabilitationguidancePatientDOS) {
            //查询计划id
            ServiceItemPlanDO itemPlanDO = itemPlanDOMap.get(rehabilitationguidancePatientDO.getRelationCode());
            if(itemPlanDO==null){
                throw new ServiceException("请勿重复发送");
            }
            if(!itemPlanDO.getDoctor().equals(rehabilitationguidancePatientDO.getDoctor())){
                throw new ServiceException("不是您的任务,无法完成");
            }
            RehabilitationguidanceDO rehabilitationguidanceDO = rehabilitationGuidanceDao.findByCode(rehabilitationguidancePatientDO.getArticle());
            rehabilitationguidanceDO.setUseCount(rehabilitationguidanceDO.getUseCount() + 1);
            rehabilitationGuidanceDao.save(rehabilitationguidanceDO);
@ -207,6 +252,8 @@ public class RehabilitationGuidanceService {
            rehabilitationguidancePatientDO.setIsRead(0);
            rehabilitationguidancePatientDO.setSendStatus(0);
            rehabilitationguidancePatientDO = rehabilitationGuidancePatientDao.save(rehabilitationguidancePatientDO);
            itemPlanDO.setRelationCode(rehabilitationguidancePatientDO.getId()+"");
            rehabilitationManageService.completePlan(itemPlanDO);
            this.sendSpecialistWeixinMessage(rehabilitationguidancePatientDO.getPatient(), rehabilitationguidancePatientDO.getDoctor(), 1, rehabilitationguidancePatientDO.getArticle(), planId, null);
        }
        return rehabilitationguidancePatientDOS;
@ -236,16 +283,15 @@ public class RehabilitationGuidanceService {
     *
     * @param patientCode  居民code
     * @param doctorCode   专科医生code
     * @param type         1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
     * @param type         1康复指导2康复下转3复诊提醒4上门服务提醒
     * @param relationCode 业务关联code
     * @param planId       计划id
     * @throws Exception
     */
    public void sendSpecialistWeixinMessage(String patientCode, String doctorCode, Integer type, String relationCode, String planId, String reservationType) throws Exception {
    public void sendSpecialistWeixinMessage(String patientCode, String doctorCode, Integer type, String relationCode, String planId, Integer reservationType) throws Exception {
        //康复指导
        BasePatientDO patient = patientDao.findById(patientCode).orElse(null);
        BaseDoctorDO doctor = doctorDao.findById(doctorCode).orElse(null);
//        SignFamily signFamily = signFamilyDao.findByPatient(patientCode);
        String name = "";
        String doctorName = "";
@ -257,18 +303,15 @@ public class RehabilitationGuidanceService {
        if (doctor != null) {
            doctorName = doctor.getName();
        }
//        if (signFamily != null) {
//            familyDoctorName = signFamily.getDoctorName();
//        }
        Integer sendType = null;
        if (type == 1) {
            RehabilitationguidanceDO rehabilitationguidanceDO = rehabilitationGuidanceDao.findByCode(relationCode);
            json.put("toUser", patientCode);
            json.put("first", patient.getName() + ",您好!您的家庭医生发来一篇健康文章!");
            json.put("first", patient.getName() + ",您好!您的医生发来一篇健康文章!");
            json.put("represented", patientCode);//被代理人
            json.put("id", planId);
            json.put("date", DateUtil.getStringDate());
//            json.put("orgName", doctor.getHospitalName());
            json.put("doctorName", doctor.getName());
            json.put("content", "《" + rehabilitationguidanceDO.getTitle() + "》");
            json.put("remark", "请及时阅读");
@ -296,23 +339,20 @@ public class RehabilitationGuidanceService {
        } else if (type == 3) {
            //复诊提醒3
            //更新复诊类型
            if (StringUtils.isNoneBlank(reservationType)) {
                String updSql = "update wlyy_rehabilitation_plan_detail set reservation_type = " + reservationType + " where id = '" + relationCode + "'";
                jdbcTemplate.execute(updSql);
            ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(relationCode).orElse(null);
            if(serviceItemPlanDO==null){
                throw new ServiceException("参数错误:relationCode");
            }
            sendType = 11;//待办事项
            String sql = "select pd.id,pd.execute_time as executeTime from wlyy_rehabilitation_plan_detail pd " +
                    "where pd.id ='" + relationCode + "' and pd.hospital_service_item_id='7' and pd.status <>1 order by pd.execute_time desc ";
            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql);
            String excuteTime = "";
            if (mapList != null && mapList.size() != 0) {
                excuteTime = DateUtil.dateToStrLong((Date) mapList.get(0).get("executeTime"));
            if(!serviceItemPlanDO.getDoctor().equals(doctorCode)){
                throw new ServiceException("不是您的任务,无法操作");
            }
            if (StringUtils.isNoneBlank(excuteTime)) {
                json.put("first", patient.getName() + ",您好!您的下次复诊时间是[" + excuteTime + "],请按时安排就诊。您可点击“查看详情”,提前预约就诊");
            } else {
                json.put("first", patient.getName() + ",您好!" + doctor.getName() + "医生提醒您预约复诊。您可点击“查看详情”,提前预约就诊");
            if("1".equals(serviceItemPlanDO.getStatus())){
                throw new ServiceException("请勿重复提醒");
            }
            serviceItemPlanDO.setReservationType(reservationType);
            rehabilitationManageService.completePlan(serviceItemPlanDO);
            sendType = 11;//待办事项
            json.put("first", patient.getName() + ",您好!" + doctor.getName() + "医生提醒您预约复诊。您可点击“查看详情”,提前预约就诊");
            json.put("toUser", patientCode);
            json.put("represented", patientCode);//被代理人
            json.put("keyword1", "复诊预约");
@ -326,10 +366,8 @@ public class RehabilitationGuidanceService {
                    "where pd.id ='" + relationCode + "' and pd.hospital_service_item_id='4' and pd.status <>1 order by pd.execute_time desc ";
            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql);
            String excuteTime = "";
            String detailId = "";
            if (mapList != null && mapList.size() != 0) {
                excuteTime = DateUtil.dateToStrLong((Date) mapList.get(0).get("executeTime"));
            }
            if (StringUtils.isNoneBlank(excuteTime)) {
                json.put("first", patient.getName() + ",您好!您的下次上门诊疗服务时间是[" + excuteTime + "],请按时预约上门诊疗服务。您可点击“查看详情”,提前预约就诊");
@ -343,44 +381,11 @@ public class RehabilitationGuidanceService {
            json.put("keyword2", DateUtil.getStringDate());
            json.put("remark", "请及时阅读");
            json.put("url", "smfw/html/toAppointment.html?relationCode=" + relationCode + "");
        } else if (type == 5) {
            //家签提醒 5
            sendType = 11;//待办事项
            String sql = "select pd.id,pd.execute_time as executeTime from wlyy_rehabilitation_plan_detail pd " +
                    "where pd.plan_id ='" + planId + "' and pd.hospital_service_item_id='4' and pd.status <>1 order by pd.execute_time desc ";
            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql);
            String excuteTime = "";
            if (mapList != null && mapList.size() != 0) {
                excuteTime = DateUtil.dateToStrLong((Date) mapList.get(0).get("executeTime"));
            }
            json.put("first", patient.getName() + ",您好!为方便为您提供康复管理服务,请先选择合适的社区和家庭医生进行签约");
            json.put("toUser", patientCode);
            json.put("represented", patientCode);//被代理人
            json.put("keyword1", "家庭医生签约");
            json.put("keyword2", DateUtil.getStringDate());
            json.put("remark", "请及时阅读");
            json.put("url", "qygl/html/signing-welcome.html");
        }
        logger.info("微信模板入参:" + sendType + "==" + json.toString());
        if (StringUtils.isNotBlank(patient.getOpenid())) {
            pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), sendType, patient.getOpenid(), patient.getName(), json);
        } else {
            //发送代理人
            org.json.JSONArray jsonArray = weiXinOpenIdUtils.getAgentOpenId(patient.getId(), patient.getOpenid());
            if (jsonArray != null && jsonArray.length() > 0) {
                for (int i = 0; i < jsonArray.length(); i++) {
                    org.json.JSONObject j = jsonArray.getJSONObject(i);
                    BasePatientDO member = (BasePatientDO) j.get("member");
                    org.json.JSONObject data = json;
                    data.remove("toUser");
                    data.put("toUser", member.getId());
                    data.remove("first");
                    data.put("first", weiXinOpenIdUtils.getTitleMes(patient, j.getInt("relation"), patient.getName()));
                    pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), sendType, member.getOpenid(), patient.getName(), data);
                }
            }
        }
    }

+ 19 - 10
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java

@ -1097,7 +1097,13 @@ public class RehabilitationInfoService {
    /**
     * 获取所有居民的康复计列表
     */
    public List<Map<String, Object>> getRehabilitationPatientPlan(String idcard, String doctorId, String patientId, String finishStatus, Integer page, Integer pagesize) {
    public List<Map<String, Object>> getRehabilitationPatientPlan(String idcard, String doctorId, String patientId,
                                                                  String finishStatus, Integer page, Integer pagesize,String diseaseId) {
        String sqlTem = "";
        if(StringUtils.isNotBlank(diseaseId)){
            sqlTem += "	and w.disease ='" + diseaseId + "' ";
        }
        String limitSql = " LIMIT " + (page - 1) * pagesize + "," + pagesize;
        String sql = "SELECT * FROM ( " +
                "SELECT DISTINCT \n" +
@ -1105,34 +1111,34 @@ public class RehabilitationInfoService {
                "	   (\n" +
                "		SELECT GROUP_CONCAT(q.`name`) FROM base_disease_hospital q \n" +
                "        INNER JOIN wlyy_patient_rehabilitation_plan w ON q.id = w.disease \n" +
                "		 WHERE 1 = 1 AND w.patient=a.id  GROUP BY w.patient\n" +
                "		 WHERE 1 = 1 AND w.patient=a.id "+sqlTem+" GROUP BY w.patient\n" +
                "	   ) 'diseaseListName',\n" +
                "      (\n" +
                "        SELECT GROUP_CONCAT(DISTINCT w.plan_doctor_name) FROM wlyy_patient_rehabilitation_plan w WHERE a.id = w.patient \n" +
                "        SELECT GROUP_CONCAT(DISTINCT w.plan_doctor_name) FROM wlyy_patient_rehabilitation_plan w WHERE a.id = w.patient \n" +sqlTem+
                "      ) 'planDoctorListName',\n" +
                "	   (\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE 1 = 1 AND w.patient = a.id \n" +
                "			WHERE 1 = 1 AND w.patient = a.id \n" +sqlTem+
                "		)'itemAllCount',\n" +
                "		(\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='0'	AND w.patient = a.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='0'	AND w.patient = a.id \n" +sqlTem+
                "		)'unFinishCount',\n" +
                "		(\n" +
                "			SELECT count(1) 	FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='1'	AND w.patient = a.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='1'	AND w.patient = a.id \n" +sqlTem+
                "		)'finishCount',\n" +
                "		(\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.plan_time=DATE_FORMAT(NOW(),'%Y-%m-%d') AND e.`status`='0'	AND w.patient = a.id \n" +
                "			WHERE	1 = 1 	AND e.plan_time=DATE_FORMAT(NOW(),'%Y-%m-%d') AND e.`status`='0'	AND w.patient = a.id \n" +sqlTem+
                "		)'totayTask'\n" +
                "FROM\n" +
                "	base_patient a\n" +
@ -1149,6 +1155,9 @@ public class RehabilitationInfoService {
            sql += " and  c.doctor is not null  ";
        }
        if(StringUtils.isNotBlank(diseaseId)){
            sql += "	AND b.disease ='" + diseaseId + "' ";
        }
        if (StringUtils.isNotBlank(patientId)) {
            //康复计划状态 [0已中止,1进行中,2已完成]
@ -1172,7 +1181,6 @@ public class RehabilitationInfoService {
            }
        }
        sql += limitSql;
        System.out.println("查询sql==>" + sql);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
@ -1280,14 +1288,15 @@ public class RehabilitationInfoService {
//                "		WHEN d.`status`='5' THEN '同步居民失败'\n" +
                "		WHEN d.`status`='7' THEN '已管理'\n" +
                "  END 'statusName',\n" +
                "  d.`status`,count(1) 'count' \n" +
                "  d.`status`,count(DISTINCT p.id) 'count' \n" +
                "FROM\n" +
                "	base_patient p\n" +
                "	INNER JOIN wlyy_rehabilitation_patient_info d ON p.id = d.patient\n" +
                "	LEFT JOIN wlyy_patient_rehabilitation_plan q ON d.`code` = q.patient_info_code \n" +
                "	LEFT JOIN wlyy_rehabilitation_plan_detail pd ON pd.plan_id = q.id " +
                "WHERE\n" +
                "	1 = 1 \n" +
                " 	AND ( d.create_user = '" + doctorId + "'  OR q.plan_doctor='" + doctorId + "' OR ISNULL( d.create_user ) ) \n" +
                " 	AND ( d.create_user = '" + doctorId + "'  OR q.plan_doctor='" + doctorId + "' OR ISNULL( d.create_user ) or pd.doctor='"+doctorId+"' ) \n" +
                "	AND ( ISNULL( d.type ) OR d.type = 2 )\n" +
                "	GROUP BY d.`status`";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);

+ 26 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationManageService.java

@ -1334,6 +1334,13 @@ public class RehabilitationManageService {
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success, resultMap);
    }
    //获取其他执行计划
    public List<ServiceItemPlanDO> selectPlanDetailByPlan(String planId, String itemId, String searchTask) {
        String sql = "SELECT * from base_service_item_plan WHERE plan_id='"+planId+"' and relation_type='"+searchTask+"'" +
                " and status='0' and id<>'"+itemId+"' order by plan_time asc";
        return jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(ServiceItemPlanDO.class));
    }
    //康复计划服务项列表
    public List<RehabilitationDetailDO> rehabilitationDetailInfo(String planId,String status,String searchTask){
        String sql = "select * from wlyy_rehabilitation_plan_detail where plan_id='"+planId+"' ";
@ -1352,7 +1359,9 @@ public class RehabilitationManageService {
        for (RehabilitationDetailDO detailDO:detailDOList){
            String key = detailDO.getHospitalServiceItemId();
            List<ServiceItemPlanDO> planDOS = planListMap.get(key);
            if(planDOS==null){
                planDOS = new ArrayList<>();
            }
            String completeTime = "";
            String planTime = "";
            int total = planDOS.size();
@ -1447,6 +1456,11 @@ public class RehabilitationManageService {
                planDO.setFollowupStatus(followup.getStatus());
            }
        }
        PatientRehabilitationPlanDO rehabilitationPlanDO = patientRehabilitationPlanDao.findById(planDO.getPlanId()).orElse(null);
        if(rehabilitationPlanDO!=null){
            planDO.setPlanDoctor(rehabilitationPlanDO.getPlanDoctor());
            planDO.setPlanDoctorName(rehabilitationPlanDO.getPlanDoctorName());
        }
        return planDO;
    }
@ -1460,6 +1474,17 @@ public class RehabilitationManageService {
        return null;
    }
    //查询最新一条指导留言
    public GuidanceMessageLogDO findLastGuidanceMessage(String planId){
        String sql = "SELECT l.* from wlyy_guidance_message_log l,base_service_item_plan p WHERE p.plan_id ='"+planId+"'" +
                " and l.plan_detail_id=p.id order by l.create_time desc LIMIT 1";
        List<GuidanceMessageLogDO> logDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(GuidanceMessageLogDO.class));
        if(logDOS.size()>0){
            return logDOS.get(0);
        }
        return null;
    }
    /**
     * 保存康复管理指导留言信息
     *

+ 0 - 4
svr/svr-visit-behind/src/main/resources/application.yml

@ -1457,10 +1457,6 @@ basedb:
base:
  url: http://172.17.110.212:10020/
# ====================================================
sms:
  clientId: EwC0iRSrcP
myFamily: