陈昶聿
4 天以前 05c82d89b6df8c236feb0e4dc3f83f18e8414df0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -93,6 +93,9 @@
    @Value("${spring.profiles.active}")
    private String active;
    @Value("${isAdmin}")
    private List<Long> isAdmin;
    @Autowired
    private RedisCache redisCache;
@@ -553,23 +556,25 @@
        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);
                    }
                }
            }
        }
@@ -878,6 +883,16 @@
        ryTask.dealOutHospInfo();
    }
    @PostMapping("/compensateTasktest")
    public void compensateTasktest(@RequestParam("subId")Long subId) {
        ryTask.compensateTaskTest(subId);
    }
    @PostMapping("/longTaskSendtest")
    public void longTaskSendtest(@RequestParam("subId")Long subId) {
        ryTask.longTaskSendTest(subId);
    }
    @PostMapping("/syncMedInhospForShiyi")
    public void syncMedInhospForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) {
        collectHISService.syncMedInhosp(startTime, endTime);