diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java index 91a608e..d704cc1 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java @@ -152,7 +152,7 @@ public class AntenatalExaminationFacade { * @param userId * @return */ - public String handHideBuild(String pid, String parentId, Integer userId, int type) { + public String handHideBuild(String pid, String parentId, Integer userId, Integer type) { String hospitalId = autoMatchFacade.getHospitalId(userId); Patients patients; Patients patients1 = patientsService.findOnePatientById(parentId); @@ -183,7 +183,7 @@ public class AntenatalExaminationFacade { patients.setBookbuildingDate(patients.getBookbuildingDate()); // 产后复查,设置自动分娩,这个字段其实是为了确定是否有对应的分娩记录,但是这种是没有分娩记录的 - if (type == 3) { + if (type != null && type == 3) { patients.setIsAutoFm(YnEnums.YES.getId()); //本院建档本院分娩外院产后复查,区域产妇管理出现多调记录 // http://jira.healthbaby.com.cn/browse/WEB-2743 @@ -295,7 +295,7 @@ public class AntenatalExaminationFacade { //表示区域的 if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { //建立隐藏档案 - String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId, 1); + String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId, StringUtils.isNotEmpty(antExAddRequest.getSupplement()) ? null : 1); model.setParentId(parentId); antExAddRequest.setParentId(parentId); Patients p = patientsService.findOnePatientById(parentId); @@ -2780,7 +2780,14 @@ public class AntenatalExaminationFacade { //http://jira.healthbaby.com.cn/browse/WEB-2733 if (StringUtils.isNotEmpty(queryRequest.getVcCardNo()) && StringUtils.isEmpty(queryRequest.getCardNo())) { - antExChuQuery.setParentId(patients.getId()); + if (StringUtils.isNotEmpty(queryRequest.getSupplement())) { + antExChuQuery.setPid(patients.getPid()); + } + else + { + antExChuQuery.setParentId(patients.getId()); + } + } else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon())) { @@ -2812,7 +2819,13 @@ public class AntenatalExaminationFacade { if (StringUtils.isNotEmpty(queryRequest.getVcCardNo()) && StringUtils.isEmpty(queryRequest.getCardNo())) { - antExQuery.setParentId(patients.getId()); + if (StringUtils.isNotEmpty(queryRequest.getSupplement())) { + antExQuery.setPid(patients.getPid()); + } + else + { + antExQuery.setParentId(patients.getId()); + } } else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon())) {