Browse Source

修改bug

wangzhinan 6 tháng trước cách đây
mục cha
commit
5c1ef5a06b

+ 6 - 5
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -8602,7 +8602,7 @@ public class StatisticsEsService {
        }
        endDate = endDate +" 23:59:59";
        //开通详情
        String sql = "select dept_name,diagnosis_name from base_disease_hospital where status=1 and create_time>='"+startDate+"' and create_time <='"+endDate+"'";
        String sql = "select dept_name,diagnosis_name from base_disease_hospital where status=1 ";
        if(StringUtils.isNotBlank(deptCode)){
            sql += " and dept like '%"+deptCode+"%'";
        }
@ -8685,10 +8685,10 @@ public class StatisticsEsService {
        String followUpTotal = "0";//随访总次数
        String followupCompleteTotal = "0";
        String followupSql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum from wlyy_followup f" +
                " where f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"' ";
                " where f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"'   ";
        if(StringUtils.isNotBlank(deptCode)){
            followupSql += "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum from wlyy_followup f,base_doctor_hospital h " +
                    " where f.doctor_code=h.doctor_code and h.del=1 and h.dept_code='"+deptCode+"' " +
                    " where f.doctor_code=h.doctor_code  and h.del=1 and h.dept_code='"+deptCode+"' " +
                    " and f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"' ";
        }
        Map<String,Object> followupMap = jdbcTemplate.queryForMap(followupSql);
@ -8698,6 +8698,7 @@ public class StatisticsEsService {
        String rate = getTwoRange(Integer.parseInt(followupCompleteTotal),Integer.parseInt(followUpTotal),0);
        jsonObject.put("followupCompleteRate",rate);
        jsonObject.put("followupTotal",followUpTotal);
        jsonObject.put("followupCompleteTotal",followupCompleteTotal);
        if("1".equals(isRate)){
            // 计算上一个周期  开始时间period[0] 、结束时间period[1]
@ -8924,8 +8925,8 @@ public class StatisticsEsService {
        }
        endDate = endDate +" 23:59:59";
        String sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum, " +
                "COUNT(if(f.`status`=1,if(f.followup_date<f.followup_plan_date,1,null ),null)) ontimeNum, " +
                "COUNT(if(f.followup_date>=f.followup_plan_date,1,null)) overTimeNum,count(DISTINCT f.patient_code) patientNum " +
                "COUNT(if(f.`status`=1,if(f.followup_date<=f.followup_plan_date,1,null ),null)) ontimeNum, " +
                "COUNT(if(f.followup_date>f.followup_plan_date,1,null)) overTimeNum,count(DISTINCT IF(f.status=1,(f.patient_code),NULL)) patientNum " +
                ",f.doctor_name doctorName,h.dept_name deptName" +
                " from wlyy_followup f,base_doctor_hospital h " +
                "WHERE f.doctor_code=h.doctor_code and h.del=1 " +