Commit fb74a679acdf501f2a1330320a3526a8ed1b3362

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 4 changed files

platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java View file @ fb74a67
... ... @@ -661,8 +661,8 @@
661 661  
662 662 // Date lastLmess = parseYMD("2016-07-02");
663 663 // Date startDate = DateUtil.getRangeDate(lastLmess, 1, "周", -2);
664   -// Date startDate = DateUtil.addDay(new Date(), 2);
665   -// System.out.println(getyyyy_MM_dd(startDate));
  664 + Date startDate = DateUtil.addDay(new Date(), -100);
  665 + System.out.println(getyyyy_MM_dd(startDate));
666 666 try {
667 667  
668 668 // Date startDate = DateUtil.addMonth(new Date(), -1);
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java View file @ fb74a67
... ... @@ -1247,6 +1247,7 @@
1247 1247 if (specialDateType == SpecialDateEnums.ETMY.getId())
1248 1248 {
1249 1249 Date birthday = DateUtil.getNewDate(-1, "月", -sendTimeType);
  1250 + birthday = DateUtil.formatDate(birthday);
1250 1251 babyModelQuery.setBirthStart(birthday);
1251 1252 babyModelQuery.setBirthEnd(birthday);
1252 1253 messages.addAll(getBabyMessageRequestList( babyModelQuery, config, template));
... ... @@ -1255,6 +1256,7 @@
1255 1256 else if(specialDateType == SpecialDateEnums.ETBS.getId())
1256 1257 {
1257 1258 Date birthday = DateUtil.getNewDate(-100, "天", -sendTimeType);
  1259 + birthday = DateUtil.formatDate(birthday);
1258 1260 babyModelQuery.setBirthStart(birthday);
1259 1261 babyModelQuery.setBirthEnd(birthday);
1260 1262 messages.addAll(getBabyMessageRequestList( babyModelQuery, config, template));
... ... @@ -1340,6 +1342,8 @@
1340 1342 patientsQuery.setHospitalId(hospitalId);
1341 1343 //1孕妇 3产妇
1342 1344 patientsQuery.setType(3);
  1345 + //0未终止妊娠的产妇
  1346 + patientsQuery.setDueStatus(0);
1343 1347  
1344 1348 getServicePatientQuery(serviceType, serviceStatus, patientsQuery);
1345 1349  
... ... @@ -1530,7 +1534,8 @@
1530 1534  
1531 1535 //3产妇
1532 1536 chanPatientsQuery.setType(3);
1533   - getServicePatientQuery(serviceType, serviceStatus, chanPatientsQuery);
  1537 + chanPatientsQuery.setDueStatus(0);
  1538 + getServicePatientQuery(serviceType, serviceStatus, chanPatientsQuery);
1534 1539  
1535 1540  
1536 1541 PatientsQuery yunPatientsQuery = new PatientsQuery();
... ... @@ -1538,6 +1543,7 @@
1538 1543 yunPatientsQuery.setHospitalId(hospitalId);
1539 1544 //1孕妇
1540 1545 yunPatientsQuery.setType(1);
  1546 + chanPatientsQuery.setDueStatus(0);
1541 1547 getServicePatientQuery(serviceType, serviceStatus, yunPatientsQuery);
1542 1548  
1543 1549  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ fb74a67
... ... @@ -152,7 +152,7 @@
152 152 }
153 153  
154 154 PersonModel resperson = null;
155   - if (yunRequest.getPregnantPhone() != null || yunRequest.getPregnantCertificateNum() != null)
  155 + if (StringUtils.isNotEmpty(yunRequest.getPregnantCertificateNum()))
156 156 {
157 157  
158 158 PersonModelQuery personModelQuery = new PersonModelQuery();
... ... @@ -161,14 +161,6 @@
161 161 personModelQuery.setTypes(new Integer[]{1,3}); //孕妇或者产妇基本信息
162 162 List<PersonModel> personModels = personService.queryPersons(personModelQuery);
163 163  
164   -// if (personModels == null || personModels.size() == 0)
165   -// {
166   -// personModelQuery.setPhone(yunRequest.getPregnantPhone());
167   -// personModelQuery.setCardNo(null);
168   -// personModels = personService.queryPersons(personModelQuery);
169   -// }
170   -
171   -
172 164 PersonModel pmodel = new PersonModel();
173 165 pmodel.setName(yunRequest.getPregnantName());
174 166 pmodel.setBirth(DateUtil.parseYMD(yunRequest.getBirthday()));
175 167  
... ... @@ -191,12 +183,11 @@
191 183 }
192 184  
193 185 Patients patient = getPatientsData(yunRequest);
194   -
195 186 patient.setDueStatus(0);
196 187 //1孕妇 3 产妇
197 188 patient.setType(type);
198 189 patient.setBuildType(buildType);
199   - if (type == 3 && date != null)
  190 + if (type == ServiceObjEnums.CHANOBJ.getId() && date != null)
200 191 {
201 192 patient.setFmDate(date);
202 193 }
... ... @@ -220,7 +211,7 @@
220 211 if (p == null || p.getId() == null)
221 212 {
222 213 br.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
223   - br.setErrormsg("失败");
  214 + br.setErrormsg("建档失败,保存异常");
224 215 return br;
225 216  
226 217 }
... ... @@ -228,7 +219,7 @@
228 219 //加入产筛
229 220 patientsService.validata(p);
230 221  
231   - if (type == 1)
  222 + if (type == ServiceObjEnums.YUNOBJ.getId())
232 223 {
233 224 //生成建档短信
234 225 createBuildSms(p);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsConfigFacade.java View file @ fb74a67
... ... @@ -633,31 +633,32 @@
633 633  
634 634 public BaseListResponse querySmsList(String hospitalName, String phone,Integer smsType,Integer smsStatus,String content,String planTime,String actualTime,Integer objType, Integer page, Integer limit)
635 635 {
  636 + String hospitalIds = "";
636 637  
637   - OrganizationQuery organizationQuery = new OrganizationQuery();
  638 + if (StringUtils.isNotEmpty(hospitalName))
  639 + {
  640 + OrganizationQuery organizationQuery = new OrganizationQuery();
638 641  
639   - organizationQuery.setYn(YnEnums.YES.getId());
640   - organizationQuery.setKeyword(hospitalName);
  642 + organizationQuery.setYn(YnEnums.YES.getId());
  643 + organizationQuery.setKeyword(hospitalName);
641 644  
642   -
643   - String hospitalIds = "";
644   - List<Organization> orgs = organizationService.queryHospitals(organizationQuery);
645   - if (CollectionUtils.isNotEmpty(orgs))
646   - {
647   - for(int i = 0 ; i< orgs.size() ; i++)
  645 + List<Organization> orgs = organizationService.queryHospitals(organizationQuery);
  646 + if (CollectionUtils.isNotEmpty(orgs))
648 647 {
649   - String orgId = orgs.get(i).getId()+"";
650   - if (i == orgs.size() -1)
  648 + for(int i = 0 ; i< orgs.size() ; i++)
651 649 {
652   - hospitalIds+=orgId;
  650 + String orgId = orgs.get(i).getId()+"";
  651 + if (i == orgs.size() -1)
  652 + {
  653 + hospitalIds+=orgId;
  654 + }
  655 + else
  656 + {
  657 + hospitalIds+=orgId+",";
  658 + }
653 659 }
654   - else
655   - {
656   - hospitalIds+=orgId+",";
657   - }
658 660 }
659 661 }
660   -
661 662  
662 663 String planTimeStart = "";
663 664 String planTimeEnd = "";