Commit a48e9066f39c29a0c9c23daebdf7e7ae07aa7c42

Authored by liquanyu
1 parent ff76a6e9b8

补录产检

Showing 1 changed file with 18 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ a48e906
... ... @@ -152,7 +152,7 @@
152 152 * @param userId
153 153 * @return
154 154 */
155   - public String handHideBuild(String pid, String parentId, Integer userId, int type) {
  155 + public String handHideBuild(String pid, String parentId, Integer userId, Integer type) {
156 156 String hospitalId = autoMatchFacade.getHospitalId(userId);
157 157 Patients patients;
158 158 Patients patients1 = patientsService.findOnePatientById(parentId);
... ... @@ -183,7 +183,7 @@
183 183 patients.setBookbuildingDate(patients.getBookbuildingDate());
184 184  
185 185 // 产后复查,设置自动分娩,这个字段其实是为了确定是否有对应的分娩记录,但是这种是没有分娩记录的
186   - if (type == 3) {
  186 + if (type != null && type == 3) {
187 187 patients.setIsAutoFm(YnEnums.YES.getId());
188 188 //本院建档本院分娩外院产后复查,区域产妇管理出现多调记录
189 189 // http://jira.healthbaby.com.cn/browse/WEB-2743
... ... @@ -295,7 +295,7 @@
295 295 //表示区域的
296 296 if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) {
297 297 //建立隐藏档案
298   - String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId, 1);
  298 + String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId, StringUtils.isNotEmpty(antExAddRequest.getSupplement()) ? null : 1);
299 299 model.setParentId(parentId);
300 300 antExAddRequest.setParentId(parentId);
301 301 Patients p = patientsService.findOnePatientById(parentId);
... ... @@ -2780,7 +2780,14 @@
2780 2780 //http://jira.healthbaby.com.cn/browse/WEB-2733
2781 2781 if (StringUtils.isNotEmpty(queryRequest.getVcCardNo()) && StringUtils.isEmpty(queryRequest.getCardNo()))
2782 2782 {
2783   - antExChuQuery.setParentId(patients.getId());
  2783 + if (StringUtils.isNotEmpty(queryRequest.getSupplement())) {
  2784 + antExChuQuery.setPid(patients.getPid());
  2785 + }
  2786 + else
  2787 + {
  2788 + antExChuQuery.setParentId(patients.getId());
  2789 + }
  2790 +
2784 2791 }
2785 2792 else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon()))
2786 2793 {
... ... @@ -2812,7 +2819,13 @@
2812 2819  
2813 2820 if (StringUtils.isNotEmpty(queryRequest.getVcCardNo()) && StringUtils.isEmpty(queryRequest.getCardNo()))
2814 2821 {
2815   - antExQuery.setParentId(patients.getId());
  2822 + if (StringUtils.isNotEmpty(queryRequest.getSupplement())) {
  2823 + antExQuery.setPid(patients.getPid());
  2824 + }
  2825 + else
  2826 + {
  2827 + antExQuery.setParentId(patients.getId());
  2828 + }
2816 2829 }
2817 2830 else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon()))
2818 2831 {