123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907 |
- using Google.Protobuf.WellKnownTypes;
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection.Metadata.Ecma335;
- using System.Text;
- using System.Text.Json.Serialization;
- using System.Threading.Tasks;
- namespace OASystem.Domain.ViewModels.QiYeWeChat
- {
-
-
-
- public class ApprovalDataView : ResponseBase
- {
-
-
-
- public int Count { get; set; }
-
-
-
- public int total { get; set; }
-
-
-
- public long next_spnum { get; set; }
-
-
-
- public List<Sp_Info>? data { get; set; }
- }
-
-
-
- public class ApprovalInfoView : ResponseBase
- {
-
-
-
- public List<string>? sp_no_list { get; set; }
-
-
-
- public string? new_next_cursor { get; set; }
- }
-
-
-
- public class ApprovalDetailView : ResponseBase
- {
-
-
-
- public Sp_Detail? info { get; set; }
- }
-
-
-
- public class Applyer
- {
-
-
-
- public string userid { get; set; }
-
-
-
- public string partyid { get; set; }
- }
-
-
-
- public class Approver
- {
-
-
-
- public string userid { get; set; }
- }
-
-
-
- public class DetailsItem
- {
-
-
-
- public Approver approver { get; set; }
-
-
-
- public string speech { get; set; }
-
-
-
- public int sp_status { get; set; }
-
-
-
- public int sptime { get; set; }
-
-
-
- public List<string> media_id { get; set; }
- }
-
-
-
- public class Sp_recordItem
- {
-
-
-
- public int sp_status { get; set; }
-
-
-
- public int approverattr { get; set; }
-
-
-
- public List<DetailsItem> details { get; set; }
- }
-
-
-
- public class NotifyerItem
- {
-
-
-
- public string userid { get; set; }
- }
-
-
-
- public class TitleItem
- {
-
-
-
- public string text { get; set; }
-
-
-
- public string lang { get; set; }
- }
-
-
-
- public class OptionsItem
- {
-
-
-
- public string key { get; set; }
-
-
-
- public List<TitleItem> value { get; set; }
- }
-
-
-
- public class Selector
- {
-
-
-
- public string type { get; set; }
-
-
-
- public List<OptionsItem> options { get; set; }
- }
-
-
-
- public class Date_range
- {
-
-
-
- public string type { get; set; }
-
-
-
- public long new_begin { get; set; }
-
-
-
- public DateTime new_begin_dt
- {
- get
- {
- return new DateTime(new_begin * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public long new_end { get; set; }
-
-
-
- public DateTime new_end_dt
- {
- get
- {
- return new DateTime(new_end * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public int new_duration { get; set; }
- }
-
-
-
- public class Day_itemsItem
- {
-
-
-
- public long daytime { get; set; }
- public DateTime daytimeDt
- {
- get
- {
- return new DateTime(daytime * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
-
-
-
-
- public long duration { get; set; }
- }
-
-
-
- public class Slice_info
- {
-
-
-
- public List<Day_itemsItem> day_items { get; set; }
-
-
-
- public int state { get; set; }
-
-
-
- public long duration { get; set; }
- }
-
-
-
- public class Attendance
- {
-
-
-
- public Date_range date_range { get; set; }
-
-
-
- public int type { get; set; }
-
-
-
- public Slice_info slice_info { get; set; }
- }
-
-
-
- public class Vacation
- {
-
-
-
- public Selector selector { get; set; }
-
-
-
- public Attendance attendance { get; set; }
- }
-
-
-
- public class Value
- {
- public string? text { get; set; }
-
-
-
- public object? tips { get; set; }
-
-
-
- public List<Member> members { get; set; }
-
-
-
- public List<Department> departments { get; set; }
-
-
-
- public List<File_Info> files { get; set; }
-
-
-
- public List<Children> children { get; set; }
-
-
-
- public List<string> stat_field { get; set; }
-
-
-
- public Vacation vacation { get; set; }
-
-
-
-
-
-
-
- public Punch_Correction punch_correction { get; set; }
-
-
-
- public List<Related_Approval> related_approval { get; set; }
- public Attendance attendance { get; set; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-
-
- public class Punch_Correction
- {
-
-
-
- public string state { get; set; }
-
-
-
- public long time { get; set; }
-
-
-
- public DateTime time_dt
- {
- get
- {
- return new DateTime(time * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public long date { get; set; }
- }
-
-
-
- public class Department
- {
-
-
-
- public string openapi_id { get; set; }
-
-
-
- public string name { get; set; }
- }
-
-
-
- public class Member
- {
-
-
-
- public string userid { get; set; }
-
-
-
- public string name { get; set; }
- }
-
-
-
- public class File_Info
- {
-
-
-
- public string file_id { get; set; }
- }
-
-
-
- public class Children
- {
- public List<ListInfo> list { get; set; }
- }
- public class ListInfo
- {
- public string control { get; set; }
- public string id { get; set; }
- public List<TitleItem> title { get; set; }
- public ValueText value { get; set; }
- }
- public class ValueText
- {
- public string text { get; set; }
- }
-
-
-
- public class Related_Approval
- {
-
-
-
- public List<TitleItem> template_names { get; set; }
-
-
-
- public string sp_no { get; set; }
-
-
-
- public int sp_status { get; set; }
-
-
-
- public long create_time { get; set; }
-
-
-
- public string name { get; set; }
- }
-
-
-
- public class ContentsItem
- {
-
-
-
-
-
-
- public string control { get; set; }
-
-
-
- public string id { get; set; }
-
-
-
- public List<TitleItem> title { get; set; }
-
-
-
- public Value value { get; set; }
-
-
-
- public int display { get; set; }
-
-
-
- public int require { get; set; }
- }
-
-
-
- public class Apply_data
- {
-
-
-
- public List<ContentsItem> contents { get; set; }
- }
-
-
-
- public class Sp_Detail
- {
-
-
-
- public string sp_no { get; set; }
-
-
-
- public string sp_name { get; set; }
-
-
-
- public int sp_status { get; set; }
-
-
-
- public string template_id { get; set; }
-
-
-
- public long apply_time { get; set; }
-
-
-
- public DateTime apply_time_dt
- {
- get
- {
- return new DateTime(apply_time * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public Applyer applyer { get; set; }
-
-
-
- public List<Sp_recordItem> sp_record { get; set; }
-
-
-
- public List<NotifyerItem> notifyer { get; set; }
-
-
-
- public Apply_data apply_data { get; set; }
-
-
-
- public List<Comment> comments { get; set; }
- }
-
-
-
- public class Comment
- {
-
-
-
- public Approver commentUserInfo { get; set; }
-
-
-
- public long commenttime { get; set; }
-
-
-
- public string commentcontent { get; set; }
-
-
-
- public string commentid { get; set; }
-
-
-
- public List<string> media_id { get; set; }
- }
- #region 审批详情 (旧版)
-
-
-
- public class Sp_Info
- {
-
-
-
- public string? spname { get; set; }
-
-
-
- public string? apply_name { get; set; }
-
-
-
- public string? apply_org { get; set; }
-
-
-
- public List<string>? approval_name { get; set; }
-
-
-
- public List<string>? notify_name { get; set; }
-
-
-
- public int sp_status { get; set; }
-
-
-
- public long sp_num { get; set; }
-
-
-
- public Leave? leave { get; set; }
-
-
-
- public Comm? comm { get; set; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- public List<string>? mediaids { get; set; }
-
-
-
-
- public uint apply_time { get; set; }
-
-
-
-
- public DateTime apply_time_dt
- {
- get
- {
- return new DateTime(long.Parse(apply_time.ToString()) * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public string? apply_user_id { get; set; }
- }
-
-
-
- public class Leave
- {
-
-
-
- public int timeunit { get; set; }
-
-
-
-
- public int leave_type { get; set; }
-
-
-
- public uint start_time { get; set; }
-
-
-
- public DateTime start_time_dt
- {
- get
- {
- return new DateTime(long.Parse(start_time.ToString()) * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public uint end_time { get; set; }
-
-
-
- public DateTime end_time_dt
- {
- get
- {
- return new DateTime(long.Parse(end_time.ToString()) * 10000000 + 621355968000000000L).ToLocalTime();
- }
- }
-
-
-
- public int duration { get; set; }
-
-
-
- public string? reason { get; set; }
- }
-
-
-
- public class Comm
- {
-
-
-
- public string? apply_data { get; set; }
- public List<ApplyInfo>? applydata
- {
- get
- {
- List<ApplyInfo> applyInfos = new List<ApplyInfo>();
- if (!string.IsNullOrEmpty(apply_data))
- {
- applyInfos = JsonConvert.DeserializeObject<List<ApplyInfo>>(apply_data);
- }
- return applyInfos;
- }
- }
-
-
-
-
- public DateTime? FillingDt {
- get
- {
- DateTime? dt = null;
- if (applydata != null && applydata.Count > 0)
- {
- ApplyInfo applyInfo = applydata.Where(it => it.id == "checkin-time").FirstOrDefault();
- if (applyInfo != null)
- {
- dt = applyInfo.valueDt;
- }
- }
- return dt;
- }
- }
- }
-
-
-
- public class ApplyInfo
- {
- public string? id { get; set; }
- public string? title { get; set; }
- public string? type { get; set; }
- public object? value { get; set; }
- public DateTime? valueDt
- {
- get
- {
- if (id == "checkin-time" && value != null)
- {
- long timeSpan = long.Parse(value.ToString()) / 1000;
- return new DateTime(timeSpan * 10000000 + 621355968000000000L).ToLocalTime();
- }
- return null;
- }
- }
- }
- #endregion
- }
|