Commit 34f84d3c by zhangtw

导入模板样式调整

导入实际数量必须大于0
parent 799854d0
...@@ -2,6 +2,7 @@ package com.ruoyi.common.core.domain.entity; ...@@ -2,6 +2,7 @@ package com.ruoyi.common.core.domain.entity;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.poi.ss.usermodel.IndexedColors;
/** /**
* 物料对象 materials * 物料对象 materials
...@@ -16,51 +17,51 @@ public class Materials extends BaseEntity ...@@ -16,51 +17,51 @@ public class Materials extends BaseEntity
/** 编号 */ /** 编号 */
private String id; private String id;
@Excel(name = "NO.") @Excel(name = "NO.",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long no; private Long no;
/** 货主 数据库暂无字段 */ /** 货主 数据库暂无字段 */
@Excel(name = "货主") @Excel(name = "货主",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String ownerId; private String ownerId;
/** SAP物料号 检索条件 */ /** SAP物料号 检索条件 */
@Excel(name = "产品代码") @Excel(name = "产品代码",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private String sapNo; private String sapNo;
/** 是否激活 Y-是 N-否 */ /** 是否激活 Y-是 N-否 */
@Excel(name = "激活") @Excel(name = "激活",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long isActive; private Long isActive;
/** 物料名称 检索条件 */ /** 物料名称 检索条件 */
@Excel(name = "中文描述") @Excel(name = "中文描述",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private String materialName; private String materialName;
/** 物料名称 检索条件 */ /** 物料名称 检索条件 */
@Excel(name = "英文描述") @Excel(name = "英文描述",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialEname; private String materialEname;
/** 总重量 */ /** 总重量 */
@Excel(name = "毛重") @Excel(name = "毛重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long totalWeight; private Long totalWeight;
/** 单位重量 */ /** 单位重量 */
@Excel(name = "净重") @Excel(name = "净重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long unitWeight; private Long unitWeight;
/** 包装重量 */ /** 包装重量 */
@Excel(name = "皮重") @Excel(name = "皮重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long packageWeight; private Long packageWeight;
/** 体积 */ /** 体积 */
@Excel(name = "体积") @Excel(name = "体积",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long volume; private Long volume;
/** 单价 */ /** 单价 */
@Excel(name = "单价") @Excel(name = "单价",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long unitPrice; private Long unitPrice;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String remark; private String remark;
/** 物料编码 检索条件 */ /** 物料编码 检索条件 */
......
...@@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; ...@@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.poi.ss.usermodel.IndexedColors;
/** /**
* 入库单明细对象 inbound_order_items * 入库单明细对象 inbound_order_items
...@@ -22,42 +23,42 @@ public class InboundOrderItems extends BaseEntity ...@@ -22,42 +23,42 @@ public class InboundOrderItems extends BaseEntity
private String inboundOrderId; private String inboundOrderId;
/** 入库单号 检索条件 */ /** 入库单号 检索条件 */
@Excel(name = "入库单号") @Excel(name = "入库单号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderId; private String orderId;
/** 货物ID 字典,检索条件 */ /** 货物ID 字典,检索条件 */
@Excel(name = "货物ID") @Excel(name = "货物ID",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialId; private String materialId;
/** 批次ID 检索条件 */ /** 批次ID 检索条件 */
@Excel(name = "批次ID") @Excel(name = "批次ID",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String batchId; private String batchId;
/** 仓库ID 检索条件 */ /** 仓库ID 检索条件 */
@Excel(name = "仓库ID") @Excel(name = "仓库ID",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String warehouseId; private String warehouseId;
/** 库位ID 检索条件 */ /** 库位ID 检索条件 */
@Excel(name = "库位ID") @Excel(name = "库位ID",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String locationId; private String locationId;
/** 收获库位 检索条件 */ /** 收获库位 检索条件 */
private String receiptLocationId; private String receiptLocationId;
/** 计划数量 */ /** 计划数量 */
@Excel(name = "计划数量") @Excel(name = "计划数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedQuantity; private Long plannedQuantity;
/** 实际数量 */ /** 实际数量 */
@Excel(name = "实际数量") @Excel(name = "实际数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualQuantity; private Long actualQuantity;
/** 计划件数 暂无用 */ /** 计划件数 暂无用 */
@Excel(name = "计划件数") @Excel(name = "计划件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedPackages; private Long plannedPackages;
/** 实际件数 */ /** 实际件数 */
@Excel(name = "实际件数") @Excel(name = "实际件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualPackages; private Long actualPackages;
/** 约数 */ /** 约数 */
...@@ -65,15 +66,15 @@ public class InboundOrderItems extends BaseEntity ...@@ -65,15 +66,15 @@ public class InboundOrderItems extends BaseEntity
private Long divisor; private Long divisor;
/** 标签颜色 字典,检索条件 */ /** 标签颜色 字典,检索条件 */
@Excel(name = "标签颜色") @Excel(name = "标签颜色",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long labelColor; private Long labelColor;
/** 凭证号 检索条件 */ /** 凭证号 检索条件 */
@Excel(name = "凭证号") @Excel(name = "凭证号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String voucherNumber; private String voucherNumber;
/** 单价 */ /** 单价 */
@Excel(name = "单价") @Excel(name = "单价",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitPrice; private Double unitPrice;
/** 状态1-待收货 2-部分收货 3-已完成 暂无用 */ /** 状态1-待收货 2-部分收货 3-已完成 暂无用 */
...@@ -81,11 +82,11 @@ public class InboundOrderItems extends BaseEntity ...@@ -81,11 +82,11 @@ public class InboundOrderItems extends BaseEntity
private Long itemStatus; private Long itemStatus;
/** 收货时间 暂无用 */ /** 收货时间 暂无用 */
@Excel(name = "收货时间") @Excel(name = "收货时间",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long receivedAt; private Long receivedAt;
/** 收货人 */ /** 收货人 */
@Excel(name = "收货人") @Excel(name = "收货人",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String receivedBy; private String receivedBy;
/** 贴标数量 */ /** 贴标数量 */
......
...@@ -5,6 +5,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; ...@@ -5,6 +5,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.poi.ss.usermodel.IndexedColors;
/** /**
* 入库单明细对象 inbound_order_items * 入库单明细对象 inbound_order_items
...@@ -18,115 +19,115 @@ public class InboundItemsTO extends BaseEntity { ...@@ -18,115 +19,115 @@ public class InboundItemsTO extends BaseEntity {
// ======================== 匹配Excel表头的字段(按表头顺序) ======================== // ======================== 匹配Excel表头的字段(按表头顺序) ========================
/** 日期 */ /** 日期 */
@Excel(name = "日期") @Excel(name = "日期",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String inboundDate; // 建议用LocalDateTime,若Excel是字符串格式则用String private String inboundDate; // 建议用LocalDateTime,若Excel是字符串格式则用String
/** SAP No */ /** SAP No */
@Excel(name = "SAP No") @Excel(name = "SAP No",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String sapNo; private String sapNo;
/** 物料名称 */ /** 物料名称 */
@Excel(name = "物料名称") @Excel(name = "物料名称",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialName; private String materialName;
/** TS Code */ /** TS Code */
@Excel(name = "TS Code") @Excel(name = "TS Code",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String tsCode; private String tsCode;
/** 批号 */ /** 批号 */
@Excel(name = "批号") @Excel(name = "批号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String batchId; private String batchId;
/** 计划数量 */ /** 计划数量 */
@Excel(name = "计划数量") @Excel(name = "计划数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedQuantity; private Long plannedQuantity;
/** 件重 */ /** 件重 */
@Excel(name = "件重") @Excel(name = "件重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitWeight; private Double unitWeight;
/** 约数 */ /** 约数 */
@Excel(name = "约数") @Excel(name = "约数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long divisor; private Long divisor;
/** 件数 */ /** 件数 */
@Excel(name = "件数") @Excel(name = "件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualPackages; private Long actualPackages;
/** 实发数量 */ /** 实发数量 */
@Excel(name = "实发数量") @Excel(name = "实发数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualQuantity; private Long actualQuantity;
/** 重量 */ /** 重量 */
@Excel(name = "重量(成品)") @Excel(name = "重量(成品)",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double weight; private Double weight;
/** 库位 */ /** 库位 */
@Excel(name = "库位") @Excel(name = "库位",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String locationName; private String locationName;
/** 仓库 */ /** 仓库 */
@Excel(name = "仓库") @Excel(name = "仓库",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String warehouseId; private String warehouseId;
/** 库位(成品) */ /** 库位(成品) */
@Excel(name = "目标库位(成品)") @Excel(name = "目标库位(成品)",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String finishedLocation; private String finishedLocation;
/** 备注(TRDC) */ /** 备注(TRDC) */
@Excel(name = "备注(TRDC)") @Excel(name = "备注(TRDC)",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String remarkTrdc; private String remarkTrdc;
/** 收货库位(正常) */ /** 收货库位(正常) */
@Excel(name = "收货库位(正常)") @Excel(name = "收货库位(正常)",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String relocation; private String relocation;
/** 标签颜色 */ /** 标签颜色 */
@Excel(name = "标签颜色") @Excel(name = "标签颜色",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String labelColorName; private String labelColorName;
/** 凭证号 */ /** 凭证号 */
@Excel(name = "凭证号") @Excel(name = "凭证号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String voucherNumber; private String voucherNumber;
/** 保温 */ /** 保温 */
@Excel(name = "保温") @Excel(name = "保温",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String keepWarm; private String keepWarm;
/** 危险类别 */ /** 危险类别 */
@Excel(name = "危险类别") @Excel(name = "危险类别",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String hazardId; private String hazardId;
/** 单号 */ /** 单号 */
@Excel(name = "单号") @Excel(name = "单号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderId; private String orderId;
/** 系统编号 */ /** 系统编号 */
@Excel(name = "系统编号") @Excel(name = "系统编号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String systemNo; private String systemNo;
/** 智观(客户订单号) */ /** 智观(客户订单号) */
@Excel(name = "智观(客户订单号)") @Excel(name = "智观(客户订单号)",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String finishedOrderId; private String finishedOrderId;
/** 客户订单号/PO号 */ /** 客户订单号/PO号 */
@Excel(name = "客户订单号/PO号") @Excel(name = "客户订单号/PO号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String finishedSystemNo; private String finishedSystemNo;
/** 货主 */ /** 货主 */
@Excel(name = "货主") @Excel(name = "货主",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String ownerId; private String ownerId;
/** 贴标数量 */ /** 贴标数量 */
@Excel(name = "贴标数量") @Excel(name = "贴标数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long labelQuantity; private Long labelQuantity;
/** 订单类型 */ /** 订单类型 */
@Excel(name = "订单类型") @Excel(name = "订单类型",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long orderType; private Long orderType;
/** 单件重量 */ /** 单件重量 */
@Excel(name = "单件重量") @Excel(name = "单件重量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double packageWeight; private Double packageWeight;
// ======================== 原有类中多的字段(放在末尾) ======================== // ======================== 原有类中多的字段(放在末尾) ========================
......
...@@ -2,6 +2,7 @@ package com.ruoyi.inventory.domain.vo; ...@@ -2,6 +2,7 @@ package com.ruoyi.inventory.domain.vo;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import lombok.Data; import lombok.Data;
import org.apache.poi.ss.usermodel.IndexedColors;
import java.util.Date; import java.util.Date;
...@@ -12,71 +13,71 @@ public class InboundDetailsVO { ...@@ -12,71 +13,71 @@ public class InboundDetailsVO {
// 基础物料字段 // 基础物料字段
private String materialId; private String materialId;
@Excel(name = "物料SAP") @Excel(name = "物料SAP",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String sapNo; private String sapNo;
@Excel(name = "物料名") @Excel(name = "物料名",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialName; private String materialName;
// 新增:TS编码(来自第一个SQL的m.ts_code) // 新增:TS编码(来自第一个SQL的m.ts_code)
@Excel(name = "TS编码") @Excel(name = "TS编码",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String tsCode; private String tsCode;
// 新增:危险等级ID(来自第一个SQL的m.hazard_id) // 新增:危险等级ID(来自第一个SQL的m.hazard_id)
@Excel(name = "危险等级ID") @Excel(name = "危险等级ID",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String hazardId; private String hazardId;
// 新增:物料规格(来自第一个SQL的m.specification) // 新增:物料规格(来自第一个SQL的m.specification)
@Excel(name = "物料规格") @Excel(name = "物料规格",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String specification; private String specification;
// 新增:物料单位(来自第一个SQL的m.material_unit) // 新增:物料单位(来自第一个SQL的m.material_unit)
@Excel(name = "物料单位") @Excel(name = "物料单位",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialUnit; private String materialUnit;
// 新增:单重(来自第一个SQL的m.unit_weight) // 新增:单重(来自第一个SQL的m.unit_weight)
@Excel(name = "物料单重") @Excel(name = "物料单重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitWeight; private Double unitWeight;
// 新增:计划入库数量(来自第一个SQL的SUM(ioi.planned_quantity)) // 新增:计划入库数量(来自第一个SQL的SUM(ioi.planned_quantity))
@Excel(name = "计划入库数量") @Excel(name = "计划入库数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedQuantity; private Long plannedQuantity;
@Excel(name = "入库单号") @Excel(name = "入库单号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderId; private String orderId;
@Excel(name = "批次ID") @Excel(name = "批次ID",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String batchId; private String batchId;
private String warehouseId; private String warehouseId;
@Excel(name = "仓库名") @Excel(name = "仓库名",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String warehousesName; private String warehousesName;
private String locationId; private String locationId;
@Excel(name = "库位名称") // 补充Excel注解 @Excel(name = "库位名称",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE) // 补充Excel注解
private String locationName; private String locationName;
@Excel(name = "入库数量") @Excel(name = "入库数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualQuantity; private Long actualQuantity;
@Excel(name = "件数") @Excel(name = "件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualPackages; private Long actualPackages;
@Excel(name = "标签颜色") @Excel(name = "标签颜色",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String labelColor; private String labelColor;
@Excel(name = "单价") @Excel(name = "单价",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitPrice; private Double unitPrice;
@Excel(name = "入库物料总价") @Excel(name = "入库物料总价",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double totalPrice; private Double totalPrice;
@Excel(name = "备注") @Excel(name = "备注",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String remark; private String remark;
@Excel(name = "入库时间") // 补充日期格式化 @Excel(name = "入库时间",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE) // 补充日期格式化
private Date inboundDate; private Date inboundDate;
// 查询条件字段(无需Excel注解) // 查询条件字段(无需Excel注解)
......
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import org.apache.poi.ss.usermodel.IndexedColors;
import java.util.Date; import java.util.Date;
@Data @Data
...@@ -18,36 +19,36 @@ public class InboundFinishTemplateVO extends BaseEntity { ...@@ -18,36 +19,36 @@ public class InboundFinishTemplateVO extends BaseEntity {
private Date inboundDate; private Date inboundDate;
/** 货物ID 字典,检索条件 */ /** 货物ID 字典,检索条件 */
@Excel(name = "SAP No") @Excel(name = "SAP No",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String sapNo; private String sapNo;
/** 货物名称 */ /** 货物名称 */
@Excel(name = "物料名称") @Excel(name = "物料名称",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialName; private String materialName;
/** 货物名称 */ /** 货物名称 */
@Excel(name = "TS Code") @Excel(name = "TS Code",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String tsCode; private String tsCode;
/** 批次ID 检索条件 */ /** 批次ID 检索条件 */
@Excel(name = "批号") @Excel(name = "批号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String batchId; private String batchId;
/** 计划数量 */ /** 计划数量 */
@Excel(name = "计划数量") @Excel(name = "计划数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedQuantity; private Long plannedQuantity;
@Excel(name = "件重") @Excel(name = "件重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double packageWeight2; private Double packageWeight2;
/** 约数 */ /** 约数 */
@Excel(name = "约数") @Excel(name = "约数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long divisor; private Long divisor;
@Excel(name = "件数") @Excel(name = "件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualPackages; private Long actualPackages;
@Excel(name = "重量") @Excel(name = "重量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitWeight; private Double unitWeight;
...@@ -60,11 +61,11 @@ public class InboundFinishTemplateVO extends BaseEntity { ...@@ -60,11 +61,11 @@ public class InboundFinishTemplateVO extends BaseEntity {
private String locationId; private String locationId;
/** 仓库ID 暂无用 */ /** 仓库ID 暂无用 */
@Excel(name = "仓库") @Excel(name = "仓库",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String warehouseId; private String warehouseId;
/** 成品表里的第二个 "库位" */ /** 成品表里的第二个 "库位" */
@Excel(name = "库位") @Excel(name = "库位",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String remark2; private String remark2;
/** 库位ID 检索条件 */ /** 库位ID 检索条件 */
...@@ -72,40 +73,40 @@ public class InboundFinishTemplateVO extends BaseEntity { ...@@ -72,40 +73,40 @@ public class InboundFinishTemplateVO extends BaseEntity {
private String relocationId; private String relocationId;
/** 标签颜色 字典,检索条件 */ /** 标签颜色 字典,检索条件 */
@Excel(name = "标签颜色") @Excel(name = "标签颜色",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long labelColor; private Long labelColor;
/** 凭证号 检索条件 */ /** 凭证号 检索条件 */
@Excel(name = "凭证号") @Excel(name = "凭证号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String voucherNumber; private String voucherNumber;
@Excel(name = "保温") @Excel(name = "保温",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String keepWarm; private String keepWarm;
@Excel(name = "危险类别") @Excel(name = "危险类别",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String hazardId; private String hazardId;
/** 入库单号 检索条件 */ /** 入库单号 检索条件 */
@Excel(name = "智观(客户订单号)") @Excel(name = "智观(客户订单号)",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderId; private String orderId;
/** 系统编号 检索条件 */ /** 系统编号 检索条件 */
@Excel(name = "客户订单号/PO号") @Excel(name = "客户订单号/PO号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String systemNo; private String systemNo;
/** 货主ID */ /** 货主ID */
@Excel(name = "货主") @Excel(name = "货主",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String ownerId; private String ownerId;
/** 入库类型 字典,检索条件 */ /** 入库类型 字典,检索条件 */
@Excel(name = "贴标数量") @Excel(name = "贴标数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String labelQuantity; private String labelQuantity;
/** 订单类型 字典,检索条件 */ /** 订单类型 字典,检索条件 */
@Excel(name = "订单类型") @Excel(name = "订单类型",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderType; private String orderType;
@Excel(name = "单个件重") @Excel(name = "单个件重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double packageWeight; private Double packageWeight;
/** 单价 */ /** 单价 */
......
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import org.apache.poi.ss.usermodel.IndexedColors;
import java.util.Date; import java.util.Date;
@Data @Data
...@@ -14,54 +15,54 @@ public class InboundTRDCTemplateVO extends BaseEntity { ...@@ -14,54 +15,54 @@ public class InboundTRDCTemplateVO extends BaseEntity {
/** 入库日期 日期无时间 */ /** 入库日期 日期无时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Date inboundDate; private Date inboundDate;
/** 货物ID 字典,检索条件 */ /** 货物ID 字典,检索条件 */
@Excel(name = "SAP No") @Excel(name = "SAP No",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String sapNo; private String sapNo;
/** 货物名称 */ /** 货物名称 */
@Excel(name = "物料名称") @Excel(name = "物料名称",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialName; private String materialName;
/** 货物名称 */ /** 货物名称 */
@Excel(name = "TS Code") @Excel(name = "TS Code",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String tsCode; private String tsCode;
/** 批次ID 检索条件 */ /** 批次ID 检索条件 */
@Excel(name = "批号") @Excel(name = "批号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String batchId; private String batchId;
/** 计划数量 */ /** 计划数量 */
@Excel(name = "计划数量") @Excel(name = "计划数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedQuantity; private Long plannedQuantity;
@Excel(name = "件重") @Excel(name = "件重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitWeight; private Double unitWeight;
/** 约数 */ /** 约数 */
@Excel(name = "约数") @Excel(name = "约数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long divisor; private Long divisor;
/** 实际件数 */ /** 实际件数 */
@Excel(name = "件数") @Excel(name = "件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualPackages; private Long actualPackages;
/** 实际数量 */ /** 实际数量 */
@Excel(name = "实发数量") @Excel(name = "实发数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualQuantity; private Long actualQuantity;
/** 库位ID 检索条件 */ /** 库位ID 检索条件 */
@Excel(name = "库位") @Excel(name = "库位",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String locationId; private String locationId;
/** 仓库ID 暂无用 */ /** 仓库ID 暂无用 */
@Excel(name = "仓库") @Excel(name = "仓库",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String warehouseId; private String warehouseId;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String remark2; private String remark2;
/** 库位ID 检索条件 */ /** 库位ID 检索条件 */
...@@ -69,40 +70,40 @@ public class InboundTRDCTemplateVO extends BaseEntity { ...@@ -69,40 +70,40 @@ public class InboundTRDCTemplateVO extends BaseEntity {
private String relocationId; private String relocationId;
/** 标签颜色 字典,检索条件 */ /** 标签颜色 字典,检索条件 */
@Excel(name = "标签颜色") @Excel(name = "标签颜色",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long labelColor; private Long labelColor;
/** 凭证号 检索条件 */ /** 凭证号 检索条件 */
@Excel(name = "凭证号") @Excel(name = "凭证号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String voucherNumber; private String voucherNumber;
@Excel(name = "保温") @Excel(name = "保温",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String keepWarm; private String keepWarm;
@Excel(name = "危险类别") @Excel(name = "危险类别",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String hazardId; private String hazardId;
/** 入库单号 检索条件 */ /** 入库单号 检索条件 */
@Excel(name = "单号") @Excel(name = "单号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderId; private String orderId;
/** 系统编号 检索条件 */ /** 系统编号 检索条件 */
@Excel(name = "系统编号") @Excel(name = "系统编号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String systemNo; private String systemNo;
/** 货主ID */ /** 货主ID */
@Excel(name = "货主") @Excel(name = "货主",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String ownerId; private String ownerId;
/** 入库类型 字典,检索条件 */ /** 入库类型 字典,检索条件 */
@Excel(name = "贴标数量") @Excel(name = "贴标数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String labelQuantity; private String labelQuantity;
/** 订单类型 字典,检索条件 */ /** 订单类型 字典,检索条件 */
@Excel(name = "订单类型") @Excel(name = "订单类型",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String orderType; private String orderType;
@Excel(name = "单件重量") @Excel(name = "单件重量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double packageWeight; private Double packageWeight;
/** 单价 */ /** 单价 */
......
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import org.apache.poi.ss.usermodel.IndexedColors;
import java.util.Date; import java.util.Date;
...@@ -21,54 +22,54 @@ public class InboundTemplateVO extends BaseEntity { ...@@ -21,54 +22,54 @@ public class InboundTemplateVO extends BaseEntity {
/** 入库日期 日期无时间 */ /** 入库日期 日期无时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Date inboundDate; private Date inboundDate;
/** 货物ID 字典,检索条件 */ /** 货物ID 字典,检索条件 */
@Excel(name = "SAP No") @Excel(name = "SAP No",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private String sapNo; private String sapNo;
/** 货物名称 */ /** 货物名称 */
@Excel(name = "物料名称") @Excel(name = "物料名称",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String materialName; private String materialName;
/** 货物名称 */ /** 货物名称 */
@Excel(name = "TS Code") @Excel(name = "TS Code",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String tsCode; private String tsCode;
/** 批次ID 检索条件 */ /** 批次ID 检索条件 */
@Excel(name = "批号") @Excel(name = "批号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private String batchId; private String batchId;
/** 计划数量 */ /** 计划数量 */
@Excel(name = "计划数量") @Excel(name = "计划数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long plannedQuantity; private Long plannedQuantity;
@Excel(name = "件重") @Excel(name = "件重",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitWeight; private Double unitWeight;
/** 约数 */ /** 约数 */
@Excel(name = "约数") @Excel(name = "约数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long divisor; private Long divisor;
/** 实际件数 */ /** 实际件数 */
@Excel(name = "件数") @Excel(name = "件数",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long actualPackages; private Long actualPackages;
/** 实际数量 */ /** 实际数量 */
@Excel(name = "实发数量") @Excel(name = "实发数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private Long actualQuantity; private Long actualQuantity;
/** 库位ID 检索条件 */ /** 库位ID 检索条件 */
@Excel(name = "库位") @Excel(name = "库位",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String locationId; private String locationId;
/** 仓库ID 暂无用 */ /** 仓库ID 暂无用 */
@Excel(name = "仓库") @Excel(name = "仓库",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String warehouseId; private String warehouseId;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String remark; private String remark;
/** 库位ID 检索条件 */ /** 库位ID 检索条件 */
...@@ -76,44 +77,44 @@ public class InboundTemplateVO extends BaseEntity { ...@@ -76,44 +77,44 @@ public class InboundTemplateVO extends BaseEntity {
private String remark2; private String remark2;
/** 标签颜色 字典,检索条件 */ /** 标签颜色 字典,检索条件 */
@Excel(name = "标签颜色") @Excel(name = "标签颜色",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long labelColor; private Long labelColor;
/** 凭证号 检索条件 */ /** 凭证号 检索条件 */
@Excel(name = "凭证号") @Excel(name = "凭证号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String voucherNumber; private String voucherNumber;
@Excel(name = "保温") @Excel(name = "保温",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String keepWarm; private String keepWarm;
@Excel(name = "危险类别") @Excel(name = "危险类别",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String hazardId; private String hazardId;
/** 入库单号 检索条件 */ /** 入库单号 检索条件 */
@Excel(name = "单号") @Excel(name = "单号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private String orderId; private String orderId;
/** 系统编号 检索条件 */ /** 系统编号 检索条件 */
@Excel(name = "系统编号") @Excel(name = "系统编号",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String systemNo; private String systemNo;
/** 货主ID */ /** 货主ID */
@Excel(name = "货主") @Excel(name = "货主",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private String ownerId; private String ownerId;
/** 入库类型 字典,检索条件 */ /** 入库类型 字典,检索条件 */
@Excel(name = "贴标数量") @Excel(name = "贴标数量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Long labelQuantity; private Long labelQuantity;
/** 订单类型 字典,检索条件 */ /** 订单类型 字典,检索条件 */
@Excel(name = "订单类型") @Excel(name = "订单类型",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.YELLOW)
private String orderType; private String orderType;
@Excel(name = "单件重量") @Excel(name = "单件重量",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double packageWeight; private Double packageWeight;
/** 单价 */ /** 单价 */
@Excel(name = "单价") @Excel(name = "单价",headerColor = IndexedColors.BLACK,headerBackgroundColor = IndexedColors.WHITE)
private Double unitPrice; private Double unitPrice;
/** 收货人 */ /** 收货人 */
......
...@@ -165,7 +165,6 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService ...@@ -165,7 +165,6 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
inboundOrderItems.setCreateTime(DateUtils.getNowDate()); inboundOrderItems.setCreateTime(DateUtils.getNowDate());
inboundOrderItems.setCreateUserCode(SystemUtils.getUserName()); inboundOrderItems.setCreateUserCode(SystemUtils.getUserName());
inboundOrderItems.setCreateBy(SystemUtils.getUserName()); inboundOrderItems.setCreateBy(SystemUtils.getUserName());
inboundOrderItems.setId(UUID.randomUUID().toString()); inboundOrderItems.setId(UUID.randomUUID().toString());
inboundOrderItems.setOrderId(orderId); inboundOrderItems.setOrderId(orderId);
inboundOrderItems.setInboundOrderId(inboundOrders.getId()); inboundOrderItems.setInboundOrderId(inboundOrders.getId());
...@@ -414,6 +413,8 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService ...@@ -414,6 +413,8 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
itemDO.setCreateUserCode(operId); itemDO.setCreateUserCode(operId);
itemDO.setOrderId(orderId); // 关联入库单号 itemDO.setOrderId(orderId); // 关联入库单号
itemDO.setIsUsed(1L); itemDO.setIsUsed(1L);
// 反射获取batchId并设置 // 反射获取batchId并设置
try { try {
Method getBatchIdMethod = vo.getClass().getMethod("getBatchId"); Method getBatchIdMethod = vo.getClass().getMethod("getBatchId");
...@@ -450,6 +451,10 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService ...@@ -450,6 +451,10 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
} }
itemDO.setMaterialId(sapAndId.get("id")); itemDO.setMaterialId(sapAndId.get("id"));
if(itemDO.getActualQuantity() == null || itemDO.getActualQuantity() == 0){
throw new ServiceException("物料" + sapNo + "的实际数量需要大于0");
}
// ========== 仓库/库位查询(反射获取) ========== // ========== 仓库/库位查询(反射获取) ==========
// 1. 仓库名称转ID // 1. 仓库名称转ID
String warehouseName = ""; String warehouseName = "";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论