Commit 68cbe5f3ef7edf633278e67e61fdda905790e754
1 parent
4db195681f
Exists in
master
and in
6 other branches
update code
Showing 2 changed files with 21 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
68cbe5f
| ... | ... | @@ -154,6 +154,9 @@ |
| 154 | 154 | map.put("serviceType",serviceType ); |
| 155 | 155 | map.put("serviceStatus", ServiceStatusEnums.getNameById(data.getServiceStatus())); |
| 156 | 156 | |
| 157 | + //建档孕周 | |
| 158 | + map.put("buildDueWeek",ResolveUtils.getPregnancyWeek(data,data.getBookbuildingDate())); | |
| 159 | + | |
| 157 | 160 | br.setData(map); |
| 158 | 161 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 159 | 162 | br.setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/ResolveUtils.java
View file @
68cbe5f
| ... | ... | @@ -300,8 +300,8 @@ |
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(color)); |
| 303 | - map.put("score",pingfen); | |
| 304 | - map.put("name",yinsu); | |
| 303 | + map.put("score", pingfen); | |
| 304 | + map.put("name", yinsu); | |
| 305 | 305 | return map; |
| 306 | 306 | } |
| 307 | 307 | |
| ... | ... | @@ -357,6 +357,22 @@ |
| 357 | 357 | } else { |
| 358 | 358 | if (null != patients.getLastMenses()) { |
| 359 | 359 | int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); |
| 360 | + dueWeek = com.lyms.platform.common.utils.StringUtils.dueWeek(days); | |
| 361 | + } | |
| 362 | + } | |
| 363 | + return dueWeek; | |
| 364 | + } | |
| 365 | + | |
| 366 | + | |
| 367 | + public static String getPregnancyWeek(Patients patients,Date date){ | |
| 368 | + String dueWeek=""; | |
| 369 | + if (null != patients.getDueStatus() && 1 == patients.getDueStatus()) { | |
| 370 | + dueWeek = "终止妊娠"; | |
| 371 | + } else if (3 == patients.getType()) { | |
| 372 | + dueWeek = "已分娩"; | |
| 373 | + } else { | |
| 374 | + if (null != patients.getLastMenses()) { | |
| 375 | + int days = DateUtil.daysBetween(patients.getLastMenses(), date); | |
| 360 | 376 | dueWeek = com.lyms.platform.common.utils.StringUtils.dueWeek(days); |
| 361 | 377 | } |
| 362 | 378 | } |