自动化立体仓库 - WMS系统
pjb
2025-07-28 63c493a4bd197aac30f5b0a67123be1e72a7d18e
库存明细统计excel导出完善
3个文件已修改
39 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocDetlController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocDetl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocDetlMapper.xml 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -428,12 +428,12 @@
//    @ManagerAuth
    public void statisExport(HttpServletResponse response) throws IOException {
        List<LocDetl> excel = LocDetlMapper.getStockStatisExcel();
        for (LocDetl locDetl : excel) {
            Mat mat = matService.selectByMatnr(locDetl.getMatnr());
            if (mat != null) {
                locDetl.sync(mat);
            }
        }
//        for (LocDetl locDetl : excel) {
//            Mat mat = matService.selectByMatnr(locDetl.getMatnr());
//            if (mat != null) {
//                locDetl.sync(mat);
//            }
//        }
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf-8");
        String fileName = URLEncoder.encode("库存明细统计报表", "UTF-8");
src/main/java/com/zy/asrs/entity/LocDetl.java
@@ -48,11 +48,10 @@
    private String maktx;
    @ApiModelProperty(value= "规格")
    @ExcelProperty("规格")
    private String specs;
    @ApiModelProperty(value= "货品特征")
    @ExcelProperty("货品特征")
    @ExcelProperty("批号")
    private String batch;
    @ApiModelProperty(value= "单据编号")
@@ -61,6 +60,7 @@
    private String orderNo;
    @ApiModelProperty(value= "型号")
    @ExcelProperty("桶型")
    private String model;
    @ApiModelProperty(value= "颜色")
@@ -92,6 +92,7 @@
    @ApiModelProperty(value= "生产日期")
    @TableField("manu_date")
    @ExcelProperty("生产日期")
    private String manuDate;
    @ApiModelProperty(value= "品项数")
@@ -103,14 +104,17 @@
    private Double safeQty;
    @ApiModelProperty(value= "重量")
    @ExcelProperty("净重")
    private Double weight;
    @ApiModelProperty(value= "长度")
    @TableField("man_length")
    @ExcelProperty("毛重")
    private Double manLength;
    @ApiModelProperty(value= "体积")
    @TableField("volume")
    @ExcelProperty("罐装量")
    private Double volume;
    @ApiModelProperty(value= "三方编码")
src/main/resources/mapper/LocDetlMapper.xml
@@ -401,11 +401,15 @@
            , a.maktx
            , a.model
            , a.volume
            ,manu_date manuDate
            ,batch
            , sum(a.anfme) as anfme
            ,sum(a.weight) weight
            ,sum(a.man_length) manLength
            from asr_loc_detl a
            where 1=1
            <include refid="stockOutCondition"></include>
            group by a.matnr,a.maktx,a.model,a.volume
            group by a.matnr,a.maktx,a.model,a.volume,manu_date,batch
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
@@ -417,10 +421,12 @@
        , a.maktx
        , a.model
        , a.volume
        ,manu_date manuDate
        ,batch
        from asr_loc_detl a
        where 1=1
        <include refid="stockOutCondition"></include>
        group by a.matnr, a.maktx, a.model,a.volume
        group by a.matnr,a.maktx,a.model,a.volume,manu_date,batch
     ) b
    </select>
@@ -428,10 +434,17 @@
        select
        ROW_NUMBER() over (order by sum(a.anfme) desc) as row
        , a.matnr
        , a.maktx
        , a.model
        , a.volume
        ,manu_date manuDate
        ,batch
        , sum(a.anfme) as anfme
        ,sum(a.weight) weight
        ,sum(a.man_length) manLength
        from asr_loc_detl a
        where 1=1
        group by a.matnr
        group by a.matnr,a.maktx,a.model,a.volume,manu_date,batch
    </select>
    <select id="selectPakoutByRule" resultMap="BaseResultMap">