Commit 20526499b3733b62bf7a9fbddd25b5fe496967f4

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 5 changed files

platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java View file @ 2052649
... ... @@ -375,7 +375,7 @@
375 375 }
376 376  
377 377 if (!StringUtils.isEmpty(name)) {
378   - condition = condition.and("name", name, MongoOper.IS);
  378 + condition = condition.and("name", name, MongoOper.LIKE);
379 379 }
380 380  
381 381 if (null != highRisk) {
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 2052649
... ... @@ -497,9 +497,8 @@
497 497 }
498 498  
499 499 if (null != orServiceStatus && orServiceStatus.length > 1) {
500   - MongoCondition con1 = MongoCondition.newInstance("serviceStatus", orServiceStatus[0], MongoOper.IS);
501   - MongoCondition con = MongoCondition.newInstance("serviceStatus", orServiceStatus[1], MongoOper.IS);
502   - condition = condition.orCondition(new MongoCondition[]{con1, con});
  500 + Criteria c = Criteria.where("serviceStatus").in(orServiceStatus[0], orServiceStatus[1]);
  501 + condition.andCondition( new MongoCondition(c));
503 502 }
504 503 if (null != hcertificateNum) {
505 504 condition = condition.and("hcertificateNum", hcertificateNum, MongoOper.LIKE);
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java View file @ 2052649
... ... @@ -612,7 +612,7 @@
612 612  
613 613 SmsConfigModel config = getSmsConfig(configs,hospitalId);
614 614  
615   - //false 表示该服务没有启动
  615 + //false 表示该服务没有启动 smsType为消息类型
616 616 boolean isStart = isStartTemplate(config, smsType);
617 617 if (!isStart)
618 618 {
... ... @@ -639,7 +639,7 @@
639 639 {
640 640 Date yuYueDate = DateUtil.addDay(new Date(),sendTimeType);
641 641 //得到孕妇的id
642   - Set<String> idset = getYuYuePatient(sendTimeType,tempHid);
  642 + Set<String> idset = getYuYuePatient(sendTimeType, tempHid);
643 643  
644 644 for (String pid : idset)
645 645 {
... ... @@ -650,7 +650,6 @@
650 650 {
651 651 for (Patients pat : patients)
652 652 {
653   -
654 653 //短信前缀
655 654 String messagePrefix = getSmsPrefix(config,pat.getBookbuildingDoctor());
656 655 String messageContent = "【"+messagePrefix+"】"+template.getContent();
... ... @@ -665,6 +664,7 @@
665 664 }
666 665  
667 666 }
  667 + //产检程序提醒
668 668 else if (smsType == SmsServiceEnums.CJCXTX.getId())
669 669 {
670 670 //发送频次
... ... @@ -745,6 +745,11 @@
745 745 {
746 746 for (Patients pat : patients)
747 747 {
  748 + if (pat != null && StringUtils.isEmpty(pat.getHusbandPhone()))
  749 + {
  750 + continue;
  751 + }
  752 +
748 753 //短信前缀
749 754 String messagePrefix = getSmsPrefix(config,pat.getBookbuildingDoctor());
750 755 String messageContent = "【"+messagePrefix+"】"+template.getContent();
... ... @@ -1640,7 +1645,7 @@
1640 1645 if (startDate != null)
1641 1646 {
1642 1647 //把时间格式化成 yyyy_MM_dd 的日期
1643   - startDate = DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(startDate));
  1648 + startDate = DateUtil.formatDate(startDate);
1644 1649 }
1645 1650 List<PostReviewModel> models = postReviewService.queryPostOrder(startDate, tempHid, pid);
1646 1651 for (PostReviewModel model : models)
... ... @@ -1902,7 +1907,7 @@
1902 1907 if (yuYueDate != null)
1903 1908 {
1904 1909 //把时间格式化成 yyyy_MM_dd 的日期
1905   - yuYueDate = DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(yuYueDate));
  1910 + yuYueDate = DateUtil.formatDate(yuYueDate);
1906 1911 }
1907 1912 AntExChuQuery antExChuQuery = new AntExChuQuery();
1908 1913 antExChuQuery.setYn(YnEnums.YES.getId());
... ... @@ -2046,7 +2051,7 @@
2046 2051 {
2047 2052 String messagePrefix = config.getHospitalPrefix();
2048 2053 //前缀类型 0医院前缀 1科室前缀
2049   - if (config.getPrefixType() == 1)
  2054 + if (config.getPrefixType() != null && config.getPrefixType() == 1)
2050 2055 {
2051 2056 String res = getDeptPrefix(doctorId,config.getDeptPrefix());
2052 2057 messagePrefix = res == "" ? messagePrefix : res;
2053 2058  
... ... @@ -2111,10 +2116,18 @@
2111 2116 {
2112 2117 return "";
2113 2118 }
  2119 + Integer userId = null;
  2120 + try {
  2121 + userId = Integer.valueOf(doctorId);
  2122 + }catch (Exception e)
  2123 + {
  2124 + System.out.println(doctorId);
  2125 + return "";
  2126 + }
2114 2127  
2115 2128 UsersQuery usersQuery = new UsersQuery();
2116 2129 usersQuery.setYn(YnEnums.YES.getId());
2117   - usersQuery.setId(Integer.valueOf(doctorId));
  2130 + usersQuery.setId(userId);
2118 2131 //通过建档医生查询用户信息
2119 2132 List<Users> users = usersService.queryUsers2(usersQuery);
2120 2133 if (CollectionUtils.isNotEmpty(users))
2121 2134  
... ... @@ -2183,9 +2196,12 @@
2183 2196 if (CollectionUtils.isNotEmpty(organizations))
2184 2197 {
2185 2198 Organization org = organizations.get(0);
2186   - if (org != null && org.getStatus() != null && org.getStatus() == HospitalStatusEnums.ZSYX.getId())
  2199 + if (org != null && org.getStatus() != null)
2187 2200 {
2188   - return true;
  2201 + if (org.getStatus() == HospitalStatusEnums.ZSYX.getId() || org.getStatus() == HospitalStatusEnums.SYX.getId())
  2202 + {
  2203 + return true;
  2204 + }
2189 2205 }
2190 2206 }
2191 2207 return false;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 2052649
... ... @@ -1212,6 +1212,7 @@
1212 1212 return objectResponse;
1213 1213 }
1214 1214  
  1215 +
1215 1216 public List queryRisk(List<String> id) {
1216 1217 BasicConfigQuery
1217 1218 basicConfigQuery = new BasicConfigQuery();
... ... @@ -1262,7 +1263,7 @@
1262 1263 BabyManageListResult result = new BabyManageListResult();
1263 1264 result.setId(model.getId());
1264 1265 if (model.getHighRisk() == null || model.getHighRisk() == 0) {
1265   - result.setHighRisk("正常");
  1266 + result.setHighRisk("健康");
1266 1267 } else {
1267 1268 result.setHighRisk("高危");
1268 1269 }
... ... @@ -1277,7 +1278,7 @@
1277 1278 result.setMonthAge(DateUtil.getBabyMonthAge(model.getBirth(), new Date()));
1278 1279 result.setPatientId(model.getParentId());
1279 1280  
1280   - String diagnose = "正常";
  1281 + String diagnose = "";
1281 1282 if (!StringUtils.isEmpty(model.getDiagnose())) {
1282 1283 List diagList = JsonUtil.toList(model.getDiagnose(), List.class);
1283 1284 if (CollectionUtils.isNotEmpty(diagList)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 2052649
... ... @@ -342,7 +342,7 @@
342 342  
343 343 PatientsQuery patientsQuery = new PatientsQuery();
344 344 patientsQuery.setYn(YnEnums.YES.getId());
345   - patientsQuery.setBuildType(0);
  345 + patientsQuery.setBuildType(1);
346 346 //如果身份证号码不为空就以身份证号码查询
347 347 if (!StringUtils.isEmpty(bookbuildingQueryRequest.getCardNo()))
348 348 {