Commit c3ad7d3ebdfcf54e702b16e448cc0f9fa5f703fa
1 parent
32b9ecbf93
Exists in
master
and in
1 other branch
威海产后观察记录
Showing 5 changed files with 270 additions and 0 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IRecordsDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/RecordsDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/RecordsService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/Records.java
- platform-dal/src/main/java/com/lyms/platform/query/RecordsQuery.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IRecordsDao.java
View file @
c3ad7d3
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.Records; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by Administrator on 2019/1/11. | |
| 10 | + */ | |
| 11 | +public interface IRecordsDao { | |
| 12 | + | |
| 13 | + public List<Records> queryRecordsList(MongoQuery query); | |
| 14 | + | |
| 15 | + public void deleteOneRecord(MongoQuery query); | |
| 16 | + | |
| 17 | + public void updateRecordsById(Records obj,String id); | |
| 18 | + | |
| 19 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/RecordsDaoImpl.java
View file @
c3ad7d3
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IRecordsDao; | |
| 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; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.pojo.PostpartumRecords; | |
| 9 | +import com.lyms.platform.pojo.Records; | |
| 10 | +import org.springframework.stereotype.Repository; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * Created by Administrator on 2019/1/11. | |
| 16 | + */ | |
| 17 | +@Repository("recordsDao") | |
| 18 | +public class RecordsDaoImpl extends BaseMongoDAOImpl<Records> implements IRecordsDao { | |
| 19 | + | |
| 20 | + public List<Records> queryRecordsList(MongoQuery query){ | |
| 21 | + return find(query.convertToMongoQuery()); | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void deleteOneRecord(MongoQuery query){ | |
| 25 | + delete(query.convertToMongoQuery()); | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void updateRecordsById(Records obj,String id){ | |
| 29 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), obj); | |
| 30 | + } | |
| 31 | + | |
| 32 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/RecordsService.java
View file @
c3ad7d3
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IRecordsDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.pojo.Records; | |
| 6 | +import com.lyms.platform.query.RecordsQuery; | |
| 7 | +import org.apache.commons.lang.StringUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.data.domain.Sort; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * Created by Administrator on 2019/1/11. | |
| 16 | + */ | |
| 17 | +@Service("recordsService") | |
| 18 | +public class RecordsService { | |
| 19 | + @Autowired | |
| 20 | + private IRecordsDao recordsDao; | |
| 21 | + | |
| 22 | + public List<Records> getBabySieveQuery(RecordsQuery recordsQuery){ | |
| 23 | + MongoQuery query = recordsQuery.convertToQuery(); | |
| 24 | + return recordsDao.queryRecordsList(query.addOrder(Sort.Direction.DESC, "created")); | |
| 25 | + } | |
| 26 | + | |
| 27 | + public void deleteOneRecord(RecordsQuery recordsQuery){ | |
| 28 | + MongoQuery query = recordsQuery.convertToQuery(); | |
| 29 | + recordsDao.deleteOneRecord(query); | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void updateRecordsById(Records obj,String id){ | |
| 33 | + recordsDao.updateRecordsById(obj,id); | |
| 34 | + } | |
| 35 | + | |
| 36 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/Records.java
View file @
c3ad7d3
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 4 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * Created by Administrator on 2019/1/11. | |
| 8 | + *产后观察记录详情 | |
| 9 | + */ | |
| 10 | +@Document(collection = "lyms_records") | |
| 11 | +public class Records { | |
| 12 | + private static final long serialVersionUID = SerialIdEnum.Records.getCid(); | |
| 13 | + private String id; | |
| 14 | + private String postId;//产后观察基本表ID | |
| 15 | + private String date;//时间 | |
| 16 | + private String tw;//体温 | |
| 17 | + private String xy;//血压 | |
| 18 | + private String mb;//脉搏 | |
| 19 | + private String xybhd;//血氧饱和度 | |
| 20 | + private String gd;//宫底 | |
| 21 | + private String cxl;//出血量 | |
| 22 | + private String pgjc;//膀胱检查 | |
| 23 | + private String hyqk;//会阴情况 | |
| 24 | + private String nz;//内诊 | |
| 25 | + private String fz;//附注 | |
| 26 | + private String qm;//签名 | |
| 27 | + | |
| 28 | + public String getPostId() { | |
| 29 | + return postId; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setPostId(String postId) { | |
| 33 | + this.postId = postId; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public String getDate() { | |
| 37 | + return date; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public void setDate(String date) { | |
| 41 | + this.date = date; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public String getTw() { | |
| 45 | + return tw; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void setTw(String tw) { | |
| 49 | + this.tw = tw; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public String getXy() { | |
| 53 | + return xy; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public void setXy(String xy) { | |
| 57 | + this.xy = xy; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public String getMb() { | |
| 61 | + return mb; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void setMb(String mb) { | |
| 65 | + this.mb = mb; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public String getXybhd() { | |
| 69 | + return xybhd; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void setXybhd(String xybhd) { | |
| 73 | + this.xybhd = xybhd; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public String getGd() { | |
| 77 | + return gd; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void setGd(String gd) { | |
| 81 | + this.gd = gd; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public String getCxl() { | |
| 85 | + return cxl; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setCxl(String cxl) { | |
| 89 | + this.cxl = cxl; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public String getPgjc() { | |
| 93 | + return pgjc; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void setPgjc(String pgjc) { | |
| 97 | + this.pgjc = pgjc; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public String getHyqk() { | |
| 101 | + return hyqk; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setHyqk(String hyqk) { | |
| 105 | + this.hyqk = hyqk; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public String getNz() { | |
| 109 | + return nz; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setNz(String nz) { | |
| 113 | + this.nz = nz; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public String getFz() { | |
| 117 | + return fz; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void setFz(String fz) { | |
| 121 | + this.fz = fz; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public String getQm() { | |
| 125 | + return qm; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setQm(String qm) { | |
| 129 | + this.qm = qm; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public String getId() { | |
| 133 | + return id; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setId(String id) { | |
| 137 | + this.id = id; | |
| 138 | + } | |
| 139 | +} |
platform-dal/src/main/java/com/lyms/platform/query/RecordsQuery.java
View file @
c3ad7d3
| 1 | +package com.lyms.platform.query; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
| 4 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * Created by Administrator on 2019/1/11. | |
| 11 | + * 产后观察记录详情查询模板 | |
| 12 | + */ | |
| 13 | +public class RecordsQuery extends BaseQuery implements IConvertToNativeQuery { | |
| 14 | + | |
| 15 | + private String id;//主键ID | |
| 16 | + private String postId;//产后观察基本表ID | |
| 17 | + | |
| 18 | + public MongoQuery convertToQuery() { | |
| 19 | + MongoCondition condition = MongoCondition.newInstance(); | |
| 20 | + if(null != id){ | |
| 21 | + condition = condition.and("id", id, MongoOper.IS); | |
| 22 | + } | |
| 23 | + if(null !=postId){ | |
| 24 | + condition = condition.and("postId", postId, MongoOper.IS); | |
| 25 | + } | |
| 26 | + return condition.toMongoQuery(); | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getId() { | |
| 30 | + return id; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setId(String id) { | |
| 34 | + this.id = id; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getPostId() { | |
| 38 | + return postId; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setPostId(String postId) { | |
| 42 | + this.postId = postId; | |
| 43 | + } | |
| 44 | +} |