114 lines
2.3 KiB
C#
114 lines
2.3 KiB
C#
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; }
|
|
|
|
/// <summary>
|
|
/// 设备号
|
|
/// </summary>
|
|
public string DeviceUniqueNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备部署点
|
|
/// </summary>
|
|
public string DeployPlace { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户学工号
|
|
/// </summary>
|
|
public string UserCode { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 用户名称
|
|
/// </summary>
|
|
public string UserName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 上传时间
|
|
/// </summary>
|
|
public DateTime RaiseDateTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// 记录创建时间
|
|
/// </summary>
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// 序列号
|
|
/// </summary>
|
|
public string SerialNo { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public string OriginUserUniqueNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否同步sap
|
|
/// </summary>
|
|
public bool Sync { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否需要上传
|
|
/// </summary>
|
|
public bool NeedUpload { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否有效
|
|
/// </summary>
|
|
public bool Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否是异常记录
|
|
/// </summary>
|
|
public bool IsError
|
|
{
|
|
get
|
|
{
|
|
if (WorkGridInfo.IsEmpty())
|
|
{
|
|
return false;
|
|
}
|
|
|
|
var obj = WorkGridInfo.ToObject<WorkGridInfo>();
|
|
return obj.IsError;
|
|
}
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string WorkGridInfo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 状态描述
|
|
/// </summary>
|
|
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; }
|
|
} |