From 3752abdd3387e4bee148677e1180fc68eb03b0fd Mon Sep 17 00:00:00 2001 From: liquanyu Date: Thu, 14 Jul 2016 09:42:26 +0800 Subject: [PATCH] update code --- .../platform/data/service/impl/SmsServiceImpl.java | 39 +++++++++++++++++++--- .../operate/web/facade/BookbuildingFacade.java | 2 +- .../web/request/YunBookbuildingAddRequest.java | 6 ++-- 3 files changed, 38 insertions(+), 9 deletions(-) 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 0b44f45..c2d7fab 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 @@ -595,8 +595,7 @@ public class SmsServiceImpl implements SmsService{ //消息类型 Integer smsType = template.getSmsType(); -// //发送频次 -// Integer sendFreq = template.getSendFrequency(); + // // //发送日期类型 SendDateEnums枚举类 // Integer sendDateType = template.getSendDateType(); @@ -736,12 +735,42 @@ public class SmsServiceImpl implements SmsService{ } else if (smsType == SmsServiceEnums.CJCXTX.getId()) { - //查询符合条件的孕妇 - List patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); - if (CollectionUtils.isNotEmpty(patients)) + + //发送频次 + Integer sendFreq = template.getSendFrequency(); + + if (sendFreq == SendFrequencyEnums.YEAR.getId()) { + //GL(0,"公历","0,1,2","0,1,2,3"),NL(1,"农历","0,1,2","0,1,2,3"),TSRQ(2,"特殊日期","0,2","1,2,3"),SLRQ(3,"生理日期","0","1,2,3"); + Integer sendDateType = template.getSendDateType(); + if (sendDateType == SendDateEnums.SLRQ.getId()) + { + //孕妇为孕周 + Integer specialDateType = template.getSpecialDateType(); + + if (specialDateType == SpecialDateEnums.YZ.getId()) + { + Integer start = template.getStart(); + Integer end = template.getEnd(); + + if (start != null && end != null) + { + + //查询符合条件的孕妇 + List patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); + if (CollectionUtils.isNotEmpty(patients)) + { + + } + } + + } + } + } + + } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java index ec5d621..153784b 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java @@ -183,7 +183,7 @@ public class BookbuildingFacade { if (pat != null) { BookbuildingRecordResult result = new BookbuildingRecordResult(); - Organization org = organizationService.getOrganization(pat.getHospitalId()); + Organization org = organizationService.getOrganization(Integer.valueOf(pat.getHospitalId())); if (org != null) { result.setBookbuildHospital(org.getName()); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java index 24abab9..3d4aa11 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java @@ -140,7 +140,7 @@ public class YunBookbuildingAddRequest { //医院Id @FormParam - private Integer hospitalId; + private String hospitalId; //服务状态 @FormParam @@ -476,11 +476,11 @@ public class YunBookbuildingAddRequest { this.childbirthAreaId = childbirthAreaId; } - public Integer getHospitalId() { + public String getHospitalId() { return hospitalId; } - public void setHospitalId(Integer hospitalId) { + public void setHospitalId(String hospitalId) { this.hospitalId = hospitalId; } -- 1.8.3.1