using Dlhis.Entity.Basic.Enums; using Kurisu.AspNetCore.Utils.Extensions; using Newtonsoft.Json; namespace Dlhis.Basic.WorkGrids.Response; public class WorkGridScheduleAttendancePageResponse { public long Id { get; set; } /// /// 设备号 /// public string DeviceUniqueNo { get; set; } /// /// 设备部署点 /// public string DeployPlace { get; set; } /// /// 用户学工号 /// public string UserCode { get; set; } /// /// 用户名称 /// public string UserName { get; set; } /// /// 上传时间 /// public DateTime RaiseDateTime { get; set; } /// /// 记录创建时间 /// public DateTime CreateTime { get; set; } /// /// 序列号 /// public string SerialNo { get; set; } [JsonIgnore] public string OriginUserUniqueNo { get; set; } /// /// 是否同步sap /// public bool Sync { get; set; } /// /// 是否需要上传 /// public bool NeedUpload { get; set; } /// /// 是否有效 /// public bool Status { get; set; } /// /// 是否是异常记录 /// public bool IsError { get { if (WorkGridInfo.IsEmpty()) { return false; } var obj = WorkGridInfo.ToObject(); return obj.IsError; } } [JsonIgnore] public string WorkGridInfo { get; set; } /// /// 状态描述 /// public string ResultDescription { get { if (IsError) { return Sync ? "已上传" : "/"; } if (NeedUpload) { return Sync ? "已上传" : "待上传"; } return "/"; } } } public class WorkGridInfo { public bool IsError { get; set; } public object WorkGrid { get; set; } public WorkGridTimePeriodEnumType? PeriodType { get; set; } public object TimeSetting { get; set; } }