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 31f8d99..74f0c05 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 @@ -718,7 +718,7 @@ public class SmsServiceImpl implements SmsService{ SmsConfigQuery configQuery = new SmsConfigQuery(); configQuery.setYn(YnEnums.YES.getId()); configQuery.setPrefixTypes(new Integer[]{0, 1}); -// configQuery.setHospitalId(242 + ""); +// configQuery.setHospitalId(221 + ""); //查询出对应医院配置 List configs = smsConfigService.querySmsConfig(configQuery); @@ -2240,16 +2240,14 @@ public class SmsServiceImpl implements SmsService{ { Set idset = new HashSet<>(); Date yuYueDate = DateUtil.addDay(new Date(), sendTimeType); - Date startDeate = DateUtil.addDay(new Date(), sendTimeType-1); if (yuYueDate != null) { //把时间格式化成 yyyy_MM_dd 的日期 yuYueDate = DateUtil.formatDate(yuYueDate); - startDeate = DateUtil.formatDate(startDeate); } AntExChuQuery antExChuQuery = new AntExChuQuery(); antExChuQuery.setYn(YnEnums.YES.getId()); - antExChuQuery.setNextCheckTimeStart(startDeate); + antExChuQuery.setNextCheckTimeStart(yuYueDate); antExChuQuery.setNextCheckTimeEnd(yuYueDate); antExChuQuery.setHospitalId(tempHid); List chus = antenatalExaminationService.queryAntExChu(antExChuQuery); @@ -2260,22 +2258,12 @@ public class SmsServiceImpl implements SmsService{ AntExQuery antExQuery = new AntExQuery(); antExQuery.setParentId(chu.getParentId()); antExQuery.setYn(YnEnums.YES.getId()); - - 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)) + antExQuery.setHospitalId(tempHid); + //复诊不存在 才添加 + List list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); + if (!CollectionUtils.isNotEmpty(list)) { - //复诊不存在 才添加 - List list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); - if (!CollectionUtils.isNotEmpty(list)) - { - idset.add(chu.getParentId()); - } - + idset.add(chu.getParentId()); } }