fix 字段补充

This commit is contained in:
2025-04-03 14:34:50 +08:00
parent 24f6f1f535
commit fbbadec338
2 changed files with 32 additions and 20 deletions

View File

@@ -62,6 +62,36 @@ public class WorkGridScheduleAttendancePageResponse
/// </summary>
public bool Status { get; set; }
[JsonIgnore]
public string WorkGridInfo { get; set; }
[JsonIgnore]
public WorkGridInfo WorkGridInfoObj
{
get
{
if (WorkGridInfo.IsPresent())
{
return WorkGridInfo.ToObject<WorkGridInfo>();
}
return null;
}
}
public string WorkGridName
{
get
{
if (WorkGridInfoObj != null)
{
return WorkGridInfoObj?.WorkGrid?.WorkGridName;
}
return string.Empty;
}
}
/// <summary>
/// 是否是异常记录
/// </summary>
@@ -69,20 +99,15 @@ public class WorkGridScheduleAttendancePageResponse
{
get
{
if (WorkGridInfo.IsEmpty())
if (NeedUpload || WorkGridInfo.IsEmpty())
{
return false;
}
var obj = WorkGridInfo.ToObject<WorkGridInfo>();
return obj.IsError;
return WorkGridInfoObj.IsError;
}
}
[JsonIgnore]
public string WorkGridInfo { get; set; }
/// <summary>
/// 状态描述
/// </summary>

View File

@@ -201,19 +201,6 @@ public class DeviceUploadLogUserResponse
}
}
public string WorkGridName
{
get
{
if (WorkGridInfoObj != null)
{
return WorkGridInfoObj?.WorkGrid?.WorkGridName;
}
return string.Empty;
}
}
[JsonIgnore]
public string WorkGridInfo { get; set; }