Commit 8e4bc6e10c913ba99defc33efad54d5d9214d874
1 parent
c1ab96850e
Exists in
master
and in
7 other branches
1
Showing 1 changed file with 22 additions and 20 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
8e4bc6e
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | |
34 | 34 | /** |
35 | 35 | * 分娩记录信息 |
36 | - * <p> | |
36 | + * <p/> | |
37 | 37 | * Created by Administrator on 2016/6/17 0017. |
38 | 38 | */ |
39 | 39 | @Component |
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | |
135 | 135 | //表示区域的 |
136 | 136 | if (StringUtils.isNotEmpty(organizationGroupsFacade.findByCurrentUserId(hospitalId))) { |
137 | - String parentId =antenatalExaminationFacade.handHideBuild(deliverAddRequest.getPid(), deliverAddRequest.getParentId(), userId,-1); | |
137 | + String parentId = antenatalExaminationFacade.handHideBuild(deliverAddRequest.getPid(), deliverAddRequest.getParentId(), userId, -1); | |
138 | 138 | if (StringUtils.isEmpty(parentId)) { |
139 | 139 | logger.warn("get handHideBuild parentId is null."); |
140 | 140 | } |
... | ... | @@ -194,7 +194,7 @@ |
194 | 194 | patientsLocal.setIsAutoFm(YnEnums.NO.getId()); |
195 | 195 | patientsLocal.setType(3); |
196 | 196 | patientsLocal.setFmHospital(deliverAddRequest.getFmHospital()); |
197 | - patientsLocal.setFmType(MapUtils.isNotEmpty(deliverAddRequest.getDeliveryMode())?null:deliverAddRequest.getDeliveryMode().toString()); | |
197 | + patientsLocal.setFmType(MapUtils.isNotEmpty(deliverAddRequest.getDeliveryMode()) ? null : deliverAddRequest.getDeliveryMode().toString()); | |
198 | 198 | try { |
199 | 199 | patientsLocal.setFmAge(DateUtil.getAge(patients1.getBirth(), fmDate)); |
200 | 200 | } catch (Exception e) { |
201 | 201 | |
... | ... | @@ -306,13 +306,13 @@ |
306 | 306 | for (MatDeliverAddRequest.Baby baby : list) { |
307 | 307 | MaternalDeliverModel.Baby babyModel = baby.convertToDataModel(); |
308 | 308 | //判断妊娠结局是活产才添加数据 |
309 | - BabyModel babyModel1=new BabyModel(); | |
310 | - MatDeliverQuery query=new MatDeliverQuery(); | |
309 | + BabyModel babyModel1 = new BabyModel(); | |
310 | + MatDeliverQuery query = new MatDeliverQuery(); | |
311 | 311 | query.setId(deliverAddRequest.getId()); |
312 | 312 | babyModel1.setParentId(deliverAddRequest.getParentId()); |
313 | 313 | if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { |
314 | 314 | babyModel1.setYn(YnEnums.YES.getId()); |
315 | - }else{ | |
315 | + } else { | |
316 | 316 | babyModel1.setYn(YnEnums.NO.getId()); |
317 | 317 | } |
318 | 318 | babyModel1.setBirth(DateUtil.parseYMD(baby.getDueTime())); |
... | ... | @@ -346,7 +346,7 @@ |
346 | 346 | patients1.setType(3); |
347 | 347 | patients1.setIsAutoFm(YnEnums.NO.getId()); |
348 | 348 | patients1.setFmHospital(deliverAddRequest.getFmHospital()); |
349 | - patients1.setFmType(MapUtils.isNotEmpty(deliverAddRequest.getDeliveryMode())?null:deliverAddRequest.getDeliveryMode().toString()); | |
349 | + patients1.setFmType(MapUtils.isNotEmpty(deliverAddRequest.getDeliveryMode()) ? null : deliverAddRequest.getDeliveryMode().toString()); | |
350 | 350 | try { |
351 | 351 | patients1.setFmAge(DateUtil.getAge(patients1.getBirth(), fmDate)); |
352 | 352 | } catch (Exception e) { |
... | ... | @@ -391,8 +391,10 @@ |
391 | 391 | if (fmDate.getTime() >= DateUtil.addDay(patients.getLastMenses(), 168).getTime()) { |
392 | 392 | patients.setFmDate(fmDate); |
393 | 393 | patients.setType(3); |
394 | - //修改buildtype为0 http://jira.healthbaby.com.cn/browse/WEB-808 | |
395 | - patients.setBuildType(0); | |
394 | + //自动分娩的时候修改buildtype为0 http://jira.healthbaby.com.cn/browse/WEB-808 | |
395 | + if (null != patients.getBuildType() && patients.getBuildType() == 2) { | |
396 | + patients.setBuildType(0); | |
397 | + } | |
396 | 398 | patientsService.updatePatient(patients); |
397 | 399 | } |
398 | 400 | } |
... | ... | @@ -576,7 +578,7 @@ |
576 | 578 | */ |
577 | 579 | public BaseResponse queryMatDeliver(MatDeliverQueryRequest deliverQueryRequest, Integer userId) { |
578 | 580 | |
579 | - String hospital=autoMatchFacade.getHospitalId(userId); | |
581 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
580 | 582 | //获取 |
581 | 583 | /* Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, -1); |
582 | 584 | if (null == patients) { |
583 | 585 | |
584 | 586 | |
585 | 587 | |
... | ... | @@ -585,18 +587,18 @@ |
585 | 587 | |
586 | 588 | Organization og = organizationService.getOrganization(Integer.valueOf(hospital)); |
587 | 589 | //区域模式 |
588 | - boolean isEnable=og.getbStatus()==1; | |
590 | + boolean isEnable = og.getbStatus() == 1; | |
589 | 591 | |
590 | 592 | //外院的孕妇 |
591 | - Patients patients1 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, null, 1, false, null,true); | |
593 | + Patients patients1 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, null, 1, false, null, true); | |
592 | 594 | //外院的产妇 |
593 | 595 | // Patients patients2 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, null, 3); |
594 | 596 | |
595 | 597 | //http://jira.healthbaby.com.cn/browse/WEB-204 修改bug |
596 | 598 | //本院的孕妇 |
597 | - Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId,false), 1, false, null,isEnable); | |
599 | + Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId, false), 1, false, null, isEnable); | |
598 | 600 | //本院产妇 |
599 | - Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId,false), 3, false, null,isEnable); | |
601 | + Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId, false), 3, false, null, isEnable); | |
600 | 602 | PersonModelQuery personModelQuery = new PersonModelQuery(); |
601 | 603 | String pid = ""; |
602 | 604 | if (null != patients1) { |
... | ... | @@ -1121,7 +1123,7 @@ |
1121 | 1123 | // 居住类型 |
1122 | 1124 | if (childbirthManagerRequest.getInitQuery().contains("pliveTypeId")) { |
1123 | 1125 | try { |
1124 | - if(StringUtils.isNotEmpty(patients.getPliveTypeId())) { | |
1126 | + if (StringUtils.isNotEmpty(patients.getPliveTypeId())) { | |
1125 | 1127 | childbirthManagerQueryModel.setPliveTypeId(basicConfigService.getOneBasicConfigById(patients.getPliveTypeId()).getName()); |
1126 | 1128 | } |
1127 | 1129 | } catch (Exception e) { |
... | ... | @@ -1132,7 +1134,7 @@ |
1132 | 1134 | // 户口类型 |
1133 | 1135 | if (childbirthManagerRequest.getInitQuery().contains("pcensusTypeId")) { |
1134 | 1136 | try { |
1135 | - if(StringUtils.isNotEmpty(patients.getPcensusTypeId())) { | |
1137 | + if (StringUtils.isNotEmpty(patients.getPcensusTypeId())) { | |
1136 | 1138 | childbirthManagerQueryModel.setPcensusTypeId(basicConfigService.getOneBasicConfigById(patients.getPcensusTypeId()).getName()); |
1137 | 1139 | } |
1138 | 1140 | } catch (Exception e) { |
1139 | 1141 | |
1140 | 1142 | |
... | ... | @@ -1346,19 +1348,19 @@ |
1346 | 1348 | Map<String, String> prodprocessOne = prodprocessMap.get("one"); |
1347 | 1349 | if (MapUtils.isNotEmpty(prodprocessOne)) { |
1348 | 1350 | childbirthManagerQueryModel.setProdprocessOne(prodprocessOne.get("h") + "时," + prodprocessOne.get("m") + "分"); |
1349 | - }else{ | |
1351 | + } else { | |
1350 | 1352 | childbirthManagerQueryModel.setProdprocessOne(""); |
1351 | 1353 | } |
1352 | 1354 | Map<String, String> prodprocessTwo = prodprocessMap.get("two"); |
1353 | 1355 | if (MapUtils.isNotEmpty(prodprocessTwo)) { |
1354 | 1356 | childbirthManagerQueryModel.setProdprocessTwo(prodprocessTwo.get("h") + "时," + prodprocessTwo.get("m") + "分"); |
1355 | - }else{ | |
1357 | + } else { | |
1356 | 1358 | childbirthManagerQueryModel.setProdprocessTwo(""); |
1357 | 1359 | } |
1358 | 1360 | Map<String, String> prodprocessThree = prodprocessMap.get("three"); |
1359 | 1361 | if (MapUtils.isNotEmpty(prodprocessThree)) { |
1360 | 1362 | childbirthManagerQueryModel.setProdprocessThree(prodprocessThree.get("h") + "时," + prodprocessThree.get("m") + "分"); |
1361 | - }else{ | |
1363 | + } else { | |
1362 | 1364 | childbirthManagerQueryModel.setProdprocessThree(""); |
1363 | 1365 | } |
1364 | 1366 | } |
... | ... | @@ -1367,7 +1369,7 @@ |
1367 | 1369 | Map<String, String> totalprocessMap = JsonUtil.getMap(maternalDeliverModel.getTotalprocess()); |
1368 | 1370 | if (MapUtils.isNotEmpty(totalprocessMap)) { |
1369 | 1371 | childbirthManagerQueryModel.setTotalprocess(totalprocessMap.get("h") + "时," + totalprocessMap.get("m") + "分"); |
1370 | - }else{ | |
1372 | + } else { | |
1371 | 1373 | childbirthManagerQueryModel.setTotalprocess(""); |
1372 | 1374 | } |
1373 | 1375 |