using MiniExcelLibs.Attributes; using System.ComponentModel.DataAnnotations; 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 string MaterialName { 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; } public Dictionary GetExportData() { var exportData = new Dictionary(); foreach (var property in this.GetType().GetProperties()) { exportData.Add(property.Name, property.GetValue(this)); } return exportData; } }