using Edu.Common.Enum.Duty;
using Edu.Model.Entity.Duty;
using System;
using System.Collections.Generic;
using System.Text;

namespace Edu.Model.ViewModel.Duty
{
    /// <summary>
    /// 值班班次视图实体类
    /// </summary>
    public class RB_Duty_PlanDetails_ViewModel : RB_Duty_PlanDetails
    {
        /// <summary>
        /// 计划编号【查询使用】
        /// </summary>
        public string QPlanIds { get; set; }

        /// <summary>
        /// 班次名称
        /// </summary>
        public string ShiftName { get; set; }

        /// <summary>
        /// 值班人员
        /// </summary>
        public string QDutyMan { get; set; }

        /// <summary>
        /// 值班人员姓名
        /// </summary>
        public string DutyManName { get; set; }

        /// <summary>
        /// 值班人员头像
        /// </summary>
        public string DutyManIcon { get; set; }

        /// <summary>
        /// 值班日期
        /// </summary>
        public DateTime DutyDate { get; set; }

        /// <summary>
        /// 查询开始时间
        /// </summary>
        public string QStartDate { get; set; }

        /// <summary>
        /// 工作清单列表
        /// </summary>
        public List<RB_Duty_PlanWork_ViewModel> WorkContentList { get; set; }

        /// <summary>
        /// 状态字符串
        /// </summary>
        public string StatusStr
        {
            get
            {
                return Common.Plugin.EnumHelper.ToName(this.Status);
            }
        }



        /// <summary>
        /// 突发事件总数
        /// </summary>
        public int BurstCount { get; set; }

        /// <summary>
        /// 交接工作总数
        /// </summary>
        public int HandoverCount { get; set; }

        /// <summary>
        /// 上班打卡时间
        /// </summary>
        public string CheckTimeStr
        {
            get
            {
                string str = Common.ConvertHelper.FormatTimeStr(this.CheckTime);
                if (str == "" || str == "00:00")
                {
                    str = "未打卡";
                }
                return str;
            }
        }

        /// <summary>
        /// 下班打卡时间
        /// </summary>
        public string FinishTimeStr
        {
            get
            {
                string str = Common.ConvertHelper.FormatTimeStr(this.FinishTime);
                if ( str == "" || str == "00:00")
                {
                    str = "未打卡";
                }
                return str;
            }
        }

        /// <summary>
        /// 值班状态(0-未开始,1-值班中,2-已完成,3-未值班)
        /// </summary>
        public int QDutyStatus { get; set; }

        /// <summary>
        /// 出勤状态(1-迟到,2-早退,3-缺勤,4-正常)
        /// </summary>
        public int QAttendanceStatus { get; set; }

        /// <summary>
        /// 配置班次上班时间
        /// </summary>
        public string ConfigStartTime { get; set; }

        /// <summary>
        /// 配置班次下班时间
        /// </summary>
        public string ConfigEndTime { get; set; }

    }

    /// <summary>
    /// 值班班次对应事项列表
    /// </summary>
    public class RB_Duty_PlanWork_ViewModel
    {
        /// <summary>
        /// 值班填写事项编号(rb_duty_content表Id)
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 值班事项表中Id(rb_duty_item)
        /// </summary>
        public int ItemId { get; set; }

        /// <summary>
        /// 值班事项名称(rb_duty_item)
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 值班事项填写类型(rb_duty_item)
        /// </summary>
        public ItemTypeEnum ItemType { get; set; }

        /// <summary>
        /// 填写事项填写内容(rb_duty_content表WorkContent)
        /// </summary>
        public string WorkContent { get; set; }

        /// <summary>
        /// 填写事项是否完成(rb_duty_content表WorkContent)【1-已完成】
        /// </summary>
        public int IsChecked { get; set; }


    }
}
