Commit 25ac2269909eec4c5e5dbe062b528f0fa3af6437
1 parent
8960d10c5e
Exists in
master
1
Showing 2 changed files with 66 additions and 7 deletions
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/FetationStages.java
View file @
25ac226
| 1 | +package com.lyms.hospital.entity.woman; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * <li>@ClassName: 孕妇产程 | |
| 7 | + * <li>@Description: TODO(类描述) | |
| 8 | + * <li>@author 方承 | |
| 9 | + * <li>@date 2017年4月25日 | |
| 10 | + * <li> | |
| 11 | + */ | |
| 12 | +public class FetationStages { | |
| 13 | + private String id; | |
| 14 | + private String title; | |
| 15 | + private Date checkTime; | |
| 16 | + private Integer type; | |
| 17 | + private String hospitalId; | |
| 18 | + private String hospitalName; | |
| 19 | + public String getId() { | |
| 20 | + return id; | |
| 21 | + } | |
| 22 | + public void setId(String id) { | |
| 23 | + this.id = id; | |
| 24 | + } | |
| 25 | + public String getTitle() { | |
| 26 | + return title; | |
| 27 | + } | |
| 28 | + public void setTitle(String title) { | |
| 29 | + this.title = title; | |
| 30 | + } | |
| 31 | + public Date getCheckTime() { | |
| 32 | + return checkTime; | |
| 33 | + } | |
| 34 | + public void setCheckTime(Date checkTime) { | |
| 35 | + this.checkTime = checkTime; | |
| 36 | + } | |
| 37 | + public Integer getType() { | |
| 38 | + return type; | |
| 39 | + } | |
| 40 | + public void setType(Integer type) { | |
| 41 | + this.type = type; | |
| 42 | + } | |
| 43 | + public String getHospitalId() { | |
| 44 | + return hospitalId; | |
| 45 | + } | |
| 46 | + public void setHospitalId(String hospitalId) { | |
| 47 | + this.hospitalId = hospitalId; | |
| 48 | + } | |
| 49 | + public String getHospitalName() { | |
| 50 | + return hospitalName; | |
| 51 | + } | |
| 52 | + public void setHospitalName(String hospitalName) { | |
| 53 | + this.hospitalName = hospitalName; | |
| 54 | + } | |
| 55 | + | |
| 56 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java
View file @
25ac226
| ... | ... | @@ -193,17 +193,20 @@ |
| 193 | 193 | List<FetationStages> dataList = fetationMapper.getFetationStages(personId); |
| 194 | 194 | //产程列表 |
| 195 | 195 | List<List<FetationStages>> ccList = InstanceUtils.newArrayList(); |
| 196 | - | |
| 197 | - boolean isSameStages = true;//是否同一产程 | |
| 198 | 196 | List<FetationStages> oneStages = InstanceUtils.newArrayList();//初始化第一个产程列表 |
| 199 | - FetationStages agoFetation =null; | |
| 197 | + Integer agoType = 0;//记录上一次阶段的type类型,用于是否新产程的判断 | |
| 200 | 198 | for(FetationStages entity : dataList){ |
| 201 | - if(isSameStages){ | |
| 199 | + if(agoType > 3){//代表是复诊以后的阶段 | |
| 200 | + if(entity.getType() == 1){//agoType > 3 && entity.getType() == 1 代表一个新的产程 | |
| 201 | + ccList.add(oneStages); | |
| 202 | + oneStages = InstanceUtils.newArrayList();//新的一个产程 | |
| 203 | + agoType = 1; | |
| 204 | + continue; | |
| 205 | + } | |
| 206 | + agoType = entity.getType(); | |
| 202 | 207 | oneStages.add(entity); |
| 203 | - }else{ | |
| 204 | - ccList.add(oneStages); | |
| 205 | - oneStages = InstanceUtils.newArrayList(); | |
| 206 | 208 | } |
| 209 | + oneStages.add(entity); | |
| 207 | 210 | } |
| 208 | 211 | return ccList; |
| 209 | 212 | } |