Commit 9c105560840e4f485db5c1c86082e3e9c502b78f
1 parent
df898e965b
Exists in
master
and in
8 other branches
产妇增加字段
Showing 1 changed file with 11 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
View file @
9c10556
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import org.apache.commons.collections.CollectionUtils; |
9 | 9 | |
10 | 10 | import java.util.ArrayList; |
11 | +import java.util.Date; | |
11 | 12 | import java.util.List; |
12 | 13 | |
13 | 14 | /** |
... | ... | @@ -127,9 +128,11 @@ |
127 | 128 | setPhone(patients.getPhone()); |
128 | 129 | setRemarks("产妇备注"); |
129 | 130 | setRiskScore("60"); |
130 | - /* List<Map> list=new ArrayList<>(); | |
131 | - setRiskFactor();*/ | |
132 | - setDueWeek("孕3周"); | |
131 | + | |
132 | + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
133 | + String week= (days/7)+""; | |
134 | + int day = (days%7); | |
135 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
133 | 136 | if(null!=patients.getLastMenses()){ |
134 | 137 | setLastMenses(DateUtil.getYmd(patients.getLastMenses())); |
135 | 138 | } |
136 | 139 | |
... | ... | @@ -151,13 +154,16 @@ |
151 | 154 | private String checkTime; |
152 | 155 | public AntData(AntenatalExaminationModel model){ |
153 | 156 | this.id=model.getId(); |
154 | - this.dueWeek=""; | |
157 | + this.dueWeek=model.getCurrentDueDate(); | |
155 | 158 | this.checkTime=model.getCheckDate(); |
156 | 159 | } |
157 | 160 | |
158 | 161 | public AntData(AntExChuModel model){ |
159 | 162 | this.id=model.getId(); |
160 | - this.dueWeek=""; | |
163 | + int days= DateUtil.daysBetween(model.getLastMenses(),new Date()); | |
164 | + String week= (days/7)+""; | |
165 | + int day = (days%7); | |
166 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
161 | 167 | this.checkTime=model.getCheckTime(); |
162 | 168 | } |
163 | 169 | public String getCheckTime() { |