- 在WmsTransferOrder实体中添加调拨类型、审批人、审批时间和审批状态字段 - 在WmsMaterialCoil实体中添加调拨类型字段用于关联调拨信息 - 实现调拨单审批接口,支持通过或驳回操作 - 更新调拨单明细处理逻辑,确保调拨类型正确传递到钢卷信息 - 添加调拨单取消功能,可恢复调拨前的状态 - 在导出VO中增加调拨类型字段支持Excel导出 - 更新查询条件支持按调拨类型、审批状态等字段筛选 - 完善调拨流程中的数据验证和错误处理机制
356 lines
8.3 KiB
Java
356 lines
8.3 KiB
Java
package com.klp.domain.bo;
|
||
|
||
import com.alibaba.excel.annotation.ExcelProperty;
|
||
import com.baomidou.mybatisplus.annotation.TableField;
|
||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||
import com.klp.common.core.domain.BaseEntity;
|
||
import com.klp.common.core.validate.AddGroup;
|
||
import com.klp.common.core.validate.EditGroup;
|
||
import lombok.Data;
|
||
import lombok.EqualsAndHashCode;
|
||
import org.springframework.format.annotation.DateTimeFormat;
|
||
|
||
import javax.validation.constraints.*;
|
||
import java.math.BigDecimal;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
|
||
/**
|
||
* 钢卷物料表业务对象 wms_material_coil
|
||
*
|
||
* @author Joshi
|
||
* @date 2025-07-18
|
||
*/
|
||
@Data
|
||
@EqualsAndHashCode(callSuper = true)
|
||
public class WmsMaterialCoilBo extends BaseEntity {
|
||
|
||
/**
|
||
* 主键ID
|
||
*/
|
||
private Long coilId;
|
||
|
||
/**
|
||
* 入场钢卷号(年份后两位+月份+当月第几个,如25100001、25102422)
|
||
*/
|
||
@NotBlank(message = "入场钢卷号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||
private String enterCoilNo;
|
||
|
||
/**
|
||
* 当前钢卷号(入场钢卷号和当前钢卷号可能不同)
|
||
*/
|
||
private String currentCoilNo;
|
||
|
||
/**
|
||
* 厂家原料卷号
|
||
*/
|
||
private String supplierCoilNo;
|
||
|
||
/**
|
||
* 数据类型(0=历史,1=现存)
|
||
*/
|
||
private Integer dataType;
|
||
|
||
/**
|
||
* 所在库区ID
|
||
*/
|
||
private Long warehouseId;
|
||
|
||
/**
|
||
* 所在库区IDs(逗号分隔)
|
||
*/
|
||
private String warehouseIds;
|
||
|
||
/**
|
||
* 下一库区ID
|
||
*/
|
||
private Long nextWarehouseId;
|
||
|
||
/**
|
||
* 下一库区IDs(逗号分隔)
|
||
*/
|
||
private String nextWarehouseIds;
|
||
|
||
/**
|
||
* 关联二维码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;
|
||
|
||
/**
|
||
* 分卷/合卷的新钢卷列表(用于批量更新)
|
||
*/
|
||
private List<WmsMaterialCoilBo> newCoils;
|
||
|
||
/**
|
||
* 操作记录ID(用于合卷操作关联)
|
||
*/
|
||
private Long actionId;
|
||
|
||
/**
|
||
* 操作类型(1=分卷,2=合卷,3=更新)
|
||
*/
|
||
private Integer actionType;
|
||
|
||
/**
|
||
* 合卷后的新钢卷ID(用于返回)
|
||
*/
|
||
private Long mergedCoilId;
|
||
|
||
//时间格式化
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date startTime;
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date endTime;
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date exportTime;
|
||
|
||
private String itemIds;
|
||
|
||
private Long actualWarehouseId;
|
||
|
||
//材料类型
|
||
@NotBlank(message = "材料类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||
private String materialType;
|
||
|
||
|
||
/**
|
||
* 质量状态(0=正常,1=待检,2=不合格)
|
||
*/
|
||
private String qualityStatus;
|
||
|
||
/**
|
||
* 质量状态多选查询
|
||
*/
|
||
private String qualityStatusCsv;
|
||
|
||
/**
|
||
* 切边要求
|
||
*/
|
||
private String trimmingRequirement;
|
||
|
||
/**
|
||
* 打包状态(0=未打包,1=已打包)
|
||
*/
|
||
private String packingStatus;
|
||
|
||
/**
|
||
* 包装要求
|
||
*/
|
||
private String packagingRequirement;
|
||
|
||
/**
|
||
* 最小异常数量(用于筛选异常数量 >= 此值的钢卷)
|
||
*/
|
||
private Integer minAbnormalCount;
|
||
|
||
/**
|
||
* 钢卷ID列表(逗号分隔,用于根据ID列表查询钢卷)
|
||
*/
|
||
private String coilIds;
|
||
|
||
// 筛选类型
|
||
private String selectType;
|
||
// 物品名称
|
||
private String itemName;
|
||
// 材质(两表通用字段名:product.material / raw_material.material)
|
||
private String itemMaterial;
|
||
// 厂家(两表通用字段名:product.manufacturer / raw_material.manufacturer)
|
||
private String itemManufacturer;
|
||
// 表面处理详情(两表通用字段名:surface_treatment_desc)
|
||
private String itemSurfaceTreatmentDesc;
|
||
// 锌层厚度(两表通用字段名:zinc_layer)
|
||
private String itemZincLayer;
|
||
//规格
|
||
private String itemSpecification;
|
||
|
||
private Boolean onlyUnshippedAndUnplanned;
|
||
|
||
/**
|
||
* 是否排除已被发货单明细绑定的钢卷(true=列表不返回已绑定钢卷)
|
||
*/
|
||
private Boolean excludeBound;
|
||
|
||
/**
|
||
* 是否排除已打包的钢卷(true=列表不返回已打包钢卷)
|
||
*/
|
||
private Boolean excludePacked;
|
||
|
||
/**
|
||
* 是否在列表中返回“发货单明细绑定信息”(true=返回 bound + 绑定来源信息)
|
||
* 默认不返回,避免不需要的场景变慢。
|
||
*/
|
||
private Boolean includeBindInfo;
|
||
|
||
//销售id
|
||
private Long saleId;
|
||
|
||
//销售人员姓名
|
||
private String saleName;
|
||
|
||
|
||
//新增长度字段
|
||
private BigDecimal length;
|
||
|
||
// 新增的在钢卷表中的表面处理
|
||
private String coilSurfaceTreatment;
|
||
|
||
//新增通过创建时间
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date byCreateTimeStart;
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date byCreateTimeEnd;
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date byExportTimeStart;
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date byExportTimeEnd;
|
||
|
||
// 仅查询废品(质量状态为 D+、D、D-)
|
||
private Boolean onlyScrap;
|
||
|
||
private String exportBy;
|
||
|
||
|
||
// 调制度
|
||
private String temperGrade;
|
||
|
||
// 业务用途(如:生产领用、销售发货、样品送检、内部调拨等)
|
||
private String businessPurpose;
|
||
|
||
// 是否与订单相关(0=否,1=是)
|
||
private Integer isRelatedToOrder;
|
||
|
||
// 镀层种类
|
||
private String coatingType;
|
||
|
||
/**
|
||
* 独占状态(0=未独占,1=特殊分卷中)
|
||
*/
|
||
private Integer exclusiveStatus;
|
||
|
||
// 接收前端传来是否排序的字段 OrderBy
|
||
@TableField(exist = false)
|
||
private Boolean orderBy;
|
||
|
||
// 父钢卷id
|
||
private String parentCoilId;
|
||
|
||
// 已绑定钢卷列表中,未发货(status=0)的排在前面
|
||
@TableField(exist = false)
|
||
private Boolean statusFirst;
|
||
|
||
/**
|
||
* 实测长度
|
||
*/
|
||
private BigDecimal actualLength;
|
||
|
||
/**
|
||
* 实测宽度
|
||
*/
|
||
private BigDecimal actualWidth;
|
||
|
||
/**
|
||
* 实测厚度(单位:毫米)
|
||
*/
|
||
private String actualThickness;
|
||
|
||
/**
|
||
* 生产开始时间
|
||
*/
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date productionStartTime;
|
||
|
||
/**
|
||
* 生产结束时间
|
||
*/
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||
private Date productionEndTime;
|
||
|
||
/**
|
||
* 生产耗时(单位:分钟)
|
||
*/
|
||
private BigDecimal productionDuration;
|
||
|
||
/**
|
||
* 预留宽度(单位:毫米)
|
||
*/
|
||
private BigDecimal reservedWidth;
|
||
|
||
/**
|
||
* 操作记录ID列表(逗号分隔,用于根据actionIds查询钢卷)
|
||
*/
|
||
private String actionIds;
|
||
|
||
/**
|
||
* 钢卷异常信息列表(用于更新钢卷时同时插入异常信息)
|
||
*/
|
||
private List<WmsCoilAbnormalBo> abnormals;
|
||
|
||
/**
|
||
* 按异常数量排序(异常钢卷在前按创建时间,没异常的钢卷在后按创建时间)
|
||
*/
|
||
@TableField(exist = false)
|
||
private Boolean orderByAbnormal;
|
||
|
||
/**
|
||
* 调拨类型
|
||
*/
|
||
private String transferType;
|
||
}
|
||
|