Commit 5fa7ea6d87fa35313944872f55e5160aa3c0587e
1 parent
9a8c5528c1
Exists in
master
and in
6 other branches
改字段
Showing 3 changed files with 28 additions and 14 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
5fa7ea6
... | ... | @@ -1219,8 +1219,8 @@ |
1219 | 1219 | */ |
1220 | 1220 | private BabyBuildResult getBabyBuildResult(BabyModel model) { |
1221 | 1221 | BabyBuildResult result = new BabyBuildResult(); |
1222 | - result.setmHighRiskReason(mongoUtil.findNames(model.getmHighRiskReason())); | |
1223 | - result.setmHighRiskReason2(mongoUtil.findNameList(model.getmHighRiskReason())); | |
1222 | +// result.setmHighRiskReason(mongoUtil.findNames(model.getmHighRiskReason())); | |
1223 | + result.setmHighRiskReason(mongoUtil.findColor(model.getmHighRiskReason())); | |
1224 | 1224 | |
1225 | 1225 | result.setId(model.getId()); |
1226 | 1226 | result.setPid(model.getPid()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
View file @
5fa7ea6
... | ... | @@ -8,16 +8,14 @@ |
8 | 8 | */ |
9 | 9 | public class BabyBuildResult { |
10 | 10 | // 母亲高危因素 |
11 | - private List<String> mHighRiskReason; | |
11 | + private List<Map<String, Object>> mHighRiskReason; | |
12 | 12 | |
13 | - private List<Map<String, Object>> mHighRiskReason2; | |
14 | 13 | |
15 | - | |
16 | - public List<String> getmHighRiskReason() { | |
14 | + public List<Map<String, Object>> getmHighRiskReason() { | |
17 | 15 | return mHighRiskReason; |
18 | 16 | } |
19 | 17 | |
20 | - public void setmHighRiskReason(List<String> mHighRiskReason) { | |
18 | + public void setmHighRiskReason(List<Map<String, Object>> mHighRiskReason) { | |
21 | 19 | this.mHighRiskReason = mHighRiskReason; |
22 | 20 | } |
23 | 21 | |
... | ... | @@ -564,12 +562,5 @@ |
564 | 562 | this.apgarScore = apgarScore; |
565 | 563 | } |
566 | 564 | |
567 | - public void setmHighRiskReason2(List<Map<String,Object>> mHighRiskReason2) { | |
568 | - this.mHighRiskReason2 = mHighRiskReason2; | |
569 | - } | |
570 | - | |
571 | - public List<Map<String, Object>> getmHighRiskReason2() { | |
572 | - return mHighRiskReason2; | |
573 | - } | |
574 | 565 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
5fa7ea6
1 | 1 | package com.lyms.platform.operate.web.utils; |
2 | 2 | |
3 | +import com.lyms.platform.common.enums.RiskDefaultTypeEnum; | |
3 | 4 | import com.lyms.platform.common.utils.DateUtil; |
4 | 5 | import com.lyms.platform.common.utils.StringUtils; |
5 | 6 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
... | ... | @@ -371,6 +372,28 @@ |
371 | 372 | list.add(sb.toString()); |
372 | 373 | } |
373 | 374 | return list; |
375 | + } | |
376 | + | |
377 | + public List<Map<String,Object>> findColor(List<String> ids) { | |
378 | + if(CollectionUtils.isNotEmpty(ids)) { | |
379 | + List<Map<String, Object>> rest = new ArrayList<>(); | |
380 | + for (String id : ids) { | |
381 | + BasicConfig basicConfig = findBasicConfigById(id); | |
382 | + if(basicConfig != null) { | |
383 | + BasicConfig parent = findBasicConfigById(basicConfig.getParentId()); | |
384 | + if(parent != null) { | |
385 | + Map<String, Object> tempMap = new HashedMap(); | |
386 | + tempMap.put("id", basicConfig.getId()); | |
387 | + tempMap.put("name", basicConfig.getName()); | |
388 | + tempMap.put("color", RiskDefaultTypeEnum.getColor(parent.getName())); | |
389 | + rest.add(tempMap); | |
390 | + } | |
391 | + | |
392 | + } | |
393 | + } | |
394 | + return rest; | |
395 | + } | |
396 | + return null; | |
374 | 397 | } |
375 | 398 | } |