diff --git a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs
index d432eac4..05efb01d 100644
--- a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs
+++ b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs
@@ -1,4 +1,6 @@
-using Newtonsoft.Json;
+using Dlhis.ScheduledTask.DeviceUploadLog.Services.Implements;
+using Kurisu.AspNetCore.Utils.Extensions;
+using Newtonsoft.Json;
namespace Dlhis.ScheduledTask.DeviceUploadLog.Response;
@@ -75,8 +77,32 @@ public class DeviceUploadLogResponse
/// 是否有效
///
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 class WorkGridInfo2
+{
+ public bool IsError { get; set; }
+}
public class DeviceUploadLogUserResponse
@@ -142,4 +168,24 @@ public class DeviceUploadLogUserResponse
/// 是否有效
///
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; }
}
\ No newline at end of file
diff --git a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs
index 67d6eae1..73e9a614 100644
--- a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs
+++ b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs
@@ -176,7 +176,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
{
var startTime = nightTimePeriod.Start.AddMinutes(-nightTimePeriod.Before);
var endTime = nightTimePeriod.End.AddMinutes(nightTimePeriod.After);
-
+
if (currentNightWorkGridSchedules.Any(x => x.Date == currentDateOnly))
{
var currentWorkGrid = workGrids.First(x => x.Code == currentNightWorkGridSchedules.First(p => p.Date == currentDateOnly).WorkGridCode);
@@ -186,7 +186,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
WorkGridName = currentWorkGrid.Name,
LeaderUserCode = currentWorkGrid.LeaderUserCode
};
-
+
var start = currentDateOnly.ToDateTime(startTime);
var end = currentDateOnly.ToDateTime(new TimeOnly(23, 59, 59, 999));
@@ -194,8 +194,6 @@ public class DeviceUploadLogService : IDeviceUploadLogService
{
workGridInfo.PeriodType = WorkGridTimePeriodEnumType.Night;
}
-
-
}
if (currentNightWorkGridSchedules.Any(x => x.Date == currentDateOnly.AddDays(-1)))
@@ -207,7 +205,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
WorkGridName = currentWorkGrid.Name,
LeaderUserCode = currentWorkGrid.LeaderUserCode
};
-
+
var start = currentDateOnly.AddDays(-1).ToDateTime(startTime);
var end = currentDateOnly.ToDateTime(endTime);
@@ -408,6 +406,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
NeedUpload = x.NeedUpload,
Sync = x.Sync,
Status = x.Status,
+ WorkGridInfo = x.WorkGridInfo
}).ToPageListAsync(request.PageIndex, request.PageSize);
return new Pagination
@@ -473,6 +472,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
NeedUpload = x.NeedUpload,
Sync = x.Sync,
Status = x.Status,
+ WorkGridInfo = x.WorkGridInfo
}).ToPageListAsync(request.PageIndex, request.PageSize);
return new Pagination