Commit 4ca992a4461bf0f07b3298a7544433c0559dbd71

Authored by yangfei
1 parent 13524c6ecd

孕妇转诊开通标准服务

Showing 1 changed file with 20 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java View file @ 4ca992a
... ... @@ -13,6 +13,7 @@
13 13 import com.lyms.platform.operate.web.utils.FunvCommonUtil;
14 14 import com.lyms.platform.permission.model.Organization;
15 15 import com.lyms.platform.permission.model.OrganizationQuery;
  16 +import com.lyms.platform.permission.model.PatientService;
16 17 import com.lyms.platform.permission.model.Users;
17 18 import com.lyms.platform.permission.service.OrganizationService;
18 19 import com.lyms.platform.permission.service.UsersService;
... ... @@ -67,6 +68,8 @@
67 68 private OperateLogFacade operateLogFacade;
68 69 @Autowired
69 70 private CommonService commonService;
  71 + @Autowired
  72 + private PatientServiceFacade patientServiceFacade;
70 73  
71 74 //添加回执单
72 75 public BaseResponse addReferralReceipt(ReferralReceiptRequest referralReceipt) {
... ... @@ -224,6 +227,23 @@
224 227 patients.setSource(referralApplyOrderAddRequest.getParentId());
225 228 id = patientsService.addPatient(patients).getId();
226 229 operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospital), patients, OptActionEnums.ADD.getId(), "添加孕妇转诊");
  230 +
  231 + PatientService patientService = new PatientService();
  232 + Map<String, String> serInfo = new HashMap<>();
  233 + serInfo.put("serType",PatientSerEnums.SerTypeEnums.bzfw.getId().toString());
  234 +
  235 + patientService.setSerInfos(Arrays.asList(serInfo));
  236 + patientService.setPerType(1);
  237 + patientService.setCreateUser(String.valueOf(userId));
  238 + //开通日期与建档日期一致
  239 + patientService.setCreateDate(patients.getBookbuildingDate());
  240 + patientService.setParentid(id);
  241 + try {
  242 + patientServiceFacade.addPatientService(patientService, userId, patients.getHospitalId());
  243 + } catch (Exception e) {
  244 + System.out.println("孕妇建档服务开通异常!");
  245 + e.printStackTrace();
  246 + }
227 247 } else {
228 248 Patients patients1 = patientsList.get(0);
229 249 id = patients1.getId();