Commit bfae6821f93a9f9cc4b0a0b09c2ec561cc3c7e51
1 parent
4fc6236da7
Exists in
master
and in
1 other branch
全部孕妇管理增加按照排序
Showing 1 changed file with 22 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TempFacade.java
View file @
bfae682
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.biz.service.CommonService; | |
| 3 | 4 | import com.lyms.platform.biz.service.PatientsService; |
| 4 | 5 | import com.lyms.platform.biz.service.TempService; |
| 5 | 6 | import com.lyms.platform.common.base.ContextHolder; |
| ... | ... | @@ -55,6 +56,8 @@ |
| 55 | 56 | private PatientsService patientsService; |
| 56 | 57 | @Autowired |
| 57 | 58 | private MongoUtil mongoUtil; |
| 59 | + @Autowired | |
| 60 | + private CommonService commonService; | |
| 58 | 61 | |
| 59 | 62 | public BaseResponse addOrUpdateOneTemp(TempAddRequest addRequest, Integer userId) { |
| 60 | 63 | Assert.notNull(addRequest, "请求为空."); |
| 61 | 64 | |
| ... | ... | @@ -153,12 +156,31 @@ |
| 153 | 156 | data.put("patientId", patients.getId()); |
| 154 | 157 | data.put("vcCardNo", patients.getVcCardNo()); |
| 155 | 158 | data.put("cardNo", patients.getCardNo()); |
| 159 | + data.put("status", getTempStatus(Double.valueOf(tmp.getNow()))); | |
| 160 | + data.put("level", commonService.findRiskLevel(patients.getRiskLevelId())); | |
| 161 | + data.put("rFactor", commonService.resloveFactor(patients.getRiskFactorId())); | |
| 156 | 162 | dataList.add(data); |
| 157 | 163 | } |
| 158 | 164 | } |
| 159 | 165 | } |
| 160 | 166 | } |
| 161 | 167 | return new BaseListResponse().setData(dataList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 168 | + } | |
| 169 | + | |
| 170 | + private String getTempStatus(double temp){ | |
| 171 | + String str=""; | |
| 172 | + if(37.5<=temp&&37.9>=temp){ | |
| 173 | + str="低热"; | |
| 174 | + }else if(38.0<=temp&&38.9>=temp){ | |
| 175 | + str="中等度热"; | |
| 176 | + }else if(39.0<=temp&&40.9>=temp){ | |
| 177 | + str="高热"; | |
| 178 | + }else if(temp>=41){ | |
| 179 | + str="超高热"; | |
| 180 | + }else if(36<=temp&&37>=temp){ | |
| 181 | + str="标准"; | |
| 182 | + } | |
| 183 | + return str; | |
| 162 | 184 | } |
| 163 | 185 | |
| 164 | 186 |