Commit 7ffcacabced34207b62c828838d4739d3e3e4bfd

Authored by landong2015
1 parent eadfa69008

修改叶酸管理查询bug

Showing 1 changed file with 11 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java View file @ 7ffcaca
... ... @@ -207,7 +207,7 @@
207 207  
208 208 List<Map<String,Object>> list = new ArrayList<>();
209 209  
210   - List<Organization> organizationList = new ArrayList<>();
  210 + List<Organization> organizationList = null;
211 211  
212 212 FolicAcidQuery folicAcidQuery = new FolicAcidQuery();
213 213 folicAcidQuery.setYn(YnEnums.YES.getId());
214 214  
215 215  
216 216  
217 217  
... ... @@ -240,17 +240,25 @@
240 240 organizationQuery.setProvinceId(queryRequest.getProvinceId());
241 241 organizationQuery.setCityId(queryRequest.getCityId());
242 242 organizationQuery.setAreaId(queryRequest.getAreaId());
  243 +
  244 + organizationList = new ArrayList<>();
243 245 organizationList = organizationService.queryHospitals(organizationQuery);
244 246 }
245 247  
246   - List<String> hospitalIds = new ArrayList<>();
  248 + List<String> hospitalIds = null;
247 249  
248 250 if (CollectionUtils.isNotEmpty(organizationList)){
  251 + hospitalIds = new ArrayList<>();
249 252 for (Organization hospital : organizationList){
250 253 hospitalIds.add(String.valueOf(hospital.getId()));
251 254 }
252   - if (CollectionUtils.isNotEmpty(hospitalIds)){
  255 + }
  256 +
  257 + if (organizationList!=null){
  258 + if (hospitalIds != null){
253 259 folicAcidQuery.setHospitalList(hospitalIds);
  260 + }else {
  261 + folicAcidQuery.setHospitalId("-1");
254 262 }
255 263 }
256 264