czt
2026-01-21 8c132142d0ee8b72372e589c6b1856fbd6e1f21e
仓库列表优化
已修改2个文件
34 ■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DepotService.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DepotService.java
@@ -199,25 +199,25 @@
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT) + "*";
        Collection<String> keys = redisCache.keys(patten);
        if (null == keys) {
            return null;
        }
        List<Depot> list = new ArrayList<>();
        for (String key : keys) {
            list.add((Depot) redisCache.getCacheObject(key));
        String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT) + "*";
        Collection<String> keys = redisCache.keys(patten);
        if (null != keys) {
            for (String key : keys) {
                list.add((Depot) redisCache.getCacheObject(key));
            }
        }
        //缓存获取为空,则查询数据库
        if (list.size() < 1) {
        if (list.isEmpty()) {
            list = this.getData(companyId,null, false);
            setCacheDepotList(list, companyId);
        }
        //重新排序
        Collections.sort(list, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum());
        if(!list.isEmpty()){
            //重新排序
            Collections.sort(list, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum());
        }
        return list;
    }
@@ -242,8 +242,10 @@
                result.add(depot);
            }
        }
        //重新排序
        Collections.sort(result, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum());
        if(!result.isEmpty()){
            //重新排序
            Collections.sort(list, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum());
        }
        return result;
    }
fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
@@ -88,7 +88,7 @@
     */
    @DataProvider
    public List<Depot> getAllCache() {
        return depotService.getCacheDepotList(null, ContextUtil.subDeptId(null));
        return depotService.getCacheDepotList(null);
    }
    /**