1. 在钢卷物料实体类、业务对象、值对象及导出VO中新增理论厚度(theoreticalThickness)和镀铬卷号(chromePlateCoilNo)字段 2. 在映射文件中补充新增字段的数据库映射关系 3. 在服务实现类中添加理论厚度自动计算逻辑:根据净重、实测长度和物品规格宽度,使用公式“理论厚度 = 净重(吨) × 1000 / (7.85 × 实测长度(mm) × 宽度(mm))”自动计算并保留3位小数 4. 新增工具方法用于从物品规格中提取厚度和宽度信息 5. 在新增、修改、分卷、批量分卷等业务方法中调用理论厚度计算逻辑 6. 在分卷和批量分卷时增加子卷净重和规格厚度不超过母卷的业务校验
354 lines
7.3 KiB
Java
354 lines
7.3 KiB
Java
package com.klp.domain.vo;
|
||
|
||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||
import com.alibaba.excel.annotation.ExcelProperty;
|
||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||
import com.klp.common.annotation.ExcelDictFormat;
|
||
import com.klp.common.convert.ExcelDictConvert;
|
||
import com.klp.common.core.domain.BaseEntity;
|
||
import com.klp.domain.WmsActualWarehouse;
|
||
import lombok.Data;
|
||
import java.math.BigDecimal;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
|
||
|
||
/**
|
||
* 钢卷物料表视图对象 wms_material_coil
|
||
*
|
||
* @author Joshi
|
||
* @date 2025-07-18
|
||
*/
|
||
@Data
|
||
@ExcelIgnoreUnannotated
|
||
public class WmsMaterialCoilVo extends BaseEntity {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
/**
|
||
* 主键ID
|
||
*/
|
||
private Long coilId;
|
||
|
||
/**
|
||
* 入场钢卷号
|
||
*/
|
||
@ExcelProperty(value = "入场钢卷号")
|
||
private String enterCoilNo;
|
||
|
||
/**
|
||
* 当前钢卷号
|
||
*/
|
||
@ExcelProperty(value = "当前钢卷号")
|
||
private String currentCoilNo;
|
||
|
||
/**
|
||
* 厂家原料卷号
|
||
*/
|
||
@ExcelProperty(value = "厂家原料卷号")
|
||
private String supplierCoilNo;
|
||
|
||
/**
|
||
* 数据类型(0=历史,1=现存)
|
||
*/
|
||
@ExcelProperty(value = "数据类型", converter = ExcelDictConvert.class)
|
||
@ExcelDictFormat(readConverterExp = "0=历史,1=现存")
|
||
private Integer dataType;
|
||
|
||
/**
|
||
所在库区ID 联查当前库区和物品id 复卷好去掉 dataType数据类型是1当前 0就是历史 物品类型row_me 原材料 product产品
|
||
*/
|
||
@ExcelProperty(value = "所在库区ID")
|
||
private Long warehouseId;
|
||
|
||
/**
|
||
* 下一库区ID
|
||
*/
|
||
private Long nextWarehouseId;
|
||
|
||
/**
|
||
* 关联二维码ID
|
||
*/
|
||
private Long qrcodeRecordId;
|
||
|
||
/**
|
||
* 班组
|
||
*/
|
||
@ExcelProperty(value = "班组")
|
||
private String team;
|
||
|
||
/**
|
||
* 是否合卷/分卷
|
||
*/
|
||
@ExcelProperty(value = "是否合卷/分卷", converter = ExcelDictConvert.class)
|
||
@ExcelDictFormat(readConverterExp = "0=否,1=分卷,2=合卷")
|
||
private Integer hasMergeSplit;
|
||
|
||
/**
|
||
* 父卷号
|
||
*/
|
||
private String parentCoilNos;
|
||
|
||
/**
|
||
* 物品类型
|
||
*/
|
||
@ExcelProperty(value = "物品类型")
|
||
private String itemType;
|
||
|
||
/**
|
||
* 物品ID
|
||
*/
|
||
private Long itemId;
|
||
|
||
/**
|
||
* 毛重(kg)
|
||
*/
|
||
@ExcelProperty(value = "毛重(kg)")
|
||
private BigDecimal grossWeight;
|
||
|
||
/**
|
||
* 净重(kg)
|
||
*/
|
||
@ExcelProperty(value = "净重(kg)")
|
||
private BigDecimal netWeight;
|
||
|
||
/**
|
||
* 状态
|
||
*/
|
||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||
@ExcelDictFormat(readConverterExp = "0=在库,1=在途,2=已出库")
|
||
private Integer status;
|
||
|
||
/**
|
||
* 备注
|
||
*/
|
||
@ExcelProperty(value = "备注")
|
||
private String remark;
|
||
|
||
// ========== 关联对象属性 ==========
|
||
|
||
/**
|
||
* 所在库区信息
|
||
*/
|
||
private WmsWarehouseVo warehouse;
|
||
|
||
/**
|
||
* 下一库区信息
|
||
*/
|
||
private WmsWarehouseVo nextWarehouse;
|
||
|
||
/**
|
||
* 仓库信息
|
||
*/
|
||
private WmsActualWarehouseVo actualWarehouse;
|
||
|
||
/**
|
||
* 二维码信息
|
||
*/
|
||
private WmsGenerateRecordVo qrcodeRecord;
|
||
|
||
/**
|
||
* 库区名称(用于统计查询)
|
||
*/
|
||
@ExcelProperty(value = "库区名称")
|
||
private String warehouseName;
|
||
|
||
/**
|
||
* 下一库区名称
|
||
*/
|
||
private String nextWarehouseName;
|
||
|
||
/**
|
||
* 钢卷数量(用于统计查询)
|
||
*/
|
||
private Long coilCount;
|
||
|
||
/**
|
||
* 总毛重(用于统计查询)
|
||
*/
|
||
private BigDecimal totalGrossWeight;
|
||
|
||
/**
|
||
* 总净重(用于统计查询)
|
||
*/
|
||
private BigDecimal totalNetWeight;
|
||
|
||
@ExcelProperty(value = "物品名称")
|
||
private String itemName;
|
||
@ExcelProperty(value = "物品编号")
|
||
private String itemCode;
|
||
|
||
private Long actualWarehouseId;
|
||
private String actualWarehouseName;
|
||
|
||
|
||
//材料类型
|
||
private String materialType;
|
||
|
||
|
||
|
||
/**
|
||
* 质量状态(0=正常,1=待检,2=不合格)
|
||
*/
|
||
private String qualityStatus;
|
||
|
||
/**
|
||
* 切边要求
|
||
*/
|
||
private String trimmingRequirement;
|
||
|
||
/**
|
||
* 打包状态(0=未打包,1=已打包)
|
||
*/
|
||
private String packingStatus;
|
||
|
||
/**
|
||
* 包装要求
|
||
*/
|
||
private String packagingRequirement;
|
||
|
||
|
||
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@ExcelProperty(value = "发货时间")
|
||
private Date exportTime;
|
||
|
||
|
||
private String specification; // 规格
|
||
private String material; // 材质
|
||
private String surfaceTreatmentDesc; // 表面处理
|
||
private String zincLayer; // 锌层
|
||
private String manufacturer; // 厂家
|
||
|
||
/**
|
||
* 异常数量(钢卷异常信息表统计)
|
||
*/
|
||
private Integer abnormalCount;
|
||
|
||
|
||
private String createByName;
|
||
private String updateByName;
|
||
|
||
//销售id
|
||
private Long saleId;
|
||
// 销售昵称
|
||
private String saleName;
|
||
|
||
//新增长度字段
|
||
private Long length;
|
||
|
||
//发货人
|
||
private String exportBy;
|
||
//发货人昵称
|
||
private String exportByName;
|
||
|
||
|
||
// 调制度
|
||
private String temperGrade;
|
||
|
||
// 业务用途(如:生产领用、销售发货、样品送检、内部调拨等)
|
||
private String businessPurpose;
|
||
|
||
// 是否与订单相关(0=否,1=是)
|
||
private Integer isRelatedToOrder;
|
||
|
||
// 镀层种类
|
||
private String coatingType;
|
||
|
||
/**
|
||
* 独占状态(0=未独占,1=特殊分卷中)
|
||
*/
|
||
private Integer exclusiveStatus;
|
||
|
||
/**
|
||
* 炉火层级(1=一层,2=二层,3=三层)
|
||
*/
|
||
private Integer furnaceLevel;
|
||
|
||
/**
|
||
* 是否已被发货单明细绑定(true=不可再次绑定)
|
||
*/
|
||
private Boolean bound;
|
||
// 父钢卷id
|
||
private String parentCoilId;
|
||
|
||
/**
|
||
* 实测长度
|
||
*/
|
||
@ExcelProperty(value = "实测长度")
|
||
private Long actualLength;
|
||
|
||
/**
|
||
* 实测宽度
|
||
*/
|
||
@ExcelProperty(value = "实测宽度")
|
||
private BigDecimal actualWidth;
|
||
|
||
/**
|
||
* 实测厚度(单位:毫米)
|
||
*/
|
||
private String actualThickness;
|
||
|
||
/**
|
||
* 生产开始时间
|
||
*/
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date productionStartTime;
|
||
|
||
/**
|
||
* 生产结束时间
|
||
*/
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date productionEndTime;
|
||
|
||
/**
|
||
* 生产耗时(单位:分钟)
|
||
*/
|
||
private BigDecimal productionDuration;
|
||
|
||
/**
|
||
* 预留宽度(单位:毫米)
|
||
*/
|
||
private BigDecimal reservedWidth;
|
||
|
||
/**
|
||
* 新增在钢卷表中的表面处理
|
||
*/
|
||
private String coilSurfaceTreatment;
|
||
|
||
/**
|
||
* 操作完成时间(从wms_coil_pending_action表查询到的完成时间)
|
||
*/
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date actionCompleteTime;
|
||
|
||
private String saleNickName;
|
||
|
||
/**
|
||
* 调拨类型
|
||
*/
|
||
private String transferType;
|
||
|
||
/**
|
||
* 关联的订单列表(通过wms_coil_contract_rel中间表JOIN crm_order)
|
||
*/
|
||
private List<com.klp.domain.vo.WmsCoilContractRelVo> orderList;
|
||
|
||
private Long specId;
|
||
private Long versionId;
|
||
private String specCode;
|
||
private String versionCode;
|
||
|
||
/**
|
||
* 理论厚度(单位:毫米)
|
||
*/
|
||
private BigDecimal theoreticalThickness;
|
||
|
||
/**
|
||
* 镀铬卷号
|
||
*/
|
||
private String chromePlateCoilNo;
|
||
}
|
||
|