Parcourir la source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenweida il y a 8 ans
Parent
commit
21fb022f2c

+ 2 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/SignPatientLabelInfoDao.java

@ -58,6 +58,7 @@ public interface SignPatientLabelInfoDao extends
     * @return
     */
    @Modifying
    @Query("update SignPatientLabelInfo set status = 0 where patient = ?1 and labelType = ?2 and status = ?3")
    int deleteByPatientAndLabelTypeAndStatus(String patient, String labelType, Integer status);
    @Modifying
@ -73,4 +74,5 @@ public interface SignPatientLabelInfoDao extends
    @Modifying
    @Query("update SignPatientLabelInfo a set a.labelName = ?1 where a.label= ?2 and a.labelType = '4' ")
    int updateLabelName(String labelName,String labelCode);
}

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

@ -509,9 +509,6 @@ public class SignPatientLabelInfoService extends BaseService {
    }
    /**
     * 查询某个标签类型的所有标签居民数统计
     *
@ -526,7 +523,7 @@ public class SignPatientLabelInfoService extends BaseService {
            throw new Exception("doctor info can not find");
        }
        List<SignPatientLabel> labels = labelService.getLabelsByTypeAndTeam(labelType, teamCode);
        List<SignPatientLabel> labels = labelService.getLabelsByTypeAndTeam(labelType, teamCode.toString());
        JSONArray result = new JSONArray();
        SignPatientLabel labelNo = new SignPatientLabel();
@ -653,13 +650,15 @@ public class SignPatientLabelInfoService extends BaseService {
        return result;
    }
    /**
     *
     */
    public int getPatientAmountByTeam(Long teamCode) throws Exception{
        List<SignFamily> signFamilies =  signFamilyDao.findByAdminTeamIdAndStatus(teamCode, 1);
    public int getPatientAmountByTeam(Long teamCode) throws Exception {
        List<SignFamily> signFamilies = signFamilyDao.findByAdminTeamIdAndStatus(teamCode, 1);
        return signFamilies.size();
    }
    /**
     * 查询某个标签类型的所有标签居民数统计,或者所有类型
     *
@ -667,14 +666,14 @@ public class SignPatientLabelInfoService extends BaseService {
     * @param teamCode  标签类型为4时,不能为空
     * @return
     */
    public JSONArray getPatientAmountByTeamGroupLable(Long teamCode,String labelType) throws Exception {
    public JSONArray getPatientAmountByTeamGroupLable(Long teamCode, String labelType) throws Exception {
        Boolean isAll = false;
        List<SignPatientLabel> labels = new ArrayList<>();
        if("0".equals(labelType)){
            labels =  labelService.getTeamAllLabels(teamCode);
        if ("0".equals(labelType)) {
            labels = labelService.getTeamAllLabels(teamCode);
            isAll = true;
        }else{
            labels = labelService.getLabelsByTypeAndTeam(labelType,teamCode);
        } else {
            labels = labelService.getLabelsByTypeAndTeam(labelType, teamCode.toString());
        }
        JSONArray result = new JSONArray();
@ -693,8 +692,8 @@ public class SignPatientLabelInfoService extends BaseService {
        if (labels != null) {
            for (SignPatientLabel label : labels) {
                if(isAll){//查询所有
                 labelType  =  label.getLabelType();
                if (isAll) {//查询所有
                    labelType = label.getLabelType();
                }
                JSONObject json = new JSONObject();
@ -736,7 +735,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        throw new Exception("label is not exist");
                    }
                    if (teamCode > 0) {
                        args = new Object[]{teamCode,teamCode};
                        args = new Object[]{teamCode, teamCode};
                    } else {
                        args = new Object[]{};
                    }
@ -755,9 +754,9 @@ public class SignPatientLabelInfoService extends BaseService {
                                (teamCode > 0 ? "    AND t1.admin_team_code = ? " : "");
                        if (teamCode > 0) {
                            args = new Object[]{labelType, teamCode, labelType,teamCode};
                            args = new Object[]{labelType, teamCode, labelType, teamCode};
                        } else {
                            args = new Object[]{labelType,labelType};
                            args = new Object[]{labelType, labelType};
                        }
                    } else {
                        sql = " SELECT " +
@ -804,8 +803,6 @@ public class SignPatientLabelInfoService extends BaseService {
    }
    /**
     * 设置患者标签
     *
@ -817,7 +814,7 @@ public class SignPatientLabelInfoService extends BaseService {
     * @param custom      自定义标签
     * @return
     */
    public int setPatientLabels(String patient, String idcard, String patientName, String health, String disease, String custom) {
    public int setPatientLabels(String patient, String idcard, String patientName, String health, String disease, String custom, String doctor) {
        Patient p = patientDao.findByCode(patient);
        if (p == null && (StringUtils.isEmpty(idcard) || StringUtils.isEmpty(patientName))) {
@ -843,122 +840,184 @@ public class SignPatientLabelInfoService extends BaseService {
            }
        }
        JSONArray teams = adminTeamService.findPatientDoctorTeam(patient, doctor);
        List<String> teamCodes = new ArrayList<>();
        if(teams.length() > 0){
            for(int i = 0; i < teams.length(); i++){
                teamCodes.add(String.valueOf(teams.getJSONObject(i).getLong("id")));
            }
        } else {
            return -4;
        }
        String[] diseaseArr = disease.split(",");
        String[] customArr = custom.split(",");
        // 健康情况标签
        int healthAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "2", 1);
        if (StringUtils.isNotEmpty(health)) {
            SignPatientLabelInfo healthLabel = new SignPatientLabelInfo();
            SignPatientLabel label = labelService.getLabelByCodeAndType(health, "2");
            SignPatientLabelInfo healthEx = labelInfoDao.findByPatientAndLabelAndLabelTypeAndStatus(patient, health, "2", 1);
            if (label == null) {
                return -1;
            }
            if (healthEx == null) {
                // 健康情况标签
                int healthAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "2", 1);
            healthLabel.setPatient(patient);
            healthLabel.setPname(patientName);
            healthLabel.setLabelType("2");
            healthLabel.setLabel(health);
            healthLabel.setLabelName(label.getLabelName());
            healthLabel.setStatus(1);
            healthLabel.setCzrq(new Date());
                SignPatientLabelInfo healthLabel = new SignPatientLabelInfo();
                SignPatientLabel label = labelService.getLabelByCodeAndType(health, "2");
            labelInfoDao.save(healthLabel);
                if (label == null) {
                    return -1;
                }
                healthLabel.setPatient(patient);
                healthLabel.setPname(patientName);
                healthLabel.setLabelType("2");
                healthLabel.setLabel(health);
                healthLabel.setLabelName(label.getLabelName());
                healthLabel.setStatus(1);
                healthLabel.setCzrq(new Date());
                labelInfoDao.save(healthLabel);
            }
        } else {
            return -2;
        }
        // 疾病类型标签
        int disAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "3", 1);
        if (diseaseArr != null && diseaseArr.length > 0) {
            List<SignPatientLabelInfo> labels = labelInfoDao.findByPatientAndLabelTypeAndStatus(patient, "3", 1);
            Map<String, SignPatientLabelInfo> labelMap = new HashMap<>();
            List<String> disList = Arrays.asList(diseaseArr);
            for (SignPatientLabelInfo label : labels) {
                labelMap.put(label.getLabel(), label);
                if (!disList.contains(label.getLabel())) {
                    label.setStatus(0);
                    labelInfoDao.save(label);
                }
            }
            for (String diseaseLabel : diseaseArr) {
                if (StringUtils.isEmpty(diseaseLabel)) {
                    continue;
                }
                SignPatientLabelInfo disLabel = new SignPatientLabelInfo();
                SignPatientLabel label = labelService.getLabelByCodeAndType(diseaseLabel, "3");
                if (label == null) {
                    return -1;
                }
                SignPatientLabelInfo diseaseEx = labelMap.get(diseaseLabel);
                disLabel.setPatient(patient);
                disLabel.setPname(patientName);
                disLabel.setLabelType("3");
                disLabel.setLabel(diseaseLabel);
                disLabel.setLabelName(label.getLabelName());
                disLabel.setStatus(1);
                disLabel.setCzrq(new Date());
                if (diseaseEx == null) {
                    SignPatientLabelInfo disLabel = new SignPatientLabelInfo();
                    SignPatientLabel label = labelService.getLabelByCodeAndType(diseaseLabel, "3");
                labelInfoDao.save(disLabel);
                    if (label == null) {
                        return -1;
                    }
                    disLabel.setPatient(patient);
                    disLabel.setPname(patientName);
                    disLabel.setLabelType("3");
                    disLabel.setLabel(diseaseLabel);
                    disLabel.setLabelName(label.getLabelName());
                    disLabel.setStatus(1);
                    disLabel.setCzrq(new Date());
                    labelInfoDao.save(disLabel);
                }
            }
        } else {
            // 疾病类型标签
            int disAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "3", 1);
        }
        // 自定义标签
        int cusAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "4", 1);
        List<SignPatientLabelInfo> labels = labelInfoDao.findByPatientAndLabelTypeAndStatus(patient, "4", 1);
        Map<String, SignPatientLabelInfo> labelMap = new HashMap<>();
        List<String> custList = Arrays.asList(customArr);
        for (SignPatientLabelInfo label : labels) {
            labelMap.put(label.getLabel(), label);
            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 (customArr != null && customArr.length > 0) {
            for (String customLabel : customArr) {
                if (StringUtils.isEmpty(customLabel)) {
                    continue;
                }
                SignPatientLabelInfo cusLabel = new SignPatientLabelInfo();
                SignPatientLabel label = labelService.getLabelByCodeAndType(customLabel, "4");
                SignPatientLabelInfo customEx = labelMap.get(customLabel);
                if (label == null) {
                    return -1;
                }
                if (customEx == null) {
                    SignPatientLabelInfo cusLabel = new SignPatientLabelInfo();
                    SignPatientLabel label = labelService.getLabelByCodeAndType(customLabel, "4");
                    if (label == null) {
                        return -1;
                    }
                cusLabel.setPatient(patient);
                cusLabel.setPname(patientName);
                cusLabel.setLabelType("4");
                cusLabel.setLabel(customLabel);
                cusLabel.setLabelName(label.getLabelName());
                cusLabel.setStatus(1);
                cusLabel.setCzrq(new Date());
                    cusLabel.setPatient(patient);
                    cusLabel.setPname(patientName);
                    cusLabel.setLabelType("4");
                    cusLabel.setLabel(customLabel);
                    cusLabel.setLabelName(label.getLabelName());
                    cusLabel.setStatus(1);
                    cusLabel.setCzrq(new Date());
                labelInfoDao.save(cusLabel);
                    labelInfoDao.save(cusLabel);
                }
            }
        }
        // 卫计委三大分组
        int wjwAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "1", 1);
        if (diseaseArr != null && diseaseArr.length > 0 && (Arrays.asList(diseaseArr).contains("1")
                || Arrays.asList(diseaseArr).contains("2"))) {
            SignPatientLabelInfo disLabel = new SignPatientLabelInfo();
            SignPatientLabelInfo mbEx = labelInfoDao.findByPatientAndLabelAndLabelTypeAndStatus(patient, "2", "1", 1);
            disLabel.setPatient(patient);
            disLabel.setPname(patientName);
            disLabel.setLabelType("1");
            disLabel.setLabel("2");
            disLabel.setLabelName("慢病人群");
            disLabel.setStatus(1);
            disLabel.setCzrq(new Date());
            if(mbEx == null) {
                // 卫计委三大分组
                int wjwAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "1", 1);
                SignPatientLabelInfo disLabel = new SignPatientLabelInfo();
                disLabel.setPatient(patient);
                disLabel.setPname(patientName);
                disLabel.setLabelType("1");
                disLabel.setLabel("2");
                disLabel.setLabelName("慢病人群");
                disLabel.setStatus(1);
                disLabel.setCzrq(new Date());
            labelInfoDao.save(disLabel);
                labelInfoDao.save(disLabel);
            }
        } else {
            int age = IdCardUtil.getAgeForIdcard(idcard);
            SignPatientLabelInfo disLabel = new SignPatientLabelInfo();
            disLabel.setPatient(patient);
            disLabel.setPname(patientName);
            disLabel.setLabelType("1");
            disLabel.setStatus(1);
            disLabel.setCzrq(new Date());
            if (age >= 65) {
                disLabel.setLabel("3");
                disLabel.setLabelName("65岁以上人群");
            String lbCode = "",lbName = "";
            if(age >= 65){
                lbCode = "3";
                lbName = "65岁以上人群";
            } else {
                disLabel.setLabel("1");
                disLabel.setLabelName("普通人群");
                lbCode = "1";
                lbName = "普通人群";
            }
            labelInfoDao.save(disLabel);
            SignPatientLabelInfo wjwEx = labelInfoDao.findByPatientAndLabelAndLabelTypeAndStatus(patient, lbCode, "1", 1);
            if(wjwEx == null) {
                // 卫计委三大分组
                int wjwAmount = labelInfoDao.deleteByPatientAndLabelTypeAndStatus(patient, "1", 1);
                SignPatientLabelInfo disLabel = new SignPatientLabelInfo();
                disLabel.setPatient(patient);
                disLabel.setPname(patientName);
                disLabel.setLabelType("1");
                disLabel.setStatus(1);
                disLabel.setCzrq(new Date());
                disLabel.setLabel(lbCode);
                disLabel.setLabelName(lbName);
                labelInfoDao.save(disLabel);
            }
        }
        return 1;
@ -990,7 +1049,7 @@ public class SignPatientLabelInfoService extends BaseService {
     * @param labelType 标签类型
     * @return
     */
    public JSONArray getPatientLabelByLabelTypeAndTeamCode(String patient, String labelType, Long teamCode, String doctor) {
    public JSONArray getPatientLabelByLabelTypeAndTeamCode(String patient, String labelType, long teamCode, String doctor) {
        List<SignPatientLabelInfo> labels = new ArrayList<>();
        JSONArray result = new JSONArray();
@ -1000,10 +1059,11 @@ public class SignPatientLabelInfoService extends BaseService {
            labels = labelInfoDao.findByPatientAndLabelTypeAndStatus(patient, labelType, 1);
        }
        // 查询居民签约团队
        SignFamily ssSign = signFamilyDao.findSignByPatient(patient, 1);
        SignFamily jtSign = signFamilyDao.findSignByPatient(patient, 2);
        Long ssTeam = 0L;
        Long jtTeam = 0L;
        long ssTeam = 0L;
        long jtTeam = 0L;
        if (ssSign != null && (doctor.equals(ssSign.getDoctor()) ||
                doctor.equals(ssSign.getDoctorHealth()))) {
@ -1021,10 +1081,27 @@ public class SignPatientLabelInfoService extends BaseService {
                if (label.getLabelType().equals("4") && !label.getLabel().equals("1") && !label.getLabel().equals("2")) {
                    SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4");
                    if (teamCode != null && teamCode > 0 && teamCode != lb.getTeamCode()) {
                    // 有指定团队时不在团队内的过滤
                    if (teamCode > 0 && teamCode != lb.getTeamCode()) {
                        continue;
                    }
                    if (teamCode < 1) {
                        // 是否为签约团队标签
                        boolean teamLabelFlag = false;
                        if (ssTeam > 0 && ssTeam == lb.getTeamCode()) {
                            teamLabelFlag = true;
                        }
                        if (jtTeam > 0 && jtTeam == lb.getTeamCode()) {
                            teamLabelFlag = true;
                        }
                        // 有签约关系时,判断标签是否在签约团队标签,不是签约团队标签不显示;无签约关系时返回全部
                        if ((ssTeam > 0 || jtTeam > 0) && !teamLabelFlag) {
                            continue;
                        }
                    }
                    AdminTeam team = adminTeamService.getTeam(lb.getTeamCode());
                    Doctor doc = doctorDao.findByCode(lb.getCreator());
@ -1317,9 +1394,6 @@ public class SignPatientLabelInfoService extends BaseService {
    }
    /**
     * 添加居民到某个标签
     *
@ -1503,10 +1577,10 @@ public class SignPatientLabelInfoService extends BaseService {
        } else if (StringUtils.isEmpty(labelCode) && StringUtils.isNotEmpty(labelType)) {
            args = new Object[]{labelType, "%" + filter + "%", "%" + filter + "%"};
        } else {
            args = new Object[]{ "%" + filter + "%", "%" + filter + "%"};
            args = new Object[]{"%" + filter + "%", "%" + filter + "%"};
        }
       String sql = "select DISTINCT t.* from (" + sqlTemp+ ") t limit " + page + "," + pagesize;
        String sql = "select DISTINCT t.* from (" + sqlTemp + ") t limit " + page + "," + pagesize;
        signList = jdbcTemplate.queryForList(sql, args);
        if (signList != null && signList.size() > 0) {
@ -1632,19 +1706,19 @@ public class SignPatientLabelInfoService extends BaseService {
     * @param filter 搜索关键字
     * @return
     */
    public JSONArray searchTeamsPatients(String filter,  long teamCode, int page, int pagesize) throws Exception {
    public JSONArray searchTeamsPatients(String filter, long teamCode, int page, int pagesize) throws Exception {
        JSONArray reArray = new JSONArray();
        Map<String, JSONArray> map = new HashMap<>();
        Map<Long, AdminTeam> teamMap = new HashMap<>();
        List<AdminTeam> teams = null;
        int start = page * pagesize;
        int size = pagesize;
            teams = new ArrayList<>();
            AdminTeam teamTemp = adminTeamService.getTeam(teamCode);
            if (teamTemp == null) {
                throw new Exception("adminTeam is not exist");
            }
            teams.add(teamTemp);
        teams = new ArrayList<>();
        AdminTeam teamTemp = adminTeamService.getTeam(teamCode);
        if (teamTemp == null) {
            throw new Exception("adminTeam is not exist");
        }
        teams.add(teamTemp);
        String sql = "select distinct t.* from (" +
                " select " +
@ -1731,7 +1805,7 @@ public class SignPatientLabelInfoService extends BaseService {
        String tempsql = " select * from wlyy_sign_family where " +
                " status > 0 and admin_team_code = ? ";
        args = new Object[]{ teamCode};
        args = new Object[]{teamCode};
        sql = "select t.* from (" + tempsql + ") t limit " + start + "," + pagesize;
        signList = jdbcTemplate.queryForList(sql, args);

+ 46 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelService.java

@ -59,6 +59,44 @@ public class SignPatientLabelService extends BaseService {
        return labelDao.save(label);
    }
    /**
     * 新增自定义标签
     *
     * @param lableName 标签名称
     * @param creator   创建人
     * @param teamCode  所属团队
     * @return
     */
    public List<SignPatientLabel> addTeamsLabel(String lableName, String creator, String teamCode) throws Exception {
        String[] teams = teamCode.split(",");
        List<SignPatientLabel> result = new ArrayList<>();
        if (teams.length > 0) {
            for (String team : teams) {
                SignPatientLabel lbEx = isLabelNameExist(lableName, Long.valueOf(team));
                if (lbEx != null) {
                    throw new Exception("团队下该标签名称已经存在");
                }
                SignPatientLabel label = new SignPatientLabel();
                label.setLabelCode(getCode());
                label.setLabelName(lableName);
                label.setLabelType("4");
                label.setIsSystem(0);
                label.setCreator(creator);
                label.setTeamCode(Long.valueOf(team));
                label.setStatus(1);
                label.setCzrq(new Date());
                result.add(labelDao.save(label));
            }
        }
        return result;
    }
    /**
     * 查询某个标签名称是否存在
     *
@ -102,7 +140,7 @@ public class SignPatientLabelService extends BaseService {
        label.setCzrq(new Date());
        labelLogDao.save(log);
        labelInfoDao.updateLabelName(newName,labelCode);
        labelInfoDao.updateLabelName(newName, labelCode);
        return 1;
    }
@ -174,12 +212,16 @@ public class SignPatientLabelService extends BaseService {
     * @param teamCode 团队code
     * @return
     */
    public List<SignPatientLabel> getLabelsByTypeAndTeam(String labelType, Long teamCode) {
    public List<SignPatientLabel> getLabelsByTypeAndTeam(String labelType, String teamCode) {
        List<SignPatientLabel> labels = new ArrayList<>();
        if (labelType.equals("4")) {
            // 自定义标签
            labels = labelDao.findCustomLabels(teamCode);
            String[] teams = teamCode.split(",");
            for (String team : teams) {
                // 自定义标签
                labels.addAll(labelDao.findCustomLabels(Long.valueOf(team)));
            }
        } else {
            labels = labelDao.findByLabelTypeAndStatus(labelType, 1);
        }

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -904,7 +904,7 @@ public class FamilyContractService extends BaseService {
        // 患者标签设置
        if (!(labelInfoService.setPatientLabels(patient.getCode(), patient.getIdcard(),
                patient.getName(), healthLabel, disease, customLabel) == 1)) {
                patient.getName(), healthLabel, disease, customLabel, sf.getDoctor()) == 1)) {
            throw new Exception("patient sign label settting error:" + patient.getIdcard());
        }
@ -1106,7 +1106,7 @@ public class FamilyContractService extends BaseService {
        // 患者标签设置
        if (!(labelInfoService.setPatientLabels(p.getCode(), p.getIdcard(),
                p.getName(), healthLabel, disease, customLabel) == 1)) {
                p.getName(), healthLabel, disease, customLabel, sf.getDoctor()) == 1)) {
            throw new Exception("patient sign label settting error:" + p.getIdcard());
        }

+ 3 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -350,7 +350,9 @@ public class AdminTeamService extends BaseService {
        if (jtSign != null && (doctor.equals(jtSign.getDoctor())
                || doctor.equals(jtSign.getDoctorHealth()))) {
            AdminTeam team = getTeam(jtSign.getAdminTeamId());
            result.put(new JSONObject(team));
            if(ssSign == null || (long)ssSign.getAdminTeamId() != jtSign.getAdminTeamId()) {
                result.put(new JSONObject(team));
            }
        }
        return result;

+ 36 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelController.java

@ -65,6 +65,40 @@ public class SignPatientLabelController extends BaseController {
        }
    }
    /**
     * 添加标签
     *
     * @param labelName 标签名称
     * @param teamCode  所属团队
     * @return
     */
    @RequestMapping(value = "/add/teams")
    public String addTeamsLabel(@RequestParam String labelName, @RequestParam String teamCode) {
        try {
            if (StringUtils.isEmpty(labelName)) {
                return error(-1, "标签名称不能为空");
            }
            if (teamCode == null) {
                return error(-1, "所属团队不能为空");
            }
            if (labelName.equals("孕产妇") || labelName.equals("儿童")) {
                return error(-1, "该标签名称已存在");
            }
            List<SignPatientLabel> labels = labelService.addTeamsLabel(labelName, getUID(), teamCode);
            if (labels.size() > 0) {
                return write(200, "添加成功", "data", labels);
            } else {
                return error(-1, "添加失败");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "添加失败");
        }
    }
    /**
     * 更新标签
     *
@ -185,12 +219,12 @@ public class SignPatientLabelController extends BaseController {
     * @return
     */
    @RequestMapping(value = "/labels_by_type")
    public String getLabelsByTypeAndTeam(String labelType, @RequestParam(required = false) Long teamCode) {
    public String getLabelsByTypeAndTeam(@RequestParam String labelType, @RequestParam(required = false) String teamCode) {
        try {
            if (StringUtils.isEmpty(labelType)) {
                return error(-1, "标签不能为空");
            }
            if (labelType.equals("4") && (teamCode == null || teamCode <= 0)) {
            if (labelType.equals("4") && StringUtils.isEmpty(teamCode)) {
                return error(-1, "查询自定义标签团队code不能为空");
            }

+ 7 - 15
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -109,7 +109,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    /**
     * 获取团队下的居民
     *
@ -167,7 +166,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    /**
     * 查询某个团队的某个标签类型下各标签患者数/分组统计
     *
@ -193,7 +191,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    /**
     * 查询某个团队的患者数/汇总
     *
@ -229,7 +226,7 @@ public class SignPatientLabelInfoController extends BaseController {
                return error(-1, "健康情况标签不能为空");
            }
            int result = labelInfoService.setPatientLabels(patient, "", "", health, disease, custom);
            int result = labelInfoService.setPatientLabels(patient, "", "", health, disease, custom ,getUID());
            if (result == 0) {
                return error(-1, "查不到患者信息");
@ -240,6 +237,12 @@ public class SignPatientLabelInfoController extends BaseController {
            if (result == -2) {
                return error(-1, "健康情况标签不能为空");
            }
            if (result == -3) {
                return error(-1, "三师疾病不能更改");
            }
            if (result == -4) {
                return error(-1, "医生与居民没有签约关系");
            }
            if (result == 1) {
                return write(200, "更新成功");
            } else {
@ -318,10 +321,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/patient_search_all", method = RequestMethod.GET)
    @ApiOperation("根据姓名搜索所有团队下居民(根据团队和当前医生)")
    public String searchPatients(@RequestParam(required = true) String filter,
@ -342,7 +341,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    /**
     * 查询某个患者的某类标签(根据团队)
     *
@ -385,10 +383,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/patient_search_all_exitdoc", method = RequestMethod.GET)
    @ApiOperation("根据姓名搜索所有团队下居民(根据团队)")
    public String searchPatientsExitDoc(@RequestParam(required = true) String filter,
@ -407,8 +401,6 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    /**
     * 添加居民到某个标签
     *