Commit 8960d10c5e107a7ad74e2c470a36fe438a79c300
1 parent
d06fedde66
Exists in
master
产程模块
Showing 4 changed files with 65 additions and 0 deletions
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/WomanFetationRecordMapper.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/WomanFetationRecord.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/WomanFetationRecordService.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/WomanFetationRecordMapper.java
View file @
8960d10
1 | 1 | package com.lyms.hospital.dao.woman; |
2 | 2 | |
3 | +import com.lyms.hospital.entity.woman.FetationStages; | |
3 | 4 | import com.lyms.hospital.entity.woman.WomanFetationRecord; |
4 | 5 | import com.baomidou.mybatisplus.mapper.BaseMapper; |
5 | 6 | |
... | ... | @@ -46,6 +47,9 @@ |
46 | 47 | * <li>修改时间: |
47 | 48 | */ |
48 | 49 | public WomanFetationRecord selectDetailById(String id); |
50 | + | |
51 | + | |
52 | + public List<FetationStages> getFetationStages(Serializable personId); | |
49 | 53 | |
50 | 54 | } |
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/WomanFetationRecord.java
View file @
8960d10
... | ... | @@ -291,6 +291,23 @@ |
291 | 291 | //隐藏建档源ID |
292 | 292 | @TableField(value="SOURCE_ID") |
293 | 293 | private String sourceId; |
294 | + | |
295 | + /** | |
296 | + * 分娩日期 | |
297 | + */ | |
298 | + @TableField(value="FM_DATE") | |
299 | + private Date fmDate; | |
300 | + /** | |
301 | + * 是否自动分娩,0不是,1是 | |
302 | + */ | |
303 | + @TableField(value="IFAUTOFM") | |
304 | + private Integer ifautofm; | |
305 | + | |
306 | + /** | |
307 | + * 孕妇状态,1孕妇,3产妇 | |
308 | + */ | |
309 | + @TableField(value="STATE") | |
310 | + private Integer state; | |
294 | 311 | |
295 | 312 | //格式化字段 |
296 | 313 | @TableField(exist=false) |
... | ... | @@ -815,6 +832,14 @@ |
815 | 832 | public void setSourceId(String sourceId) { |
816 | 833 | this.sourceId = sourceId; |
817 | 834 | } |
835 | + | |
836 | + public Date getFmDate() { | |
837 | + return fmDate; | |
838 | + } | |
839 | + | |
840 | + public void setFmDate(Date fmDate) { | |
841 | + this.fmDate = fmDate; | |
842 | + } | |
818 | 843 | |
819 | 844 | |
820 | 845 | } |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/WomanFetationRecordService.java
View file @
8960d10
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | import java.util.List; |
5 | 5 | import java.util.Map; |
6 | 6 | |
7 | +import com.lyms.hospital.entity.woman.FetationStages; | |
7 | 8 | import com.lyms.hospital.entity.woman.WomanFetationRecord; |
8 | 9 | import com.lyms.hospital.entity.woman.WomanHusband; |
9 | 10 | import com.lyms.web.service.BaseService; |
... | ... | @@ -133,5 +134,18 @@ |
133 | 134 | * <li>修改时间: |
134 | 135 | */ |
135 | 136 | public WomanFetationRecord selectDetailById(String id); |
137 | + | |
138 | + | |
139 | + /** | |
140 | + * <li>@Description:根据居民表id获取孕妇产程 | |
141 | + * <li>@param personId | |
142 | + * <li>@return | |
143 | + * <li>创建人:方承 | |
144 | + * <li>创建时间:2017年4月25日 | |
145 | + * <li>修改人: | |
146 | + * <li>修改时间: | |
147 | + */ | |
148 | + public List<List<FetationStages>> getFetationStages(Serializable personId); | |
149 | + | |
136 | 150 | } |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java
View file @
8960d10
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
16 | 16 | import com.lyms.exception.SystemException; |
17 | 17 | import com.lyms.hospital.dao.woman.WomanFetationRecordMapper; |
18 | +import com.lyms.hospital.entity.woman.FetationStages; | |
18 | 19 | import com.lyms.hospital.entity.woman.WomanFetationRecord; |
19 | 20 | import com.lyms.hospital.entity.woman.WomanHusband; |
20 | 21 | import com.lyms.hospital.enums.IfdelEnum; |
... | ... | @@ -23,6 +24,7 @@ |
23 | 24 | import com.lyms.hospital.service.woman.WomanHusbandService; |
24 | 25 | import com.lyms.hospital.service.woman.WomanPersonService; |
25 | 26 | import com.lyms.util.CollectionUtils; |
27 | +import com.lyms.util.InstanceUtils; | |
26 | 28 | import com.lyms.util.StrUtils; |
27 | 29 | |
28 | 30 | /** |
... | ... | @@ -185,5 +187,25 @@ |
185 | 187 | query.setDueStatus(0);//分娩状态 0未终止妊娠 1终止妊娠 |
186 | 188 | return queryOne(query); |
187 | 189 | } |
190 | + | |
191 | + @Override | |
192 | + public List<List<FetationStages>> getFetationStages(Serializable personId) { | |
193 | + List<FetationStages> dataList = fetationMapper.getFetationStages(personId); | |
194 | + //产程列表 | |
195 | + List<List<FetationStages>> ccList = InstanceUtils.newArrayList(); | |
196 | + | |
197 | + boolean isSameStages = true;//是否同一产程 | |
198 | + List<FetationStages> oneStages = InstanceUtils.newArrayList();//初始化第一个产程列表 | |
199 | + FetationStages agoFetation =null; | |
200 | + for(FetationStages entity : dataList){ | |
201 | + if(isSameStages){ | |
202 | + oneStages.add(entity); | |
203 | + }else{ | |
204 | + ccList.add(oneStages); | |
205 | + oneStages = InstanceUtils.newArrayList(); | |
206 | + } | |
207 | + } | |
208 | + return ccList; | |
209 | + } | |
188 | 210 | } |