diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java index c525b9b..878f329 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java @@ -507,9 +507,11 @@ public class PatientDtController { @RequestMapping(method = RequestMethod.GET, value = "/dt/appointment") @ResponseBody public BaseResponse getAppointment(@RequestHeader("Authorization")String authorization, - @RequestParam String doctor, - @RequestParam String startTime, - @RequestParam String endTime, + @RequestParam String doctor, + @RequestParam String startTime, + @RequestParam String endTime, + @RequestParam(required = false) Integer isBuild, + @RequestParam(required = false) Integer expire, @RequestParam(required = false) String name, @RequestParam(required = false) String doctorName @@ -523,6 +525,9 @@ public class PatientDtController { List modelList= appointmentService.queryAppointment(doctor,startTime,endTime,name,doctorName); Date date=new Date(); if (CollectionUtils.isNotEmpty(modelList)){ + boolean b=true; + List checkList=new ArrayList<>(); + PatientsQuery patientsQuery =new PatientsQuery(); patientsQuery.setYn(1); patientsQuery.setHospitalId(hospitalId); @@ -539,6 +544,7 @@ public class PatientDtController { patientsQuery.setPhone(phone); }else { appointmentModel.setIsBuild(0); + appointmentModel.setExpire(1); } } if (appointmentModel.getIsBuild()==null){ @@ -561,7 +567,6 @@ public class PatientDtController { } } - if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getRiskLevelId()) && !"[]".equals(patients.getRiskLevelId())) { List level = new ArrayList(); try { @@ -571,21 +576,47 @@ public class PatientDtController { if (null != basicConfig) { Map map = new HashMap(); basicConfig.replenRisk(map); - level.add(map); + if (!level.contains(map)){ + level.add(map); + } } } } catch (Exception e) { ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); } - appointmentModel.setrlevel(HighScoreResult.filter(level)); + appointmentModel.setrlevel(level); } }else { appointmentModel.setIsBuild(0); + appointmentModel.setExpire(1); } } + if (isBuild!=null){ + b=false; + if (expire!=null){ + if (appointmentModel.getIsBuild()==isBuild&&appointmentModel.getExpire()==expire){ + checkList.add(appointmentModel); + } + }else { + if (appointmentModel.getIsBuild()==isBuild){ + checkList.add(appointmentModel); + } + } + }else { + if (expire!=null){ + b=false; + if (appointmentModel.getExpire()==expire){ + checkList.add(appointmentModel); + } + } + } + } + if (b){ + baseResponse.setObject(modelList); + }else { + baseResponse.setObject(checkList); } } - baseResponse.setObject(modelList); baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); return baseResponse; }