Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,374 @@ public class ApplyEventRequest_ApplyData_Contents
public ApplyEventRequest_ApplyData_Contents_Value value { get; set; }
}

/// <summary>
/// 控件值,不同控件类型对应不同的参数
/// 参考文档:https://developer.work.weixin.qq.com/document/path/91853
/// </summary>
public class ApplyEventRequest_ApplyData_Contents_Value
{
/// <summary>
///
/// 文本/多行文本控件(control为Text或Textarea)的值
/// </summary>
public string text { get; set; }

/// <summary>
/// 数字控件(control为Number)的值
/// </summary>
public string new_number { get; set; }

/// <summary>
/// 金额控件(control为Money)的值
/// </summary>
public string new_money { get; set; }

/// <summary>
/// 日期/日期+时间控件(control为Date)的值
/// </summary>
public ApplyEventRequest_Date date { get; set; }

/// <summary>
/// 单选/多选控件(control为Selector)的值
/// </summary>
public ApplyEventRequest_Selector selector { get; set; }

/// <summary>
/// 成员控件(control为Contact,mode为user)的值
/// </summary>
public List<ApplyEventRequest_Member> members { get; set; }

/// <summary>
/// 部门控件(control为Contact,mode为department)的值
/// </summary>
public List<ApplyEventRequest_Department> departments { get; set; }

/// <summary>
/// 附件控件(control为File)的值
/// </summary>
public List<ApplyEventRequest_File> files { get; set; }

/// <summary>
/// 明细控件(control为Table)的值,包含多行子控件数据
/// </summary>
public List<ApplyEventRequest_TableChildren> children { get; set; }

/// <summary>
/// 位置控件(control为Location)的值
/// </summary>
public ApplyEventRequest_Location location { get; set; }

/// <summary>
/// 关联审批单控件(control为RelatedApproval)的值
/// </summary>
public List<ApplyEventRequest_RelatedApproval> related_approval { get; set; }

/// <summary>
/// 时长控件(control为DateRange)的值
/// </summary>
public ApplyEventRequest_DateRange date_range { get; set; }

/// <summary>
/// 公式控件(control为Formula)的值
/// </summary>
public string formula { get; set; }

/// <summary>
/// 假勤控件-请假(control为Vacation)的值
/// </summary>
public ApplyEventRequest_Vacation vacation { get; set; }

/// <summary>
/// 假勤控件-出差/外出/加班(control为Attendance)的值
/// </summary>
public ApplyEventRequest_Attendance attendance { get; set; }
}

#region 各控件类型的值类

/// <summary>
/// 日期控件的值
/// </summary>
public class ApplyEventRequest_Date
{
/// <summary>
/// 时间展示类型:day-日期;hour-日期+时间
/// </summary>
public string type { get; set; }

/// <summary>
/// 时间戳,填写UTC时间戳
/// </summary>
public long s_timestamp { get; set; }
}

/// <summary>
/// 单选/多选控件的值
/// </summary>
public class ApplyEventRequest_Selector
{
/// <summary>
/// 选择方式:single-单选;multi-多选
/// </summary>
public string type { get; set; }

/// <summary>
/// 选中的选项
/// </summary>
public List<ApplyEventRequest_SelectorOption> options { get; set; }
}

/// <summary>
/// 单选/多选控件的选项
/// </summary>
public class ApplyEventRequest_SelectorOption
{
/// <summary>
/// 选项key,可通过"获取审批模板详情"接口获得
/// </summary>
public string key { get; set; }

/// <summary>
/// 选项的值(用于填写其他类型选项的值)
/// </summary>
public List<ApplyEventRequest_TextLang> value { get; set; }
}

/// <summary>
/// 成员控件的成员值
/// </summary>
public class ApplyEventRequest_Member
{
/// <summary>
/// 成员userid
/// </summary>
public string userid { get; set; }

/// <summary>
/// 成员名称,若接口没有返回此字段可不填
/// </summary>
public string name { get; set; }
}

/// <summary>
/// 部门控件的部门值
/// </summary>
public class ApplyEventRequest_Department
{
/// <summary>
/// 部门id
/// </summary>
public string openapi_id { get; set; }

/// <summary>
/// 部门名称,若接口没有返回此字段可不填
/// </summary>
public string name { get; set; }
}

/// <summary>
/// 附件控件的附件值
/// </summary>
public class ApplyEventRequest_File
{
/// <summary>
/// 文件id,通过上传临时素材接口获取
/// </summary>
public string file_id { get; set; }
}

/// <summary>
/// 明细控件的子控件行数据(一行)
/// </summary>
public class ApplyEventRequest_TableChildren
{
/// <summary>
/// 明细行中每个子控件的值
/// </summary>
public List<ApplyEventRequest_ApplyData_Contents> list { get; set; }
}

/// <summary>
/// 位置控件的值
/// </summary>
public class ApplyEventRequest_Location
{
/// <summary>
/// 纬度
/// </summary>
public string latitude { get; set; }

/// <summary>
/// 经度
/// </summary>
public string longitude { get; set; }

/// <summary>
/// 地点标题
/// </summary>
public string title { get; set; }

/// <summary>
/// 地点详细地址
/// </summary>
public string address { get; set; }

/// <summary>
/// 选择的打卡时间(秒),仅假勤组件的外出地点返回
/// </summary>
public long time { get; set; }
}

/// <summary>
/// 关联审批单控件的值
/// </summary>
public class ApplyEventRequest_RelatedApproval
{
/// <summary>
/// 关联审批单号
/// </summary>
public string sp_no { get; set; }
}

/// <summary>
/// 时长控件的值
/// </summary>
public class ApplyEventRequest_DateRange
{
/// <summary>
/// 时间展示类型:halfday-日期;hour-日期+时间
/// </summary>
public string type { get; set; }

/// <summary>
/// 开始时间
/// </summary>
public ApplyEventRequest_DateRangeData new_begin { get; set; }

/// <summary>
/// 结束时间
/// </summary>
public ApplyEventRequest_DateRangeData new_end { get; set; }

/// <summary>
/// 时长秒数
/// </summary>
public long new_duration { get; set; }
}

/// <summary>
/// 时长控件的时间范围数据
/// </summary>
public class ApplyEventRequest_DateRangeData
{
/// <summary>
/// 时间戳,填写UTC时间戳
/// </summary>
public long timestamp { get; set; }

/// <summary>
/// 类型:0-上午;1-下午;仅当type为halfday时有效
/// </summary>
public int time_type { get; set; }
}

/// <summary>
/// 假勤控件-请假的值
/// </summary>
public class ApplyEventRequest_Vacation
{
/// <summary>
/// 请假类型key,可通过获取审批模板详情接口获取
/// </summary>
public ApplyEventRequest_VacationSelector selector { get; set; }

/// <summary>
/// 请假的日期范围
/// </summary>
public ApplyEventRequest_VacationAttendance attendance { get; set; }
}

/// <summary>
/// 请假类型选择器
/// </summary>
public class ApplyEventRequest_VacationSelector
{
/// <summary>
/// 选择方式,固定为single
/// </summary>
public string type { get; set; }

/// <summary>
/// 选择的请假类型
/// </summary>
public List<ApplyEventRequest_SelectorOption> options { get; set; }
}

/// <summary>
/// 请假日期范围信息
/// </summary>
public class ApplyEventRequest_VacationAttendance
{
/// <summary>
/// 时间范围
/// </summary>
public ApplyEventRequest_AttendanceDateRange date_range { get; set; }
}

/// <summary>
/// 假勤控件-出差/外出/加班的值
/// </summary>
public class ApplyEventRequest_Attendance
{
/// <summary>
/// 时长控件
/// </summary>
public ApplyEventRequest_AttendanceDateRange date_range { get; set; }
}

/// <summary>
/// 假勤控件的日期范围
/// </summary>
public class ApplyEventRequest_AttendanceDateRange
{
/// <summary>
/// 时间展示类型:halfday-日期;hour-日期+时间
/// </summary>
public string type { get; set; }

/// <summary>
/// 开始时间
/// </summary>
public ApplyEventRequest_AttendanceDateRangeData new_begin { get; set; }

/// <summary>
/// 结束时间
/// </summary>
public ApplyEventRequest_AttendanceDateRangeData new_end { get; set; }

/// <summary>
/// 时长秒数
/// </summary>
public long new_duration { get; set; }
}

/// <summary>
/// 假勤日期范围数据
/// </summary>
public class ApplyEventRequest_AttendanceDateRangeData
{
/// <summary>
/// 时间戳,填写UTC时间戳
/// </summary>
public long timestamp { get; set; }

/// <summary>
/// 类型:0-上午;1-下午;仅当type为halfday时有效
/// </summary>
public int time_type { get; set; }
}

#endregion

public class ApplyEventRequest_SummaryList
{
/// <summary>
Expand Down
Loading