Commit 416ca38dd0e780ec4089024f582fb0b2a3af7e89
1 parent
6bc54a479e
Exists in
master
and in
1 other branch
查询所有高危因素
Showing 3 changed files with 46 additions and 3 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
416ca38
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | @TokenRequired |
94 | 94 | public BaseResponse addOneAntenatalExamination(@Valid @RequestBody AntExAddRequest antExAddRequest,HttpServletRequest request) { |
95 | 95 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
96 | - return antenatalExaminationFacade.addOneAntEx(antExAddRequest,loginState.getId()); | |
96 | + return antenatalExaminationFacade.addOneAntEx(antExAddRequest, loginState.getId()); | |
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | @TokenRequired |
108 | 108 | public BaseResponse addOneAntEx(@Valid @RequestBody AntExcAddRequest antExcAddRequest,HttpServletRequest request) { |
109 | 109 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
110 | - return antenatalExaminationFacade.addOneAnetExChu(antExcAddRequest,loginState.getId()); | |
110 | + return antenatalExaminationFacade.addOneAnetExChu(antExcAddRequest, loginState.getId()); | |
111 | 111 | } |
112 | 112 | |
113 | 113 | |
... | ... | @@ -135,7 +135,7 @@ |
135 | 135 | @TokenRequired |
136 | 136 | public BaseResponse delOneAntById(@Valid AntExQueryRequest antExQueryRequest,HttpServletRequest request) { |
137 | 137 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
138 | - return antenatalExaminationFacade.delOneAntEx(antExQueryRequest,loginState.getId()); | |
138 | + return antenatalExaminationFacade.delOneAntEx(antExQueryRequest, loginState.getId()); | |
139 | 139 | } |
140 | 140 | |
141 | 141 | @RequestMapping(method = RequestMethod.GET, value = "/antex/getenums") |
... | ... | @@ -143,6 +143,17 @@ |
143 | 143 | public BaseResponse getEnums() { |
144 | 144 | return antenatalExaminationFacade.getEnums(); |
145 | 145 | } |
146 | + | |
147 | + /** | |
148 | + * 查询高危因素 包括禁用了的 | |
149 | + * @return | |
150 | + */ | |
151 | + @RequestMapping(method = RequestMethod.GET, value = "/antex/getRiskEnums") | |
152 | + @ResponseBody | |
153 | + public BaseResponse getRiskEnums() { | |
154 | + return antenatalExaminationFacade.getRiskEnums(); | |
155 | + } | |
156 | + | |
146 | 157 | |
147 | 158 | /** |
148 | 159 | * 获取产妇整个产程的建档记录 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
416ca38
... | ... | @@ -59,6 +59,8 @@ |
59 | 59 | private DeleteProcessHandler deleteProcessHandler; |
60 | 60 | @Autowired |
61 | 61 | private AntExRecordService recordService; |
62 | + private BaseResponse riskEnums; | |
63 | + | |
62 | 64 | /** |
63 | 65 | * 修改最后一次产检时间 |
64 | 66 | * |
... | ... | @@ -1201,6 +1203,12 @@ |
1201 | 1203 | return 0; |
1202 | 1204 | } |
1203 | 1205 | }); |
1206 | + } | |
1207 | + | |
1208 | + public BaseResponse getRiskEnums() { | |
1209 | + Map<String, Object> map = new HashMap<>(); | |
1210 | + map.put("getHighRisk", basicConfigFacade.getHighRiskAll()); | |
1211 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
1204 | 1212 | } |
1205 | 1213 | |
1206 | 1214 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
416ca38
... | ... | @@ -235,6 +235,30 @@ |
235 | 235 | return basicConfigs1; |
236 | 236 | } |
237 | 237 | |
238 | + | |
239 | + public List getHighRiskAll() { | |
240 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
241 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
242 | + basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID); | |
243 | +// basicConfigQuery.setEnable(1); | |
244 | + List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
245 | + List<BasicConfig> basicConfigs1 = new ArrayList<>(); | |
246 | + if (CollectionUtils.isNotEmpty(basicConfigs)) { | |
247 | + for (BasicConfig basicConfig : basicConfigs) { | |
248 | + basicConfigQuery.setParentId(basicConfig.getId()); | |
249 | + List<BasicConfig> basicConfigs2 = basicConfigService.queryBasicConfig(basicConfigQuery); | |
250 | + if (CollectionUtils.isNotEmpty(basicConfigs2)) { | |
251 | + for (BasicConfig bc:basicConfigs2) { | |
252 | + bc.setColor("risk_"+ RiskDefaultTypeEnum.getColor(basicConfig.getName())); | |
253 | + } | |
254 | + basicConfigs1.addAll(basicConfigs2); | |
255 | + } | |
256 | + } | |
257 | + } | |
258 | + return basicConfigs1; | |
259 | + } | |
260 | + | |
261 | + | |
238 | 262 | private List convertToList(List<BasicConfig> list) { |
239 | 263 | List data = new ArrayList<>(); |
240 | 264 | for (BasicConfig basicConfig : list) { |