Commit 94bc3a382b1c292c79123331cb0aad9e17e432bf
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PremaritalCheckupController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PredictedStatisticsFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PredictedStatisticsQueryModel.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PremaritalCheckupController.java
View file @
94bc3a3
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PredictedStatisticsFacade.java
View file @
94bc3a3
| ... | ... | @@ -7,7 +7,6 @@ |
| 7 | 7 | import com.lyms.platform.common.enums.YnEnums; |
| 8 | 8 | import com.lyms.platform.common.utils.BeanUtils; |
| 9 | 9 | import com.lyms.platform.common.utils.DateUtil; |
| 10 | -import com.lyms.platform.common.utils.StringUtils; | |
| 11 | 10 | import com.lyms.platform.operate.web.request.PredictedStatisticsRequest; |
| 12 | 11 | import com.lyms.platform.operate.web.request.PredictedStatisticsSumRequest; |
| 13 | 12 | import com.lyms.platform.operate.web.result.PredictedStatisticsQueryModel; |
| ... | ... | @@ -27,6 +26,8 @@ |
| 27 | 26 | import java.util.Date; |
| 28 | 27 | import java.util.List; |
| 29 | 28 | |
| 29 | +import static org.springframework.util.StringUtils.isEmpty; | |
| 30 | + | |
| 30 | 31 | /** |
| 31 | 32 | * @auther HuJiaqi |
| 32 | 33 | * @createTime 2016年11月28日 11时36分 |
| ... | ... | @@ -54,7 +55,7 @@ |
| 54 | 55 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| 55 | 56 | String ym = predictedStatisticsRequest.getDate(); |
| 56 | 57 | Date date; |
| 57 | - if (!StringUtils.isEmpty(ym)) { | |
| 58 | + if (!isEmpty(ym)) { | |
| 58 | 59 | try { |
| 59 | 60 | date = simpleDateFormat.parse(predictedStatisticsRequest.getDate()); |
| 60 | 61 | } catch (Exception e) { |
| ... | ... | @@ -76,7 +77,7 @@ |
| 76 | 77 | patientsQuery.setTypeList(typeList); |
| 77 | 78 | patientsQuery.setSort("dueDate"); |
| 78 | 79 | String doctorId = predictedStatisticsRequest.getDoctorId(); |
| 79 | - if (!StringUtils.isEmpty(doctorId)) { | |
| 80 | + if (!isEmpty(doctorId)) { | |
| 80 | 81 | patientsQuery.setLastCheckEmployeeId(doctorId); |
| 81 | 82 | } |
| 82 | 83 | patientsQuery.setBuildTypeNot(1); |
| ... | ... | @@ -94,6 +95,7 @@ |
| 94 | 95 | predictedStatisticsQueryModel.setRiskFactor(getRiskFactor(patients.getRiskFactorId())); |
| 95 | 96 | predictedStatisticsQueryModel.setLastCheckEmployee(getLastCheckEmployee(patients.getLastCheckEmployeeId())); |
| 96 | 97 | predictedStatisticsQueryModel.setGestationalWeeks(getGestationalWeeks(patients.getLastMenses(), patients.getType(), patients.getDueStatus())); |
| 98 | + predictedStatisticsQueryModel.setRiskScore(getRiskScore(patients.getRiskScore())); | |
| 97 | 99 | predictedStatisticsQueryModelList.add(predictedStatisticsQueryModel); |
| 98 | 100 | } |
| 99 | 101 | } |
| ... | ... | @@ -121,7 +123,7 @@ |
| 121 | 123 | patientsQuery.setTypeList(typeList); |
| 122 | 124 | patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(predictedStatisticsRequest.getOperatorId())); |
| 123 | 125 | String doctorId = predictedStatisticsRequest.getDoctorId(); |
| 124 | - if (!StringUtils.isEmpty(doctorId)) { | |
| 126 | + if (!isEmpty(doctorId)) { | |
| 125 | 127 | patientsQuery.setLastCheckEmployeeId(doctorId); |
| 126 | 128 | } |
| 127 | 129 | patientsQuery.setBuildTypeNot(1); |
| 128 | 130 | |
| ... | ... | @@ -151,9 +153,9 @@ |
| 151 | 153 | |
| 152 | 154 | private static String getGestationalWeeks(Date date, int type, Integer dueStatus) { |
| 153 | 155 | if (type == 3) { |
| 154 | - if (dueStatus!=null&&dueStatus == 0 ) { | |
| 156 | + if (dueStatus != null && dueStatus == 0) { | |
| 155 | 157 | return "已分娩"; |
| 156 | - } else if (dueStatus!=null&&dueStatus == 1) { | |
| 158 | + } else if (dueStatus != null && dueStatus == 1) { | |
| 157 | 159 | return "终止妊娠"; |
| 158 | 160 | } else { |
| 159 | 161 | return "已分娩"; |
| ... | ... | @@ -247,7 +249,6 @@ |
| 247 | 249 | return riskFactor; |
| 248 | 250 | } |
| 249 | 251 | |
| 250 | - | |
| 251 | 252 | private String getLastCheckEmployee(String str) { |
| 252 | 253 | try { |
| 253 | 254 | return usersService.getUsers(Integer.valueOf(str)).getName(); |
| ... | ... | @@ -255,5 +256,13 @@ |
| 255 | 256 | return ""; |
| 256 | 257 | } |
| 257 | 258 | } |
| 259 | + | |
| 260 | + private String getRiskScore(Integer in) { | |
| 261 | + if (in == null || in == 0) { | |
| 262 | + return ""; | |
| 263 | + } | |
| 264 | + return in.toString(); | |
| 265 | + } | |
| 266 | + | |
| 258 | 267 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PredictedStatisticsQueryModel.java
View file @
94bc3a3
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | * @createTime 2016年11月29日 17时05分 |
| 34 | 34 | * @discription 高危评分 |
| 35 | 35 | */ |
| 36 | - private Integer riskScore; | |
| 36 | + private String riskScore; | |
| 37 | 37 | /** |
| 38 | 38 | * @auther HuJiaqi |
| 39 | 39 | * @createTime 2016年11月29日 17时06分 |
| 40 | 40 | |
| ... | ... | @@ -106,11 +106,11 @@ |
| 106 | 106 | this.dueDate = dueDate; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - public Integer getRiskScore() { | |
| 109 | + public String getRiskScore() { | |
| 110 | 110 | return riskScore; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - public void setRiskScore(Integer riskScore) { | |
| 113 | + public void setRiskScore(String riskScore) { | |
| 114 | 114 | this.riskScore = riskScore; |
| 115 | 115 | } |
| 116 | 116 |