Commit 7c4f4500201e2ac9df3d7f15f7b4a4d75de8dc03
1 parent
a5f925a9ca
Exists in
master
and in
8 other branches
孕妇分娩后 变成产妇
Showing 1 changed file with 5 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
7c4f450
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.utils.DateUtil; |
| 4 | +import com.lyms.platform.common.utils.StringUtils; | |
| 4 | 5 | import com.lyms.platform.pojo.Patients; |
| 5 | 6 | |
| 6 | 7 | import java.util.Date; |
| ... | ... | @@ -95,6 +96,9 @@ |
| 95 | 96 | } |
| 96 | 97 | |
| 97 | 98 | public String getRiskScore() { |
| 99 | + if(null==riskScore){ | |
| 100 | + return "0"; | |
| 101 | + } | |
| 98 | 102 | return riskScore; |
| 99 | 103 | } |
| 100 | 104 | |
| ... | ... | @@ -128,9 +132,7 @@ |
| 128 | 132 | if(null!=patients.getLastMenses()){ |
| 129 | 133 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 130 | 134 | int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); |
| 131 | - String week= (days/7)+""; | |
| 132 | - int day = (days%7); | |
| 133 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 135 | + this.dueWeek=StringUtils.dueWeek(days); | |
| 134 | 136 | } |
| 135 | 137 | return this; |
| 136 | 138 | } |