1. 在钢卷物料实体类、业务对象、值对象及导出VO中新增理论长度(theoreticalLength)字段,并在映射文件中补充数据库映射关系 2. 重构理论计算工具方法,将原有的calculateTheoreticalThickness方法扩展为calculateTheoretical,支持同时计算理论厚度和理论长度 3. 理论长度计算公式:理论长度 = 净重(吨) × 1000 / 7.85 / 规格厚度(mm) / 规格宽度(mm) / 1000 4. 优化规格信息提取逻辑,统一从物品规格中解析厚度和宽度,避免重复代码 5. 在新增、修改、分卷、批量分卷等业务方法中调用新的计算逻辑,确保理论长度字段的自动填充
233 lines
4.6 KiB
Java
233 lines
4.6 KiB
Java
package com.klp.domain;
|
||
|
||
import com.alibaba.excel.annotation.ExcelProperty;
|
||
import com.baomidou.mybatisplus.annotation.*;
|
||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||
import com.klp.common.core.domain.BaseEntity;
|
||
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)
|
||
@TableName("wms_material_coil")
|
||
public class WmsMaterialCoil extends BaseEntity {
|
||
|
||
private static final long serialVersionUID=1L;
|
||
|
||
/**
|
||
* 主键ID
|
||
*/
|
||
@TableId(value = "coil_id")
|
||
private Long coilId;
|
||
/**
|
||
* 入场钢卷号(年份后两位+月份+当月第几个,如25100001、25102422)
|
||
*/
|
||
private String enterCoilNo;
|
||
/**
|
||
* 当前钢卷号(入场钢卷号和当前钢卷号可能不同)
|
||
*/
|
||
private String currentCoilNo;
|
||
/**
|
||
* 厂家原料卷号
|
||
*/
|
||
private String supplierCoilNo;
|
||
/**
|
||
* 数据类型(0=历史,1=现存)
|
||
*/
|
||
private Integer dataType;
|
||
/**
|
||
* 所在库区ID
|
||
*/
|
||
private Long warehouseId;
|
||
/**
|
||
* 下一库区ID
|
||
*/
|
||
private Long nextWarehouseId;
|
||
/**
|
||
* 关联二维码ID(wms_generate_record.record_id)
|
||
*/
|
||
private Long qrcodeRecordId;
|
||
/**
|
||
* 班组
|
||
*/
|
||
private String team;
|
||
/**
|
||
* 是否合卷/分卷(0=否,1=分卷,2=合卷)
|
||
*/
|
||
private Integer hasMergeSplit;
|
||
/**
|
||
* 父卷号(合卷或分卷时用,逗号分隔)
|
||
*/
|
||
private String parentCoilNos;
|
||
/**
|
||
* 物品类型(raw_material/product)
|
||
*/
|
||
private String itemType;
|
||
/**
|
||
* 物品ID(指向原材料或产品主键)
|
||
*/
|
||
private Long itemId;
|
||
/**
|
||
* 毛重(kg)
|
||
*/
|
||
private BigDecimal grossWeight;
|
||
/**
|
||
* 净重(kg)
|
||
*/
|
||
private BigDecimal netWeight;
|
||
/**
|
||
* 状态(0=在库,1=在途,2=已出库)
|
||
*/
|
||
private Integer status;
|
||
/**
|
||
* 备注
|
||
*/
|
||
private String remark;
|
||
/**
|
||
* 删除标志(0=正常,1=已删除)
|
||
*/
|
||
@TableLogic
|
||
private Integer delFlag;
|
||
|
||
private Long actualWarehouseId;
|
||
|
||
|
||
//材料类型
|
||
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;
|
||
|
||
//销售id
|
||
private Long saleId;
|
||
|
||
//销售人员姓名
|
||
private String saleName;
|
||
|
||
|
||
//新增长度字段
|
||
private Long length;
|
||
|
||
//发货人
|
||
private String exportBy;
|
||
|
||
|
||
// 调制度
|
||
private String temperGrade;
|
||
|
||
// 业务用途(如:生产领用、销售发货、样品送检、内部调拨等)
|
||
private String businessPurpose;
|
||
|
||
// 是否与订单相关(0=否,1=是)
|
||
private Integer isRelatedToOrder;
|
||
|
||
// 镀层种类
|
||
private String coatingType;
|
||
|
||
/**
|
||
* 独占状态(0=未独占,1=单步分卷中,2=退火中)
|
||
*/
|
||
private Integer exclusiveStatus;
|
||
|
||
|
||
// 父钢卷id
|
||
private String parentCoilId;
|
||
|
||
/**
|
||
* 实测长度
|
||
*/
|
||
private Long actualLength;
|
||
|
||
/**
|
||
* 实测宽度
|
||
*/
|
||
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;
|
||
|
||
/**
|
||
* 调拨类型
|
||
*/
|
||
private String transferType;
|
||
|
||
private Long specId;
|
||
private Long versionId;
|
||
|
||
/**
|
||
* 理论厚度(单位:毫米)
|
||
*/
|
||
private BigDecimal theoreticalThickness;
|
||
|
||
/**
|
||
* 理论长度(单位:米)
|
||
*/
|
||
private BigDecimal theoreticalLength;
|
||
|
||
/**
|
||
* 镀铬卷号
|
||
*/
|
||
private String chromePlateCoilNo;
|
||
}
|
||
|