Commit a5810429e8d21c9d2c09b66cc25e183a9efd1768
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
a581042
... | ... | @@ -1219,8 +1219,9 @@ |
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 | + | |
1224 | + result.setmHighRiskReason(mongoUtil.findColor(model.getmHighRiskReason())); | |
1224 | 1225 | |
1225 | 1226 | result.setId(model.getId()); |
1226 | 1227 | result.setPid(model.getPid()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
a581042
... | ... | @@ -2842,7 +2842,7 @@ |
2842 | 2842 | BabyModel model = models.get(0); |
2843 | 2843 | |
2844 | 2844 | result = result.convertToResult(model); |
2845 | - result.setmHighRiskReason(mongoUtil.findNameList(model.getmHighRiskReason())); | |
2845 | + result.setmHighRiskReason(mongoUtil.findNames(model.getmHighRiskReason())); | |
2846 | 2846 | |
2847 | 2847 | String homeAddress = CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(), |
2848 | 2848 | model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
View file @
a581042
... | ... | @@ -8,16 +8,19 @@ |
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; | |
13 | + private List mHighRiskReason2; | |
14 | 14 | |
15 | + public List getmHighRiskReason2() { | |
16 | + return mHighRiskReason2; | |
17 | + } | |
15 | 18 | |
16 | - public List<String> getmHighRiskReason() { | |
19 | + public List<Map<String, Object>> getmHighRiskReason() { | |
17 | 20 | return mHighRiskReason; |
18 | 21 | } |
19 | 22 | |
20 | - public void setmHighRiskReason(List<String> mHighRiskReason) { | |
23 | + public void setmHighRiskReason(List<Map<String, Object>> mHighRiskReason) { | |
21 | 24 | this.mHighRiskReason = mHighRiskReason; |
22 | 25 | } |
23 | 26 | |
24 | 27 | |
... | ... | @@ -564,12 +567,8 @@ |
564 | 567 | this.apgarScore = apgarScore; |
565 | 568 | } |
566 | 569 | |
567 | - public void setmHighRiskReason2(List<Map<String,Object>> mHighRiskReason2) { | |
570 | + public void setmHighRiskReason2(List mHighRiskReason2) { | |
568 | 571 | this.mHighRiskReason2 = mHighRiskReason2; |
569 | - } | |
570 | - | |
571 | - public List<Map<String, Object>> getmHighRiskReason2() { | |
572 | - return mHighRiskReason2; | |
573 | 572 | } |
574 | 573 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
View file @
a581042
... | ... | @@ -21,13 +21,13 @@ |
21 | 21 | public class BabyPageResult implements IBasicResultConvert<BabyPageResult,BabyModel> { |
22 | 22 | |
23 | 23 | // 母亲高危因素 |
24 | - List<Map<String, Object>> mHighRiskReason; | |
24 | + List<String> mHighRiskReason; | |
25 | 25 | |
26 | - public List<Map<String, Object>> getmHighRiskReason() { | |
26 | + public List<String> getmHighRiskReason() { | |
27 | 27 | return mHighRiskReason; |
28 | 28 | } |
29 | 29 | |
30 | - public void setmHighRiskReason(List<Map<String, Object>> mHighRiskReason) { | |
30 | + public void setmHighRiskReason(List<String> mHighRiskReason) { | |
31 | 31 | this.mHighRiskReason = mHighRiskReason; |
32 | 32 | } |
33 | 33 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
a581042
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 | } |