|
@@ -1,8 +1,17 @@
|
|
|
package com.sd.business.entity.in.vo;
|
|
|
|
|
|
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
|
+import com.alibaba.excel.annotation.ExcelProperty;
|
|
|
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
|
|
+import com.sd.business.entity.in.emums.InDetailTypeEnum;
|
|
|
+import com.sd.business.entity.in.emums.OutDetailTypeEnum;
|
|
|
import com.sd.business.entity.in.po.InOutStorageBom;
|
|
|
import lombok.Getter;
|
|
|
import lombok.Setter;
|
|
|
+import org.springframework.format.annotation.DateTimeFormat;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* 出入库bom列表查询返回值实体
|
|
@@ -12,9 +21,15 @@ import lombok.Setter;
|
|
|
*/
|
|
|
@Getter
|
|
|
@Setter
|
|
|
+@ExcelIgnoreUnannotated
|
|
|
public class InOutStorageBomVo extends InOutStorageBom {
|
|
|
|
|
|
/**
|
|
|
+ * 类型 1入库 0出库
|
|
|
+ */
|
|
|
+ private Integer type;
|
|
|
+
|
|
|
+ /**
|
|
|
* 出入库明细
|
|
|
*/
|
|
|
private Integer detailType;
|
|
@@ -22,11 +37,23 @@ public class InOutStorageBomVo extends InOutStorageBom {
|
|
|
/**
|
|
|
* 出入库单号
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "出入库单号", index = 0)
|
|
|
private String code;
|
|
|
|
|
|
/**
|
|
|
+ * 入库时间
|
|
|
+ */
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
+ @ExcelProperty(value = "出入库时间", index = 9)
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ /**
|
|
|
* 申请人
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "申请人", index = 10)
|
|
|
private String applicant;
|
|
|
|
|
|
/**
|
|
@@ -37,26 +64,60 @@ public class InOutStorageBomVo extends InOutStorageBom {
|
|
|
/**
|
|
|
* 仓库名称
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "仓库", index = 4)
|
|
|
private String warehouseName;
|
|
|
|
|
|
/**
|
|
|
* 事业部名称
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "归属事业部", index = 2)
|
|
|
private String departmentName;
|
|
|
|
|
|
/**
|
|
|
* 采购单号
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "采购单号", index = 1)
|
|
|
private String purchaseCode;
|
|
|
|
|
|
/**
|
|
|
* 产品规格品号
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "品号", index = 6)
|
|
|
private String bomSpecCode;
|
|
|
|
|
|
/**
|
|
|
* 产品规格品名
|
|
|
*/
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "品名", index = 7)
|
|
|
private String bomSpecName;
|
|
|
|
|
|
+ /**
|
|
|
+ * 仓库类型值
|
|
|
+ */
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "仓库类型", index = 3)
|
|
|
+ private String warehouseTypeValue;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出入库明细类型值
|
|
|
+ */
|
|
|
+ @ColumnWidth(20)
|
|
|
+ @ExcelProperty(value = "出入库类型", index = 5)
|
|
|
+ private String detailTypeValue;
|
|
|
+
|
|
|
+ public String getWarehouseTypeValue() {
|
|
|
+ return warehouseName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getDetailTypeValue() {
|
|
|
+ if (Objects.equals(type, 1)) {
|
|
|
+ return InDetailTypeEnum.getInDetailType(detailType).getValue();
|
|
|
+ }
|
|
|
+ return OutDetailTypeEnum.getOutDetailType(detailType).getValue();
|
|
|
+ }
|
|
|
}
|