Commit abdd90a747649fd8fa2cd6f6f406107a79990278
1 parent
534afd45b5
Exists in
master
and in
6 other branches
儿保增加高危儿、体弱儿基础数据
Showing 1 changed file with 36 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
abdd90a
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.BabyService; |
4 | +import com.lyms.platform.biz.service.BasicConfigService; | |
4 | 5 | import com.lyms.platform.biz.service.CommonService; |
5 | 6 | import com.lyms.platform.biz.service.PatientsService; |
6 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | 8 | |
... | ... | @@ -16,7 +17,9 @@ |
16 | 17 | import com.lyms.platform.permission.model.*; |
17 | 18 | import com.lyms.platform.permission.service.*; |
18 | 19 | import com.lyms.platform.pojo.BabyModel; |
20 | +import com.lyms.platform.pojo.BasicConfig; | |
19 | 21 | import com.lyms.platform.pojo.Patients; |
22 | +import com.lyms.platform.query.BasicConfigQuery; | |
20 | 23 | import com.lyms.platform.query.PatientsQuery; |
21 | 24 | import net.sf.json.JSONObject; |
22 | 25 | import org.apache.commons.collections.CollectionUtils; |
23 | 26 | |
24 | 27 | |
... | ... | @@ -58,14 +61,47 @@ |
58 | 61 | @Autowired |
59 | 62 | private BookbuildingFacade bookbuildingFacade; |
60 | 63 | @Autowired |
64 | + private BasicConfigService basicConfigService; | |
65 | + @Autowired | |
61 | 66 | private BabyBookbuildingFacade babyBookbuildingFacade; |
62 | 67 | |
68 | + private static List<BasicConfig> mainBasicConfigList; | |
69 | + | |
70 | + private static List<BasicConfig> tiRuoBasicConfigList; | |
71 | + | |
63 | 72 | public BaseResponse babyServiceInit(Integer userId) { |
64 | 73 | Map map = new HashMap(); |
65 | 74 | //服务类型 |
66 | 75 | map.put("serTypes", PatientSerEnums.getBabySerType()); |
67 | 76 | //服务状态 |
68 | 77 | map.put("serStatus", PatientSerEnums.getSerStatus()); |
78 | + if (CollectionUtils.isEmpty(mainBasicConfigList)) { | |
79 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
80 | + basicConfigQuery.setEnable(1); | |
81 | + basicConfigQuery.setTypeId("5b18f8a7422b03d4ad2bf913"); | |
82 | + | |
83 | + //所有数据 | |
84 | + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); | |
85 | + //主节点数据 | |
86 | + basicConfigQuery.setTypeId(null); | |
87 | + basicConfigQuery.setParentId("5b18f8a7422b03d4ad2bf913"); | |
88 | + mainBasicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); | |
89 | + BasicConfigFacade.dispNewHighRisk(basicConfigList, mainBasicConfigList); | |
90 | + } | |
91 | + | |
92 | + //高危儿的基础数据 | |
93 | + map.put("gaoWeiEnmum", mainBasicConfigList); | |
94 | + | |
95 | + if (CollectionUtils.isEmpty(tiRuoBasicConfigList)) { | |
96 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
97 | + basicConfigQuery.setEnable(1); | |
98 | + basicConfigQuery.setTypeId("5b18f33c422b03d4ad2bf8ff"); | |
99 | + //所有数据 | |
100 | + tiRuoBasicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); | |
101 | + } | |
102 | + //体弱儿的基础数据 | |
103 | + map.put("tiRuoEnmum", tiRuoBasicConfigList); | |
104 | + | |
69 | 105 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map); |
70 | 106 | } |
71 | 107 |