using MadRunFabric.Common;
using MadRunFabric.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace EquipmentApi.Model.Dto
{
    /// <summary>
    /// 项目运行详情
    /// </summary>
    public class Wo_EquipmentRunningDto
    {
        /// <summary>
        /// id
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 工单编号
        /// </summary>
        public string wocode { get; set; } = "";
        /// <summary>
        /// 项目名称id
        /// </summary>
        public string projectid { get; set; }
        public string projectname { get; set; }
        /// <summary>
        /// 检查事项
        /// </summary>
        public string[] matterids { get; set; }
        public string[] matternames { get; set; }
        ///// <summary>
        ///// 系统名称id
        ///// </summary>
        //public string systemid { get; set; }
        //public string systemname { get; set; }
        ///// <summary>
        ///// 设备名称id
        ///// </summary>
        //public string[] equipmentid { get; set; }
        //public string[] equipmentname { get; set; }
        /// <summary>
        /// 巡检计划id
        /// </summary>
        public string planid { get; set; }
        public string planname { get; set; }
        /// <summary>
        /// 上次巡检时间
        /// </summary>
        public DateTime lastchecktime { get; set; }
        /// <summary>
        /// 上次巡检结果 1正常，0异常
        /// </summary>
        public int lastcheckresultid { get; set; } = 1;

        /// <summary>
        /// 工单开始时间
        /// </summary>
        public DateTime starttime { get; set; }
        /// <summary>
        /// 工单结束时间
        /// </summary>
        public DateTime endtime { get; set; }
        /// <summary>
        /// 工单名称
        /// </summary>
        public string woname { get; set; }
        /// <summary>
        /// 工单内容
        /// </summary>
        public string wocontent { get; set; }
        /// <summary>
        /// 任务状态:0创建工单，1已转派，3已处理，6挂起 
        /// </summary>
        public int wostate { get; set; } = 0;
        /// <summary>
        /// 提交人 usercode
        /// </summary>
        public string createby { get; set; } = "";
        public string createbyuser { get; set; } = "";
        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime createtime { get; set; }
        /// <summary>
        /// 是否删除(0正常，-1删除)
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 删除人工号
        /// </summary>
        public string deleteby { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime deletetime { get; set; }

        #region 处理信息
        /// <summary>
        /// 巡检人 usercode
        /// </summary>
        public string checkby { get; set; } = "";
        public string checkbyuser { get; set; } = "";
        /// <summary>
        /// 设备状态 1正常，0异常
        /// </summary> 
        public int quipmenttype { get; set; } = 1;
        /// <summary>
        /// 异常说明
        /// </summary>
        public string checkcontent { get; set; } = "";
        /// <summary>
        /// 巡检图片
        /// </summary>
        public List<FileBaseModel> checkpic { get; set; } = null;
        /// <summary>
        /// 扩展字段 - 自定义
        /// </summary>
        public List<ExtensionFileModel> extensionlist { get; set; } = null;

        /// <summary>
        /// 处理提交时间
        /// </summary>
        public DateTime dealtime { get; set; }
        /// <summary>
        /// 处理人 usercode
        /// </summary>
        public string dealby { get; set; } = "";
        public string dealbyuser { get; set; } = "";
        /// <summary>
        /// 楼层名称
        /// </summary>
        public string floorname { get; set; }
        /// <summary>
        /// 超时时长
        /// </summary>
        public int timeoutlong { get; set; } = 0;
        #endregion
        /// <summary>
        /// 工单完成是否返回消息提醒 0不提醒，1提醒
        /// </summary>
        public int isreturnmsg { get; set; } = 0;
        #region
        /// <summary>
        /// 处理流程
        /// </summary>
        public List<Wo_EquipmentRunning_Items> itemlist { get; set; } = null;
        #endregion
        #region
        ///// <summary>
        ///// id
        ///// </summary>
        //public string id { get; set; }
        ///// <summary>
        ///// 工单编号
        ///// </summary>
        //public string wocode { get; set; } = "";
        ///// <summary>
        ///// 项目名称id
        ///// </summary>
        //public string projectid { get; set; }
        //public string projectname { get; set; }
        ///// <summary>
        ///// 系统名称id
        ///// </summary>
        //public string systemid { get; set; }
        //public string systemname { get; set; }
        ///// <summary>
        ///// 设备名称id
        ///// </summary>
        //public string[] equipmentid { get; set; }
        //public string[] equipmentname { get; set; }
        ///// <summary>
        ///// 计划id
        ///// </summary>
        //public string planid { get; set; }
        ///// <summary>
        ///// 计划名称
        ///// </summary>
        //public string planname { get; set; }

        ///// <summary>
        ///// 上次巡检时间
        ///// </summary>
        //public DateTime lastchecktime { get; set; }
        ///// <summary>
        ///// 本次巡检时间
        ///// </summary>
        //public DateTime thischeckime { get; set; }
        ///// <summary>
        ///// 上次巡检结果 1正常，0异常
        ///// </summary>
        //public int lastcheckresultid { get; set; } = 1;
        ///// <summary>
        ///// 异常说明
        ///// </summary>
        //public string abnormalcontent { get; set; } = "";
        ///// <summary>
        ///// 到期时间
        ///// </summary>
        //public DateTime expirytime { get; set; }
        ///// <summary>
        ///// 提前展示时长（分钟）
        ///// </summary>
        //public int advancelong { get; set; } = 0;
        ///// <summary>
        ///// 提前展示时间
        ///// </summary>
        //public DateTime advancetime { get; set; }
        ///// <summary>
        ///// 提交人 usercode
        ///// </summary>
        //public string createby { get; set; } = "";
        ///// <summary>
        ///// 提交时间
        ///// </summary>
        //public DateTime createtime { get; set; }
        ///// <summary>
        ///// 是否删除(0正常，-1删除)
        ///// </summary>
        //public int isdelete { get; set; } = 0;
        ///// <summary>
        ///// 删除人工号
        ///// </summary>
        //public string deleteby { get; set; }
        ///// <summary>
        ///// 删除时间
        ///// </summary>
        //public DateTime deletetime { get; set; }

        //#region 处理信息
        ///// <summary>
        ///// 巡检人 usercode
        ///// </summary>
        //public string checkby { get; set; } = "";
        ///// <summary>
        ///// 设备状态 1正常，0异常
        ///// </summary> 
        //public int quipmenttype { get; set; } = 1;
        ///// <summary>
        ///// 异常说明
        ///// </summary>
        //public string checkcontent { get; set; } = "";
        ///// <summary>
        ///// 巡检图片
        ///// </summary>
        //public List<FileBaseModel> checkpic { get; set; }
        ///// <summary>
        ///// 扩展字段 - 自定义
        ///// </summary>
        //public List<ExtensionModel> extensionlist { get; set; } = null;
        ///// <summary>
        ///// 任务状态:0创建工单，1已转派，3已处理，6挂起 
        ///// </summary>
        //public int wostate { get; set; } = 0;
        ///// <summary>
        ///// 处理提交时间
        ///// </summary>
        //public DateTime dealtime { get; set; }
        ///// <summary>
        ///// 处理人 usercode
        ///// </summary>
        //public string dealby { get; set; } = "";
        //#endregion
        ///// <summary>
        ///// 楼层名称
        ///// </summary>
        //public string floorname { get; set; }
        ///// <summary>
        ///// 超时时长
        ///// </summary>
        //public int timeoutlong { get; set; } = 0;
        #endregion
    }

    /// <summary>
    /// 巡检报表
    /// </summary>
    public class Wo_EquipmentRunningChartDto
    {
        /// <summary>
        /// 日期
        /// </summary>
        public string wodate { get; set; }
        /// <summary>
        /// 总数量
        /// </summary>
        public int counts { get; set; }
        /// <summary>
        /// 已巡检数量
        /// </summary>
        public int yxjcounts { get; set; }
        /// <summary>
        /// 未巡检数量
        /// </summary>
        public int wxjcounts { get; set; }
        /// <summary>
        /// 异常数量
        /// </summary>
        public int abcounts { get; set; }
    }
}
