using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OASystem.Domain.ViewModels.QiYeWeChat
{
#region 企业微信 API 获取企业打卡规则
///
/// 企业微信 API 获取企业打卡规则
///
public class CorpCheckInRuleView : ResponseBase
{
///
/// 企业规则信息列表
///
public List? group { get; set; }
}
public class GroupItem
{
///
/// 打卡规则类型,1:固定时间上下班;2:按班次上下班;3:自由上下班
///
public int grouptype { get; set; }
///
/// 打卡规则id
///
public int groupid { get; set; }
///
/// 打卡规则名称
///
public string groupname { get; set; }
///
/// 特殊日期-不用打卡日期时间戳
///
public List spe_offdays { get; set; }
}
///
/// 特殊日期-不用打卡日期时间戳
///
public class spe_offdaysItem
{
///
/// 特殊日期备注
///
public string notes { get; set; }
public long timestamp { get; set; }
public List checkintime { get; set; }
public int type { get; set; }
///
/// 开始时间戳
///
public long begtime { get; set; }
///
/// 开始时间
///
public DateTime begtime_dt
{
get
{
return new DateTime(begtime * 10000000 + 621355968000000000L).ToLocalTime();
}
}
public long endtime { get; set; }
///
/// 开始时间
///
public DateTime endtime_dt
{
get
{
return new DateTime(endtime * 10000000 + 621355968000000000L).ToLocalTime();
}
}
}
#endregion
///
/// 企业微信 API
/// 打卡月数据
///
public class CheckInView:ResponseBase
{
///
/// 基础信息
///
public List? datas { get; set; }
}
///
/// 基础信息 Data
///
public class Data
{
///
/// 基础信息
///
public Base_Info? base_info { get; set; }
///
/// 汇总信息
///
public Summary_Info? summary_info { get; set; }
///
/// 异常状态统计信息
///
public List? exception_infos { get; set; }
///
/// 假勤统计信息
///
public List? sp_items { get; set; }
///
/// 加班情况
///
public Overwork_Info? overwork_info { get; set; }
}
///
/// 成员基础信息
///
public class Base_Info
{
///
/// 记录类型:1-固定上下班;2-外出(此报表中不会出现外出打卡数据);3-按班次上下班;4-自由签到;5-加班;7-无规则
///
public int record_type { get; set; }
///
/// 打卡人员姓名
///
public string? name { get; set; }
///
/// 打卡人员别名
///
public string? name_ex { get; set; }
///
/// 打卡人员所在部门,会显示所有所在部门
///
public string? departs_name { get; set; }
///
/// 打卡人员账号,即userid
///
public string? acctid { get; set; }
///
/// 打卡人员所属规则信息
///
public Rule_Info? rule_info { get; set; }
}
///
/// 打卡人员所属规则信息
///
public class Rule_Info
{
///
/// 所属规则的id
///
public int groupid { get; set; }
///
/// 打卡规则名
///
public string? groupname { get; set; }
}
///
/// 汇总信息
///
public class Summary_Info
{
///
/// 应打卡天数
///
public int work_days { get; set; }
///
/// 正常天数
///
public int regular_days { get; set; }
///
/// 异常天数
///
public int except_days { get; set; }
///
/// 实际工作时长,为统计周期每日实际工作时长之和
///
public int regular_work_sec { get; set; }
///
/// 标准工作时长,为统计周期每日标准工作时长之和
///
public int standard_work_sec { get; set; }
}
///
/// 异常状态统计信息
///
public class Exception_Info
{
///
/// 异常类型:1-迟到;2-早退;3-缺卡;4-旷工;5-地点异常;6-设备异常
///
public int exception { get; set; }
///
/// 异常次数,为统计周期内每日此异常次数之和
///
public int count { get; set; }
///
/// 异常时长(迟到/早退/旷工才有值),为统计周期内每日此异常时长之和
///
public int duration { get; set; }
}
///
/// 假勤统计信息
///
public class Sp_Item
{
///
/// 假勤类型:1-请假;2-补卡;3-出差;4-外出;100-外勤
///
public int type { get; set; }
///
/// 具体请假类型,当type为1请假时,具体的请假类型id,可通过审批相关接口获取假期详情
///
public int vacation_id { get; set; }
///
/// 假勤次数,为统计周期内每日此假勤发生次数之和
///
public int count { get; set; }
///
/// 假勤时长,为统计周期内每日此假勤发生时长之和,时长单位为天直接除以86400即为天数,单位为小时直接除以3600即为小时数
///
public int duration { get; set; }
///
/// 时长单位:0-按天 1-按小时
///
public int time_type { get; set; }
///
/// 统计项名称
///
public string? name { get; set; }
}
///
/// 加班情况
///
public class Overwork_Info
{
///
/// 工作日加班时长
///
public int? workday_over_sec { get; set; }
///
/// 节假日加班时长
///
public int? holidays_over_sec { get; set; }
///
/// 休息日加班时长
///
public int? restdays_over_sec { get; set; }
}
public class AssessmentByUserListView : ResponseBase
{
public List Data { get; set; }
}
public class AssessmentByUserView
{
public string Name { get; set; }
public string Accid { get; set; }
public int Regular_days { get; set; }
public int Except_days { get; set; }
public List Exception_info_List { get; set; }
public int Work_days { get; set; }
}
public class Exception_info
{
public ErrorType Type { get; set; }
public DateTime Date { get; set; }
public string Info { get; set; }
}
public enum ErrorType
{
迟到 = 1, // 迟到
早退 = 2, // 早退
缺卡 = 3, // 缺卡
旷工 = 4, // 旷工
地点异常 = 5, // 地点异常
设备异常 = 6 // 设备异常
}
}