feat: 期初库存导入

This commit is contained in:
faramita 2024-12-18 14:23:32 +08:00
parent b7208154fa
commit 63acf921a3
19 changed files with 171 additions and 2676 deletions

View File

@ -1,168 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import java.math.BigDecimal;
public class DocumentAdvanceBindDto {
@ExcelProperty(value = "单据号",index = 0)
private String documentNo;
@ExcelProperty(value="行号",index = 1)
private String seq;
@ExcelProperty(value="托",index = 2)
private String tray;
@ExcelProperty(value="箱",index = 3)
private String box;
@ExcelProperty(value="卷",index = 4)
private String inventoryId;
@ExcelProperty(value="物料",index = 5)
private String item;
@ExcelProperty(value="数量",index = 6)
private BigDecimal qty;
@ExcelProperty(value="生产日期",index = 7)
private String productionDate;
@ExcelProperty(value="规格型号",index = 8)
private String groes;
@ExcelProperty(value="质检等级",index = 9)
private String qualityInspectionStatus;
@ExcelProperty(value="升级标志",index = 10)
private String upgradeFlag;
@ExcelProperty(value="标准长度",index = 11)
private String standardLength;
@ExcelProperty(value="实际长度",index = 12)
private String currentLength;
@ExcelProperty(value="宽度",index = 13)
private String width;
@ExcelProperty(value="厚度",index = 14)
private String bismt ;
@ExcelProperty(value="生产基地",index = 15)
private String productionBase;
public String getDocumentNo() {
return documentNo;
}
public void setDocumentNo(String documentNo) {
this.documentNo = documentNo;
}
public String getSeq() {
return seq;
}
public void setSeq(String seq) {
this.seq = seq;
}
public String getTray() {
return tray;
}
public void setTray(String tray) {
this.tray = tray;
}
public String getBox() {
return box;
}
public void setBox(String box) {
this.box = box;
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public BigDecimal getQty() {
return qty;
}
public void setQty(BigDecimal qty) {
this.qty = qty;
}
public String getProductionDate() {
return productionDate;
}
public void setProductionDate(String productionDate) {
this.productionDate = productionDate;
}
public String getGroes() {
return groes;
}
public void setGroes(String groes) {
this.groes = groes;
}
public String getQualityInspectionStatus() {
return qualityInspectionStatus;
}
public void setQualityInspectionStatus(String qualityInspectionStatus) {
this.qualityInspectionStatus = qualityInspectionStatus;
}
public String getUpgradeFlag() {
return upgradeFlag;
}
public void setUpgradeFlag(String upgradeFlag) {
this.upgradeFlag = upgradeFlag;
}
public String getStandardLength() {
return standardLength;
}
public void setStandardLength(String standardLength) {
this.standardLength = standardLength;
}
public String getCurrentLength() {
return currentLength;
}
public void setCurrentLength(String currentLength) {
this.currentLength = currentLength;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
public String getBismt() {
return bismt;
}
public void setBismt(String bismt) {
this.bismt = bismt;
}
public String getProductionBase() {
return productionBase;
}
public void setProductionBase(String productionBase) {
this.productionBase = productionBase;
}
}

View File

@ -1,168 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import java.math.BigDecimal;
public class DocumentFinishedProduct {
@ExcelProperty(value = "单据号",index = 0)
private String documentNo;
@ExcelProperty(value="行号",index = 1)
private String seq;
@ExcelProperty(value="托",index = 2)
private String tray;
@ExcelProperty(value="箱",index = 3)
private String box;
@ExcelProperty(value="卷",index = 4)
private String inventoryId;
@ExcelProperty(value="物料",index = 5)
private String item;
@ExcelProperty(value="数量",index = 6)
private BigDecimal qty;
@ExcelProperty(value="生产日期",index = 7)
private String productionDate;
@ExcelProperty(value="规格型号",index = 8)
private String groes;
@ExcelProperty(value="质检等级",index = 9)
private String qualityInspectionStatus;
@ExcelProperty(value="升级标志",index = 10)
private String upgradeFlag;
@ExcelProperty(value="标准长度",index = 11)
private String standardLength;
@ExcelProperty(value="实际长度",index = 12)
private String currentLength;
@ExcelProperty(value="宽度",index = 13)
private String width;
@ExcelProperty(value="厚度",index = 14)
private String bismt ;
@ExcelProperty(value="生产基地",index = 15)
private String productionBase;
public String getDocumentNo() {
return documentNo;
}
public void setDocumentNo(String documentNo) {
this.documentNo = documentNo;
}
public String getSeq() {
return seq;
}
public void setSeq(String seq) {
this.seq = seq;
}
public String getTray() {
return tray;
}
public void setTray(String tray) {
this.tray = tray;
}
public String getBox() {
return box;
}
public void setBox(String box) {
this.box = box;
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public BigDecimal getQty() {
return qty;
}
public void setQty(BigDecimal qty) {
this.qty = qty;
}
public String getProductionDate() {
return productionDate;
}
public void setProductionDate(String productionDate) {
this.productionDate = productionDate;
}
public String getGroes() {
return groes;
}
public void setGroes(String groes) {
this.groes = groes;
}
public String getQualityInspectionStatus() {
return qualityInspectionStatus;
}
public void setQualityInspectionStatus(String qualityInspectionStatus) {
this.qualityInspectionStatus = qualityInspectionStatus;
}
public String getUpgradeFlag() {
return upgradeFlag;
}
public void setUpgradeFlag(String upgradeFlag) {
this.upgradeFlag = upgradeFlag;
}
public String getStandardLength() {
return standardLength;
}
public void setStandardLength(String standardLength) {
this.standardLength = standardLength;
}
public String getCurrentLength() {
return currentLength;
}
public void setCurrentLength(String currentLength) {
this.currentLength = currentLength;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
public String getBismt() {
return bismt;
}
public void setBismt(String bismt) {
this.bismt = bismt;
}
public String getProductionBase() {
return productionBase;
}
public void setProductionBase(String productionBase) {
this.productionBase = productionBase;
}
}

View File

@ -1,99 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import java.math.BigDecimal;
public class DocumentRawMaterialDto {
@ExcelProperty(value = "单据号",index = 0)
private String documentNo;
@ExcelProperty(value="行号",index = 1)
private String seq;
@ExcelProperty(value="卷",index = 2)
private String inventoryId;
@ExcelProperty(value="物料",index = 3)
private String item;
@ExcelProperty(value="数量",index = 4)
private BigDecimal qty;
@ExcelProperty(value="批次",index = 5)
private String batch;
@ExcelProperty(value="供应商批次",index = 6)
private String vendorBatch;
@ExcelProperty(value="生产日期",index =7)
private String productionDate;
@ExcelProperty(value="检验特殊标记",index =8)
private String qmsSpecialMarking;
public String getDocumentNo() {
return documentNo;
}
public void setDocumentNo(String documentNo) {
this.documentNo = documentNo;
}
public String getSeq() {
return seq;
}
public void setSeq(String seq) {
this.seq = seq;
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public BigDecimal getQty() {
return qty;
}
public void setQty(BigDecimal qty) {
this.qty = qty;
}
public String getBatch() {
return batch;
}
public void setBatch(String batch) {
this.batch = batch;
}
public String getVendorBatch() {
return vendorBatch;
}
public void setVendorBatch(String vendorBatch) {
this.vendorBatch = vendorBatch;
}
public String getProductionDate() {
return productionDate;
}
public void setProductionDate(String productionDate) {
this.productionDate = productionDate;
}
public String getQmsSpecialMarking() {
return qmsSpecialMarking;
}
public void setQmsSpecialMarking(String qmsSpecialMarking) {
this.qmsSpecialMarking = qmsSpecialMarking;
}
}

View File

@ -0,0 +1,74 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* 原材料导入
*/
@ExcelIgnoreUnannotated
@Data
@NoArgsConstructor
public class InventoryImportDTO {
@ExcelProperty(value = "仓库", index = 0)
private String erpStorageLocation;
@ExcelProperty(value = "库存条码", index = 1)
private String inventoryId;
@ExcelProperty(value = "库存状态", index = 2)
private String status;
@ExcelProperty(value = "物料", index = 3)
private String item;
@ExcelProperty(value = "SAP批次", index = 4)
private String batchNumber;
@ExcelProperty(value = "供应商批次", index = 5)
private String vendorBatch;
@ExcelProperty(value = "原始数量", index = 6)
private String originalQty;
@ExcelProperty(value = "现有数量", index = 7)
private String currentQty;
@ExcelProperty(value = "生产日期", index = 8)
private String productionDataTime;
@ExcelProperty(value = "质量等级", index = 9)
private String qualityInspectionStatus;
@ExcelProperty(value = "标准长度", index = 10)
private String standardLength;
@ExcelProperty(value = "实际长度", index = 11)
private String length;
@ExcelProperty(value = "特殊库存标识(E/空)", index = 12)
private String inventorySpecialMarking;
@ExcelProperty(value = "销售订单", index = 13)
private String dnOrder;
@ExcelProperty(value = "销售订单行号", index = 14)
private String dnOrderSeq;
@ExcelProperty(value = "膜卷类型", index = 15)
private String rollType;
@ExcelProperty(value = "辅助单位", index = 16)
private String auxiliaryUnit;
@ExcelProperty(value = "辅助数量", index = 17)
private String auxiliaryOty;
@ExcelProperty(value = "库存保密ID", index = 18)
private String secrecyId;
}

View File

@ -1,20 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 包材导入
*/
@ExcelIgnoreUnannotated
@Data
public class InventoryNoteImportDto {
@ExcelProperty(value = "条码", index = 0)
private String inventoryId;
@ExcelProperty(value = "说明",index = 1)
private String note;
}

View File

@ -1,75 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 成品导入
*/
@ExcelIgnoreUnannotated
@Data
@NoArgsConstructor
public class MaterialFERTDto {
@ExcelProperty(value = "ERP仓库", index = 0)
private String erpStorage;
@ExcelProperty(value = "条码", index = 1)
private String inventoryId;
@ExcelProperty(value = "状态", index = 2)
private String status;
@ExcelProperty(value = "物料", index = 3)
private String material;
@ExcelProperty(value = "现有数量(正数)", index = 4)
private String currentQty;
@ExcelProperty(value = "生产日期", index = 5)
private String productionDataTime;
@ExcelProperty(value = "规格型号", index = 6)
private String model;
@ExcelProperty(value = "质量等级", index = 7)
private String qualityLevel;
@ExcelProperty(value = "升级标志", index = 8)
private String upgradeFlag;
@ExcelProperty(value = "标准长度", index = 9)
private String standardLength;
@ExcelProperty(value = "实际长度", index = 10)
private String length;
@ExcelProperty(value = "宽度", index = 11)
private String width;
@ExcelProperty(value = "厚度", index = 12)
private String bismt;
@ExcelProperty(value = "生产基地", index = 13)
private String productionBase;
@ExcelProperty(value = "目标客户", index = 14)
private String demandCustomers;
@ExcelProperty(value = "托条码", index = 15)
private String pallet;
@ExcelProperty(value = "箱条码", index = 16)
private String box;
@ExcelProperty(value = "箱类型", index = 17)
private String boxType;
@ExcelProperty(value = "货格号", index = 18)
private String shelves;
@ExcelProperty(value = "备注", index = 19)
private String comments;
}

View File

@ -1,128 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 成品导入
*/
@Data
@NoArgsConstructor
public class MaterialFERTwithQcDataDTO {
@ExcelProperty(value = "条码", index = 0)
private String inventoryId;
@ExcelProperty(value = "状态", index = 1)
private String status;
@ExcelProperty(value = "物料", index = 2)
private String material;
@ExcelProperty(value = "现有数量", index = 3)
private String currentQty;
@ExcelProperty(value = "生产日期", index = 4)
private String productionDataTime;
@ExcelProperty(value = "失效日期", index = 5)
private String validityDate;
@ExcelProperty(value = "质量等级", index = 6)
private String qualityLevel;
@ExcelProperty(value = "实际长度", index = 7)
private String length;
@ExcelProperty(value = "宽度", index = 8)
private String width;
@ExcelProperty(value = "托条码", index = 9)
private String pallet;
@ExcelProperty(value = "托类型", index = 10)
private String palletType;
@ExcelProperty(value = "箱条码", index = 11)
private String box;
@ExcelProperty(value = "箱类型", index = 12)
private String boxType;
@ExcelProperty(value = "目标客户", index = 13)
private String demandCustomers;
@ExcelProperty(value = "规格型号", index = 14)
private String model;
@ExcelProperty(value = "厚度", index = 15)
private String bismt;
@ExcelProperty(value = "标准长度", index = 16)
private String standardLength;
@ExcelProperty(value = "仓库", index = 17)
private String erpStorage;
@ExcelProperty(value = "升级标志", index = 18)
private String upgradeFlag;
@ExcelProperty(value = "生产基地", index = 19)
private String productionBase;
@ExcelProperty(value = "货格号", index = 20)
private String shelves;
@ExcelProperty(value = "母卷号", index = 21)
private String referenceSfc;
@ExcelProperty(value = "实测宽度", index = 22)
private String measuredWidth;
@ExcelProperty(value = "检验人员", index = 23)
private String inspectionUser;
@ExcelProperty(value = "检验时间", index = 24)
private String inspectionTime;
@ExcelProperty(value = "卷膜类型", index = 25)
private String rollType;
@ExcelProperty(value = "工序", index = 26)
private String operation;
@ExcelProperty(value = "资源", index = 27)
private String resource;
@ExcelProperty(value = "切号", index = 28)
private String cutNumber;
@ExcelProperty(value = "工位号", index = 29)
private String locationNumber;
@ExcelProperty(value = "物性项", index = 30)
private String physical;
@ExcelProperty(value = "物性判定", index = 31)
private String physicalDecide;
@ExcelProperty(value = "物性描述", index = 32)
private String physicalDesc;
@ExcelProperty(value = "AOI", index = 33)
private String aoi;
@ExcelProperty(value = "AOI判定", index = 34)
private String aoiDecide;
@ExcelProperty(value = "AOI描述", index = 35)
private String aoiDesc;
@ExcelProperty(value = "膜面项", index = 36)
private String surface;
@ExcelProperty(value = "膜面项判定", index = 37)
private String surfaceDecide;
@ExcelProperty(value = "膜面项描述", index = 38)
private String surfaceDesc;
@ExcelProperty(value = "分切项", index = 39)
private String cut;
@ExcelProperty(value = "分切项判定", index = 40)
private String cutDecide;
@ExcelProperty(value = "分切项描述", index = 41)
private String cutDesc;
@ExcelProperty(value = "静电", index = 42)
private String staticElectricity;
@ExcelProperty(value = "弯曲度", index = 43)
private String curvature;
@ExcelProperty(value = "涂层朝向", index = 44)
private String coatingToward;
@ExcelProperty(value = "综合判定等级", index = 45)
private String comprehensiveDecisionLevel;
@ExcelProperty(value = "检验项目编码", index = 46)
private String inspectionItem;
@ExcelProperty(value = "检验项目名称", index = 47)
private String inspectionItemDescription;
@ExcelProperty(value = "数据点位", index = 48)
private String point;
@ExcelProperty(value = "检验项目实测值", index = 49)
private String value;
@ExcelProperty(value = "客户GAP值", index = 50)
private String customerValue;
@ExcelProperty(value = "判定结果", index = 51)
private String result;
@ExcelProperty(value = "检验单据编码", index = 52)
private String inspectionDocument;
@ExcelProperty(value = "工序类型", index = 53)
private String opType;
@ExcelProperty(value = "产品型号", index = 54)
private String kdmat;
@ExcelProperty(value = "检验方式", index = 55)
private String inspectionMethod;
@ExcelProperty(value = "备注", index = 56)
private String comments;
}

View File

@ -1,169 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import java.time.LocalDateTime;
/**
* 半成品导入
*/
public class MaterialHALBDto {
@ExcelProperty("条码")
private String inventoryId;
@ExcelProperty("物料")
private String material;
@ExcelProperty("型号")
private String model;
@ExcelProperty("现有数量")
private String currentQty;
@ExcelProperty("质检状态")
private String qualityInspectionStatus;
@ExcelProperty("生产日期")
private LocalDateTime productionDataTime;
@ExcelProperty("有效期")
private LocalDateTime validityDate;
@ExcelProperty("托条码")
private String pallet;
@ExcelProperty("箱条码")
private String box;
@ExcelProperty("托盘类型")
private String palletType;
@ExcelProperty("实际长度")
private String length;
@ExcelProperty("宽度")
private String width;
@ExcelProperty("货格号")
private String shelves;
@ExcelProperty("存储区域")
private String storage;
public MaterialHALBDto() {
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getCurrentQty() {
return currentQty;
}
public void setCurrentQty(String currentQty) {
this.currentQty = currentQty;
}
public String getQualityInspectionStatus() {
return qualityInspectionStatus;
}
public void setQualityInspectionStatus(String qualityInspectionStatus) {
this.qualityInspectionStatus = qualityInspectionStatus;
}
public LocalDateTime getProductionDataTime() {
return productionDataTime;
}
public void setProductionDataTime(LocalDateTime productionDataTime) {
this.productionDataTime = productionDataTime;
}
public LocalDateTime getValidityDate() {
return validityDate;
}
public void setValidityDate(LocalDateTime validityDate) {
this.validityDate = validityDate;
}
public String getPallet() {
return pallet;
}
public void setPallet(String pallet) {
this.pallet = pallet;
}
public String getBox() {
return box;
}
public void setBox(String box) {
this.box = box;
}
public String getPalletType() {
return palletType;
}
public void setPalletType(String palletType) {
this.palletType = palletType;
}
public String getLength() {
return length;
}
public void setLength(String length) {
this.length = length;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
public String getShelves() {
return shelves;
}
public void setShelves(String shelves) {
this.shelves = shelves;
}
public String getStorage() {
return storage;
}
public void setStorage(String storage) {
this.storage = storage;
}
}

View File

@ -1,36 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 包材导入
*/
@ExcelIgnoreUnannotated
@Data
@NoArgsConstructor
public class MaterialKMATDto {
@ExcelProperty(value = "ERP仓库", index = 0)
private String erpStorage;
@ExcelProperty(value = "条码", index = 1)
private String inventoryId;
@ExcelProperty(value = "状态", index = 2)
private String status;
@ExcelProperty(value = "物料", index = 3)
private String material;
@ExcelProperty(value = "现有数量", index = 4)
private String currentQty;
@ExcelProperty(value = "存储区域", index = 5)
private String storage;
@ExcelProperty(value = "备注", index = 6)
private String comments;
}

View File

@ -1,49 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 原材料导入
*/
@ExcelIgnoreUnannotated
@Data
@NoArgsConstructor
public class MaterialROHDto {
@ExcelProperty(value = "ERP仓库", index = 0)
private String erpStorage;
@ExcelProperty(value = "条码", index = 1)
private String inventoryId;
@ExcelProperty(value = "状态", index = 2)
private String status;
@ExcelProperty(value = "物料", index = 3)
private String material;
@ExcelProperty(value = "采购到货批次号", index = 4)
private String batchNumber;
@ExcelProperty(value = "供应商批次", index = 5)
private String vendorBatch;
@ExcelProperty(value = "现有数量", index = 6)
private String currentQty;
@ExcelProperty(value = "生产日期", index = 7)
private String productionDataTime;
@ExcelProperty(value = "特殊检验标志", index = 8)
private String qmsSpecialMarking;
@ExcelProperty(value = "存储区域", index = 9)
private String storage;
@ExcelProperty(value = "备注", index = 10)
private String comments;
}

View File

@ -1,174 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
public class SalesReturnsDto {
@ExcelProperty(value = "条码",index = 0)
private String inventoryId;
@ExcelProperty(value = "状态",index = 1)
private String status;
@ExcelProperty(value = "物料",index = 2)
private String material;
@ExcelProperty(value = "采购到货批",index = 3)
private String batchNumber;
@ExcelProperty(value = "供应商批次",index = 4)
private String vendorBatch;
@ExcelProperty(value = "原始数量(正数)",index = 5)
private String currentQty;
@ExcelProperty(value = "生产日期",index = 6)
private String productionData;
@ExcelProperty(value = "失效日期",index = 7)
private String expireDate;
@ExcelProperty(value = "质量等级",index = 8)
private String qualityLevel;
@ExcelProperty(value = "实际长度",index = 9)
private String length;
@ExcelProperty(value = "宽度",index = 10)
private String width;
@ExcelProperty(value = "托条码",index = 11)
private String pallet;
@ExcelProperty(value = "托类型",index = 12)
private String palletType;
@ExcelProperty(value = "箱条码",index = 13)
private String box;
@ExcelProperty(value = "箱类型",index = 14)
private String boxType;
public SalesReturnsDto() {
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getBatchNumber() {
return batchNumber;
}
public void setBatchNumber(String batchNumber) {
this.batchNumber = batchNumber;
}
public String getVendorBatch() {
return vendorBatch;
}
public void setVendorBatch(String vendorBatch) {
this.vendorBatch = vendorBatch;
}
public String getCurrentQty() {
return currentQty;
}
public void setCurrentQty(String currentQty) {
this.currentQty = currentQty;
}
public String getProductionData() {
return productionData;
}
public void setProductionData(String productionData) {
this.productionData = productionData;
}
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
public String getQualityLevel() {
return qualityLevel;
}
public void setQualityLevel(String qualityLevel) {
this.qualityLevel = qualityLevel;
}
public String getLength() {
return length;
}
public void setLength(String length) {
this.length = length;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
public String getPallet() {
return pallet;
}
public void setPallet(String pallet) {
this.pallet = pallet;
}
public String getPalletType() {
return palletType;
}
public void setPalletType(String palletType) {
this.palletType = palletType;
}
public String getBox() {
return box;
}
public void setBox(String box) {
this.box = box;
}
public String getBoxType() {
return boxType;
}
public void setBoxType(String boxType) {
this.boxType = boxType;
}
}

View File

@ -1,77 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
public class StorageLocationIODto {
@ExcelProperty(value = "存储位置代码",index = 0)
private String storageLocation;
@ExcelProperty(value = "存储位置描述",index = 1)
private String description;
@ExcelProperty(value = "存储位置类型",index = 2)
private String storageLocationTypeBo;
@ColumnWidth(10)
@ExcelProperty(value = "仓库",index = 3)
private String warehouseBo;
@ExcelProperty(value = "ERP仓库",index = 4)
private String erpStorageLocation;
@ExcelProperty(value = "是否默认区域(Y/N)",index = 5)
private String isDefault;
public StorageLocationIODto() {
}
public String getStorageLocation() {
return storageLocation;
}
public void setStorageLocation(String storageLocation) {
this.storageLocation = storageLocation;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getStorageLocationTypeBo() {
return storageLocationTypeBo;
}
public void setStorageLocationTypeBo(String storageLocationTypeBo) {
this.storageLocationTypeBo = storageLocationTypeBo;
}
public String getWarehouseBo() {
return warehouseBo;
}
public void setWarehouseBo(String warehouseBo) {
this.warehouseBo = warehouseBo;
}
public String getErpStorageLocation() {
return erpStorageLocation;
}
public void setErpStorageLocation(String erpStorageLocation) {
this.erpStorageLocation = erpStorageLocation;
}
public String getIsDefault() {
return isDefault;
}
public void setIsDefault(String isDefault) {
this.isDefault = isDefault;
}
}

View File

@ -1,48 +0,0 @@
package com.foreverwin.mom.wms.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import java.time.LocalDateTime;
/**
* 更新库存日期
*/
public class UpdateInventoryDto {
@ExcelProperty("条码")
private String inventoryId;
@ExcelProperty("生产日期")
private LocalDateTime productionDataTime;
@ExcelProperty("有效期")
private LocalDateTime validityDate;
public UpdateInventoryDto(){
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public LocalDateTime getProductionDataTime() {
return productionDataTime;
}
public void setProductionDataTime(LocalDateTime productionDataTime) {
this.productionDataTime = productionDataTime;
}
public LocalDateTime getValidityDate() {
return validityDate;
}
public void setValidityDate(LocalDateTime validityDate) {
this.validityDate = validityDate;
}
}

View File

@ -33,11 +33,5 @@ public class DataImportController {
public void exportTemplate(String importType) throws IOException {
exportTemplateService.exportX(importType);
}
//单据预绑信息导出
@GetMapping("/export-receipt-template")
@ResponseBody
public void exportTemplates(String importType) throws IOException {
exportTemplateService.exportS(importType);
}
}

View File

@ -42,6 +42,7 @@ public class DocumentReportController {
@ResponseBody
@GetMapping("/pageDocumentSummary")
public R pageDocumentSummary(FrontPage page, DocumentSummaryReportDto documentSummaryReportDto) {
page.setOptimizeCountSql(false);
return R.ok(documentReportService.pageDocumentSummary(page, documentSummaryReportDto));
}
@ -70,6 +71,7 @@ public class DocumentReportController {
@ResponseBody
@GetMapping("/pageDocumentDetailed")
public R pageDocumentDetailed(FrontPage page, DocumentDetailReportDto documentDetailReportDto) {
page.setOptimizeCountSql(false);
return R.ok(documentReportService.pageDocumentDetailed(page, documentDetailReportDto));
}

View File

@ -8,14 +8,4 @@ public interface DataImportService {
String importX(MultipartFile file, String importType, String optionValue) throws Exception;
String importMaterialROH(MultipartFile file, String optionValue) throws IOException;
String importMaterialFERT(MultipartFile file, String optionValue) throws IOException;
String importCarrier(MultipartFile file) throws IOException;
String importStorageBin(MultipartFile file) throws IOException;
String importStorageLocation(MultipartFile file) throws IOException;
}

View File

@ -5,6 +5,4 @@ import java.io.IOException;
public interface ExportTemplateService {
void exportX(String importType) throws IOException;
void exportS(String importType) throws IOException;
}

View File

@ -2,13 +2,8 @@ package com.foreverwin.mom.wms.service.impl;
import com.alibaba.excel.EasyExcel;
import com.foreverwin.mom.common.core.exception.BusinessException;
import com.foreverwin.mom.common.data.tenant.TenantContextHolder;
import com.foreverwin.mom.wms.constant.Constant;
import com.foreverwin.mom.wms.converter.BooleanToYNConverter;
import com.foreverwin.mom.wms.dto.*;
import com.foreverwin.mom.wms.entity.DocumentDetailed;
import com.foreverwin.mom.wms.entity.ItemSafeInventory;
import com.foreverwin.mom.wms.entity.WmsTempInventory;
import com.foreverwin.mom.wms.dto.CarrierImportDto;
import com.foreverwin.mom.wms.dto.InventoryImportDTO;
import com.foreverwin.mom.wms.service.ExportTemplateService;
import com.foreverwin.mom.wms.util.EasyExcelCellWriteHandler;
import lombok.AllArgsConstructor;
@ -19,11 +14,8 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@Service
@ -31,300 +23,41 @@ import java.util.List;
@AllArgsConstructor
public class ExportTemplateServiceImpl implements ExportTemplateService {
@Override
public void exportX(String importType) throws IOException {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = attributes.getResponse();
response.setCharacterEncoding("utf-8");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + System.currentTimeMillis() + ".xlsx");
switch (importType) {
case "1":
//原材料
this.exportMaterialROHTemplate(response);
break;
@Override
public void exportX(String importType) throws IOException {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = attributes.getResponse();
response.setCharacterEncoding("utf-8");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + System.currentTimeMillis() + ".xlsx");
switch (importType) {
case "1":
//原材料
this.exportInventoryTemplate(response);
break;
default:
throw BusinessException.build("不支持的模板类型");
}
}
case "2":
//包材
this.exportMaterialKMATTemplate(response);
break;
private void exportInventoryTemplate(HttpServletResponse response) throws IOException {
case "3":
//半成品
this.exportMaterialHALBTemplate(response);
break;
List<InventoryImportDTO> list = new ArrayList<>();
InventoryImportDTO inventoryImportDTO = new InventoryImportDTO();
inventoryImportDTO.setErpStorageLocation("1001");
inventoryImportDTO.setInventoryId("1234565432");
inventoryImportDTO.setStatus("1001");
inventoryImportDTO.setItem("1100005");
inventoryImportDTO.setBatchNumber("");
inventoryImportDTO.setOriginalQty("1");
inventoryImportDTO.setCurrentQty("2");
list.add(inventoryImportDTO);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 6, 7, 8, 9);
EasyExcel.write(response.getOutputStream(), InventoryImportDTO.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
case "4":
//成品
this.exportMaterialFERTTemplate(response);
break;
}
case "5":
//更新库存
this.exportUpdateInventoryTemplate(response);
break;
case "6":
//临时半成品导入
this.exportTempInventoryTemplate(response);
break;
case "7":
//载具主数据
this.exportCarrierTemplate(response);
break;
case "8":
//货格主数据
this.exportStorageBinTemplate(response);
break;
case "9":
//采购成品
this.exportPurchaseManufacturedTemplate(response);
break;
case "10":
//销售退货
this.exportSalesReturnsDtoTemplate(response);
break;
case "11":
//存储位置
this.exportStorageLocationIODtoTemplate(response);
break;
case "12":
//库存说明
this.exportInventoryNoteTemplate(response);
break;
case "13":
//角色区域绑定信息
this.exportRoleAreaBindTemplate(response);
break;
case "14":
this.exportStocktakingROHTemplate(response, Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
break;
case "15":
this.exportStocktakingROHTemplate(response, Arrays.asList(1, 6));
break;
case "16":
this.exportStocktakingKMATTemplate(response, Arrays.asList(0, 1, 2, 3, 4, 5, 6));
break;
case "17":
this.exportStocktakingKMATTemplate(response, Arrays.asList(1, 4));
break;
case "18":
this.exportStocktakingFERTTemplate(response, Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18));
break;
case "19":
this.exportStocktakingFERTTemplate(response, Arrays.asList(1, 4));
break;
case "20":
this.exportMaterialFERTwithQcDataTemplate(response);
break;
case "21":
this.exportItemSafeInventoryTemplate(response);
break;
case "22":
this.exportDocument(Constant.DOCUMENT_COST_CENTER_RECEIVE,response);
break;
default:
throw BusinessException.build("不支持的模板类型");
}
}
@Override
public void exportS(String importType) throws IOException {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = attributes.getResponse();
response.setCharacterEncoding("utf-8");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + System.currentTimeMillis() + ".xlsx");
switch (importType) {
case "1":
//销售退货成品导入
this.exportFinishedProduct(response);
break;
case "2":
//销售退货原材料导入
this.exportRawMaterial(response);
break;
case "3":
//公司间采购到货成品导入
this.exportProcure(response);
break;
case "4":
//角色区域绑定信息
this.exportRoleAreaBindTemplate(response);
default:
return;
}
}
//销售退货成品导入
private void exportFinishedProduct(HttpServletResponse response) throws IOException {
List<DocumentAdvanceBindDto> list = new ArrayList<>();
DocumentAdvanceBindDto documentAdvanceBindDto = new DocumentAdvanceBindDto();
documentAdvanceBindDto.setDocumentNo("XT202404170040");
documentAdvanceBindDto.setSeq("1");
documentAdvanceBindDto.setTray("P21042423004");
documentAdvanceBindDto.setBox("M024052001896");
documentAdvanceBindDto.setInventoryId("2022110001INV");
documentAdvanceBindDto.setItem("ITEM");
documentAdvanceBindDto.setQty(BigDecimal.valueOf(1));
documentAdvanceBindDto.setProductionDate("2024-03-28");
documentAdvanceBindDto.setGroes("HG07D01");
documentAdvanceBindDto.setQualityInspectionStatus("1001");
documentAdvanceBindDto.setUpgradeFlag("Y");
documentAdvanceBindDto.setStandardLength("1000");
documentAdvanceBindDto.setCurrentLength("1000");
documentAdvanceBindDto.setWidth("985");
documentAdvanceBindDto.setBismt("7");
documentAdvanceBindDto.setProductionBase("SX或JS");
list.add(documentAdvanceBindDto);
List<Integer> columns = Arrays.asList(0, 1, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15);
EasyExcel.write(response.getOutputStream(), DocumentAdvanceBindDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
//销售退货原材料导入
private void exportRawMaterial(HttpServletResponse response) throws IOException {
List<DocumentRawMaterialDto> list = new ArrayList<>();
DocumentRawMaterialDto documentRawMaterialDto = new DocumentRawMaterialDto();
documentRawMaterialDto.setDocumentNo("XT202404170040");
documentRawMaterialDto.setSeq("1");
documentRawMaterialDto.setInventoryId("2022110001INV");
documentRawMaterialDto.setItem("ITEM");
documentRawMaterialDto.setQty(BigDecimal.valueOf(1));
documentRawMaterialDto.setBatch("12345");
documentRawMaterialDto.setProductionDate("2024-03-28");
documentRawMaterialDto.setVendorBatch("54321");
documentRawMaterialDto.setQmsSpecialMarking("0/1/2/3/4");
list.add(documentRawMaterialDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7);
EasyExcel.write(response.getOutputStream(), DocumentRawMaterialDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
//公司间采购到货成品导入
private void exportProcure(HttpServletResponse response) throws IOException {
List<DocumentFinishedProduct> list = new ArrayList<>();
DocumentFinishedProduct documentFinishedProduct = new DocumentFinishedProduct();
documentFinishedProduct.setDocumentNo("CD202404170040");
documentFinishedProduct.setSeq("1");
documentFinishedProduct.setTray("P21042423004");
documentFinishedProduct.setBox("M024052001896");
documentFinishedProduct.setInventoryId("2022110001INV");
documentFinishedProduct.setItem("ITEM");
documentFinishedProduct.setQty(BigDecimal.valueOf(1));
documentFinishedProduct.setProductionDate("2024-03-28");
documentFinishedProduct.setGroes("HG07D01");
documentFinishedProduct.setQualityInspectionStatus("1001");
documentFinishedProduct.setUpgradeFlag("Y");
documentFinishedProduct.setStandardLength("1000");
documentFinishedProduct.setCurrentLength("1000");
documentFinishedProduct.setWidth("985");
documentFinishedProduct.setBismt("7");
documentFinishedProduct.setProductionBase("SX或JS");
list.add(documentFinishedProduct);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15);
EasyExcel.write(response.getOutputStream(), DocumentFinishedProduct.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportMaterialROHTemplate(HttpServletResponse response) throws IOException {
List<MaterialROHDto> list = new ArrayList<>();
MaterialROHDto materialROHDto = new MaterialROHDto();
materialROHDto.setErpStorage("9001");
materialROHDto.setInventoryId("2022110001INV");
materialROHDto.setStatus("1001");
materialROHDto.setMaterial("ITEM");
materialROHDto.setBatchNumber("B0001");
materialROHDto.setVendorBatch("V0001");
materialROHDto.setCurrentQty("1");
materialROHDto.setProductionDataTime("2022-11-24");
materialROHDto.setQmsSpecialMarking("");
materialROHDto.setStorage("A001");
list.add(materialROHDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
EasyExcel.write(response.getOutputStream(), MaterialROHDto.class).excludeColumnIndexes(Collections.singletonList(10)).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportMaterialKMATTemplate(HttpServletResponse response) throws IOException {
List<MaterialKMATDto> list = new ArrayList<>();
MaterialKMATDto materialKMATDto = new MaterialKMATDto();
materialKMATDto.setErpStorage("9001");
materialKMATDto.setInventoryId("2022110001INV");
materialKMATDto.setStatus("1001");
materialKMATDto.setMaterial("ITEM");
materialKMATDto.setCurrentQty("1");
materialKMATDto.setStorage("9001-A");
list.add(materialKMATDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 5);
EasyExcel.write(response.getOutputStream(), MaterialKMATDto.class).excludeColumnIndexes(Collections.singletonList(6)).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
}
private void exportMaterialFERTTemplate(HttpServletResponse response) throws IOException {
List<MaterialFERTDto> list = new ArrayList<>();
MaterialFERTDto materialFERTDto = new MaterialFERTDto();
materialFERTDto.setErpStorage("5001");
materialFERTDto.setInventoryId("2022110001INV");
materialFERTDto.setStatus("1001");
materialFERTDto.setMaterial("ITEM");
materialFERTDto.setCurrentQty("1");
materialFERTDto.setProductionDataTime("2022-11-24");
materialFERTDto.setModel("X1");
materialFERTDto.setQualityLevel("A1");
materialFERTDto.setUpgradeFlag("Y");
materialFERTDto.setStandardLength("1000");
materialFERTDto.setLength("1000");
materialFERTDto.setBismt("7");
materialFERTDto.setWidth("400");
materialFERTDto.setProductionBase("SX/JS");
materialFERTDto.setDemandCustomers("70000");
materialFERTDto.setPallet("T0001");
materialFERTDto.setBox("X0001");
materialFERTDto.setBoxType("X");
materialFERTDto.setShelves("9001-A");
list.add(materialFERTDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18);
EasyExcel.write(response.getOutputStream(), MaterialFERTDto.class).excludeColumnIndexes(Collections.singletonList(19)).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportMaterialHALBTemplate(HttpServletResponse response) throws IOException {
List<MaterialHALBDto> list = new ArrayList<>();
MaterialHALBDto materialHALBDto = new MaterialHALBDto();
materialHALBDto.setStorage("9001");
materialHALBDto.setInventoryId("2022110001INV");
materialHALBDto.setMaterial("ITEM");
materialHALBDto.setModel("X1");
materialHALBDto.setCurrentQty("1");
materialHALBDto.setQualityInspectionStatus("可用");
materialHALBDto.setProductionDataTime(LocalDateTime.now());
materialHALBDto.setValidityDate(LocalDateTime.now().plusDays(10));
materialHALBDto.setPallet("T0001");
materialHALBDto.setBox("X0001");
materialHALBDto.setPalletType("T01");
materialHALBDto.setLength("1000");
materialHALBDto.setWidth("400");
materialHALBDto.setShelves("9001-A");
list.add(materialHALBDto);
EasyExcel.write(response.getOutputStream(), MaterialHALBDto.class).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
}
private void exportUpdateInventoryTemplate(HttpServletResponse response) throws IOException {
List<UpdateInventoryDto> list = new ArrayList<>();
UpdateInventoryDto updateInventoryDto = new UpdateInventoryDto();
updateInventoryDto.setInventoryId("2022110001INV");
updateInventoryDto.setProductionDataTime(LocalDateTime.now());
updateInventoryDto.setValidityDate(LocalDateTime.now().plusDays(10));
list.add(updateInventoryDto);
EasyExcel.write(response.getOutputStream(), UpdateInventoryDto.class).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
}
private void exportCarrierTemplate(HttpServletResponse response) throws IOException {
/*private void exportCarrierTemplate(HttpServletResponse response) throws IOException {
List<CarrierImportDto> list = new ArrayList<>();
CarrierImportDto carrierImportDto = new CarrierImportDto();
carrierImportDto.setCarrier("C0001");
@ -334,15 +67,9 @@ public class ExportTemplateServiceImpl implements ExportTemplateService {
list.add(carrierImportDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3);
EasyExcel.write(response.getOutputStream(), CarrierImportDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
}
}*/
private void exportTempInventoryTemplate(HttpServletResponse response) throws IOException {
List<WmsTempInventory> list = new ArrayList<>();
list.add(new WmsTempInventory());
EasyExcel.write(response.getOutputStream(), WmsTempInventory.class).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
}
private void exportStorageBinTemplate(HttpServletResponse response) throws IOException {
/*private void exportStorageBinTemplate(HttpServletResponse response) throws IOException {
List<StorageBinImportDto> list = new ArrayList<>();
StorageBinImportDto storageBinImportDto = new StorageBinImportDto();
storageBinImportDto.setStorageBin("9001-A");
@ -358,214 +85,6 @@ public class ExportTemplateServiceImpl implements ExportTemplateService {
List<Integer> columns = Arrays.asList(0, 2, 3, 6);
EasyExcel.write(response.getOutputStream(), StorageBinImportDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
*/
private void exportPurchaseManufacturedTemplate(HttpServletResponse response) throws IOException {
List<PurchaseManufacturedDto> list = new ArrayList<>();
PurchaseManufacturedDto purchaseManufacturedDto = new PurchaseManufacturedDto();
purchaseManufacturedDto.setInventoryId("INV0001");
purchaseManufacturedDto.setStatus("1001");
purchaseManufacturedDto.setMaterial("ITEM001");
purchaseManufacturedDto.setBatchNumber("B0001");
purchaseManufacturedDto.setVendorBatch("V0001");
purchaseManufacturedDto.setCurrentQty("100");
purchaseManufacturedDto.setProductionData("2022-10-11");
purchaseManufacturedDto.setExpireDate("2022-10-21");
purchaseManufacturedDto.setQualityLevel("A1");
purchaseManufacturedDto.setLength("1000");
purchaseManufacturedDto.setWidth("400");
purchaseManufacturedDto.setPallet("T0001");
purchaseManufacturedDto.setPalletType("T");
purchaseManufacturedDto.setBox("X0001");
purchaseManufacturedDto.setBoxType("X");
list.add(purchaseManufacturedDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 5, 6, 8, 9, 10, 11, 12, 13, 14);
EasyExcel.write(response.getOutputStream(), PurchaseManufacturedDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportSalesReturnsDtoTemplate(HttpServletResponse response) throws IOException {
List<SalesReturnsDto> list = new ArrayList<>();
SalesReturnsDto salesReturnsDto = new SalesReturnsDto();
salesReturnsDto.setInventoryId("INV0001");
salesReturnsDto.setStatus("1001");
salesReturnsDto.setMaterial("ITEM001");
salesReturnsDto.setBatchNumber("B0001");
salesReturnsDto.setVendorBatch("V0001");
salesReturnsDto.setCurrentQty("100");
salesReturnsDto.setProductionData("2022-10-11");
salesReturnsDto.setExpireDate("2022-10-21");
salesReturnsDto.setQualityLevel("A1");
salesReturnsDto.setLength("1000");
salesReturnsDto.setWidth("400");
salesReturnsDto.setPallet("T0001");
salesReturnsDto.setPalletType("T");
salesReturnsDto.setBox("X0001");
salesReturnsDto.setBoxType("X");
list.add(salesReturnsDto);
List<Integer> columns = Arrays.asList(0, 1, 2, 5, 6, 8, 9, 10, 11, 12, 13, 14);
EasyExcel.write(response.getOutputStream(), SalesReturnsDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportStorageLocationIODtoTemplate(HttpServletResponse response) throws IOException {
List<StorageLocationIODto> list = new ArrayList<>();
StorageLocationIODto storageLocationIODto = new StorageLocationIODto();
storageLocationIODto.setStorageLocation("7003-A");
storageLocationIODto.setStorageLocationTypeBo("001");
storageLocationIODto.setWarehouseBo(TenantContextHolder.getTenantId());
storageLocationIODto.setErpStorageLocation("7003");
storageLocationIODto.setIsDefault("N");
list.add(storageLocationIODto);
List<Integer> columns = Arrays.asList(0, 2, 3, 4, 5);
EasyExcel.write(response.getOutputStream(), StorageLocationIODto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportInventoryNoteTemplate(HttpServletResponse response) throws IOException {
List<InventoryNoteImportDto> list = new ArrayList<>();
InventoryNoteImportDto inventoryNoteImportDto = new InventoryNoteImportDto();
inventoryNoteImportDto.setInventoryId("INV0001");
inventoryNoteImportDto.setNote("note");
list.add(inventoryNoteImportDto);
List<Integer> columns = Arrays.asList(0, 1);
EasyExcel.write(response.getOutputStream(), InventoryNoteImportDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportRoleAreaBindTemplate(HttpServletResponse response) throws IOException {
List<RoleAreaBindDTO> list = new ArrayList<>();
RoleAreaBindDTO roleAreaBindDTO = new RoleAreaBindDTO();
roleAreaBindDTO.setRoleCode("MES_JS_PMC");
roleAreaBindDTO.setRoleCodeDesc("MES_江苏_PMC");
roleAreaBindDTO.setStorageLocation("101-A");
list.add(roleAreaBindDTO);
List<Integer> columns = Arrays.asList(0, 2);
EasyExcel.write(response.getOutputStream(), RoleAreaBindDTO.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportStocktakingROHTemplate(HttpServletResponse response, List<Integer> columns) throws IOException {
List<MaterialROHDto> list = new ArrayList<>();
MaterialROHDto materialROHDto = new MaterialROHDto();
materialROHDto.setErpStorage("9001");
materialROHDto.setInventoryId("2022110001INV");
materialROHDto.setStatus("1001");
materialROHDto.setMaterial("ITEM");
materialROHDto.setBatchNumber("B0001");
materialROHDto.setVendorBatch("V0001");
materialROHDto.setCurrentQty("1");
materialROHDto.setProductionDataTime("2022-11-24");
materialROHDto.setQmsSpecialMarking("");
materialROHDto.setStorage("A001");
materialROHDto.setComments("COMMENTS");
list.add(materialROHDto);
EasyExcel.write(response.getOutputStream(), MaterialROHDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportStocktakingKMATTemplate(HttpServletResponse response, List<Integer> columns) throws IOException {
List<MaterialKMATDto> list = new ArrayList<>();
MaterialKMATDto materialKMATDto = new MaterialKMATDto();
materialKMATDto.setErpStorage("9001");
materialKMATDto.setInventoryId("2022110001INV");
materialKMATDto.setStatus("1001");
materialKMATDto.setMaterial("ITEM");
materialKMATDto.setCurrentQty("1");
materialKMATDto.setStorage("9001-A");
materialKMATDto.setComments("COMMENTS");
list.add(materialKMATDto);
EasyExcel.write(response.getOutputStream(), MaterialKMATDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("").doWrite(list);
}
private void exportStocktakingFERTTemplate(HttpServletResponse response, List<Integer> columns) throws IOException {
List<MaterialFERTDto> list = new ArrayList<>();
MaterialFERTDto materialFERTDto = new MaterialFERTDto();
materialFERTDto.setErpStorage("5001");
materialFERTDto.setInventoryId("2022110001INV");
materialFERTDto.setStatus("1001");
materialFERTDto.setMaterial("ITEM");
materialFERTDto.setCurrentQty("1");
materialFERTDto.setProductionDataTime("2022-11-24");
materialFERTDto.setModel("X1");
materialFERTDto.setQualityLevel("A1");
materialFERTDto.setUpgradeFlag("Y");
materialFERTDto.setStandardLength("1000");
materialFERTDto.setLength("1000");
materialFERTDto.setBismt("7");
materialFERTDto.setWidth("400");
materialFERTDto.setProductionBase("SX/JS");
materialFERTDto.setDemandCustomers("70000");
materialFERTDto.setPallet("T0001");
materialFERTDto.setBox("X0001");
materialFERTDto.setBoxType("X");
materialFERTDto.setShelves("9001-A");
materialFERTDto.setComments("COMMENTS");
list.add(materialFERTDto);
EasyExcel.write(response.getOutputStream(), MaterialFERTDto.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportMaterialFERTwithQcDataTemplate(HttpServletResponse response) throws IOException {
List<MaterialFERTwithQcDataDTO> list = new ArrayList<>();
MaterialFERTwithQcDataDTO dto = new MaterialFERTwithQcDataDTO();
dto.setInventoryId("2022110001INV");
dto.setStatus("1001");
dto.setMaterial("ITEM");
dto.setCurrentQty("1");
dto.setProductionDataTime("2022-11-24");
dto.setQualityLevel("A1");
dto.setLength("1000");
dto.setWidth("400");
dto.setPallet("T0001");
dto.setPalletType("T01");
dto.setBox("X0001");
dto.setBoxType("X");
dto.setDemandCustomers("70000");
dto.setModel("X1");
dto.setBismt("7");
dto.setStandardLength("1000");
dto.setErpStorage("5001");
dto.setUpgradeFlag("Y");
dto.setProductionBase("SX/JS");
dto.setShelves("9001-A");
dto.setReferenceSfc("XXX");
dto.setMeasuredWidth("XXX");
list.add(dto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 25, 26, 27, 28, 29, 31, 33, 37, 39, 40, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56);
EasyExcel.write(response.getOutputStream(), MaterialFERTwithQcDataDTO.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportItemSafeInventoryTemplate(HttpServletResponse response) throws IOException {
List<ItemSafeInventory> list = new ArrayList<>();
ItemSafeInventory dto = new ItemSafeInventory();
dto.setItem("item");
dto.setSafeQty(BigDecimal.valueOf(10000));
dto.setAlmQty(BigDecimal.valueOf(10000));
dto.setAlmFlag(true);
dto.setPurchaseCycle("123");
list.add(dto);
List<Integer> columns = Arrays.asList(0, 1, 2, 3, 4);
EasyExcel.write(response.getOutputStream(), ItemSafeInventory.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).registerConverter(new BooleanToYNConverter()).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
private void exportDocument(String documentType, HttpServletResponse response) throws IOException{
List<DocumentDetailed> list = new ArrayList<>();
DocumentDetailed documentDetailed = new DocumentDetailed();
documentDetailed.setItem("ITEM");
documentDetailed.setApplicationsQuantity(BigDecimal.TEN);
documentDetailed.setSourceWarehouse("XXXX");
documentDetailed.setTargetWarehouse("XXXX");
documentDetailed.setOaProjectCode("B00-1");
documentDetailed.setBatch("V0001");
documentDetailed.setRemarks("1");
list.add(documentDetailed);
List<Integer> columns = Arrays.asList(0, 1, 2, 3);
EasyExcel.write(response.getOutputStream(), DocumentDetailed.class).registerWriteHandler(new EasyExcelCellWriteHandler(columns, true)).autoCloseStream(Boolean.FALSE).sheet("导出").doWrite(list);
}
}