Sfoglia il codice sorgente

Merge branch 'dev' of huangwenjie/patient-co-management into dev

yeshijie 7 anni fa
parent
commit
f46304161c

+ 37 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -392,16 +392,22 @@ public class SignPatientLabelInfoService extends BaseService {
//                if (p == null) {
//                    continue;
//                }
                PatientVO p = new PatientVO();
                List<PatientVO> plist = new ArrayList<>();
                if(sign.get("patient") != null){
                    String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
                            "  left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
                            "  left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
                            " and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
                            " where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
                    p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
    
                    plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
                    
                    if(plist.isEmpty()){
                        continue;
                    }else{
                        p = plist.get(0);
                    }
                }else{
                    continue;
                }
@ -3821,14 +3827,21 @@ public class SignPatientLabelInfoService extends BaseService {
//                }
                //查找居民 改造成获取绑定的设备和疾病类型--huangwenjie-2017.11.21
                PatientVO p = new PatientVO();
                List<PatientVO> plist = new ArrayList<>();
                if(sign.get("patient") != null){
                    String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
                            "  left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
                            "  left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 AND status =1 " +
                            "  left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
                            " and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
                            " where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
                    p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
                    plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
                    if(plist.isEmpty()){
                        continue;
                    }else{
                        p = plist.get(0);
                    }
                }else{
                    continue;
                }
@ -4259,14 +4272,21 @@ public class SignPatientLabelInfoService extends BaseService {
        if (signList != null && signList.size() > 0) {
            for (Map<String, Object> sign : signList) {
                PatientVO p = new PatientVO();
                List<PatientVO> plist = new ArrayList<>();
                if(sign.get("patient") != null){
                    String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
                            "  left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
                            "  left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
                            " and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
                            " where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
                    p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
                    plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
                    if(plist.isEmpty()){
                        continue;
                    }else{
                        p = plist.get(0);
                    }
                }else{
                    continue;
                }
@ -4463,14 +4483,21 @@ public class SignPatientLabelInfoService extends BaseService {
        if (signList != null && signList.size() > 0) {
            for (Map<String, Object> sign : signList) {
                PatientVO p = new PatientVO();
                List<PatientVO> plist = new ArrayList<>();
                if(sign.get("patient") != null){
                    String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
                            "  left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
                            "  left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
                            " and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
                            " where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
                    p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
                    plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
                    if(plist.isEmpty()){
                        continue;
                    }else{
                        p = plist.get(0);
                    }
                }else{
                    continue;
                }