Browse Source

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

# Conflicts:
#	svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java
wangzhinan 6 years ago
parent
commit
b2610c9cba

+ 7 - 17
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -203,8 +203,8 @@ public class SpecialistService{
                " lb.labelType, " +
                " lb.labelType, " +
                " lb.label, " +
                " lb.label, " +
                " p.photo, " +
                " p.photo, " +
                " h.label_name as health, " +
                " h.label AS healthcode ," +
                " lb.labelName as health, " +
                " lb.label AS healthcode ," +
                " s.health_assistant AS healthAssistant," +
                " s.health_assistant AS healthAssistant," +
                " s.health_assistant_name AS healthAssistantName" +
                " s.health_assistant_name AS healthAssistantName" +
                " FROM " +
                " FROM " +
@ -223,17 +223,6 @@ public class SpecialistService{
                " ) lb " +
                " ) lb " +
                " JOIN "+basedb+".wlyy_patient p ON p. CODE = lb.patient " +
                " JOIN "+basedb+".wlyy_patient p ON p. CODE = lb.patient " +
                " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
                " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  "+basedb+".wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = lb.patient " +
                " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "') AND s.status >=0  AND s.sign_status >0"+
                " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "') AND s.status >=0  AND s.sign_status >0"+
                " LIMIT "+(page-1)*size+","+size;
                " LIMIT "+(page-1)*size+","+size;
        
        
@ -263,7 +252,7 @@ public class SpecialistService{
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,PatientLabelVOs);
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,PatientLabelVOs);
    }
    }
    public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String label, String labelType){
    public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String labelType, String label){
        String sql = "SELECT " +
        String sql = "SELECT " +
                " COUNT(1) as total " +
                " COUNT(1) as total " +
                " FROM " +
                " FROM " +
@ -279,9 +268,10 @@ public class SpecialistService{
                "   i.label = '"+label+"' "+
                "   i.label = '"+label+"' "+
                "  AND i.label_type = '"+labelType+"' " +
                "  AND i.label_type = '"+labelType+"' " +
                "  AND i.`status` = '1' " +
                "  AND i.`status` = '1' " +
                " ) lb " +
                " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
                " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "')  AND s.status >=0  AND s.sign_status >0";
                " AND i.patient in ( " +
                " select patient from  wlyy_specialist_patient_relation  WHERE " +
                "( doctor = '"+doctor+"' OR health_doctor = '"+doctor+"' OR health_assistant='"+doctor+ "' ) AND STATUS >= 0 AND sign_status > 0 )"+
                " ) lb ";
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        Long count = 0L;
        Long count = 0L;
        if(rstotal!=null&&rstotal.size()>0){
        if(rstotal!=null&&rstotal.size()>0){