Commit 6718f07299883aa80c482816e1c2fb50f85b6854

Authored by jiangjiazhi
1 parent 4c82647c6e

增加设置parentid

Showing 2 changed files with 20 additions and 7 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ReferralApplyOrderDaoImpl.java View file @ 6718f07
... ... @@ -4,21 +4,21 @@
4 4 import com.lyms.platform.common.dao.BaseMongoDAOImpl;
5 5 import com.lyms.platform.common.dao.operator.MongoQuery;
6 6 import com.lyms.platform.pojo.ReferralApplyOrderModel;
7   -import com.lyms.platform.query.ReferralApplyOrderQuery;
8 7 import org.springframework.stereotype.Repository;
9 8  
  9 +import java.util.Date;
10 10 import java.util.List;
11 11  
12 12 /**
13   - *
14 13 * 转诊实现
15   - *
  14 + * <p>
16 15 * Created by Administrator on 2016/6/15 0015.
17 16 */
18 17 @Repository("referralApplyOrderDao")
19   -public class ReferralApplyOrderDaoImpl extends BaseMongoDAOImpl<ReferralApplyOrderModel> implements IReferralApplyOrderDao{
  18 +public class ReferralApplyOrderDaoImpl extends BaseMongoDAOImpl<ReferralApplyOrderModel> implements IReferralApplyOrderDao {
20 19 @Override
21 20 public ReferralApplyOrderModel addReferralApplyOrder(ReferralApplyOrderModel obj) {
  21 + obj.setModified(new Date());
22 22 return save(obj);
23 23 }
24 24  
25 25  
... ... @@ -26,11 +26,14 @@
26 26 public List<ReferralApplyOrderModel> queryList(MongoQuery mongoQuery) {
27 27 return find(mongoQuery.convertToMongoQuery());
28 28 }
29   - public Integer count(MongoQuery mongoQuery){
  29 +
  30 + public Integer count(MongoQuery mongoQuery) {
30 31 return (int) count(mongoQuery.convertToMongoQuery());
31 32 }
32   - public void findAndModify(MongoQuery referralApplyOrderQuery,ReferralApplyOrderModel orderModel){
33   - findAndModify(referralApplyOrderQuery.convertToMongoQuery(),orderModel);
  33 +
  34 + public void findAndModify(MongoQuery referralApplyOrderQuery, ReferralApplyOrderModel orderModel) {
  35 + orderModel.setModified(new Date());
  36 + findAndModify(referralApplyOrderQuery.convertToMongoQuery(), orderModel);
34 37 }
35 38 }
platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java View file @ 6718f07
... ... @@ -63,10 +63,20 @@
63 63 private Date received;
64 64 //创建时间
65 65 private Date created;
  66 + //修改时间
  67 + private Date modified;
66 68 //申请单状态 0 已接收 1 已转出 2 建议转诊
67 69 private Integer status;
68 70 //转诊类型 1 儿童 2 孕妇
69 71 private Integer type;
  72 +
  73 + public Date getModified() {
  74 + return modified;
  75 + }
  76 +
  77 + public void setModified(Date modified) {
  78 + this.modified = modified;
  79 + }
70 80  
71 81 public Integer getExpVip() {
72 82 return expVip;