using IStation.Untity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Application { /// /// /// public class ProductLogicDto { /// /// /// public ProductLogicDto() { } /// /// /// public ProductLogicDto(Model.Product rhs, List property_group_list = null) { this.ID = rhs.ID; this.ParentID = TreeParentIdsHelper.GetLastParentID(rhs.ParentIds); this.ParentIds = rhs.ParentIds; this.CorpID = rhs.CorpID; this.BelongType = rhs.BelongType; this.BelongID = rhs.BelongID; this.GroupID = rhs.GroupID; this.Catalog = rhs.Catalog; this.ProductTypeID = rhs.ProductTypeID; this.Name = rhs.Name; this.Code = rhs.Code; this.Specification = rhs.Specification; this.Material = rhs.Material; this.Size = rhs.Size; this.UnitName = rhs.UnitName; this.Quantity = rhs.Quantity; this.ManufacturerID = rhs.ManufacturerID; this.ManufacturerNO = rhs.ManufacturerNO; this.ManufacturerDay = rhs.ManufacturerDay; this.ContractNO = rhs.ContractNO; this.StorageLocation = rhs.StorageLocation; this.StartUseDay = rhs.StartUseDay?.ToString("yyyy-MM-dd"); this.SameMark = rhs.SameMark; this.RealImage = rhs.RealImage; this.SiteImage = rhs.SiteImage; this.Model3DViewUrl = rhs.Model3DViewUrl; this.ExplosionImage = rhs.ExplosionImage; this.Address = rhs.Address; this.InspectionSchedule = rhs.InspectionSchedule; this.PropsParas = property_group_list?.Select(x => new ProductPropertyGroupLogicDto(x, rhs.PropsParas)).ToList(); this.RatedParas = rhs.RatedParas; this.TerminalId = rhs.TerminalId; this.TagName = rhs.TagName; this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; } /// /// 标识 /// public long ID { get; set; } /// /// 客户标识 /// public long CorpID { get; set; } /// /// 父节点标识 /// public long ParentID { get; set; } /// /// 父节点标识列表 /// public List ParentIds { get; set; } /// /// 所属类型 /// public string BelongType { get; set; } /// /// 所属标识 /// public long BelongID { get; set; } /// /// 组标识 /// public long GroupID { get; set; } /// /// 类别 /// public string Catalog { get; set; } /// /// 设备类型标识 /// public long ProductTypeID { get; set; } /// /// 名称 /// public string Name { get; set; } /// /// 型号 /// public string Code { get; set; } /// /// 规格 /// public string Specification { get; set; } /// /// 材质 /// public string Material { get; set; } /// /// 尺寸 /// public string Size { get; set; } /// /// 单位 /// public string UnitName { get; set; } /// /// 数量 /// public double Quantity { get; set; } /// /// 厂商 /// public long ManufacturerID { get; set; } /// /// 出厂编号 /// public string ManufacturerNO { get; set; } /// /// 出场日期 /// public string ManufacturerDay { get; set; } /// /// 合同编号 /// public string ContractNO { get; set; } /// /// 存储位置 /// public string StorageLocation { get; set; } /// /// 开始使用日期 /// public string StartUseDay { get; set; } /// /// 同类标识 /// public string SameMark { get; set; } /// /// 实物图 /// public string RealImage { get; set; } /// /// 现场图片 /// public string SiteImage { get; set; } /// /// 三维图 路径 /// public string Model3DViewUrl { get; set; } /// /// 爆炸图 /// public string ExplosionImage { get; set; } /// /// 地址 /// public string Address { get; set; } /// /// 巡检周期 /// public Model.Product.eInspectionSchedule InspectionSchedule { get; set; } /// /// 属性参数 /// public List PropsParas { get; set; } /// /// 额定参数 /// public T RatedParas { get; set; } /// /// 终端标识 /// public string TerminalId { get; set; } /// /// 标签 /// public string TagName { get; set; } /// /// 排序码 /// public int SortCode { get; set; } /// /// 使用状态 /// public Model.Product.eUseStatus UseStatus { get; set; } /// /// 说明 /// public string Description { get; set; } } }