Commit 9bcebc1ce0e5ddec5dd40f51124678b3abb62473
1 parent
5d63ef7202
Exists in
master
and in
6 other branches
小程序服务开通,同步更新建档服务信息
Showing 3 changed files with 59 additions and 7 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyBuildSerToPatientSerWorker.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
9bcebc1
| ... | ... | @@ -5,7 +5,6 @@ |
| 5 | 5 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| 6 | 6 | import com.lyms.hospitalapi.qinglongxian.QingLongXianHisService; |
| 7 | 7 | import com.lyms.hospitalapi.v2.HisService; |
| 8 | -import com.lyms.platform.beans.MsgListRequest; | |
| 9 | 8 | import com.lyms.platform.beans.MsgRequest; |
| 10 | 9 | import com.lyms.platform.biz.service.*; |
| 11 | 10 | import com.lyms.platform.common.base.PageInfo; |
| 12 | 11 | |
| 13 | 12 | |
| ... | ... | @@ -15,12 +14,16 @@ |
| 15 | 14 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 16 | 15 | import com.lyms.platform.common.result.BaseResponse; |
| 17 | 16 | import com.lyms.platform.common.utils.*; |
| 18 | -import com.lyms.platform.operate.web.request.*; | |
| 17 | +import com.lyms.platform.operate.web.request.BookBuildManagerQueryRequest; | |
| 18 | +import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; | |
| 19 | +import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; | |
| 19 | 20 | import com.lyms.platform.operate.web.result.*; |
| 20 | 21 | import com.lyms.platform.operate.web.utils.JdbcUtil; |
| 21 | -import com.lyms.platform.operate.web.utils.MessageCenterService; | |
| 22 | 22 | import com.lyms.platform.permission.dao.master.CouponMapper; |
| 23 | -import com.lyms.platform.permission.model.*; | |
| 23 | +import com.lyms.platform.permission.model.Organization; | |
| 24 | +import com.lyms.platform.permission.model.OrganizationQuery; | |
| 25 | +import com.lyms.platform.permission.model.PatientService; | |
| 26 | +import com.lyms.platform.permission.model.Users; | |
| 24 | 27 | import com.lyms.platform.permission.service.CouponService; |
| 25 | 28 | import com.lyms.platform.permission.service.OrganizationService; |
| 26 | 29 | import com.lyms.platform.permission.service.UsersService; |
| ... | ... | @@ -643,6 +646,15 @@ |
| 643 | 646 | } |
| 644 | 647 | } |
| 645 | 648 | } |
| 649 | + } | |
| 650 | + | |
| 651 | + /** | |
| 652 | + * 更新孕妇服务相关信息 | |
| 653 | + * | |
| 654 | + * @param id | |
| 655 | + */ | |
| 656 | + public void updatePatientSerById(String id, Patients patient) { | |
| 657 | + yunBookbuildingService.updatePregnant(patient, id); | |
| 646 | 658 | } |
| 647 | 659 | |
| 648 | 660 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
View file @
9bcebc1
| ... | ... | @@ -4,8 +4,11 @@ |
| 4 | 4 | import com.lyms.platform.biz.service.PatientsService; |
| 5 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 6 | 6 | import com.lyms.platform.common.enums.PatientSerEnums; |
| 7 | +import com.lyms.platform.common.enums.ServiceStatusEnums; | |
| 8 | +import com.lyms.platform.common.enums.ServiceTypeEnums; | |
| 7 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 8 | 10 | import com.lyms.platform.common.utils.StringUtils; |
| 11 | +import com.lyms.platform.operate.web.request.BabyBookbuildingAddRequest; | |
| 9 | 12 | import com.lyms.platform.permission.model.PatientService; |
| 10 | 13 | import com.lyms.platform.permission.model.PatientServiceQuery; |
| 11 | 14 | import com.lyms.platform.permission.service.PatientServiceService; |
| ... | ... | @@ -35,6 +38,11 @@ |
| 35 | 38 | @Autowired |
| 36 | 39 | private BabyService babyService; |
| 37 | 40 | |
| 41 | + @Autowired | |
| 42 | + private BookbuildingFacade bookbuildingFacade; | |
| 43 | + @Autowired | |
| 44 | + private BabyBookbuildingFacade babyBookbuildingFacade; | |
| 45 | + | |
| 38 | 46 | @Override |
| 39 | 47 | public BaseResponse execute(String synForm) { |
| 40 | 48 | JSONArray jsonArray = JSONArray.fromObject(synForm); |
| 41 | 49 | |
| 42 | 50 | |
| ... | ... | @@ -95,14 +103,47 @@ |
| 95 | 103 | int serType = patientService.getSerType(); |
| 96 | 104 | patientService.setUpdateDate(new Date()); |
| 97 | 105 | // 1高危精准指导、5-专家咨询默认已经领取 |
| 98 | - if(serType == PatientSerEnums.SerTypeEnums.yqjzzd.getId()||serType == PatientSerEnums.SerTypeEnums.zjzx.getId()){ | |
| 106 | + if (serType == PatientSerEnums.SerTypeEnums.yqjzzd.getId() || serType == PatientSerEnums.SerTypeEnums.zjzx.getId()) { | |
| 99 | 107 | //默认已领取 |
| 100 | 108 | patientService.setStatus(2); |
| 101 | - }else{ | |
| 109 | + } else { | |
| 102 | 110 | //默认待领取 |
| 103 | 111 | patientService.setStatus(1); |
| 104 | 112 | } |
| 105 | 113 | patientServiceService.addPatientService(patientService); |
| 114 | + } | |
| 115 | + | |
| 116 | + if (patientService.getPerType() != null && patientService.getPerType() == 2) {//儿童建档服务数据处理 | |
| 117 | + BabyBookbuildingAddRequest babyBookbuildingAddRequest = new BabyBookbuildingAddRequest(); | |
| 118 | + babyBookbuildingAddRequest.setId(patientService.getParentid()); | |
| 119 | + if (PatientSerEnums.SerTypeEnums.babyjzzz.getId() == patientService.getSerType()) { | |
| 120 | + babyBookbuildingAddRequest.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
| 121 | + if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.kt.getId()) { | |
| 122 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); | |
| 123 | + } else if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.td.getId()) { | |
| 124 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.UNSUBSCRIBE.getId()); | |
| 125 | + } else if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.gq.getId()) { | |
| 126 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId()); | |
| 127 | + } else if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.zt.getId()) { | |
| 128 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.SUSPEND.getId()); | |
| 129 | + } | |
| 130 | + } | |
| 131 | + babyBookbuildingFacade.updateBabySerInfo(babyBookbuildingAddRequest); | |
| 132 | + } else {//孕妇建档服务数据处理 | |
| 133 | + Patients patient = new Patients(); | |
| 134 | + if (PatientSerEnums.SerTypeEnums.yqjzzd.getId() == patientService.getSerType()) {//孕期精准指导同步到建档 | |
| 135 | + patient.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
| 136 | + if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.kt.getId()) { | |
| 137 | + patient.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); | |
| 138 | + } else if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.td.getId()) { | |
| 139 | + patient.setServiceStatus(ServiceStatusEnums.UNSUBSCRIBE.getId()); | |
| 140 | + } else if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.gq.getId()) { | |
| 141 | + patient.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId()); | |
| 142 | + } else if (patientService.getSerStatus() == PatientSerEnums.SerStatusEnums.zt.getId()) { | |
| 143 | + patient.setServiceStatus(ServiceStatusEnums.SUSPEND.getId()); | |
| 144 | + } | |
| 145 | + } | |
| 146 | + bookbuildingFacade.updatePatientSerById(patientService.getParentid(), patient); | |
| 106 | 147 | } |
| 107 | 148 | } |
| 108 | 149 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyBuildSerToPatientSerWorker.java
View file @
9bcebc1