| | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | @Value("${isAdmin}") |
| | | private List<Long> isAdmin; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | |
| | | |
| | | if(ObjectUtils.isNotEmpty(statisticaltype)){ |
| | | SysUser user = getLoginUser().getUser(); |
| | | if(statisticaltype==1){ |
| | | if(CollectionUtils.isEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())){ |
| | | //全部病区 |
| | | String deptInfo = user.getDeptInfo(); |
| | | List<String> leavehospitaldistrictcodes = JSON.parseArray(deptInfo) |
| | | .stream() |
| | | .map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList()); |
| | | serviceSubtaskCountReq.setLeavehospitaldistrictcodes(leavehospitaldistrictcodes); |
| | | } |
| | | }else if(statisticaltype==2){ |
| | | if(CollectionUtils.isEmpty(serviceSubtaskCountReq.getDeptcodes())){ |
| | | //全部科室 |
| | | String hospInfo = user.getHospInfo(); |
| | | List<String> deptCodes = JSON.parseArray(hospInfo) |
| | | .stream() |
| | | .map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList()); |
| | | serviceSubtaskCountReq.setDeptcodes(deptCodes); |
| | | if(!isAdmin.contains(user.getUserId())){ |
| | | if(statisticaltype==1){ |
| | | if(CollectionUtils.isEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())){ |
| | | //全部病区 |
| | | String deptInfo = user.getDeptInfo(); |
| | | List<String> leavehospitaldistrictcodes = JSON.parseArray(deptInfo) |
| | | .stream() |
| | | .map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList()); |
| | | serviceSubtaskCountReq.setLeavehospitaldistrictcodes(leavehospitaldistrictcodes); |
| | | } |
| | | }else if(statisticaltype==2){ |
| | | if(CollectionUtils.isEmpty(serviceSubtaskCountReq.getDeptcodes())){ |
| | | //全部科室 |
| | | String hospInfo = user.getHospInfo(); |
| | | List<String> deptCodes = JSON.parseArray(hospInfo) |
| | | .stream() |
| | | .map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList()); |
| | | serviceSubtaskCountReq.setDeptcodes(deptCodes); |
| | | } |
| | | } |
| | | } |
| | | } |