- 在 IWmsMaterialCoilService 接口中新增 getDistributionByActualWarehouse 方法 - 实现钢卷按实际库区统计数量和重量的查询逻辑 - 添加对应的 Mapper XML 查询语句,支持按物品类型和 ID 过滤 - 在 Controller 中暴露新的 REST 接口 /distributionByActualWarehouse - 扩展 WmsStockBo 和 WmsStockVo 类以支持实际库区相关字段 - 新增 queryPageListActual 方法用于分页查询实际库区库存数据 - 实现递归查询子实际库区的功能,并应用到查询条件中 - 更新 Mapper 文件及服务实现类以支持新查询逻辑
103 lines
2.4 KiB
Java
103 lines
2.4 KiB
Java
package com.klp.domain.vo;
|
||
|
||
import java.math.BigDecimal;
|
||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||
import com.alibaba.excel.annotation.ExcelProperty;
|
||
import com.klp.common.annotation.ExcelDictFormat;
|
||
import com.klp.common.convert.ExcelDictConvert;
|
||
import lombok.Data;
|
||
|
||
|
||
/**
|
||
* 库存:原材料/产品与库区/库位的存放关系视图对象 wms_stock
|
||
*
|
||
* @author Joshi
|
||
* @date 2025-07-18
|
||
*/
|
||
@Data
|
||
@ExcelIgnoreUnannotated
|
||
public class WmsStockVo {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
/**
|
||
* 主键ID
|
||
*/
|
||
@ExcelProperty(value = "主键ID")
|
||
private Long stockId;
|
||
|
||
/**
|
||
* 仓库/库区/库位ID
|
||
*/
|
||
private Long warehouseId;
|
||
|
||
/**
|
||
* 物品类型(raw_material/product)
|
||
*/
|
||
@ExcelProperty(value = "物品类型", converter = ExcelDictConvert.class)
|
||
@ExcelDictFormat(readConverterExp = "raw_material/product")
|
||
private String itemType;
|
||
|
||
/**
|
||
* 物品ID(指向原材料或产品主键)
|
||
*/
|
||
@ExcelProperty(value = "物品ID", converter = ExcelDictConvert.class)
|
||
@ExcelDictFormat(readConverterExp = "指向原材料或产品主键")
|
||
private Long itemId;
|
||
|
||
/**
|
||
* 物品名称(动态:产品或原材料)
|
||
*/
|
||
private String itemName;
|
||
/**
|
||
* 物品编码(动态:产品或原材料)
|
||
*/
|
||
private String itemCode;
|
||
|
||
/**
|
||
* 批次号(可选)
|
||
*/
|
||
@ExcelProperty(value = "批次号", converter = ExcelDictConvert.class)
|
||
@ExcelDictFormat(readConverterExp = "可选")
|
||
private String batchNo;
|
||
|
||
/**
|
||
* 备注
|
||
*/
|
||
@ExcelProperty(value = "备注")
|
||
private String remark;
|
||
|
||
/**
|
||
* 仓库/库区名称
|
||
*/
|
||
@ExcelProperty(value = "仓库/库区名称")
|
||
private String warehouseName;
|
||
|
||
/**
|
||
* 状态(0=在库,1=在途,2=已出库)
|
||
*/
|
||
private Integer status;
|
||
|
||
/**
|
||
* 在途量
|
||
*/
|
||
@ExcelProperty(value = "在途量")
|
||
private BigDecimal onTheWay;
|
||
|
||
/**
|
||
* 总量(通过item_type和item_id查询对应的钢卷总量)
|
||
*/
|
||
@ExcelProperty(value = "总量")
|
||
private BigDecimal totalQuantity;
|
||
|
||
/**
|
||
* 库存分布列表(按仓库统计)
|
||
*/
|
||
private java.util.List<WmsStockVo> stockDistribution;
|
||
|
||
|
||
//实际库区/库位自关联
|
||
private Long actualWarehouseId;
|
||
private String actualWarehouseName;
|
||
}
|