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

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

 Conflicts:
	business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java
LAPTOP-KB9HII50\70708 6 месяцев назад
Родитель
Сommit
02cc674c2e

+ 8 - 6
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+"%'";
        }
@ -8687,7 +8687,7 @@ public class StatisticsEsService {
        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+"' ";
        if(StringUtils.isNotBlank(deptCode)){
            followupSql = "SELECT COUNT(distinct f.id) planNum,COUNT(distinct if(f.`status`=1,f.id,null)) finishNum from wlyy_followup f,base_doctor_hospital h " +
            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+"' " +
                    " and f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"' ";
        }
@ -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]
@ -8721,9 +8722,11 @@ public class StatisticsEsService {
                turnPersonSqlH += " and dept = '"+deptCode+"' ";
                turnPersonSqlT += " and dept = '"+deptCode+"' ";
                followupSqlH = "SELECT COUNT(distinct f.id) planNum from wlyy_followup f,base_doctor_hospital h " +
                followupSqlH += "SELECT COUNT(f.id) planNum from wlyy_followup f,base_doctor_hospital h " +
                        " where f.doctor_code=h.doctor_code and h.del=1 and h.dept_code='"+deptCode+"' " +
                        " and f.followup_date >='"+period[0]+"' and f.followup_date <='"+period[1]+"' ";
                followupSqlT = "SELECT COUNT(distinct f.id) planNum from wlyy_followup f,base_doctor_hospital h " +
                followupSqlT += "SELECT COUNT(f.id) planNum from wlyy_followup f,base_doctor_hospital h " +
                        " where f.doctor_code=h.doctor_code and h.del=1 and h.dept_code='"+deptCode+"' " +
                        " and f.followup_date >='"+periodYear[0]+"' and f.followup_date <='"+periodYear[1]+"' ";
            }
@ -8845,8 +8848,7 @@ public class StatisticsEsService {
                String healthNum = healthMap.get(currentWeek);
                if(map == null){
                    map = new HashMap<>();
                    String cw[] = currentWeek.split("_");
                    map.put("date",getWeekFistday(Integer.parseInt(cw[0]),Integer.parseInt(cw[1])));
                    map.put("date",currentWeek);
                    map.put("callNum","0");
                    map.put("consultNum","0");
                    map.put("doorNum","0");
@ -8935,8 +8937,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 " +