Explorar o código

疾病分组修改

lyr %!s(int64=8) %!d(string=hai) anos
pai
achega
757bb387b5

+ 6 - 4
src/main/java/com/yihu/wlyy/service/app/disease/PatientDiseaseService.java

@ -144,11 +144,8 @@ public class PatientDiseaseService extends BaseService {
                }
                }
            } else {
            } else {
                JSONArray redisValues = new JSONArray();
                JSONArray redisValues = new JSONArray();
                // 重新分组
                if (!changeGroupInfo(patient, new ArrayList<String>())) {
                    throw new Exception("set group falied");
                }
                List<PatientDisease> ssDisease = patientDiseaseDao.findByPatientSsDisease(patient);
                List<PatientDisease> ssDisease = patientDiseaseDao.findByPatientSsDisease(patient);
                List<String> disList = new ArrayList<>();
                if (ssDisease != null && ssDisease.size() > 0) {
                if (ssDisease != null && ssDisease.size() > 0) {
                    for (PatientDisease pd : ssDisease) {
                    for (PatientDisease pd : ssDisease) {
                        JSONObject redisValue = new JSONObject();
                        JSONObject redisValue = new JSONObject();
@ -157,9 +154,14 @@ public class PatientDiseaseService extends BaseService {
                        redisValue.put("del", pd.getDel());
                        redisValue.put("del", pd.getDel());
                        redisValue.put("signType", pd.getSignType());
                        redisValue.put("signType", pd.getSignType());
                        redisValues.put(redisValue);
                        redisValues.put(redisValue);
                        disList.add(pd.getDisease());
                    }
                    }
                }
                }
                redisTemplate.opsForValue().set("disease:" + patient, redisValues.toString());
                redisTemplate.opsForValue().set("disease:" + patient, redisValues.toString());
                // 重新分组
                if (!changeGroupInfo(patient, disList)) {
                    throw new Exception("set group falied");
                }
            }
            }
            return true;
            return true;