using System; using System.Collections.Generic; namespace DeviceRepair.Models { public class DeviceWarrantyRequestFormView { /// /// 主键编号 (原则:300000000 - 399999999) /// public int AutoID { get; set; } /// /// 唯一编号 /// public Guid GUID { get; set; } /// /// 设备表主键编号 /// public int EquipmentPK { get; set; } /// /// 设备编号 /// public string EquipmentID { get; set; } /// /// 设备名称 /// public string EquipmentName { get; set; } /// /// 发生地点 /// public int Location { get; set; } /// /// 发生地点 /// public string LocationName { get; set; } /// /// 是否有在途生产单 /// public bool InProduction { get; set; } /// /// 批次号 /// public string Batch { get; set; } /// /// 故障现象 /// public string FaultSymptoms { get; set; } /// /// 设备设施部 /// public string ReceivingDep { get; set; } /// /// 停机状态(是、否) /// public bool IsDown { get; set; } /// /// 文档版本 /// public int FormVer { get; set; } /// /// 申请时间 /// public DateTime? CreatOn { get; set; } /// /// 申请人 /// public int? CreatBy { get; set; } /// /// 申请人姓名 /// public string CreatorName { get; set; } /// /// 修改时间 /// public DateTime? ModifyOn { get; set; } /// /// 修改人 /// public int? ModifyBy { get; set; } /// /// 修改人姓名 /// public string ModifyByName { get; set; } public DateTime? RestorationConfirmationOn { get; set; } public int RestorationConfirmationBy { get; set; } public string RestorationConfirmationOnName { get; set; } public DeviceWarrantyRequestMaintaionView MaintaionItems { get; set; } public List EvaluatorItems { get; set; } public DeviceWarrantyRequestFormStatus FormStatus { get { if (MaintaionItems == null || MaintaionItems.SubmitBy == 0) { return DeviceWarrantyRequestFormStatus.AwaitingRepair; } else if (MaintaionItems.SubmitBy > 0) { if (RestorationConfirmationBy > 0) { return DeviceWarrantyRequestFormStatus.BeComplate; } return DeviceWarrantyRequestFormStatus.AwaitingApproval; } return DeviceWarrantyRequestFormStatus.AwaitingRepair; } } public string FormStatusText { get { return FormStatus.ToDescription(); } } public string IsDownStatusText { get { return IsDown ? "停机" : "非停机"; } } } }