Commit ed09fd896db4c754948fe2001a4967303dce932e

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 2 changed files

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ ed09fd8
... ... @@ -236,7 +236,14 @@
236 236 if (pm != null)
237 237 {
238 238 //查询最后一次建档记录
239   - patients = patientsService.findLastBuildRecord(pm.getId(),YnEnums.YES.getId());
  239 + PatientsQuery patientsQuery = new PatientsQuery();
  240 + patientsQuery.setYn(YnEnums.YES.getId());
  241 + patientsQuery.setPid(pm.getId());
  242 + List<Patients> pats = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
  243 + if (CollectionUtils.isNotEmpty(pats))
  244 + {
  245 + patients = pats.get(0);
  246 + }
240 247 //当前状态为 孕妇状态
241 248 if (pm.getType() != null && pm.getType() == 1)
242 249 {
... ... @@ -319,7 +326,7 @@
319 326 if (model == null || model.getId() == null) {
320 327 br.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
321 328 br.setErrormsg("失败");
322   -
  329 + return br;
323 330 }
324 331 //创建建档短信
325 332 createBuildSms(model);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ ed09fd8
... ... @@ -2,9 +2,7 @@
2 2  
3 3 import com.lyms.platform.biz.service.*;
4 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
5   -import com.lyms.platform.common.enums.StopPregEnums;
6   -import com.lyms.platform.common.enums.YnEnums;
7   -import com.lyms.platform.common.enums.ZhiChenEnums;
  5 +import com.lyms.platform.common.enums.*;
8 6 import com.lyms.platform.common.result.BaseObjectResponse;
9 7 import com.lyms.platform.common.result.BaseResponse;
10 8 import com.lyms.platform.common.utils.DateUtil;
... ... @@ -52,6 +50,7 @@
52 50 @Autowired
53 51 private YunBookbuildingService yunBookbuildingService;
54 52  
  53 +
55 54 /**
56 55 * 更新终止妊娠
57 56 * @param request
... ... @@ -95,6 +94,32 @@
95 94 }
96 95  
97 96 }
  97 +
  98 + Patients pat = null;
  99 + PatientsQuery patientsQuery1 = new PatientsQuery();
  100 + patientsQuery1.setYn(YnEnums.YES.getId());
  101 + patientsQuery1.setId(request.getId());
  102 + List<Patients> pats = yunBookbuildingService.queryPregnantWithQuery(patientsQuery1);
  103 + if (CollectionUtils.isNotEmpty(pats))
  104 + {
  105 + pat = pats.get(0);
  106 + }
  107 + if (pat != null)
  108 + {
  109 + //更新状态为过期
  110 + //判断其为增值服务还是 标准服务
  111 + if (pat.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId())
  112 + {
  113 + pat.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId());
  114 + }
  115 + else if (pat.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId())
  116 + {
  117 + pat.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
  118 + }
  119 + yunBookbuildingService.updatePregnant(pat,pat.getId());
  120 + }
  121 +
  122 +
98 123  
99 124 StopPregModel model = getStopPregModel(request);
100 125 model.setCreated(new Date());