Commit 48ea00e29a56897f107fb1c16b05b2380efa2fc9
1 parent
a8ab9e5aa1
Exists in
master
and in
6 other branches
服务同步
Showing 2 changed files with 32 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
48ea00e
... | ... | @@ -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.constants.ErrorCodeConstants; |
... | ... | @@ -22,7 +21,6 @@ |
22 | 21 | import com.lyms.platform.operate.web.result.*; |
23 | 22 | import com.lyms.platform.operate.web.utils.BabyListTask; |
24 | 23 | import com.lyms.platform.operate.web.utils.GrowthCountTask; |
25 | -import com.lyms.platform.operate.web.utils.MessageCenterService; | |
26 | 24 | import com.lyms.platform.operate.web.utils.MongoUtil; |
27 | 25 | import com.lyms.platform.permission.model.Organization; |
28 | 26 | import com.lyms.platform.permission.model.OrganizationQuery; |
... | ... | @@ -321,6 +319,9 @@ |
321 | 319 | * @return |
322 | 320 | */ |
323 | 321 | public boolean updateBabySerInfo(BabyBookbuildingAddRequest request){ |
322 | + if(StringUtils.isEmpty(request.getId())){ | |
323 | + return false; | |
324 | + } | |
324 | 325 | BabyModelQuery babyQuery = new BabyModelQuery(); |
325 | 326 | babyQuery.setYn(YnEnums.YES.getId()); |
326 | 327 | babyQuery.setId(request.getId()); |
... | ... | @@ -706,6 +707,7 @@ |
706 | 707 | // String hospitalName = organizationService.getOrganization(Integer.valueOf(request.getHospitalId())).getName(); |
707 | 708 | |
708 | 709 | operateLogFacade.addAddOptLog(userId, Integer.valueOf(hid), model, OptActionEnums.ADD.getId(), "儿童建档"); |
710 | + model = babyBookbuildingService.addBabyBookbuilding(model); | |
709 | 711 | //建档开通增值服务 |
710 | 712 | if (CollectionUtils.isNotEmpty(request.getSerInfos())) { |
711 | 713 | |
... | ... | @@ -716,6 +718,7 @@ |
716 | 718 | //开通日期与建档日期一致 |
717 | 719 | patientService.setCreateDate(DateUtil.parseYMD(request.getBuildDate())); |
718 | 720 | patientService.setParentid(model.getId()); |
721 | + patientService.setPid(model.getPid()); | |
719 | 722 | try { |
720 | 723 | patientServiceFacade.addPatientService(patientService, userId); |
721 | 724 | } catch (Exception e) { |
... | ... | @@ -724,8 +727,6 @@ |
724 | 727 | } |
725 | 728 | } |
726 | 729 | |
727 | - operateLogFacade.addAddOptLog(userId, Integer.valueOf(request.getHospitalId()), model, OptActionEnums.ADD.getId(), "儿童建档"); | |
728 | - model = babyBookbuildingService.addBabyBookbuilding(model); | |
729 | 730 | |
730 | 731 | final String bId = model.getId(); |
731 | 732 | if (model == null || bId == null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
48ea00e
... | ... | @@ -293,8 +293,9 @@ |
293 | 293 | patientServiceService.updatePatientService(ps); |
294 | 294 | |
295 | 295 | if (before.getPerType() != null && before.getPerType() == 2) {//儿童建档服务数据处理 |
296 | + BabyBookbuildingAddRequest babyBookbuildingAddRequest = new BabyBookbuildingAddRequest(); | |
297 | + babyBookbuildingAddRequest.setId(ps.getParentid()); | |
296 | 298 | if(PatientSerEnums.SerTypeEnums.babyjzzz.getId() == ps.getSerType()){ |
297 | - BabyBookbuildingAddRequest babyBookbuildingAddRequest = new BabyBookbuildingAddRequest(); | |
298 | 299 | babyBookbuildingAddRequest.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); |
299 | 300 | if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.kt.getId()) { |
300 | 301 | babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); |
301 | 302 | |
302 | 303 | |
303 | 304 | |
... | ... | @@ -305,11 +306,22 @@ |
305 | 306 | } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.zt.getId()) { |
306 | 307 | babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.SUSPEND.getId()); |
307 | 308 | } |
308 | - babyBookbuildingFacade.updateBabySerInfo(babyBookbuildingAddRequest); | |
309 | + }else if(PatientSerEnums.SerTypeEnums.babyBzfw.getId() == ps.getSerType()){ | |
310 | + babyBookbuildingAddRequest.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); | |
311 | + if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.kt.getId()) { | |
312 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); | |
313 | + } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.td.getId()) { | |
314 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.NO_OPEN.getId()); | |
315 | + } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.gq.getId()) { | |
316 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId()); | |
317 | + } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.zt.getId()) { | |
318 | + babyBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId()); | |
319 | + } | |
309 | 320 | } |
321 | + babyBookbuildingFacade.updateBabySerInfo(babyBookbuildingAddRequest); | |
310 | 322 | } else {//孕妇建档服务数据处理 |
323 | + YunBookbuildingAddRequest yunBookbuildingAddRequest = new YunBookbuildingAddRequest(); | |
311 | 324 | if (PatientSerEnums.SerTypeEnums.yqjzzd.getId() == ps.getSerType()) {//孕期精准指导同步到建档 |
312 | - YunBookbuildingAddRequest yunBookbuildingAddRequest = new YunBookbuildingAddRequest(); | |
313 | 325 | yunBookbuildingAddRequest.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); |
314 | 326 | if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.kt.getId()) { |
315 | 327 | yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); |
316 | 328 | |
... | ... | @@ -320,8 +332,19 @@ |
320 | 332 | } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.zt.getId()) { |
321 | 333 | yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.SUSPEND.getId()); |
322 | 334 | } |
323 | - bookbuildingFacade.updatePregnantById(ps.getParentid(), yunBookbuildingAddRequest, userId); | |
335 | + }else if(PatientSerEnums.SerTypeEnums.bzfw.getId() == ps.getSerType()){ | |
336 | + yunBookbuildingAddRequest.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); | |
337 | + if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.kt.getId()) { | |
338 | + yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); | |
339 | + } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.td.getId()) { | |
340 | + yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.NO_OPEN.getId()); | |
341 | + } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.gq.getId()) { | |
342 | + yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId()); | |
343 | + } else if (ps.getSerStatus() == PatientSerEnums.SerStatusEnums.zt.getId()) { | |
344 | + yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.NO_OPEN.getId()); | |
345 | + } | |
324 | 346 | } |
347 | + bookbuildingFacade.updatePregnantById(ps.getParentid(), yunBookbuildingAddRequest, userId); | |
325 | 348 | } |
326 | 349 | PatientService after = patientServiceService.getPatientService(ps.getId()); |
327 | 350 | operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), before, after, OptActionEnums.UPDATE.getId(), "修改服务"); |