Procházet zdrojové kódy

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
wangzhinan před 6 měsíci
rodič
revize
0532e9839b

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

@ -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+"' " +
            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+"' ";
        }
        Map<String,Object> followupMap = jdbcTemplate.queryForMap(followupSql);
@ -9118,7 +9118,7 @@ public class StatisticsEsService {
        }
        endDate = endDate +" 23:59:59";
        String sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,h.dept_name name " +
        String sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,h.dept_name name,h.dept_code code" +
                " from wlyy_followup f,base_doctor_hospital h " +
                "WHERE f.doctor_code=h.doctor_code and h.del=1 and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"' ";
        if(StringUtils.isNotBlank(dept)){
@ -9126,11 +9126,11 @@ public class StatisticsEsService {
        }
        sql += " GROUP BY h.dept_name ";
        if("2".equals(type)){
            sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name " +
            sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name,f.doctor_code code " +
                    " from wlyy_followup f WHERE 1=1 and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"'" +
                    " GROUP BY f.doctor_name";
            if(StringUtils.isNotBlank(dept)){
                sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name " +
                sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name,f.doctor_code code " +
                        " from wlyy_followup f,base_doctor_hospital h " +
                        "WHERE f.doctor_code=h.doctor_code and h.del=1 and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"' "+
                        " and h.dept_code = '"+ dept +"' GROUP BY f.doctor_name";

+ 15 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/service/FollowUpService.java

@ -92,7 +92,7 @@ public class FollowUpService {
    public PageEnvelop followupPage(String businessType, String businessSource, String startDate, String endDate, String patientName,
                                    String keyName,String followupStatus,String doctorName, Integer page, Integer size){
        String sql = "SELECT DISTINCT f.id,f.patient_name patientName,f.patient_code patientCode,p.photo,p.idcard,p.birthday,p.sex,p.mobile, " +
                "f.doctor_code doctorCode,f.doctor_name doctorName,pl.disease_name businessTypeName,pl.disease businessType, " +
                "f.doctor_code doctorCode,f.doctor_name doctorName,pl.disease_name businessTypeName,pl.disease businessType,ip.id itemPlanId, " +
                "h.dept_code deptCode,h.dept_name deptName,f.`status`,date_format(f.followup_date, '%Y-%m-%d %H:%i:%s') followupDate,'诊后康复' businessSource," +
                "date_format(f.followup_plan_date, '%Y-%m-%d %H:%i:%s') followupPlanDate,date_format(pl.create_time, '%Y-%m-%d %H:%i:%s') turnDownDate," +
                "pl.plan_doctor_name planDoctorName,h2.dept_name turnDownDeptName ";
@ -105,7 +105,13 @@ public class FollowUpService {
                "LEFT JOIN base_doctor_hospital h2 on pl.plan_doctor=h2.doctor_code and h2.del=1 " +
                "WHERE 1=1 ";
        if(StringUtils.isNotBlank(businessType)){
            filter += " and pl.disease='"+businessType+"' ";
            if(businessType.contains(",")){
                businessType = businessType.replace(",","','");
                businessType = " in ('"+businessType+"') ";
            }else {
                businessType = " = '"+businessType+"' ";
            }
            filter += " and pl.disease "+businessType+" ";
        }
        if(StringUtils.isNotBlank(businessSource)){
@ -175,7 +181,13 @@ public class FollowUpService {
                "LEFT JOIN base_doctor_hospital h2 on pl.plan_doctor=h2.doctor_code and h2.del=1 " +
                "WHERE 1=1 ";
        if(StringUtils.isNotBlank(businessType)){
            filter += " and pl.disease='"+businessType+"' ";
            if(businessType.contains(",")){
                businessType = businessType.replace(",","','");
                businessType = " in ('"+businessType+"') ";
            }else {
                businessType = " = '"+businessType+"' ";
            }
            filter += " and pl.disease "+businessType+" ";
        }
        if(StringUtils.isNotBlank(businessSource)){