using MiniExcelLibs.Attributes; using System.ComponentModel.DataAnnotations; using System; using System.ComponentModel; using CMS.Plugin.HIAWms.Domain.Shared.Enums; namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterial; /// /// 物料基础信息表导出模型 /// public class WmsMaterialExportModel { /// /// 物料编码(唯一标识) /// [ExcelColumn(Name = "物料编码(唯一标识)", Width = 25)] public string MaterialCode { get; set; } /// /// 是否有效物料 /// [ExcelColumn(Name = "是否有效物料", Width = 25)] public bool IsValid { get; set; } /// /// 是否自产 /// [ExcelColumn(Name = "是否自产", Width = 25)] public bool? IsSelfMade { get; set; } /// /// 数量 /// [ExcelColumn(Name = "数量", Width = 25)] public int Num { get; set; } /// /// 自有数量 /// [ExcelColumn(Name = "自有数量", Width = 25)] public int? SelfNum { get; set; } /// /// 物料名称 /// [ExcelColumn(Name = "物料名称", Width = 25)] public string MaterialName { get; set; } /// /// 可空长度 /// [ExcelColumn(Name = "可空长度", Width = 25)] public decimal? NullLength { get; set; } /// /// 采购类型(枚举值) /// [ExcelColumn(Name = "采购类型(枚举值)", Width = 25)] public PurchaseTypeEnum PurchaseType { get; set; } /// /// 物料类型(枚举值) /// [ExcelColumn(Name = "物料类型(枚举值)", Width = 25)] public MaterialTypeEnum MaterialType { get; set; } /// /// 主单位(如:kg、m、个) /// [ExcelColumn(Name = "主单位(如:kg、m、个)", Width = 25)] public string PrimaryUnit { get; set; } /// /// 规格/标准(如:GB/T 8163-2018) /// [ExcelColumn(Name = "规格/标准(如:GB/T 8163-2018)", Width = 25)] public string Standard { get; set; } /// /// 外径(单位:mm) /// [ExcelColumn(Name = "外径(单位:mm)", Width = 25)] public decimal OuterDiameter { get; set; } /// /// 壁厚(单位:mm) /// [ExcelColumn(Name = "壁厚(单位:mm)", Width = 25)] public decimal WallThickness { get; set; } /// /// 材质(如:304不锈钢) /// [ExcelColumn(Name = "材质(如:304不锈钢)", Width = 25)] public string MaterialQuality { get; set; } /// /// 长度(单位:m) /// [ExcelColumn(Name = "长度(单位:m)", Width = 25)] public decimal Length { get; set; } /// /// 是否为主支管 /// [ExcelColumn(Name = "是否为主支管", Width = 25)] public YesNoEnum IsMainBranch { get; set; } /// /// 生产工厂 /// [ExcelColumn(Name = "生产工厂", Width = 25)] public string Factory { get; set; } /// /// 证书编号 /// [ExcelColumn(Name = "证书编号", Width = 25)] public string Certification { get; set; } /// /// 冗余字段1 - 预留扩展用途 /// [ExcelColumn(Name = "冗余字段1 - 预留扩展用途", Width = 25)] public string RedundantField1 { get; set; } /// /// 冗余字段2 - 预留扩展用途 /// [ExcelColumn(Name = "冗余字段2 - 预留扩展用途", Width = 25)] public string RedundantField2 { get; set; } /// /// 冗余字段3 - 预留扩展用途 /// [ExcelColumn(Name = "冗余字段3 - 预留扩展用途", Width = 25)] public string RedundantField3 { get; set; } /// /// 排序 /// [ExcelColumn(Name = "排序", Width = 25)] public int Sort { get; set; } /// /// 备注 /// [ExcelColumn(Name = "备注", Width = 25)] public string Remark { get; set; } /// /// 是否禁用 /// [ExcelColumn(Name = "是否禁用", Width = 25)] public bool? IsDisabled { get; set; } /// /// 创建人 /// [ExcelColumn(Name = "创建人", Width = 25)] public string CreatorName { get; set; } /// /// 修改人 /// [ExcelColumn(Name = "修改人", Width = 25)] public string LastModifierName { get; set; } /// /// 操作备注 /// [ExcelColumn(Name = "操作备注", Width = 25)] public string OperationRemark { get; set; } /// /// 删除备注 /// [ExcelColumn(Name = "删除备注", Width = 25)] public string DeleteRemark { get; set; } /// /// 扩展字段1 /// [ExcelColumn(Name = "扩展字段1", Width = 25)] public string ExtraField1 { get; set; } /// /// 扩展字段2 /// [ExcelColumn(Name = "扩展字段2", Width = 25)] public string ExtraField2 { get; set; } /// /// 扩展字段3 /// [ExcelColumn(Name = "扩展字段3", Width = 25)] public string ExtraField3 { get; set; } public Dictionary GetExportData() { var exportData = new Dictionary(); foreach (var property in this.GetType().GetProperties()) { exportData.Add(property.Name, property.GetValue(this)); } return exportData; } }