Browse Source

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

wsl 2 years ago
parent
commit
9d6eb6b9bf

+ 79 - 8
business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java

@ -2321,7 +2321,7 @@ public class DailyReportUploadService {
    /**
    /**
     * 管理员获取所有日报项目
     * 管理员获取所有日报项目
     */
     */
    public List<BaseDailyReportItemDO> findReportItemListAdmin(String user,String projectCode,String title,String content,Integer state,String begin_time,String end_time,String createUser,String createUserName) throws Exception {
    public List<BaseDailyReportItemDO> findReportItemListAdmin(String user,String projectCode,String title,String content,Integer state,String begin_time,String end_time,String createUser,String createUserName,String dept) throws Exception {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
        if (userRoles.size()==0){
@ -2353,6 +2353,9 @@ public class DailyReportUploadService {
        if (StringUtils.isNotBlank(createUserName)){
        if (StringUtils.isNotBlank(createUserName)){
            sql += " and i.create_user_name like '%"+createUserName+"%' ";
            sql += " and i.create_user_name like '%"+createUserName+"%' ";
        }
        }
        if (StringUtils.isNotBlank(dept)){
            sql += " and i.dept='"+dept+"' ";
        }
        itemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BaseDailyReportItemDO.class));
        itemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BaseDailyReportItemDO.class));
        for (BaseDailyReportItemDO tmp:itemDOS){
        for (BaseDailyReportItemDO tmp:itemDOS){
            List<BaseDailyReportItemMembersDO> membersDOS = reportItemMembersDao.findMembersByItemId(tmp.getId());
            List<BaseDailyReportItemMembersDO> membersDOS = reportItemMembersDao.findMembersByItemId(tmp.getId());
@ -3423,7 +3426,7 @@ public class DailyReportUploadService {
                startDateTmp = DateUtil.strToDate(startResult.get(0));
                startDateTmp = DateUtil.strToDate(startResult.get(0));
            }
            }
        }else {
        }else {
            sql = " select min(begin_time) from base_daily_report_item where begin_time is not null  ";
            sql = " select min(begin_time) from base_daily_report_item where  begin_time is not null and del=1  ";
            if (StringUtils.isNotBlank(projectCode)){
            if (StringUtils.isNotBlank(projectCode)){
                sql += "  and project_code='"+projectCode+"' ";
                sql += "  and project_code='"+projectCode+"' ";
            }
            }
@ -3483,7 +3486,7 @@ public class DailyReportUploadService {
                " INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                " INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
                "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
                "and DATE_FORMAT(up.report_date,'%w') BETWEEN 1 and 5  "+sqlWhere;
                "and DATE_FORMAT(up.report_date,'%w') BETWEEN 1 and 5  "+sqlWhere;
        //只计算出周一到周五上传的数量去求未上传
        //只计算出周一到周五上传的数量去求未上传
@ -3514,7 +3517,7 @@ public class DailyReportUploadService {
                "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                " inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1  where 1=1 " +
                " LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1  where 1=1 " +
                " "+sqlWhere;
                " "+sqlWhere;
        acWorkHours = jdbcTemplate.queryForObject(acWorkHoursSql,Double.class);
        acWorkHours = jdbcTemplate.queryForObject(acWorkHoursSql,Double.class);
@ -3523,7 +3526,7 @@ public class DailyReportUploadService {
                "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
                "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
                " "+sqlWhere+" and rd.doubt_type is not null group by rd.doubt_type";
                " "+sqlWhere+" and rd.doubt_type is not null group by rd.doubt_type";
        List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
        List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
        for (Map<String,Object>tmp:doubtTypeList){
        for (Map<String,Object>tmp:doubtTypeList){
@ -3558,7 +3561,7 @@ public class DailyReportUploadService {
                "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
                "inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
                "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
                " "+sqlWhere+" group by doctor_duty_code ";
                " "+sqlWhere+" group by doctor_duty_code ";
        List<Map<String,Object>> doctorTypeHourList = jdbcTemplate.queryForList(doctorTypeSql);
        List<Map<String,Object>> doctorTypeHourList = jdbcTemplate.queryForList(doctorTypeSql);
@ -3794,7 +3797,7 @@ public class DailyReportUploadService {
                "DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
                "DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
                " CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt', " +
                " CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt', " +
                " rd.doubt_type doubtType, rd.remark " +
                " rd.doubt_type doubtType, rd.remark " +
                "from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1  " +
                "from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id " +
                "INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 LEFT JOIN  " +
                "INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 LEFT JOIN  " +
                "base_daily_report_detail rd on up.id = rd.report_id " +
                "base_daily_report_detail rd on up.id = rd.report_id " +
                "LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
                "LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
@ -3853,7 +3856,7 @@ public class DailyReportUploadService {
                "DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
                "DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
                " CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt'," +
                " CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt'," +
                " rd.doubt_type doubtType, rd.remark " +
                " rd.doubt_type doubtType, rd.remark " +
                "from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1  " +
                "from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id " +
                "INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 LEFT JOIN  " +
                "INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 LEFT JOIN  " +
                "base_daily_report_detail rd on up.id = rd.report_id " +
                "base_daily_report_detail rd on up.id = rd.report_id " +
                "LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
                "LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
@ -4023,7 +4026,75 @@ public class DailyReportUploadService {
            JSONObject tmp = JSONObject.parseObject(dictValues.get(0));
            JSONObject tmp = JSONObject.parseObject(dictValues.get(0));
            doubtTypeObj = tmp.getJSONObject("dailyReportDoubtTypeName");
            doubtTypeObj = tmp.getJSONObject("dailyReportDoubtTypeName");
        }
        }
        Set<String> resultTimeList = new HashSet<>();
        Date startDateTmp = DateUtil.strToDate(startDate);
        Date endDateTmp = DateUtil.strToDate(endDate);
        for (;!startDateTmp.after(endDateTmp);){
            resultTimeList.add(DateUtil.dateToStr(startDateTmp,DateUtil.YYYY_MM_DD));
            startDateTmp = DateUtil.getNextDay1(startDateTmp,1);
        }
        if(userCompleteList.size()>0){
            String doctorTmp = null;
            String doctorNameTmp = null;
            String deptNameTmp = null;
            String jobTitleNameTmp = null;
            Set searchTimeList = new HashSet();
            List<Map<String,Object>> notReportList = new ArrayList<>();
            for(Map<String,Object>tmp:userCompleteList){
                String doctorId = null==tmp.get("doctor_id")?"":tmp.get("doctor_id").toString();
                String reportDate = null==tmp.get("report_date")?"":tmp.get("report_date").toString();
                String doctorName = null==tmp.get("doctor_name")?"":tmp.get("doctor_name").toString();
                String deptName = null==tmp.get("dept_name")?"":tmp.get("dept_name").toString();
                String jobTitleName = null==tmp.get("job_title_name")?"":tmp.get("job_title_name").toString();
                if(StringUtils.isBlank(doctorTmp)){
                    doctorTmp = doctorId;
                    doctorNameTmp = doctorName;
                    deptNameTmp = deptName;
                    jobTitleNameTmp = jobTitleName;
                }
                if (!doctorTmp.equals(doctorId)){
                    for (String tmpTime:resultTimeList){
                        if (!searchTimeList.contains(tmpTime)){
                            Map<String,Object> notReportObj = new HashMap<>();
                            notReportObj.put("doctor_id",doctorTmp);
                            notReportObj.put("report_date",tmpTime);
                            notReportObj.put("doctor_name",doctorNameTmp);
                            notReportObj.put("dept_name",deptNameTmp);
                            notReportObj.put("job_title_name",jobTitleNameTmp);
                            notReportObj.put("week_name",DateUtil.getWeekStr(tmpTime));
                            notReportList.add(notReportObj);
                        }
                    }
                    searchTimeList = new HashSet();
                    searchTimeList.add(reportDate);
                    doctorTmp = doctorId;
                    doctorNameTmp = doctorName;
                    deptNameTmp = deptName;
                    jobTitleNameTmp = jobTitleName;
                }else {
                    searchTimeList.add(reportDate);
                }
            }
            for (String tmpTime:resultTimeList){
                if (!searchTimeList.contains(tmpTime)){
                    Map<String,Object> notReportObj = new HashMap<>();
                    notReportObj.put("doctor_id",doctorTmp);
                    notReportObj.put("report_date",tmpTime);
                    notReportObj.put("doctor_name",doctorNameTmp);
                    notReportObj.put("dept_name",deptNameTmp);
                    notReportObj.put("job_title_name",jobTitleNameTmp);
                    notReportObj.put("week_name",DateUtil.getWeekStr(tmpTime));
                    notReportList.add(notReportObj);
                }
            }
            userCompleteList.addAll(notReportList);
        }
        userCompleteList.sort(Comparator.comparing(e->((Map<String,Object>)e).get("dept_name").toString()).reversed().thenComparing(e->((Map<String,Object>)e).get("doctor_id").toString()).thenComparing(e->((Map<String,Object>)e).get("report_date").toString()));
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        WritableSheet sheet = wwb.createSheet("sheet", 1);
        WritableSheet sheet = wwb.createSheet("sheet", 1);
        String[] header = {"员工完成情况("+startDate+"至"+endDate+")","","","","","","","","","","","","","","","","","",""};//
        String[] header = {"员工完成情况("+startDate+"至"+endDate+")","","","","","","","","","","","","","","","","","",""};//

+ 8 - 7
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -105,27 +105,27 @@ public class HealthCareService {
    public void initConfig() throws Exception{
    public void initConfig() throws Exception{
        logger.info("初始话参数!");
        logger.info("初始话参数!");
        List<WlyyHospitalSysDictDO> hospitalSysDictDOS = hospitalSysDictDao.findByDictName("ylzConfigTest");
        List<WlyyHospitalSysDictDO> hospitalSysDictDOS = hospitalSysDictDao.findByDictName("ylzConfig");
        if (hospitalSysDictDOS==null||hospitalSysDictDOS.size()==0){
        if (hospitalSysDictDOS==null||hospitalSysDictDOS.size()==0){
            throw new Exception("尚未添加配置参数");
            throw new Exception("尚未添加配置参数");
        }else {
        }else {
            for (WlyyHospitalSysDictDO hospitalSysDictDO:hospitalSysDictDOS){
            for (WlyyHospitalSysDictDO hospitalSysDictDO:hospitalSysDictDOS){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigUrlTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigUrl")){
                    ylzConfigUrl = hospitalSysDictDO.getDictValue();
                    ylzConfigUrl = hospitalSysDictDO.getDictValue();
                }
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppidTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppid")){
                    ylzConfigAppid = hospitalSysDictDO.getDictValue();
                    ylzConfigAppid = hospitalSysDictDO.getDictValue();
                }
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppSecretTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppSecret")){
                    ylzConfigAppSecret = hospitalSysDictDO.getDictValue();
                    ylzConfigAppSecret = hospitalSysDictDO.getDictValue();
                }
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigEncryptKeyTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigEncryptKey")){
                    ylzConfigEncryptKey = hospitalSysDictDO.getDictValue();
                    ylzConfigEncryptKey = hospitalSysDictDO.getDictValue();
                }
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigSignKeyTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigSignKey")){
                    ylzConfigSignKey = hospitalSysDictDO.getDictValue();
                    ylzConfigSignKey = hospitalSysDictDO.getDictValue();
                }
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigOrgCodeTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigOrgCode")){
                    ylzConfigOrgCode = hospitalSysDictDO.getDictValue();
                    ylzConfigOrgCode = hospitalSysDictDO.getDictValue();
                }
                }
            }
            }
@ -1497,6 +1497,7 @@ public class HealthCareService {
        data.put("doctor_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("doctor_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("trt_fee_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("trt_fee_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("dept_code",ylzMedicalRelationDO.getDeptCode());//科室编码
        data.put("dept_code",ylzMedicalRelationDO.getDeptCode());//科室编码
        data.put("disease_code",ylzMedicalRelationDO.getDiseaseCode());//病种编码
        data.put("charge_qty",1);//本次收费次数
        data.put("charge_qty",1);//本次收费次数
        JSONArray array = new JSONArray();
        JSONArray array = new JSONArray();
        JSONObject object = new JSONObject();
        JSONObject object = new JSONObject();

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDiagnosisDao.java

@ -16,6 +16,9 @@ public interface PrescriptionDiagnosisDao extends PagingAndSortingRepository<Wly
    @Query("select a from WlyyPrescriptionDiagnosisDO a where a.prescriptionId = ?1 and a.del=?2 ")
    @Query("select a from WlyyPrescriptionDiagnosisDO a where a.prescriptionId = ?1 and a.del=?2 ")
    List<WlyyPrescriptionDiagnosisDO> findByPrescriptionId(String prescriptionId,Integer del);
    List<WlyyPrescriptionDiagnosisDO> findByPrescriptionId(String prescriptionId,Integer del);
    @Query("select a from WlyyPrescriptionDiagnosisDO a where a.prescriptionId = ?1 and a.del=1 and a.type = ?2 ")
    List<WlyyPrescriptionDiagnosisDO> findByPrescriptionIdAndType(String prescriptionId,Integer type);
    @Modifying
    @Modifying
    @Query("update WlyyPrescriptionDiagnosisDO p set p.del=0 where p.id=?1")
    @Query("update WlyyPrescriptionDiagnosisDO p set p.del=0 where p.id=?1")
    void deleteById(String id);
    void deleteById(String id);

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

@ -622,6 +622,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.consumer as \"consumer\"," +
                " o.consumer as \"consumer\"," +
                " o.consumer_name as \"consumerName\"," +
                " o.consumer_name as \"consumerName\"," +
                " o.consumer_mobile as \"consumerMobile\", "+
                " o.consumer_mobile as \"consumerMobile\", "+
                " o.disease_code as \"diseaseCode\", "+
                " o.disease_name as \"diseaseName\", "+
                " o.fee as \"fee\", ";
                " o.fee as \"fee\", ";
        if ("xm_ykyy_wx".equals(wechatId)) {
        if ("xm_ykyy_wx".equals(wechatId)) {
            if (flag){
            if (flag){
@ -745,6 +747,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("address", basePatientDO.getAddress());
        rs.put("address", basePatientDO.getAddress());
        rs.put("mobile", basePatientDO.getMobile());
        rs.put("mobile", basePatientDO.getMobile());
        rs.put("birthday", DateUtil.dateToStr(basePatientDO.getBirthday(), "yyyy-MM-dd"));
        rs.put("birthday", DateUtil.dateToStr(basePatientDO.getBirthday(), "yyyy-MM-dd"));
        rs.put("diseaseCode",outpatientDO.getDiseaseCode());
        rs.put("diseaseName",outpatientDO.getDiseaseName());
        String hisPatient="";
        String hisPatient="";
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(basePatientDO.getId());
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(basePatientDO.getId());
        if(null!=patientMappingDO){
        if(null!=patientMappingDO){
@ -2532,8 +2536,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    public List<Map<String,Object>> getICD10(String pyKey) throws Exception {
        String sql = "select code,name,py_code,d_code from dict_icd10 where 1=1 ";
    public List<Map<String,Object>> getICD10(String pyKey,String flag) throws Exception {
        String sql = "select code,name,py_code,d_code from dict_icd10 where 1=1 and flag ='"+flag+"' ";
        if (StringUtils.isNoneBlank(pyKey)){
        if (StringUtils.isNoneBlank(pyKey)){
            sql += " and (py_code like '%"+pyKey+"%' or name like '%"+pyKey+"%') ";
            sql += " and (py_code like '%"+pyKey+"%' or name like '%"+pyKey+"%') ";
        }
        }
@ -2695,7 +2699,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param diagnosisJson
     * @param diagnosisJson
     * @return
     * @return
     */
     */
    public Map<String, Object> makeDiagnosis(String outPatientId,String prescriptionId, String advice, String type, String infoJsons, String diagnosisJson, String inspectionJson, String emrJson,String hisId) throws Exception {
    public Map<String, Object> makeDiagnosis(String outPatientId,String prescriptionId, String advice, String type, String infoJsons, String diagnosisJson, String inspectionJson, String emrJson,String hisId,String diseaseCode,String diseaseName) throws Exception {
        Map<String, Object> result = new HashedMap();
        Map<String, Object> result = new HashedMap();
@ -2703,6 +2707,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        WlyyOutpatientDO outpatientDO = outpatientDao.findOne(outPatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findOne(outPatientId);
        //设置医嘱
        //设置医嘱
        outpatientDO.setAdvice(advice);
        outpatientDO.setAdvice(advice);
        //设置特殊病种
        outpatientDO.setDiseaseCode(diseaseCode);
        outpatientDO.setDiseaseName(diseaseName);
        //========================处方操作=============================================================
        //========================处方操作=============================================================
        //创建处方记录
        //创建处方记录
@ -3625,6 +3632,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " p.real_order AS \"realOrder\" ,"+
                " p.real_order AS \"realOrder\" ,"+
                " p.origin_real_order AS \"originRealOrder\"," +
                " p.origin_real_order AS \"originRealOrder\"," +
                " o.patient_name as \"patientName\", "+
                " o.patient_name as \"patientName\", "+
                " o.doctor_name as \"doctorName\", "+
                " p.check_status as \"checkStatus\", "+
                " p.check_status as \"checkStatus\", "+
                " p.check_reason as \"checkReason\"  "+
                " p.check_reason as \"checkReason\"  "+
                " FROM " +
                " FROM " +
@ -7093,7 +7101,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSort");//isSort:1按照后台顺序,0按照系统排序
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSort");//isSort:1按照后台顺序,0按照系统排序
        if (hospitalSysDictDO!=null&&hospitalSysDictDO.getDictValue().equalsIgnoreCase("1")){
        if (hospitalSysDictDO!=null&&hospitalSysDictDO.getDictValue().equalsIgnoreCase("1")){
            sql +=" and d.del='1' order by d.sort asc  ";
            sql +=" and d.del='1' order by d.sort,d.id asc  ";
        }else {
        }else {
            if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
                if (flag){
                if (flag){
@ -14611,6 +14619,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            wlyyHisSettleVO.setOutChargeNo(outChargeNo);
            wlyyHisSettleVO.setOutChargeNo(outChargeNo);
            wlyyHisSettleVO.setOrgCode("6");
            wlyyHisSettleVO.setOrgCode("6");
            wlyyHisSettleVO.setXyzf00("0");
            wlyyHisSettleVO.setXyzf00("0");
            wlyyHisSettleVO.setBqbm00(ylzMedicalRelationDO.getDiseaseCode());
            wlyyHisSettleVO.setChannelType("09");
            wlyyHisSettleVO.setChannelType("09");
            wlyyHisSettleVO.setDjlsh0(ylzMedicalRelationDO.getBillSerial());
            wlyyHisSettleVO.setDjlsh0(ylzMedicalRelationDO.getBillSerial());
            wlyyHisSettleVO.setMzlsh0(ylzMedicalRelationDO.getInsuranceSerial());
            wlyyHisSettleVO.setMzlsh0(ylzMedicalRelationDO.getInsuranceSerial());

+ 12 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -36,10 +36,7 @@ import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.dao.DoctorZsInfoDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionEmrDao;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
@ -189,7 +186,8 @@ public class EntranceService {
    private BusinessOrderDao businessOrderDao;
    private BusinessOrderDao businessOrderDao;
    @Autowired
    @Autowired
    private BasePatientMedicareCardDao basePatientMedicareCardDao;
    private BasePatientMedicareCardDao basePatientMedicareCardDao;
    @Autowired
    private PrescriptionDiagnosisDao diagnosisDao;
    @Autowired
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    @Autowired
    @Autowired
@ -3058,6 +3056,11 @@ public class EntranceService {
            if (StringUtils.isNotEmpty(hisSettleVO.getInsutype())) {
            if (StringUtils.isNotEmpty(hisSettleVO.getInsutype())) {
                sbs.append("<insutype>"+hisSettleVO.getInsutype()+"</insutype>");
                sbs.append("<insutype>"+hisSettleVO.getInsutype()+"</insutype>");
            }
            }
            if (StringUtils.isNotEmpty(hisSettleVO.getBqbm00())){
                sbs.append("<bqbm00>"+hisSettleVO.getBqbm00()+"</bqbm00>");
            }
            sbs.append("<isMedicalNewInterface>1</isMedicalNewInterface>");
            sbs.append("<isMedicalNewInterface>1</isMedicalNewInterface>");
            sbs.append("</root>]]></Msg>");
            sbs.append("</root>]]></Msg>");
@ -3161,6 +3164,8 @@ public class EntranceService {
                    net.sf.json.JSONObject resultJSON = msgInfoJson.getJSONObject("receipt");
                    net.sf.json.JSONObject resultJSON = msgInfoJson.getJSONObject("receipt");
                    if (resultJSON!=null){
                    if (resultJSON!=null){
                        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(resultJSON.getString("xtgzh0"));
                        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(resultJSON.getString("xtgzh0"));
                        List<WlyyPrescriptionDO> prescriptionDOS = prescriptionDao.findByRealOrderAndStatusList(resultJSON.getString("xtgzh0"));
                        String diseaseCode = outpatientDO.getDiseaseCode();
                        List<YlzMedicalIcdDO> icdDOList = new ArrayList<>();
                        List<YlzMedicalIcdDO> icdDOList = new ArrayList<>();
                        List<YlzMedicalMxDO> mxDOList = new ArrayList<>();
                        List<YlzMedicalMxDO> mxDOList = new ArrayList<>();
                        if (ylzMedicalRelationDO==null){
                        if (ylzMedicalRelationDO==null){
@ -3190,6 +3195,7 @@ public class EntranceService {
                            ylzMedicalRelationDO.setPersonAccount("0");
                            ylzMedicalRelationDO.setPersonAccount("0");
                            ylzMedicalRelationDO.setDataSource("53");
                            ylzMedicalRelationDO.setDataSource("53");
                            ylzMedicalRelationDO.setBalance(cardFee+"");
                            ylzMedicalRelationDO.setBalance(cardFee+"");
                            ylzMedicalRelationDO.setDiseaseCode(diseaseCode);
                            ylzMedicalRelationDO.setPreCount(resultJSON.getString("cfxms0"));
                            ylzMedicalRelationDO.setPreCount(resultJSON.getString("cfxms0"));
                            BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
                            BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
                            if (baseDoctorDO!=null){
                            if (baseDoctorDO!=null){
@ -3324,6 +3330,7 @@ public class EntranceService {
                        }else {
                        }else {
                            ylzMedicalRelationDO.setOrgCode("3502000303");
                            ylzMedicalRelationDO.setOrgCode("3502000303");
                            ylzMedicalRelationDO.setRegionCode("350200");
                            ylzMedicalRelationDO.setRegionCode("350200");
                            ylzMedicalRelationDO.setDiseaseCode(diseaseCode);
                            ylzMedicalRelationDO.setIdcard(outpatientDO.getIdcard());
                            ylzMedicalRelationDO.setIdcard(outpatientDO.getIdcard());
                            ylzMedicalRelationDO.setName(resultJSON.getString("xming0"));
                            ylzMedicalRelationDO.setName(resultJSON.getString("xming0"));
                            ylzMedicalRelationDO.setCertType("01");
                            ylzMedicalRelationDO.setCertType("01");

+ 21 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java

@ -300,6 +300,27 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    private String medicalState;//医保状态(1医保0不用医保)
    private String medicalState;//医保状态(1医保0不用医保)
    private String diseaseCode;//特殊病种编码
    private String diseaseName;//特殊病种名称
    @Column(name = "disease_code")
    public String getDiseaseCode() {
        return diseaseCode;
    }
    public void setDiseaseCode(String diseaseCode) {
        this.diseaseCode = diseaseCode;
    }
    @Column(name = "disease_name")
    public String getDiseaseName() {
        return diseaseName;
    }
    public void setDiseaseName(String diseaseName) {
        this.diseaseName = diseaseName;
    }
    @Column(name = "medical_state")
    @Column(name = "medical_state")
    public String getMedicalState() {
    public String getMedicalState() {
        return medicalState;
        return medicalState;

+ 14 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyHisSettleVO.java

@ -238,6 +238,20 @@ public class WlyyHisSettleVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "医保结算时间",example = "医保结算时间")
    @ApiModelProperty(value = "医保结算时间",example = "医保结算时间")
    private String setlTime;
    private String setlTime;
    /**
     * 特殊病种
     */
    @ApiModelProperty(value = "特殊病种",example = "特殊病种")
    private String bqbm00;
    public String getBqbm00() {
        return bqbm00;
    }
    public void setBqbm00(String bqbm00) {
        this.bqbm00 = bqbm00;
    }
    public String getSetlTime() {
    public String getSetlTime() {
        return setlTime;
        return setlTime;
    }
    }

+ 7 - 7
common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java

@ -800,19 +800,19 @@ public class DateUtil {
    public static String getWeekStr(String sdate) {
    public static String getWeekStr(String sdate) {
        String str = "";
        String str = "";
        str = DateUtil.getWeek(sdate);
        str = DateUtil.getWeek(sdate);
        if ("1".equals(str)) {
        if ("1".equals(str)||"Monday".equals(str)) {
            str = "星期日";
            str = "星期日";
        } else if ("2".equals(str)) {
        } else if ("2".equals(str)||"Tuesday".equals(str)) {
            str = "星期一";
            str = "星期一";
        } else if ("3".equals(str)) {
        } else if ("3".equals(str)||"Wednesday".equals(str)) {
            str = "星期二";
            str = "星期二";
        } else if ("4".equals(str)) {
        } else if ("4".equals(str)||"Thursday".equals(str)) {
            str = "星期三";
            str = "星期三";
        } else if ("5".equals(str)) {
        } else if ("5".equals(str)||"Friday".equals(str)) {
            str = "星期四";
            str = "星期四";
        } else if ("6".equals(str)) {
        } else if ("6".equals(str)||"Saturday".equals(str)) {
            str = "星期五";
            str = "星期五";
        } else if ("7".equals(str)) {
        } else if ("7".equals(str)||"Sunday".equals(str)) {
            str = "星期六";
            str = "星期六";
        }
        }
        return str;
        return str;

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/dailyReport/DailyReportUploadPoint.java

@ -667,6 +667,8 @@ public class DailyReportUploadPoint extends EnvelopRestEndpoint {
                                      @RequestParam(value = "content", required = false) String content,
                                      @RequestParam(value = "content", required = false) String content,
                                      @ApiParam(name = "state", value = "-1取消,0待办,1已完成")
                                      @ApiParam(name = "state", value = "-1取消,0待办,1已完成")
                                      @RequestParam(value = "state", required = false) Integer state,
                                      @RequestParam(value = "state", required = false) Integer state,
                                      @ApiParam(name = "dept", value = "部门code")
                                      @RequestParam(value = "dept", required = false) String dept,
                                      @ApiParam(name = "begin_time", value = "begin_time")
                                      @ApiParam(name = "begin_time", value = "begin_time")
                                      @RequestParam(value = "begin_time", required = false) String begin_time,
                                      @RequestParam(value = "begin_time", required = false) String begin_time,
                                      @ApiParam(name = "end_time", value = "end_time")
                                      @ApiParam(name = "end_time", value = "end_time")
@ -676,7 +678,7 @@ public class DailyReportUploadPoint extends EnvelopRestEndpoint {
                                      @ApiParam(name = "createUserName", value = "createUserName")
                                      @ApiParam(name = "createUserName", value = "createUserName")
                                      @RequestParam(value = "createUserName", required = false) String createUserName) {
                                      @RequestParam(value = "createUserName", required = false) String createUserName) {
        try {
        try {
            List<BaseDailyReportItemDO> list = dailyReportUploadService.findReportItemListAdmin(user,projectCode,title,content,state,begin_time,end_time,createUser,createUserName);
            List<BaseDailyReportItemDO> list = dailyReportUploadService.findReportItemListAdmin(user,projectCode,title,content,state,begin_time,end_time,createUser,createUserName,dept);
            return ListEnvelop.getSuccess("success",list);
            return ListEnvelop.getSuccess("success",list);
        } catch (Exception e) {
        } catch (Exception e) {
            return failedListEnvelopException(e);
            return failedListEnvelopException(e);

+ 9 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -626,9 +626,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getICD10)
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getICD10)
    @ApiOperation(value = "获取ICD10诊断编码", notes = "获取ICD10诊断编码")
    @ApiOperation(value = "获取ICD10诊断编码", notes = "获取ICD10诊断编码")
    public ListEnvelop getICD10(@ApiParam(name = "pyKey", value = "拼音关键字")
    public ListEnvelop getICD10(@ApiParam(name = "pyKey", value = "拼音关键字")
                                @RequestParam(value = "pyKey", required = false) String pyKey) throws Exception {
                                @RequestParam(value = "pyKey", required = false) String pyKey,
                                @ApiParam(name = "flag", value = "1是普通诊断2特殊病种")
                                @RequestParam(value = "flag", required = false) String flag) throws Exception {
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")) {
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")) {
            return success(prescriptionService.getICD10(pyKey));
            return success(prescriptionService.getICD10(pyKey,flag));
        } else if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
        } else if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
            return success(xzzxEntranceService.selectIcd10Dict(pyKey));
            return success(xzzxEntranceService.selectIcd10Dict(pyKey));
        } else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")) {
        } else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")) {
@ -729,6 +731,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @RequestParam(value = "outPatientId", required = true) String outPatientId,
                                    @RequestParam(value = "outPatientId", required = true) String outPatientId,
                                    @ApiParam(name = "advice", value = "医嘱")
                                    @ApiParam(name = "advice", value = "医嘱")
                                    @RequestParam(value = "advice", required = false) String advice,
                                    @RequestParam(value = "advice", required = false) String advice,
                                    @ApiParam(name = "diseaseCode", value = "特殊病种")
                                        @RequestParam(value = "diseaseCode", required = false) String diseaseCode,
                                    @ApiParam(name = "diseaseName", value = "特殊病种名称")
                                        @RequestParam(value = "diseaseName", required = false) String diseaseName,
                                    @ApiParam(name = "type", value = "1需要提交his,2不提交只下诊断")
                                    @ApiParam(name = "type", value = "1需要提交his,2不提交只下诊断")
                                    @RequestParam(value = "type", required = true) String type,
                                    @RequestParam(value = "type", required = true) String type,
                                    @ApiParam(name = "infoJsons", value = "药品json")
                                    @ApiParam(name = "infoJsons", value = "药品json")
@ -745,7 +751,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @RequestParam(value = "hisId", required = false) String hisId,
                                    @RequestParam(value = "hisId", required = false) String hisId,
                                    @ApiParam(name = "orderId", value = "上门服务订单号")
                                    @ApiParam(name = "orderId", value = "上门服务订单号")
                                    @RequestParam(value = "orderId", required = false) String orderId) throws Exception {
                                    @RequestParam(value = "orderId", required = false) String orderId) throws Exception {
        Map<String, Object> result = prescriptionService.makeDiagnosis(outPatientId, prescriptionId, advice, type, infoJsons, diagnosisJson, inspectionJson, emrJson, hisId);
        Map<String, Object> result = prescriptionService.makeDiagnosis(outPatientId, prescriptionId, advice, type, infoJsons, diagnosisJson, inspectionJson, emrJson, hisId,diseaseCode,diseaseName);
        try {
        try {
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/SysDictService.java

@ -91,6 +91,8 @@ public class SysDictService {
        Map<String,Object> params = new HashedMap();
        Map<String,Object> params = new HashedMap();
        String sql ="SELECT " +
        String sql ="SELECT " +
                " a.id AS \"id\", " +
                " a.id AS \"id\", " +
                " a.saas_id AS \"saasId\", " +
                " a.py_code AS \"pyCode\", " +
                " a.dict_name AS \"dictName\", " +
                " a.dict_name AS \"dictName\", " +
                " a.dict_code AS \"dictCode\", " +
                " a.dict_code AS \"dictCode\", " +
                " a.dict_value AS \"dictValue\" " +
                " a.dict_value AS \"dictValue\" " +