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 3aa8d1a..31f8d99 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 @@ -2240,14 +2240,16 @@ 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(yuYueDate); + antExChuQuery.setNextCheckTimeStart(startDeate); antExChuQuery.setNextCheckTimeEnd(yuYueDate); antExChuQuery.setHospitalId(tempHid); List chus = antenatalExaminationService.queryAntExChu(antExChuQuery); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java index 40ec8a7..e00d462 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java @@ -9,6 +9,7 @@ import com.lyms.platform.operate.web.result.HighScoreResult; import com.lyms.platform.permission.model.Users; import com.lyms.platform.permission.service.UsersService; import com.lyms.platform.pojo.Patients; +import com.lyms.platform.query.AntExChuQuery; import com.lyms.platform.query.PatientsQuery; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -25,25 +26,37 @@ import java.util.List; public class Test{ public static void main(String[] args){ - PatientsQuery patientsQuery1 = new PatientsQuery(); - patientsQuery1.setHospitalId("221"); - patientsQuery1.setYn(YnEnums.YES.getId()); - patientsQuery1.setType(1); - - List buildType = new ArrayList(); - buildType.add(0); - buildType.add(2); - patientsQuery1.setBuildTypeList(buildType); - - patientsQuery1.setQueryNo("q"); - - - - patientsQuery1.setBookbuildingDateStart(DateUtil.parseYMD("1999-11-11")); - patientsQuery1.setBookbuildingDateEnd(DateUtil.parseYMD("2016-12-08")); - - - System.out.println(patientsQuery1.convertToQuery().convertToMongoQuery()); +// PatientsQuery patientsQuery1 = new PatientsQuery(); +// patientsQuery1.setHospitalId("221"); +// patientsQuery1.setYn(YnEnums.YES.getId()); +// patientsQuery1.setType(1); +// +// List buildType = new ArrayList(); +// buildType.add(0); +// buildType.add(2); +// patientsQuery1.setBuildTypeList(buildType); +// +// patientsQuery1.setQueryNo("q"); +// +// +// +// patientsQuery1.setBookbuildingDateStart(DateUtil.parseYMD("1999-11-11")); +// patientsQuery1.setBookbuildingDateEnd(DateUtil.parseYMD("2016-12-08")); + + + Date yuYueDate = DateUtil.addDay(new Date(), 2); + if (yuYueDate != null) + { + //把时间格式化成 yyyy_MM_dd 的日期 + yuYueDate = DateUtil.formatDate(yuYueDate); + } + AntExChuQuery antExChuQuery = new AntExChuQuery(); + antExChuQuery.setYn(YnEnums.YES.getId()); + antExChuQuery.setNextCheckTimeStart(yuYueDate); + antExChuQuery.setNextCheckTimeEnd(yuYueDate); + antExChuQuery.setHospitalId("242"); + + System.out.println(antExChuQuery.convertToQuery().convertToMongoQuery()); } } \ No newline at end of file