diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/FetationStages.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/FetationStages.java new file mode 100644 index 0000000..94d94a8 --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/FetationStages.java @@ -0,0 +1,56 @@ +package com.lyms.hospital.entity.woman; + +import java.util.Date; + +/** + *
  • @ClassName: 孕妇产程 + *
  • @Description: TODO(类描述) + *
  • @author 方承 + *
  • @date 2017年4月25日 + *
  • + */ +public class FetationStages { + private String id; + private String title; + private Date checkTime; + private Integer type; + private String hospitalId; + private String hospitalName; + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public Date getCheckTime() { + return checkTime; + } + public void setCheckTime(Date checkTime) { + this.checkTime = checkTime; + } + public Integer getType() { + return type; + } + public void setType(Integer type) { + this.type = type; + } + public String getHospitalId() { + return hospitalId; + } + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + public String getHospitalName() { + return hospitalName; + } + public void setHospitalName(String hospitalName) { + this.hospitalName = hospitalName; + } + +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java index 6c75f75..662c406 100644 --- a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanFetationRecordServiceImpl.java @@ -193,17 +193,20 @@ public class WomanFetationRecordServiceImpl extends ServiceImpl dataList = fetationMapper.getFetationStages(personId); //产程列表 List> ccList = InstanceUtils.newArrayList(); - - boolean isSameStages = true;//是否同一产程 List oneStages = InstanceUtils.newArrayList();//初始化第一个产程列表 - FetationStages agoFetation =null; + Integer agoType = 0;//记录上一次阶段的type类型,用于是否新产程的判断 for(FetationStages entity : dataList){ - if(isSameStages){ + if(agoType > 3){//代表是复诊以后的阶段 + if(entity.getType() == 1){//agoType > 3 && entity.getType() == 1 代表一个新的产程 + ccList.add(oneStages); + oneStages = InstanceUtils.newArrayList();//新的一个产程 + agoType = 1; + continue; + } + agoType = entity.getType(); oneStages.add(entity); - }else{ - ccList.add(oneStages); - oneStages = InstanceUtils.newArrayList(); } + oneStages.add(entity); } return ccList; }