diff --git a/platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java b/platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java index 7feefcf..a1ae51d 100644 --- a/platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java +++ b/platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java @@ -709,7 +709,7 @@ public class SmsServiceImpl implements SmsService{ SmsConfigQuery configQuery = new SmsConfigQuery(); configQuery.setYn(YnEnums.YES.getId()); configQuery.setPrefixTypes(new Integer[]{0, 1}); -// configQuery.setHospitalId(221 + ""); +// configQuery.setHospitalId(242 + ""); //查询出对应医院配置 List configs = smsConfigService.querySmsConfig(configQuery); @@ -1968,10 +1968,14 @@ public class SmsServiceImpl implements SmsService{ startDate = DateUtil.formatDate(startDate); } List models = postReviewService.queryPostOrder(startDate, tempHid, pid); - for (PostReviewModel model : models) + if (CollectionUtils.isNotEmpty(models)) { - idset.add(model.getId()); //这里的id就是parentid + for (PostReviewModel model : models) + { + idset.add(model.getId()); //这里的id就是parentid + } } + return idset.size() > 0; } @@ -1995,9 +1999,12 @@ public class SmsServiceImpl implements SmsService{ startDate = DateUtil.formatDate(startDate); } List models = babyBookbuildingService.queryBabyOrder(startDate, tempHid, pid); - for (BabyCheckModel model : models) + if (CollectionUtils.isNotEmpty(models)) { - idset.add(model.getId()); + for (BabyCheckModel model : models) + { + idset.add(model.getId()); + } } return idset.size() > 0; } @@ -2328,32 +2335,37 @@ public class SmsServiceImpl implements SmsService{ antExChuQuery.setNextCheckTime(startDate); antExChuQuery.setParentId(pid); List chus = antenatalExaminationService.queryAntExChu(antExChuQuery); - for (AntExChuModel chu : chus) + if (CollectionUtils.isNotEmpty(chus)) { - PatientsQuery patientQuery = new PatientsQuery(); - patientQuery.setYn(YnEnums.YES.getId()); - patientQuery.setType(1); - patientQuery.setId(chu.getParentId()); - - List patientses = patientsService.queryPatient(patientQuery); - if (CollectionUtils.isNotEmpty(patientses)) + for (AntExChuModel chu : chus) { - AntExQuery antExQuery = new AntExQuery(); - antExQuery.setParentId(chu.getParentId()); - antExQuery.setYn(YnEnums.YES.getId()); - //复诊不存在 才添加 - List list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); - if (!CollectionUtils.isNotEmpty(list)) + PatientsQuery patientQuery = new PatientsQuery(); + patientQuery.setYn(YnEnums.YES.getId()); + patientQuery.setType(1); + patientQuery.setId(chu.getParentId()); + + List patientses = patientsService.queryPatient(patientQuery); + if (CollectionUtils.isNotEmpty(patientses)) { - idset.add(chu.getParentId()); + AntExQuery antExQuery = new AntExQuery(); + antExQuery.setParentId(chu.getParentId()); + antExQuery.setYn(YnEnums.YES.getId()); + //复诊不存在 才添加 + List list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); + if (!CollectionUtils.isNotEmpty(list)) + { + idset.add(chu.getParentId()); + } } } } List fuzs = antenatalExaminationService.queryYuyueAntenatalExamination(startDate, tempHid, pid); - - for (AntenatalExaminationModel f : fuzs) + if (CollectionUtils.isNotEmpty(fuzs)) { - idset.add(f.getId()); //这里的id就是parentid + for (AntenatalExaminationModel f : fuzs) + { + idset.add(f.getId()); //这里的id就是parentid + } } return idset.size() > 0; }