Browse Source

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

trick9191 7 years ago
parent
commit
a6a61ae016

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

@ -176,8 +176,10 @@ public class SignPatientLabelInfoService extends BaseService {
            json.put("jtHospitalName", familySign.getHospitalName());
            json.put("jtHospitalName", familySign.getHospitalName());
            if(StringUtils.isNotBlank(familySign.getSpecialPopulation())){
            if(StringUtils.isNotBlank(familySign.getSpecialPopulation())){
                json.put("jtServerName", familySign.getSpecialPopulationName()==null?"":familySign.getSpecialPopulationName());
                json.put("jtServerName", familySign.getSpecialPopulationName()==null?"":familySign.getSpecialPopulationName());
                json.put("jtServer", familySign.getSpecialPopulationName()==null?"":familySign.getSpecialPopulation());
            }else{
            }else{
                json.put("jtServerName", familySign.getServerTypeName()==null?"":familySign.getServerTypeName());
                json.put("jtServerName", familySign.getServerTypeName()==null?"":familySign.getServerTypeName());
                json.put("jtServer", familySign.getServerTypeName()==null?"":familySign.getServerType());
            }
            }
@ -1105,13 +1107,16 @@ public class SignPatientLabelInfoService extends BaseService {
        for (SignPatientLabelInfo label : labels) {
        for (SignPatientLabelInfo label : labels) {
            labelMap.put(label.getLabel(), label);
            labelMap.put(label.getLabel(), label);
            SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4");
            SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4");
            if (!custList.contains(label.getLabel())) {
                if (lb.getLabelCode().equals("1") || lb.getLabelCode().equals("2") || teamCodes.contains(String.valueOf(lb.getTeamCode()))) {
                    label.setStatus(0);
                    labelInfoDao.save(label);
            if(lb!=null) {
                if (!custList.contains(label.getLabel())) {
                    if (lb.getLabelCode().equals("1") || lb.getLabelCode().equals("2") || teamCodes.contains(String.valueOf(lb.getTeamCode()))) {
                        label.setStatus(0);
                        labelInfoDao.save(label);
                    }
                }
                }
            }
            }
        }
        }
        if (customArr != null && customArr.length > 0) {
        if (customArr != null && customArr.length > 0) {
@ -1333,11 +1338,12 @@ public class SignPatientLabelInfoService extends BaseService {
        for (SignPatientLabelInfo label : labels) {
        for (SignPatientLabelInfo label : labels) {
            labelMap.put(label.getLabel(), label);
            labelMap.put(label.getLabel(), label);
            SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4");
            SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4");
            if (!custList.contains(label.getLabel())) {
                if (lb.getLabelCode().equals("1") || lb.getLabelCode().equals("2") || teamCodes.contains(String.valueOf(lb.getTeamCode()))) {
                    label.setStatus(0);
                    labelInfoDao.save(label);
            if(lb!=null){
                if (!custList.contains(label.getLabel())) {
                    if (lb.getLabelCode().equals("1") || lb.getLabelCode().equals("2") || teamCodes.contains(String.valueOf(lb.getTeamCode()))) {
                        label.setStatus(0);
                        labelInfoDao.save(label);
                    }
                }
                }
            }
            }
        }
        }

+ 4 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -595,7 +595,7 @@ public class PatientService extends TokenService {
    public JSONArray getSignByTeamCodeGpbyServer(Long teamCode){
    public JSONArray getSignByTeamCodeGpbyServer(Long teamCode){
        // 获取总分组数量
        // 获取总分组数量
        String totalGSql = "SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE f.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.server_type IS NOT NULL GROUP BY f.server_type ORDER BY f.server_type DESC";
        String totalGSql = "SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE f.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.server_type IS NOT NULL GROUP BY f.server_type ORDER BY f.server_type ASC";
        List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
        List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
        //获取关注量分组数量
        //获取关注量分组数量
@ -603,7 +603,7 @@ public class PatientService extends TokenService {
        List<Map<String,Object>> fousG = jdbcTemplate.queryForList(fousGSql);
        List<Map<String,Object>> fousG = jdbcTemplate.queryForList(fousGSql);
        //获取二级节点分组总数
        //获取二级节点分组总数
        String sesTotalSql ="SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName  FROM wlyy_sign_family f WHERE f.admin_team_code ="+teamCode+" AND f.`status`>0  AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population DESC ";
        String sesTotalSql ="SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName  FROM wlyy_sign_family f WHERE f.admin_team_code ="+teamCode+" AND f.`status`>0  AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population ASC ";
        List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
        List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
        //获取二级节点分组数量
        //获取二级节点分组数量
@ -695,7 +695,7 @@ public class PatientService extends TokenService {
    public JSONArray getSignByDoctorCodeGpbyServer(String doctor){
    public JSONArray getSignByDoctorCodeGpbyServer(String doctor){
        // 获取总分组数量
        // 获取总分组数量
        String totalGSql = "SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') AND f.`status`>0 AND f.server_type IS NOT NULL GROUP BY f.server_type ORDER BY f.server_type DESC";
        String totalGSql = "SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') AND f.`status`>0 AND f.server_type IS NOT NULL GROUP BY f.server_type ORDER BY f.server_type ASC";
        List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
        List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
        //获取关注量分组数量
        //获取关注量分组数量
@ -703,7 +703,7 @@ public class PatientService extends TokenService {
        List<Map<String,Object>> fousG = jdbcTemplate.queryForList(fousGSql);
        List<Map<String,Object>> fousG = jdbcTemplate.queryForList(fousGSql);
        //获取二级节点分组总数
        //获取二级节点分组总数
        String sesTotalSql ="SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName  FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"')  AND f.`status`>0  AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population DESC ";
        String sesTotalSql ="SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName  FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"')  AND f.`status`>0  AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population ASC ";
        List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
        List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
        //获取二级节点分组数量
        //获取二级节点分组数量

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -368,6 +368,7 @@ public class SignPatientLabelInfoController extends BaseController {
                return error(-1, "更新失败");
                return error(-1, "更新失败");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }