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 string MaterialNo { 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 string MaterialTypeCode { get; set; }
///
/// 物料类型(枚举值)
///
[ExcelColumn(Name = "物料类型", Width = 25)]
public string MaterialTypeDesc { get; set; }
///
/// 主单位(如:kg、m、个)
///
[ExcelColumn(Name = "主单位", Width = 25)]
public string PrimaryUnit { get; set; }
///
/// 规格/标准(如:GB/T 8163-2018)
///
[ExcelColumn(Name = "规格/标准", Width = 25)]
public string Standard { get; set; }
///
/// 外径(单位:mm)
///
[ExcelColumn(Name = "外径", Width = 25)]
public decimal OuterDiameter { get; set; }
///
/// 壁厚(单位:mm)
///
[ExcelColumn(Name = "壁厚", Width = 25)]
public decimal WallThickness { get; set; }
///
/// 材质(如:304不锈钢)
///
[ExcelColumn(Name = "材质", Width = 25)]
public string MaterialQuality { get; set; }
///
/// 长度(单位:m)
///
[ExcelColumn(Name = "长度", 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 string Remark { get; set; }
///
///
///
[ExcelColumn(Name = "", Width = 25)]
public DateTime CreationTime { get; set; }
///
///
///
[ExcelColumn(Name = "", Width = 25)]
public DateTime LastModificationTime { get; set; }
///
/// 型号
///
[ExcelColumn(Name = "型号", Width = 25)]
public string MaterialModel { 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;
}
}