Commit b0b51dbd804d960f2bc6a272631abc7ce4c86f12
1 parent
a6aaea45b8
Exists in
master
and in
6 other branches
两癌
Showing 3 changed files with 60 additions and 2 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientRegistrationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
b0b51db
| ... | ... | @@ -85,8 +85,9 @@ |
| 85 | 85 | private PostReviewService postReviewService; |
| 86 | 86 | @Autowired |
| 87 | 87 | private AutoMatchFacade autoMatchFacade; |
| 88 | - | |
| 89 | 88 | @Autowired |
| 89 | + private PatientRegistrationFacade patientRegistrationFacade; | |
| 90 | + @Autowired | |
| 90 | 91 | private ZcPrenatalService zcPrenatalService; |
| 91 | 92 | |
| 92 | 93 | @Autowired |
| ... | ... | @@ -314,6 +315,7 @@ |
| 314 | 315 | public BaseResponse addOneAntEx(AntExAddRequest antExAddRequest, Integer userId) { |
| 315 | 316 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 316 | 317 | |
| 318 | + | |
| 317 | 319 | //秦皇岛市山海关人民医院 零时处理 |
| 318 | 320 | // if (StringUtils.isNotEmpty(antExAddRequest.getCheckDate()) && "1000000004".equals(hospitalId)) { |
| 319 | 321 | // if (!antExAddRequest.getCheckDate().equals(DateUtil.getyyyy_MM_dd(new Date()))) |
| ... | ... | @@ -396,6 +398,11 @@ |
| 396 | 398 | } |
| 397 | 399 | |
| 398 | 400 | } else { |
| 401 | + if (StringUtils.isNotEmpty(antExAddRequest.getRegistration().getPid())) | |
| 402 | + { | |
| 403 | + patientRegistrationFacade.add(antExAddRequest.getRegistration()); | |
| 404 | + } | |
| 405 | + | |
| 399 | 406 | model.setOperator(userId); |
| 400 | 407 | model.setYn(YnEnums.YES.getId()); |
| 401 | 408 | model.setHospitalId(hospitalId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientRegistrationFacade.java
View file @
b0b51db
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.beans.MsgRequest; | |
| 3 | 4 | import com.lyms.platform.biz.service.PatientRegistrationService; |
| 4 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | -import com.lyms.platform.common.enums.YnEnums; | |
| 6 | +import com.lyms.platform.common.enums.*; | |
| 6 | 7 | import com.lyms.platform.common.result.BaseListResponse; |
| 7 | 8 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 8 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 9 | 10 | |
| ... | ... | @@ -100,12 +101,50 @@ |
| 100 | 101 | model.setCreateDate(new Date()); |
| 101 | 102 | model.setHospitalId("216"); |
| 102 | 103 | model = patientRegistrationService.add(model); |
| 104 | + createMsg(model); | |
| 103 | 105 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 104 | 106 | br.setErrormsg("成功"); |
| 105 | 107 | br.setData(model.getId()); |
| 106 | 108 | return br; |
| 107 | 109 | } |
| 108 | 110 | |
| 111 | + private void createMsg(PatientRegistrationModel model) | |
| 112 | + { | |
| 113 | + | |
| 114 | + List <MsgRequest> messages = new ArrayList <>(); | |
| 115 | + MsgRequest mr = new MsgRequest(); | |
| 116 | + | |
| 117 | + String bedType = model.getBedType() == null ? "" : (model.getBedType() == 1 ? "LDRP(家庭化产房)" : | |
| 118 | + (model.getBedType() == 2 ? "普通房间(产前)+单人分娩产房+单间(产后)" : "普通房间(产前+产后)")); | |
| 119 | + String content = "您已成功预约"+bedType+",预约日期为:"+DateUtil.getyyyy_MM_dd(model.getOrderDate())+",请保存本条短信后期作为预约成功凭证。"; | |
| 120 | + | |
| 121 | + mr.setFirst("【秦皇岛市妇幼保健院】" + content); | |
| 122 | + mr.setObjType(ServiceObjEnums.YUNOBJ.getId()); | |
| 123 | + mr.setPhone(model.getPhone()); | |
| 124 | + mr.setTimeType(SmsTimeTypeEnums.ONTIME.getId()); | |
| 125 | + mr.setTypeId(ProjectTypeEnums.YNXT.getId()); | |
| 126 | + mr.setPlanTime(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 127 | + mr.setSubTypeId(SmsServiceEnums.YSGXHZD.getId()); | |
| 128 | + mr.setStatus(SmsStatusEnums.WFS.getId()); | |
| 129 | + mr.setHospitalId(model.getHospitalId()); | |
| 130 | + mr.setPatientId(model.getId()); | |
| 131 | + | |
| 132 | + mr.setSmsStatus(SmsStatusEnums.WFS.getId()); | |
| 133 | + mr.setServiceType(2); | |
| 134 | + mr.setKeyword1("产科医生"); | |
| 135 | + mr.setKeyword2(DateUtil.getyyyy_MM_dd(new Date())); | |
| 136 | + mr.setRemark(""); | |
| 137 | + mr.setCreated(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 138 | + | |
| 139 | + mr.setWxTempId(WxTempleteIdEnums.YI_SHENG_ZHI_DAO.getId()); | |
| 140 | + messages.add(mr); | |
| 141 | + if (CollectionUtils.isNotEmpty(messages)) { | |
| 142 | + smsConfigFacade.saveMsg(messages, messages.get(0).getHospitalId()); | |
| 143 | + } | |
| 144 | + | |
| 145 | + } | |
| 146 | + @Autowired | |
| 147 | + private SmsConfigFacade smsConfigFacade; | |
| 109 | 148 | /** |
| 110 | 149 | * 更新 患者登记 |
| 111 | 150 | * @param request |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
View file @
b0b51db
| ... | ... | @@ -17,6 +17,18 @@ |
| 17 | 17 | */ |
| 18 | 18 | @Form |
| 19 | 19 | public class AntExAddRequest implements IBasicRequestConvert<AntenatalExaminationModel> { |
| 20 | + | |
| 21 | + //秦皇岛妇幼预约分娩医院 | |
| 22 | + private PatientRegistrationRequest registration; | |
| 23 | + | |
| 24 | + public PatientRegistrationRequest getRegistration() { | |
| 25 | + return registration; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void setRegistration(PatientRegistrationRequest registration) { | |
| 29 | + this.registration = registration; | |
| 30 | + } | |
| 31 | + | |
| 20 | 32 | //医生签名 |
| 21 | 33 | private String doctorSign; |
| 22 | 34 |