fix 通行记录数据处理isError
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dlhis.Basic.WorkGrids.Response;
|
||||
@@ -42,7 +44,6 @@ public class WorkGridScheduleAttendancePageResponse
|
||||
/// </summary>
|
||||
public string SerialNo { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public string OriginUserUniqueNo { get; set; }
|
||||
|
||||
@@ -59,5 +60,33 @@ public class WorkGridScheduleAttendancePageResponse
|
||||
/// <summary>
|
||||
/// 是否有效
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
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; }
|
||||
}
|
||||
|
||||
public class WorkGridInfo
|
||||
{
|
||||
public bool IsError { get; set; }
|
||||
public object WorkGrid { get; set; }
|
||||
public WorkGridTimePeriodEnumType? PeriodType { get; set; }
|
||||
public object TimeSetting { get; set; }
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Kurisu.AspNetCore.Utils.Converters;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dlhis.Basic.WorkGrids.Response;
|
||||
|
||||
@@ -32,14 +30,12 @@ public class WorkGridTimePeriodPageResponse
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||
public DateTime Start { get; set; }
|
||||
public TimeOnly Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||
public DateTime End { get; set; }
|
||||
public TimeOnly End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置描述
|
||||
|
||||
Reference in New Issue
Block a user