namespace F9WebAiTest.Application.Dtos.Prod;
// ==================== 考勤登记(CQDJ) ====================
/// 登记明细(读 / 写共用)
public class CqdjItemDto
{
public long Id { get; set; }
public long DepId { get; set; } // 出勤部门(流动 / 代班时可为其它部门)
public long WorktypeId { get; set; } // 出勤工种
public int TypeCq { get; set; } // 出勤类型(1正常 2请假 3流动 4加班 5代班 6外派 7旷工 8工伤)
public int TypeQj { get; set; } // 请假类型(0无 1事假 2病假 3产假 4婚假 5丧假 6公假 7年假 9调休 10轮休)
public decimal Hours { get; set; }
public string Jizu { get; set; } = "";
public string CtStart { get; set; } = "";
public string CtEnd { get; set; } = "";
public int DangcheNum { get; set; }
public string Memo { get; set; } = "";
}
/// 登记行(一人一天)
public class CqdjRowDto
{
public long Id { get; set; } // 已保存的主表 Id(0=未保存)
public long EmployeeId { get; set; }
public string EmployeeCode { get; set; } = "";
public string EmployeeName { get; set; } = "";
public long DepId { get; set; }
public string DepName { get; set; } = "";
public long WorktypeId { get; set; }
public string WorktypeName { get; set; } = "";
public int Banci { get; set; }
public bool IsXuegong { get; set; } // 学工(未转正)
public bool Saved { get; set; } // 是否已入库
public decimal HoursStandard { get; set; }
public decimal HoursCq { get; set; }
public decimal HoursQj { get; set; }
public decimal HoursLd { get; set; }
public decimal HoursJb { get; set; }
public decimal HoursDb { get; set; }
public decimal HoursWp { get; set; }
public decimal HoursKg { get; set; }
public decimal HoursGs { get; set; }
public int CsYeban { get; set; }
public string Memo { get; set; } = "";
public List Items { get; set; } = new();
}
/// 登记查询结果(一次性返回整组,前端整组编辑)
public class CqdjViewDto
{
public DateTime Date { get; set; }
public string DateText => Date.ToString("yyyy-MM-dd");
public long DepId { get; set; }
public long WorktypeId { get; set; }
public int Banci { get; set; }
public List Rows { get; set; } = new();
}
/// 整组保存入参(先软删该 日期+部门+工种+班次 的旧登记,再整批新增)
public class CqdjSaveDto
{
public DateTime Date { get; set; }
public long DepId { get; set; }
public long WorktypeId { get; set; } // 0 = 全部工种
public int Banci { get; set; }
public List Rows { get; set; } = new();
}
public class CqdjSaveRowDto
{
public long EmployeeId { get; set; }
public long DepId { get; set; } // 0 = 取职工所在部门
public long WorktypeId { get; set; } // 0 = 取职工工种
public bool IsXuegong { get; set; }
public decimal HoursStandard { get; set; }
public int CsYeban { get; set; }
public string Memo { get; set; } = "";
public List Items { get; set; } = new();
}
/// 「添加职工」下拉选项
public class CqdjEmpOptionDto
{
public long Id { get; set; }
public string Code { get; set; } = "";
public string Name { get; set; } = "";
public long DepId { get; set; }
public string DepName { get; set; } = "";
public long WorktypeId { get; set; }
public string WorktypeName { get; set; } = "";
public bool IsXuegong { get; set; }
}
// ==================== 考勤统计(CQTJ) ====================
/// 统计行(一人一行,月快照)
public class CqtjRowDto
{
public long Id { get; set; }
public int Year { get; set; }
public int Month { get; set; }
public long DepId { get; set; }
public string DepName { get; set; } = "";
public long WorktypeId { get; set; }
public string WorktypeName { get; set; } = "";
public long EmployeeId { get; set; }
public string EmployeeCode { get; set; } = "";
public string EmployeeName { get; set; } = "";
public decimal DaysCqStandard { get; set; }
public decimal DaysCqActual { get; set; }
public decimal CqTianci { get; set; }
public decimal HoursCq { get; set; }
public decimal HoursQj { get; set; }
public decimal HoursLd { get; set; }
public decimal HoursJb { get; set; }
public decimal HoursDb { get; set; }
public decimal HoursWp { get; set; }
public decimal HoursKg { get; set; }
public int CsYeban { get; set; }
public decimal HoursQjShijia { get; set; }
public decimal HoursQjBj { get; set; }
public decimal HoursQjHj { get; set; }
public decimal HoursQjCj { get; set; }
public decimal HoursQjLx { get; set; }
public decimal HoursQjSangjia { get; set; }
public decimal HoursQjGj { get; set; }
public decimal HoursQjNj { get; set; }
public decimal HoursQjTx { get; set; }
public decimal HoursXgCq { get; set; }
public decimal HoursXgJiaban { get; set; }
public decimal HoursFadingjiaqi { get; set; }
public decimal HoursQjQqmc { get; set; }
public decimal HoursQjQqcal { get; set; }
public decimal JineQuanqin { get; set; }
public decimal JineJb { get; set; }
public decimal JineLiudong { get; set; }
public decimal JineDaiban { get; set; }
public decimal JineYb { get; set; }
public decimal JineKgKk { get; set; }
public decimal JineJqBzHj { get; set; }
public decimal JineJqBzBj { get; set; }
public decimal JineJqBzLx { get; set; }
public decimal JineJqBzSangjia { get; set; }
public decimal JineJqBzFading { get; set; }
public decimal JineJqBzTxnj { get; set; }
public decimal JineJqBz { get; set; }
public string Memo { get; set; } = "";
}
/// 统计整组保存(先软删该 年/月/部门 的旧快照,再整批新增)
public class CqtjSaveDto
{
public int Year { get; set; }
public int Month { get; set; }
public long DepId { get; set; }
public List Rows { get; set; } = new();
}
/// 一键生成入参
public class CqtjGenerateDto
{
public int Year { get; set; }
public int Month { get; set; }
}
/// 统计录入视图(附加展示用的账期信息)
public class CqtjViewDto
{
public int Year { get; set; }
public int Month { get; set; }
public long DepId { get; set; }
public string DepName { get; set; } = "";
public decimal QsQuanqinDays { get; set; } // 薪资配置账期的前缫出勤天数
public bool Exists { get; set; } // true=库中已有快照,false=本次实时算出
public List Rows { get; set; } = new();
}