refactor(material-coil): 重构钢卷物料查询服务
- 移除 WmsMaterialCoilVo 中的嵌套对象结构(rawMaterial、product、bomItemList) - 新增 WmsMaterialCoilBindVo 视图对象专门处理发货绑定信息 - 添加 queryPageListWithBindInfo 方法支持发货绑定增强字段查询 - 将联查字段改为扁平化结构,直接填充基础物料属性 - 优化分页查询逻辑,分离通用查询和绑定信息查询流程 - 移除 BOM 项批量查询功能,简化服务依赖关系
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 钢卷物料表视图对象(包含发货绑定信息) wms_material_coil
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WmsMaterialCoilBindVo extends WmsMaterialCoilVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// ========== 发货绑定信息(由发货单明细占用) ==========
|
||||
|
||||
/**
|
||||
* 是否已被发货单明细绑定(true=不可再次绑定)
|
||||
*/
|
||||
private Boolean bound;
|
||||
|
||||
private Long bindDetailId;
|
||||
|
||||
private Long bindWaybillId;
|
||||
private String bindWaybillNo;
|
||||
private String bindWaybillName;
|
||||
|
||||
private Long bindPlanId;
|
||||
private String bindPlanName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date bindPlanDate;
|
||||
|
||||
// ========== 补充的发货绑定信息字段 ==========
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String bindLicensePlate;
|
||||
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
private String bindConsigneeUnit;
|
||||
|
||||
/**
|
||||
* 发货单位
|
||||
*/
|
||||
private String bindSenderUnit;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date bindDeliveryTime;
|
||||
|
||||
/**
|
||||
* 地磅
|
||||
*/
|
||||
private String bindWeighbridge;
|
||||
|
||||
/**
|
||||
* 销售人员
|
||||
*/
|
||||
private String bindSalesPerson;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String bindPrincipal;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
private String bindPrincipalPhone;
|
||||
|
||||
/**
|
||||
* 运单状态
|
||||
*/
|
||||
private Long bindWaybillStatus;
|
||||
|
||||
/**
|
||||
* 运单备注
|
||||
*/
|
||||
private String bindWaybillRemark;
|
||||
|
||||
/**
|
||||
* 明细结算类型
|
||||
*/
|
||||
private String bindDetailSettlementType;
|
||||
|
||||
/**
|
||||
* 明细单价
|
||||
*/
|
||||
private BigDecimal bindDetailUnitPrice;
|
||||
}
|
||||
@@ -141,23 +141,6 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
||||
*/
|
||||
private WmsGenerateRecordVo qrcodeRecord;
|
||||
|
||||
/**
|
||||
* 原材料信息(当itemType为raw_material时)
|
||||
*/
|
||||
private WmsRawMaterialVo rawMaterial;
|
||||
|
||||
/**
|
||||
* 产品信息(当itemType为product时)
|
||||
*/
|
||||
private WmsProductVo product;
|
||||
|
||||
/**
|
||||
* BOM列表(原材料对应的BOM项目信息)
|
||||
*/
|
||||
private List<WmsBomItemVo> bomItemList;
|
||||
|
||||
// ========== 统计相关属性 ==========
|
||||
|
||||
/**
|
||||
* 库区名称(用于统计查询)
|
||||
*/
|
||||
@@ -218,87 +201,13 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
||||
*/
|
||||
private String packagingRequirement;
|
||||
|
||||
// ========== 联查临时字段(用于优化查询性能,避免单独查询) ==========
|
||||
|
||||
/**
|
||||
* 原材料ID(联查字段)
|
||||
*/
|
||||
private Long rawMaterialId;
|
||||
|
||||
/**
|
||||
* 原材料编号(联查字段)
|
||||
*/
|
||||
private String rawMaterialCode;
|
||||
|
||||
/**
|
||||
* 原材料名称(联查字段)
|
||||
*/
|
||||
private String rawMaterialName;
|
||||
|
||||
/**
|
||||
* 原材料规格(联查字段)
|
||||
*/
|
||||
private String rawMaterialSpecification;
|
||||
|
||||
/**
|
||||
* 原材料钢种(联查字段)
|
||||
*/
|
||||
private String rawMaterialSteelGrade;
|
||||
|
||||
/**
|
||||
* 原材料厚度(联查字段)
|
||||
*/
|
||||
private BigDecimal rawMaterialThickness;
|
||||
|
||||
/**
|
||||
* 原材料宽度(联查字段)
|
||||
*/
|
||||
private BigDecimal rawMaterialWidth;
|
||||
|
||||
/**
|
||||
* 原材料BOM ID(联查字段)
|
||||
*/
|
||||
private Long rawMaterialBomId;
|
||||
|
||||
/**
|
||||
* 产品ID(联查字段)
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 产品编号(联查字段)
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称(联查字段)
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 产品规格(联查字段)
|
||||
*/
|
||||
private String productSpecification;
|
||||
|
||||
/**
|
||||
* 产品厚度(联查字段)
|
||||
*/
|
||||
private BigDecimal productThickness;
|
||||
|
||||
/**
|
||||
* 产品宽度(联查字段)
|
||||
*/
|
||||
private BigDecimal productWidth;
|
||||
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "发货时间")
|
||||
private Date exportTime;
|
||||
|
||||
/**
|
||||
* 产品BOM ID(联查字段)
|
||||
*/
|
||||
private Long productBomId;
|
||||
|
||||
private String specification; // 规格
|
||||
private String material; // 材质
|
||||
@@ -351,90 +260,13 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
||||
*/
|
||||
private Integer furnaceLevel;
|
||||
|
||||
// ========== 发货绑定信息(由发货单明细占用) ==========
|
||||
|
||||
/**
|
||||
* 是否已被发货单明细绑定(true=不可再次绑定)
|
||||
*/
|
||||
private Boolean bound;
|
||||
|
||||
private Long bindDetailId;
|
||||
|
||||
private Long bindWaybillId;
|
||||
private String bindWaybillNo;
|
||||
private String bindWaybillName;
|
||||
|
||||
private Long bindPlanId;
|
||||
private String bindPlanName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date bindPlanDate;
|
||||
|
||||
// 父钢卷id
|
||||
private String parentCoilId;
|
||||
|
||||
// ========== 补充的发货绑定信息字段 ==========
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String bindLicensePlate;
|
||||
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
private String bindConsigneeUnit;
|
||||
|
||||
/**
|
||||
* 发货单位
|
||||
*/
|
||||
private String bindSenderUnit;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date bindDeliveryTime;
|
||||
|
||||
/**
|
||||
* 地磅
|
||||
*/
|
||||
private String bindWeighbridge;
|
||||
|
||||
/**
|
||||
* 销售人员
|
||||
*/
|
||||
private String bindSalesPerson;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String bindPrincipal;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
private String bindPrincipalPhone;
|
||||
|
||||
/**
|
||||
* 运单状态
|
||||
*/
|
||||
private Long bindWaybillStatus;
|
||||
|
||||
/**
|
||||
* 运单备注
|
||||
*/
|
||||
private String bindWaybillRemark;
|
||||
|
||||
/**
|
||||
* 明细结算类型
|
||||
*/
|
||||
private String bindDetailSettlementType;
|
||||
|
||||
/**
|
||||
* 明细单价
|
||||
*/
|
||||
private BigDecimal bindDetailUnitPrice;
|
||||
|
||||
/**
|
||||
* 实测长度
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user