diff --git a/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java index 5431d02..6015668 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java @@ -375,7 +375,7 @@ public class BabyModelQuery extends BaseQuery implements IConvertToNativeQuery { } if (!StringUtils.isEmpty(name)) { - condition = condition.and("name", name, MongoOper.IS); + condition = condition.and("name", name, MongoOper.LIKE); } if (null != highRisk) { diff --git a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java index 41bd429..d50d109 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java @@ -497,9 +497,8 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { } if (null != orServiceStatus && orServiceStatus.length > 1) { - MongoCondition con1 = MongoCondition.newInstance("serviceStatus", orServiceStatus[0], MongoOper.IS); - MongoCondition con = MongoCondition.newInstance("serviceStatus", orServiceStatus[1], MongoOper.IS); - condition = condition.orCondition(new MongoCondition[]{con1, con}); + Criteria c = Criteria.where("serviceStatus").in(orServiceStatus[0], orServiceStatus[1]); + condition.andCondition( new MongoCondition(c)); } if (null != hcertificateNum) { condition = condition.and("hcertificateNum", hcertificateNum, MongoOper.LIKE); 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 6fe575d..dfffcc5 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 @@ -612,7 +612,7 @@ public class SmsServiceImpl implements SmsService{ SmsConfigModel config = getSmsConfig(configs,hospitalId); - //false 表示该服务没有启动 + //false 表示该服务没有启动 smsType为消息类型 boolean isStart = isStartTemplate(config, smsType); if (!isStart) { @@ -639,7 +639,7 @@ public class SmsServiceImpl implements SmsService{ { Date yuYueDate = DateUtil.addDay(new Date(),sendTimeType); //得到孕妇的id - Set idset = getYuYuePatient(sendTimeType,tempHid); + Set idset = getYuYuePatient(sendTimeType, tempHid); for (String pid : idset) { @@ -650,7 +650,6 @@ public class SmsServiceImpl implements SmsService{ { for (Patients pat : patients) { - //短信前缀 String messagePrefix = getSmsPrefix(config,pat.getBookbuildingDoctor()); String messageContent = "【"+messagePrefix+"】"+template.getContent(); @@ -665,6 +664,7 @@ public class SmsServiceImpl implements SmsService{ } } + //产检程序提醒 else if (smsType == SmsServiceEnums.CJCXTX.getId()) { //发送频次 @@ -745,6 +745,11 @@ public class SmsServiceImpl implements SmsService{ { for (Patients pat : patients) { + if (pat != null && StringUtils.isEmpty(pat.getHusbandPhone())) + { + continue; + } + //短信前缀 String messagePrefix = getSmsPrefix(config,pat.getBookbuildingDoctor()); String messageContent = "【"+messagePrefix+"】"+template.getContent(); @@ -1640,7 +1645,7 @@ public class SmsServiceImpl implements SmsService{ if (startDate != null) { //把时间格式化成 yyyy_MM_dd 的日期 - startDate = DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(startDate)); + startDate = DateUtil.formatDate(startDate); } List models = postReviewService.queryPostOrder(startDate, tempHid, pid); for (PostReviewModel model : models) @@ -1902,7 +1907,7 @@ public class SmsServiceImpl implements SmsService{ if (yuYueDate != null) { //把时间格式化成 yyyy_MM_dd 的日期 - yuYueDate = DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(yuYueDate)); + yuYueDate = DateUtil.formatDate(yuYueDate); } AntExChuQuery antExChuQuery = new AntExChuQuery(); antExChuQuery.setYn(YnEnums.YES.getId()); @@ -2046,7 +2051,7 @@ public class SmsServiceImpl implements SmsService{ { String messagePrefix = config.getHospitalPrefix(); //前缀类型 0医院前缀 1科室前缀 - if (config.getPrefixType() == 1) + if (config.getPrefixType() != null && config.getPrefixType() == 1) { String res = getDeptPrefix(doctorId,config.getDeptPrefix()); messagePrefix = res == "" ? messagePrefix : res; @@ -2111,10 +2116,18 @@ public class SmsServiceImpl implements SmsService{ { return ""; } + Integer userId = null; + try { + userId = Integer.valueOf(doctorId); + }catch (Exception e) + { + System.out.println(doctorId); + return ""; + } UsersQuery usersQuery = new UsersQuery(); usersQuery.setYn(YnEnums.YES.getId()); - usersQuery.setId(Integer.valueOf(doctorId)); + usersQuery.setId(userId); //通过建档医生查询用户信息 List users = usersService.queryUsers2(usersQuery); if (CollectionUtils.isNotEmpty(users)) @@ -2183,9 +2196,12 @@ public class SmsServiceImpl implements SmsService{ if (CollectionUtils.isNotEmpty(organizations)) { Organization org = organizations.get(0); - if (org != null && org.getStatus() != null && org.getStatus() == HospitalStatusEnums.ZSYX.getId()) + if (org != null && org.getStatus() != null) { - return true; + if (org.getStatus() == HospitalStatusEnums.ZSYX.getId() || org.getStatus() == HospitalStatusEnums.SYX.getId()) + { + return true; + } } } return false; diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java index b3bb3c8..9f2899d 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java @@ -1212,6 +1212,7 @@ public class BabyBookbuildingFacade { return objectResponse; } + public List queryRisk(List id) { BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); @@ -1262,7 +1263,7 @@ public class BabyBookbuildingFacade { BabyManageListResult result = new BabyManageListResult(); result.setId(model.getId()); if (model.getHighRisk() == null || model.getHighRisk() == 0) { - result.setHighRisk("正常"); + result.setHighRisk("健康"); } else { result.setHighRisk("高危"); } @@ -1277,7 +1278,7 @@ public class BabyBookbuildingFacade { result.setMonthAge(DateUtil.getBabyMonthAge(model.getBirth(), new Date())); result.setPatientId(model.getParentId()); - String diagnose = "正常"; + String diagnose = ""; if (!StringUtils.isEmpty(model.getDiagnose())) { List diagList = JsonUtil.toList(model.getDiagnose(), List.class); if (CollectionUtils.isNotEmpty(diagList)) { 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 6d65d61..45da4f8 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 @@ -342,7 +342,7 @@ public class BookbuildingFacade { PatientsQuery patientsQuery = new PatientsQuery(); patientsQuery.setYn(YnEnums.YES.getId()); - patientsQuery.setBuildType(0); + patientsQuery.setBuildType(1); //如果身份证号码不为空就以身份证号码查询 if (!StringUtils.isEmpty(bookbuildingQueryRequest.getCardNo())) {