Commit df8e2f851fd1e3585dc11a17d68b2a1d75d6e374

Authored by jiangjiazhi
1 parent 423c2f8cb5

111

Showing 1 changed file with 39 additions and 33 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ df8e2f8
... ... @@ -234,10 +234,12 @@
234 234 }
235 235 HighScoreResult highScoreResult = new HighScoreResult();
236 236 try {
  237 + boolean next=true;
237 238 //复诊
238 239 if (null != model && StringUtils.isNotEmpty(model.getRiskFactor()) && !"{}".equals(model.getRiskFactor())) {
239 240 List list1 = JsonUtil.toList(model.getRiskFactor(), List.class);
240   - highScoreResult = queryRisk(list1,needLevel);
  241 + highScoreResult = queryRisk(list1, needLevel);
  242 + next=false;
241 243 }
242 244 if (null != model && !"{}".equals(model.getOtherRisk())) {
243 245 Map map = JsonUtil.str2Obj(model.getOtherRisk(), Map.class);
244 246  
245 247  
246 248  
247 249  
... ... @@ -261,42 +263,46 @@
261 263 map2.put("name", basicConfig.getName());
262 264 highScoreResult.getLevel().add(map2);
263 265 }
  266 + next=false;
264 267 }
265   - //初诊
266   - AntExChuQuery antExChuQuery = new AntExChuQuery();
267   - antExChuQuery.setParentId(parentId);
268   - antExChuQuery.setYn(YnEnums.YES.getId());
269   - List<AntExChuModel> list1 = antenatalExaminationService.queryAntExChu(antExChuQuery);
270   - AntExChuModel antExChuModel = null;
271   - if (CollectionUtils.isNotEmpty(list1)) {
272   - antExChuModel = list1.get(0);
273   - }
274   - if (null != antExChuModel && StringUtils.isNotEmpty(antExChuModel.getHighrisk()) && !"{}".equals(antExChuModel.getHighrisk())) {
275   - List list2 = JsonUtil.toList(antExChuModel.getHighrisk(), List.class);
276   - highScoreResult = queryRisk(list2,true);
277   - }
278   - if (null != antExChuModel && !"{}".equals(antExChuModel.getOtherHighRisk())) {
279   - Map map = JsonUtil.str2Obj(antExChuModel.getOtherHighRisk(), Map.class);
280   - //风险因素
281   - Map map1 = new HashMap();
282   - map1.put("id", "");
283   - map1.put("name", map.get("fxysu"));
284   - highScoreResult.getHighRisk().add(map1);
285   - //风险评分
286   - Object idObj = map.get("fxpf");
287   - if (null != idObj) {
288   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj.toString());
289   - highScoreResult.setScore(highScoreResult.getScore() + NumberUtils.toInt(basicConfig.getName(), 0));
  268 + if(next){
  269 + //初诊
  270 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  271 + antExChuQuery.setParentId(parentId);
  272 + antExChuQuery.setYn(YnEnums.YES.getId());
  273 + List<AntExChuModel> list1 = antenatalExaminationService.queryAntExChu(antExChuQuery);
  274 + AntExChuModel antExChuModel = null;
  275 + if (CollectionUtils.isNotEmpty(list1)) {
  276 + antExChuModel = list1.get(0);
290 277 }
291   - if(needLevel){
292   - Object idObj1 = map.get("fyyse");
293   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj1.toString());
294   - Map<String, Object> map2 = new HashMap<>();
295   - map2.put("id", basicConfig.getId());
296   - map2.put("name", basicConfig.getName());
297   - highScoreResult.getLevel().add(map2);
  278 + if (null != antExChuModel && StringUtils.isNotEmpty(antExChuModel.getHighrisk()) && !"{}".equals(antExChuModel.getHighrisk())) {
  279 + List list2 = JsonUtil.toList(antExChuModel.getHighrisk(), List.class);
  280 + highScoreResult = queryRisk(list2,true);
298 281 }
  282 + if (null != antExChuModel && !"{}".equals(antExChuModel.getOtherHighRisk())) {
  283 + Map map = JsonUtil.str2Obj(antExChuModel.getOtherHighRisk(), Map.class);
  284 + //风险因素
  285 + Map map1 = new HashMap();
  286 + map1.put("id", "");
  287 + map1.put("name", map.get("fxysu"));
  288 + highScoreResult.getHighRisk().add(map1);
  289 + //风险评分
  290 + Object idObj = map.get("fxpf");
  291 + if (null != idObj) {
  292 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj.toString());
  293 + highScoreResult.setScore(highScoreResult.getScore() + NumberUtils.toInt(basicConfig.getName(), 0));
  294 + }
  295 + if(needLevel){
  296 + Object idObj1 = map.get("fyyse");
  297 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj1.toString());
  298 + Map<String, Object> map2 = new HashMap<>();
  299 + map2.put("id", basicConfig.getId());
  300 + map2.put("name", basicConfig.getName());
  301 + highScoreResult.getLevel().add(map2);
  302 + }
  303 + }
299 304 }
  305 +
300 306 } catch (Exception e) {
301 307 }
302 308 return highScoreResult;