Commit 9882721d48505f43adb143ed59ab44a9962fab3c

Authored by jiangjiazhi
1 parent 8b2bd34e98

孕妇分娩后 变成产妇

Showing 2 changed files with 15 additions and 6 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/PersonModel.java View file @ 9882721
... ... @@ -32,7 +32,7 @@
32 32 //生日
33 33 private Date birth;
34 34  
35   - //类型 1 孕妇 2 儿童
  35 + //类型 1 孕妇 2 儿童 3孕妇
36 36 private Integer type;
37 37  
38 38 private Date created;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 9882721
... ... @@ -69,16 +69,25 @@
69 69 PatientsQuery patientsQuery = new PatientsQuery();
70 70 patientsQuery.setId(parentId);
71 71 List<Patients> patients = patientsService.queryPatient(patientsQuery);
72   -
  72 + Patients patients1 =null;
73 73 if (CollectionUtils.isNotEmpty(list)) {
74 74 String userName = "";
75 75 if (CollectionUtils.isNotEmpty(patients)) {
76   - userName = patients.get(0).getUsername();
  76 + patients1=patients.get(0);
  77 + userName =patients1 .getUsername();
77 78 if (null != deliverAddRequest.getDueDate()) {
78 79 Date fmDate = DateUtil.parseYMD(deliverAddRequest.getDueDate());
79   - patients.get(0).setFmDate(fmDate);
80   - patients.get(0).setType(3);
81   - patientsService.updatePatient(patients.get(0));
  80 + patients1.setFmDate(fmDate);
  81 + patients1.setType(3);
  82 + patientsService.updatePatient(patients1);
  83 + //修改person表状态为产妇
  84 + if(StringUtils.isNotEmpty(patients1.getPid())){
  85 + PersonModel personModel=new PersonModel();
  86 + personModel.setType(3);
  87 + personModel.setId(patients1.getPid());
  88 + personModel.setModified(new Date());
  89 + personService.updatePerson(personModel,patients1.getPid());
  90 + }
82 91 }
83 92 }
84 93 for (MatDeliverAddRequest.Baby baby : list) {