a23f3acdf2a09dd056778d2217964a1878b66ea6..af8af24790cb7240da60c6752d47254d62533ffb
2026-03-26 sgj
出入库明细,导入导出,根据登录用户类型,以及搜索条件,做回显调整
af8af2 对比 | 目录
2026-03-26 sgj
导入,创建id避免重复
262206 对比 | 目录
已修改4个文件
58 ■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/ReportInDetail.view.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/ReportOutDetail.view.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/common/ExportController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java
@@ -646,10 +646,46 @@
            }
        }
        // 数据库 ID 重复校验,确保新生成的 ID 在数据库中不存在
        while (this.checkIdExists(companyId, cacheId)) {
            String temp = cacheId.substring(cacheId.length() - 4);
            Integer i = Integer.valueOf(temp);
            i++;
            temp = String.valueOf(i);
            if (temp.length() == 1) {
                cacheId = timeKey + "000" + temp;
            }
            if (temp.length() == 2) {
                cacheId = timeKey + "00" + temp;
            }
            if (temp.length() == 3) {
                cacheId = timeKey + "0" + temp;
            }
            if (temp.length() == 4) {
                cacheId = timeKey + temp;
            }
        }
        // 更新缓存
        redisCache.setCacheObject(cacheKey, cacheId);
        return cacheId;
    }
    /**
     * 检查 ID 是否在数据库中已存在
     *
     * @param companyId
     * @param id
     * @return true-已存在,false-不存在
     */
    public boolean checkIdExists(String companyId, String id) {
        QueryWrapper<InoutRecord> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("company_id", companyId);
        queryWrapper.eq("id", id);
        InoutRecord record = inoutRecordMapper.selectOne(queryWrapper);
        return null != record;
    }
    /**
@@ -668,8 +704,8 @@
        queryWrapper.eq("company_id", companyId);
        queryWrapper.like("id", timeKey);
        queryWrapper.orderByDesc("create_time");
        queryWrapper.orderByDesc("register_time");
        queryWrapper.orderByDesc("id");
        List<InoutRecord> inoutRecords = inoutRecordMapper.selectList(queryWrapper);
        if (null == inoutRecords || inoutRecords.isEmpty()) {
            return null;
fzzy-igdss-view/src/main/java/com/fzzy/igds/ReportInDetail.view.xml
@@ -185,7 +185,7 @@
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getData&quot;).getResult()}</Property>
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getDepotByUserType&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
@@ -325,7 +325,7 @@
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getData&quot;).getResult()}</Property>
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getDepotByUserType&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
fzzy-igdss-view/src/main/java/com/fzzy/igds/ReportOutDetail.view.xml
@@ -185,7 +185,7 @@
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getData&quot;).getResult()}</Property>
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getDepotByUserType&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
@@ -325,7 +325,7 @@
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getData&quot;).getResult()}</Property>
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getDepotByUserType&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
fzzy-igdss-web/src/main/java/com/fzzy/common/ExportController.java
@@ -114,10 +114,16 @@
        List<InoutRecord> list = new ArrayList<>();
        //获取分库编码对应的分库名称
        String deptName = "";
        SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null));
        String deptId= ContextUtil.subDeptId(null);
        if (StringUtils.isNotBlank(param.getDeptId())){
            deptId=param.getDeptId();
        }
        SysDept subDept = sysDeptService.getCacheDept(null,deptId);
        if (null != subDept) {
            deptName = subDept.getDeptName();
        }
        String exportTimeDesc = "";
        String exportCreateUser = "";
        Date exportCreateTime = new Date();
@@ -142,7 +148,7 @@
                .stream()
                .collect(Collectors.toMap(Dept::getId, Dept::getKqmc, (key1, key2) -> key2));
        // 创建仓库ID到名称的映射
        Map<String, String> depotMap = Optional.ofNullable(depotPR.getData(null))
        Map<String, String> depotMap = Optional.ofNullable(depotPR.getData(ContextUtil.getCompanyId()))
                .orElse(new ArrayList<>())
                .stream()
                .collect(Collectors.toMap(Depot::getId, Depot::getName, (key1, key2) -> key2));