Commit 41864ccaaa534cd07796414c21c2bf991bcef061
1 parent
470931bb35
Exists in
master
and in
8 other branches
增加统计
Showing 1 changed file with 17 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
41864cc
... | ... | @@ -111,6 +111,23 @@ |
111 | 111 | for (AntExRecordModel record : list2) { |
112 | 112 | CjStatisticsListResult cjStatisticsListResult = new CjStatisticsListResult(); |
113 | 113 | cjStatisticsListResult.convertToResult(record); |
114 | + Patients patients = patientsService.findOnePatientById(record.getParentId()); | |
115 | + String dueWeek = ""; | |
116 | + if (null != patients) { | |
117 | + if (patients.getDueStatus() == 1) { | |
118 | + dueWeek = "终止妊娠"; | |
119 | + } else if (null != patients.getFmDate()) { | |
120 | + dueWeek = "已分娩"; | |
121 | + } else { | |
122 | + int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
123 | + String week = (days / 7) + ""; | |
124 | + int day = (days % 7); | |
125 | + dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : ""); | |
126 | + } | |
127 | + cjStatisticsListResult.setDueWeek(dueWeek); | |
128 | + } | |
129 | + | |
130 | + | |
114 | 131 | Users users = usersService.getUsers(NumberUtils.toInt(record.getCheckDoctor())); |
115 | 132 | if (null != users) { |
116 | 133 | cjStatisticsListResult.setCheckDoctor(users.getName()); |