Commit aa9bd207984d27bfe0275b4b7245e106d50aa0bf
1 parent
d275f199da
Exists in
master
and in
8 other branches
产妇修改为分娩状态
Showing 1 changed file with 8 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PredictedStatisticsFacade.java
View file @
aa9bd20
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | predictedStatisticsQueryModel.setRiskLevelNameString(getRiskLevelString(riskLevelResultModelList)); |
| 94 | 94 | predictedStatisticsQueryModel.setRiskFactor(getRiskFactor(patients.getRiskFactorId())); |
| 95 | 95 | predictedStatisticsQueryModel.setLastCheckEmployee(getLastCheckEmployee(patients.getLastCheckEmployeeId())); |
| 96 | - predictedStatisticsQueryModel.setGestationalWeeks(getGestationalWeeks(patients.getLastMenses())); | |
| 96 | + predictedStatisticsQueryModel.setGestationalWeeks(getGestationalWeeks(patients.getLastMenses(), patients.getType())); | |
| 97 | 97 | predictedStatisticsQueryModelList.add(predictedStatisticsQueryModel); |
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | |
| ... | ... | @@ -149,21 +149,24 @@ |
| 149 | 149 | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - private static String getGestationalWeeks(Date date) { | |
| 153 | - String str = ""; | |
| 152 | + private static String getGestationalWeeks(Date date, int type) { | |
| 153 | + if (type == 3) { | |
| 154 | + return "已分娩"; | |
| 155 | + } | |
| 154 | 156 | try { |
| 157 | + String str = "孕"; | |
| 155 | 158 | long s = new Date().getTime() - date.getTime(); |
| 156 | 159 | long d = s / (60 * 60 * 24 * 1000); |
| 157 | 160 | int day = (int) d; |
| 158 | 161 | int w = day / 7; |
| 159 | 162 | int dd = day % 7; |
| 160 | - str += "孕" + w + "周"; | |
| 163 | + str += w + "周"; | |
| 161 | 164 | if (dd != 0) { |
| 162 | 165 | str += "+" + dd + "天"; |
| 163 | 166 | } |
| 164 | 167 | return str; |
| 165 | 168 | } catch (Exception e) { |
| 166 | - return str; | |
| 169 | + return ""; | |
| 167 | 170 | } |
| 168 | 171 | } |
| 169 | 172 |