Commit 42e615308842f1ef54548a35f4601b07cdd1484e

Authored by jiangjiazhi
1 parent bdd54f24e4

孕妇分娩后 变成产妇

Showing 6 changed files with 51 additions and 3 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/MaternalDeliverModel.java View file @ 42e6153
... ... @@ -17,6 +17,7 @@
17 17 private String id;
18 18 //产妇id
19 19 private String parentId;
  20 + private String pid;
20 21 //分娩时间
21 22 private String dueDate;
22 23 //分娩孕周
... ... @@ -122,6 +123,14 @@
122 123  
123 124 public void setModified(Date modified) {
124 125 this.modified = modified;
  126 + }
  127 +
  128 + public String getPid() {
  129 + return pid;
  130 + }
  131 +
  132 + public void setPid(String pid) {
  133 + this.pid = pid;
125 134 }
126 135  
127 136 public static class Baby {
platform-dal/src/main/java/com/lyms/platform/pojo/PostReviewModel.java View file @ 42e6153
... ... @@ -17,6 +17,8 @@
17 17 //产妇id
18 18 private String parentId;
19 19  
  20 + private String pid;
  21 +
20 22 //分娩天数
21 23 private String day;
22 24 //健康情况
... ... @@ -88,6 +90,14 @@
88 90 private Date created;
89 91 private Date modified;
90 92 private String hospitalId;
  93 +
  94 + public String getPid() {
  95 + return pid;
  96 + }
  97 +
  98 + public void setPid(String pid) {
  99 + this.pid = pid;
  100 + }
91 101  
92 102 public String getHospitalId() {
93 103 return hospitalId;
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java View file @ 42e6153
... ... @@ -17,15 +17,28 @@
17 17 private String parentId;
18 18 private String vcCardNo;
19 19 private String cardNo;
  20 + private String pid;
20 21 /**
21 22 * 是否有效
22 23 */
23 24 private Integer yn;
  25 +
  26 + public String getPid() {
  27 + return pid;
  28 + }
  29 +
  30 + public void setPid(String pid) {
  31 + this.pid = pid;
  32 + }
  33 +
24 34 @Override
25 35 public MongoQuery convertToQuery() {
26 36 MongoCondition condition=MongoCondition.newInstance();
27 37 if(null!=id){
28 38 condition=condition.and("id",id, MongoOper.IS);
  39 + }
  40 + if(null!=pid){
  41 + condition=condition.and("pid",pid, MongoOper.IS);
29 42 }
30 43 if(null!=vcCardNo){
31 44 condition=condition.and("vcCardNo",vcCardNo,MongoOper.IS);
platform-dal/src/main/java/com/lyms/platform/query/PostReviewQuery.java View file @ 42e6153
... ... @@ -20,7 +20,16 @@
20 20 private Date start;
21 21  
22 22 private Date end;
  23 + private String pid;
23 24  
  25 + public String getPid() {
  26 + return pid;
  27 + }
  28 +
  29 + public void setPid(String pid) {
  30 + this.pid = pid;
  31 + }
  32 +
24 33 public Date getEnd() {
25 34 return end;
26 35 }
... ... @@ -69,6 +78,9 @@
69 78 }
70 79 if(null!=id){
71 80 mongoCondition= mongoCondition.and("id",id, MongoOper.IS);
  81 + }
  82 + if(null!=pid){
  83 + mongoCondition= mongoCondition.and("pid",pid, MongoOper.IS);
72 84 }
73 85 if(null!=parentId){
74 86 mongoCondition= mongoCondition.and("parentId",parentId, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 42e6153
... ... @@ -71,6 +71,9 @@
71 71 patientsQuery.setId(parentId);
72 72 List<Patients> patients = patientsService.queryPatient(patientsQuery);
73 73 Patients patients1 = null;
  74 + if (CollectionUtils.isNotEmpty(patients)){
  75 + maternalDeliverModel.setPid(patients.get(0).getPid());
  76 + }
74 77 if (CollectionUtils.isNotEmpty(list)) {
75 78 String userName = "";
76 79 if (CollectionUtils.isNotEmpty(patients)) {
... ... @@ -256,7 +259,7 @@
256 259 return new BaseResponse().setErrormsg("没有相关的产妇记录").setErrorcode(ErrorCodeConstants.BUSINESS_ERROR);
257 260 }
258 261 MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
259   - matDeliverQuery.setParentId(patients.getId());
  262 + matDeliverQuery.setPid(patients.getPid());
260 263 matDeliverQuery.setYn(YnEnums.YES.getId());
261 264 List<MaternalDeliverModel> list = matDeliverService.query(matDeliverQuery);
262 265 MatDeliverListResult matDeliverListResult = new MatDeliverListResult();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java View file @ 42e6153
... ... @@ -53,6 +53,7 @@
53 53 if(CollectionUtils.isNotEmpty(list1)){
54 54 postReviewModel.setHospitalId(list1.get(0)+"");
55 55 }
  56 + postReviewModel.setPid(patientsService.findOnePatientById(postReviewRequest.getParentId()).getPid());
56 57 postReviewService.addPostReview(postReviewModel);
57 58 } else {
58 59 postReviewService.updatePostById(postReviewRequest.convertToDataModel(), postReviewRequest.getId());
59 60  
... ... @@ -69,11 +70,11 @@
69 70 PostReviewListResult postReviewListResult = new PostReviewListResult();
70 71 if (null != patientsList) {
71 72 PostReviewQuery postReviewQuery = new PostReviewQuery();
72   - postReviewQuery.setParentId(patientsList.getId());
  73 + postReviewQuery.setPid(patientsList.getPid());
73 74 postReviewQuery.setYn(YnEnums.YES.getId());
74 75 List<PostReviewModel> postReviewModels = postReviewService.findWithList(postReviewQuery);
75 76 MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
76   - matDeliverQuery.setParentId(patientsList.getId());
  77 + matDeliverQuery.setPid(patientsList.getPid());
77 78 matDeliverQuery.setYn(YnEnums.YES.getId());
78 79  
79 80 List<MaternalDeliverModel> list = matDeliverService.query(matDeliverQuery);