package com.java110.po.purchase;
|
|
import lombok.Data;
|
import java.io.Serializable;
|
|
/**
|
* 采购退库记录表实体类
|
* 适配全VARCHAR字段,兼容脏数据
|
*/
|
@Data
|
public class PurchaseReturnRecord implements Serializable {
|
|
public PurchaseReturnRecord(String id, String returnNo, String returnDate, String returnQuantity, String returnPerson, String approver, String warehousingOrderNo, String orderId) {
|
this.id = id;
|
this.returnNo = returnNo;
|
this.returnDate = returnDate;
|
this.returnQuantity = returnQuantity;
|
this.returnPerson = returnPerson;
|
this.approver = approver;
|
this.warehousingOrderNo = warehousingOrderNo;
|
this.orderId = orderId;
|
}
|
|
public PurchaseReturnRecord() {
|
}
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* 主键ID
|
*/
|
private String id;
|
|
/**
|
* 退库编号
|
*/
|
private String returnNo;
|
|
/**
|
* 退库日期(适配非标准日期,如「2026.03.23」「3月23日」)
|
*/
|
private String returnDate;
|
|
/**
|
* 退库数量(适配非数值脏数据,如「10箱」「未统计」)
|
*/
|
private String returnQuantity;
|
|
/**
|
* 退库人(姓名/工号)
|
*/
|
private String returnPerson;
|
|
/**
|
* 审批人(姓名/工号)
|
*/
|
private String approver;
|
|
/**
|
* 关联入库单号
|
*/
|
private String warehousingOrderNo;
|
|
/**
|
* 关联订单ID/采购申请单ID
|
*/
|
private String orderId;
|
|
/**
|
* 创建时间
|
*/
|
private String createTime;
|
|
/**
|
* 更新时间
|
*/
|
private String updateTime;
|
|
private String returnPrice; // 退库单价
|
private String returnTotalPrice; // 退库总价
|
private String supplierName; // 供货商名称
|
private String returnStockInNo; // 退库入库单号
|
private String returnStockInDate; // 退库入库日期
|
private String returnStockOutNo; // 退库出库单号
|
private String returnDirection; // 退库方向
|
|
// 可选:退库数量清洗方法(提取纯数字)
|
public String cleanReturnQuantity() {
|
if (returnQuantity == null || returnQuantity.trim().isEmpty()) {
|
return "0";
|
}
|
// 提取字符串中的数字,适配「10箱」「50+」等格式
|
return returnQuantity.replaceAll("[^0-9]", "");
|
}
|
}
|