lige
2024-01-25 6edab72ee16e3c173a813cec6cefa5af03147f97
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
@@ -413,10 +413,10 @@
    }
    /**
     * 影像检查页面列表
     * 化验检查页面列表
     */
    @GetMapping("/huaYangetProList")
    @ApiOperation("影像检查页面列表")
    @ApiOperation("化验检查页面列表")
    public AjaxResult huaYangetProList(@ApiParam(value = "体检单号") @RequestParam(required = false) String tjNumber,
                                 @ApiParam(value = "0未检,1已检") @RequestParam(defaultValue = "0") Integer type,
                                 @ApiParam(value = "姓名)") @RequestParam(required = false) String name,
@@ -446,21 +446,20 @@
                    SysPost byId = postService.getById(one.getPostId());
                    if (byId.getPostName().equals("录入员")) {
                        ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId));
                    }
                }
            }
        } else {
            ksproList = projectService.getKsTjProjectIdList();
        }
        //筛选影像的项目。
        ksproList = ksproList.stream()
                .filter(element -> element ==1633660948860522589L)
                .collect(Collectors.toList());
        if (ksproList == null || ksproList.size() == 0) {
            return AjaxResult.error("请完善科室项目信息");
        }
        //筛选化验的项目。
        ksproList = ksproList.stream()
                .filter(element -> element ==1633660948860522629L)
                .collect(Collectors.toList());
        List<TjCustomer> customerLis = new ArrayList<>();
        //根据体检号查
@@ -599,34 +598,25 @@
                return AjaxResult.success("暂无数据");
            }
        }
        List<TjCustomer> customerLists = new ArrayList<>();
        List<TjCustomer> customerLists = null;
        if (type == 0) {
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
        }
        if (type == 1) {
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
        }
        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
        if (customerLists != null && customerLists.size() > 0) {
            Collections.reverse(customerLists);
            List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
            Map<String, Object> map = new HashMap<>();
            map.put("date", customerList);
            map.put("total", customerLists.size());
            return AjaxResult.success(map);
        } else {
            AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
            if (map != null) return map;
            return AjaxResult.success("暂时没有数据");
        }
        AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
        if (map != null) return map;
        return AjaxResult.success("暂时没有数据");
    }
    /**
     * 化验检查页面列表
     * 影像检查页面列表
     */
    @GetMapping("/yingXiangGetProList")
    @ApiOperation("化验检查页面列表")
    @ApiOperation("影像检查页面列表")
    public AjaxResult yingXiangGetProList(@ApiParam(value = "体检单号") @RequestParam(required = false) String tjNumber,
                                       @ApiParam(value = "0未检,1已检") @RequestParam(defaultValue = "0") Integer type,
                                       @ApiParam(value = "姓名)") @RequestParam(required = false) String name,
@@ -663,25 +653,25 @@
        } else {
            ksproList = projectService.getKsTjProjectIdList();
        }
        //筛选化验的项目。
        ksproList = ksproList.stream()
                .filter(element -> element ==1633660948860522629L ||  element ==1633660948860522504L
                        ||
                        element ==1633660948860522507L||  element ==1633660948860522508L
                        ||
                        element ==1633660948860522515L||  element ==1633660948860522516L
                        ||
                        element ==1633660948860522517L||  element ==1633660948860522519L
                        ||
                        element ==1633660948860522524L||  element ==1633660948860522530L
                        ||
                        element ==1633660948860522531L||  element ==1633660948860522533L
                )
                .collect(Collectors.toList());
        if (ksproList == null || ksproList.size() == 0) {
        //筛选影像的项目。
        if (ksproList.size() == 0) {
            return AjaxResult.error("请完善科室项目信息");
        }
        ksproList = ksproList.stream()
                .filter(element -> element ==1633660948860522589L
//                        ||  element ==1633660948860522504L
//                        ||
//                        element ==1633660948860522507L||  element ==1633660948860522508L
//                        ||
//                        element ==1633660948860522515L||  element ==1633660948860522516L
//                        ||
//                        element ==1633660948860522517L||  element ==1633660948860522519L
//                        ||
//                        element ==1633660948860522524L||  element ==1633660948860522530L
//                        ||
//                        element ==1633660948860522531L||  element ==1633660948860522533L
                )
                .collect(Collectors.toList());
        List<TjCustomer> customerLis = new ArrayList<>();
        //根据体检号查
@@ -820,26 +810,26 @@
                return AjaxResult.success("暂无数据");
            }
        }
        List<TjCustomer> customerLists = new ArrayList<>();
        List<TjCustomer> customerLists = null;
        if (type == 0) {
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
        }
        if (type == 1) {
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
        }
        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
        if (customerLists != null && customerLists.size() > 0) {
            Collections.reverse(customerLists);
            List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
            Map<String, Object> map = new HashMap<>();
            map.put("date", customerList);
            map.put("total", customerLists.size());
            return AjaxResult.success(map);
        } else {
//        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
//        if (customerLists.size() > 0) {
//            Collections.reverse(customerLists);
//            List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//            Map<String, Object> map = new HashMap<>();
//            map.put("date", customerList);
//            map.put("total", customerLists.size());
//            return AjaxResult.success(map);
//        } else {
            AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
            if (map != null) return map;
            return AjaxResult.success("暂时没有数据");
        }
//        }
    }