Commit d7e198ef4d6991bea05b98ad078c5ff3debf82ee

Authored by hujiaqi
1 parent c4841bf80b

出院小结添加修改功能

Showing 13 changed files with 110 additions and 8 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/DischargeAbstractBabyDao.java View file @ d7e198e
... ... @@ -14,5 +14,7 @@
14 14 void batchSave(List<DischargeAbstractBabyModel> dischargeAbstractBabyModelList);
15 15  
16 16 List<DischargeAbstractBabyModel> query(MongoQuery mongoQuery);
  17 +
  18 + void update(DischargeAbstractBabyModel dischargeAbstractBabyModel);
17 19 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/DischargeAbstractMotherDao.java View file @ d7e198e
... ... @@ -14,5 +14,7 @@
14 14 DischargeAbstractMotherModel save(DischargeAbstractMotherModel dischargeAbstractMotherModel);
15 15  
16 16 List<DischargeAbstractMotherModel> query(MongoQuery mongoQuery);
  17 +
  18 + void update(DischargeAbstractMotherModel dischargeAbstractMotherModel);
17 19 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DischargeAbstractBabyDaoImpl.java View file @ d7e198e
... ... @@ -2,6 +2,8 @@
2 2  
3 3 import com.lyms.platform.biz.dal.DischargeAbstractBabyDao;
4 4 import com.lyms.platform.common.dao.BaseMongoDAOImpl;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
5 7 import com.lyms.platform.common.dao.operator.MongoQuery;
6 8 import com.lyms.platform.pojo.DischargeAbstractBabyModel;
7 9 import org.springframework.stereotype.Repository;
... ... @@ -24,6 +26,11 @@
24 26 @Override
25 27 public List<DischargeAbstractBabyModel> query(MongoQuery mongoQuery) {
26 28 return super.find(mongoQuery.convertToMongoQuery());
  29 + }
  30 +
  31 + @Override
  32 + public void update(DischargeAbstractBabyModel dischargeAbstractBabyModel) {
  33 + super.update(new MongoQuery(new MongoCondition("id", dischargeAbstractBabyModel.getId(), MongoOper.IS)).convertToMongoQuery(), dischargeAbstractBabyModel);
27 34 }
28 35 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DischargeAbstractMotherDaoImpl.java View file @ d7e198e
... ... @@ -2,6 +2,8 @@
2 2  
3 3 import com.lyms.platform.biz.dal.DischargeAbstractMotherDao;
4 4 import com.lyms.platform.common.dao.BaseMongoDAOImpl;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
5 7 import com.lyms.platform.common.dao.operator.MongoQuery;
6 8 import com.lyms.platform.pojo.DischargeAbstractMotherModel;
7 9 import org.springframework.stereotype.Repository;
... ... @@ -19,6 +21,11 @@
19 21 @Override
20 22 public List<DischargeAbstractMotherModel> query(MongoQuery mongoQuery) {
21 23 return super.find(mongoQuery.convertToMongoQuery());
  24 + }
  25 +
  26 + @Override
  27 + public void update(DischargeAbstractMotherModel dischargeAbstractMotherModel) {
  28 + super.update(new MongoQuery(new MongoCondition("id", dischargeAbstractMotherModel.getId(), MongoOper.IS)).convertToMongoQuery(), dischargeAbstractMotherModel);
22 29 }
23 30 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DischargeAbstractBabyService.java View file @ d7e198e
... ... @@ -25,5 +25,9 @@
25 25 public List<DischargeAbstractBabyModel> query(DischargeAbstractBabyQuery dischargeAbstractBabyQuery) {
26 26 return dischargeAbstractBabyDao.query(dischargeAbstractBabyQuery.convertToQuery());
27 27 }
  28 +
  29 + public void update(DischargeAbstractBabyModel dischargeAbstractBabyModel) {
  30 + dischargeAbstractBabyDao.update(dischargeAbstractBabyModel);
  31 + }
28 32 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DischargeAbstractMotherService.java View file @ d7e198e
... ... @@ -25,5 +25,9 @@
25 25 public List<DischargeAbstractMotherModel> query(DischargeAbstractMotherQuery dischargeAbstractMotherQuery) {
26 26 return dischargeAbstractMotherDao.query(dischargeAbstractMotherQuery.convertToQuery());
27 27 }
  28 +
  29 + public void update(DischargeAbstractMotherModel dischargeAbstractMotherModel) {
  30 + dischargeAbstractMotherDao.update(dischargeAbstractMotherModel);
  31 + }
28 32 }
platform-dal/src/main/java/com/lyms/platform/pojo/DischargeAbstractBabyModel.java View file @ d7e198e
... ... @@ -140,7 +140,7 @@
140 140 /**
141 141 * @auther HuJiaqi
142 142 * @createTime 2016年12月05日 17时44分
143   - * @discription 创建时间
  143 + * @discription 创建时间,每次操作都会更新
144 144 */
145 145 private Date createDate;
146 146  
platform-dal/src/main/java/com/lyms/platform/pojo/DischargeAbstractMotherModel.java View file @ d7e198e
... ... @@ -49,7 +49,7 @@
49 49 /**
50 50 * @auther HuJiaqi
51 51 * @createTime 2016年12月05日 17时03分
52   - * @discription 创建时间
  52 + * @discription 创建时间,每次操作都会更新
53 53 */
54 54 private Date createDate;
55 55  
... ... @@ -60,6 +60,11 @@
60 60 */
61 61 private String patientId;
62 62  
  63 + /**
  64 + * @auther HuJiaqi
  65 + * @createTime 2016年12月13日 10时23分
  66 + * @discription 操作人id,每次操作都会更新
  67 + */
63 68 private Integer operatorId;
64 69  
65 70 public String getId() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java View file @ d7e198e
... ... @@ -60,8 +60,11 @@
60 60 dischargeAbstractMotherModel.setCreateDate(new Date());
61 61 dischargeAbstractMotherModel.setOperatorId(dischargeAbstractSaveRequest.getOperatorId());
62 62 dischargeAbstractMotherModel.setAfterMakeBabyDays(DateUtil.getDays(DateUtil.parseYMD(dischargeAbstractSaveRequest.getFmDate()), new Date()));
63   - dischargeAbstractMotherModel = dischargeAbstractMotherService.save(dischargeAbstractMotherModel);
64   -
  63 + if (StringUtils.isEmpty(dischargeAbstractMotherModel.getId())) {
  64 + dischargeAbstractMotherModel = dischargeAbstractMotherService.save(dischargeAbstractMotherModel);
  65 + } else {
  66 + dischargeAbstractMotherService.update(dischargeAbstractMotherModel);
  67 + }
65 68 // 保存孩子信息
66 69 List<DischargeAbstractSaveRequest.Baby> babyList = dischargeAbstractSaveRequest.getBabyList();
67 70 List<DischargeAbstractBabyModel> dischargeAbstractBabyModelList = new ArrayList<>();
68 71  
... ... @@ -73,10 +76,16 @@
73 76 dischargeAbstractBabyModel.setCreateDate(new Date());
74 77 dischargeAbstractBabyModel.setbCGAndHBVVaccinationDate(DateUtil.parseYMD(baby.getbCGAndHBVVaccinationDate()));
75 78 dischargeAbstractBabyModel.sethBIGInjectDate(DateUtil.parseYMD(baby.gethBIGInjectDate()));
76   - dischargeAbstractBabyModelList.add(dischargeAbstractBabyModel);
  79 + if (StringUtils.isEmpty(dischargeAbstractBabyModel.getId())) {
  80 + dischargeAbstractBabyModelList.add(dischargeAbstractBabyModel);
  81 + } else {
  82 + dischargeAbstractBabyService.update(dischargeAbstractBabyModel);
  83 + }
77 84 }
78 85 }
79   - dischargeAbstractBabyService.batchSave(dischargeAbstractBabyModelList);
  86 + if (dischargeAbstractBabyModelList.size() > 0) {
  87 + dischargeAbstractBabyService.batchSave(dischargeAbstractBabyModelList);
  88 + }
80 89  
81 90 dischargeAbstractSaveResult.setErrorcode(ErrorCodeConstants.SUCCESS);
82 91 dischargeAbstractSaveResult.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/DischargeAbstractSaveRequest.java View file @ d7e198e
... ... @@ -11,6 +11,15 @@
11 11  
12 12 /**
13 13 * @auther HuJiaqi
  14 + * @createTime 2016年12月13日 11时00分
  15 + * @discription 母id
  16 + */
  17 + private String id;
  18 +
  19 + private Integer operatorId;
  20 +
  21 + /**
  22 + * @auther HuJiaqi
14 23 * @createTime 2016年12月05日 15时46分
15 24 * @discription 出院时间
16 25 */
... ... @@ -50,6 +59,13 @@
50 59  
51 60 /**
52 61 * @auther HuJiaqi
  62 + * @createTime 2016年12月13日 11时00分
  63 + * @discription 子id
  64 + */
  65 + private String id;
  66 +
  67 + /**
  68 + * @auther HuJiaqi
53 69 * @createTime 2016年12月05日 17时56分
54 70 * @discription 新生儿情况
55 71 */
... ... @@ -160,6 +176,14 @@
160 176 */
161 177 private String orderScreenDescription;
162 178  
  179 + public String getId() {
  180 + return id;
  181 + }
  182 +
  183 + public void setId(String id) {
  184 + this.id = id;
  185 + }
  186 +
163 187 public String getDescription() {
164 188 return description;
165 189 }
166 190  
167 191  
... ... @@ -283,13 +307,19 @@
283 307 public String getOrderScreenDescription() {
284 308 return orderScreenDescription;
285 309 }
286   -
287 310 public void setOrderScreenDescription(String orderScreenDescription) {
288 311 this.orderScreenDescription = orderScreenDescription;
289 312 }
  313 +
290 314 }
291 315  
292   - private Integer operatorId;
  316 + public String getId() {
  317 + return id;
  318 + }
  319 +
  320 + public void setId(String id) {
  321 + this.id = id;
  322 + }
293 323  
294 324 public Integer getOperatorId() {
295 325 return operatorId;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractBabyQueryModel.java View file @ d7e198e
... ... @@ -6,8 +6,16 @@
6 6 * @discription
7 7 */
8 8 public class DischargeAbstractBabyQueryModel {
  9 +
9 10 /**
10 11 * @auther HuJiaqi
  12 + * @createTime 2016年12月13日 10时20分
  13 + * @discription 子id
  14 + */
  15 + private String id;
  16 +
  17 + /**
  18 + * @auther HuJiaqi
11 19 * @createTime 2016年12月05日 17时56分
12 20 * @discription 新生儿情况
13 21 */
... ... @@ -117,6 +125,14 @@
117 125 * @discription 其他筛查具体信息
118 126 */
119 127 private String orderScreenDescription;
  128 +
  129 + public String getId() {
  130 + return id;
  131 + }
  132 +
  133 + public void setId(String id) {
  134 + this.id = id;
  135 + }
120 136  
121 137 public String getDescription() {
122 138 return description;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractMotherQueryModel.java View file @ d7e198e
... ... @@ -9,6 +9,13 @@
9 9  
10 10 /**
11 11 * @auther HuJiaqi
  12 + * @createTime 2016年12月13日 11时07分
  13 + * @discription 母id
  14 + */
  15 + private String id;
  16 +
  17 + /**
  18 + * @auther HuJiaqi
12 19 * @createTime 2016年12月05日 15时46分
13 20 * @discription 出院时间
14 21 */
... ... @@ -27,6 +34,14 @@
27 34 * @discription 产后时间,单位天
28 35 */
29 36 private Integer afterMakeBabyDays;
  37 +
  38 + public String getId() {
  39 + return id;
  40 + }
  41 +
  42 + public void setId(String id) {
  43 + this.id = id;
  44 + }
30 45  
31 46 public String getLeaveHospitalDate() {
32 47 return leaveHospitalDate;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractQueryResult.java View file @ d7e198e
... ... @@ -10,6 +10,7 @@
10 10 * @discription
11 11 */
12 12 public class DischargeAbstractQueryResult extends BaseResponse {
  13 +
13 14 /**
14 15 * @auther HuJiaqi
15 16 * @createTime 2016年12月06日 13时42分