From 9c5d1b558fa7c9a92b243919438de044f4386019 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Mon, 19 Aug 2024 14:17:15 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs | 8 ++++---- .../Common/Response/SapBusinessTripInfoResponse.cs | 6 +++--- .../Response/DeviceTaskAssignmentResponse.cs | 5 +++++ .../Services/Implements/DeviceTaskAssignmentService.cs | 1 + Src/Dlhis.Sys/Menu/Services/Implements/MenuService.cs | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs b/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs index d99762e9..a3787d99 100644 --- a/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs +++ b/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs @@ -34,14 +34,14 @@ public class BusinessTripEntity : SugarBaseEntity /// /// 开始时间 /// - [SugarColumn(IsNullable = false, ColumnDataType = "time")] - public TimeOnly BeginDateTime { get; set; } + [SugarColumn(IsNullable = true, ColumnDataType = "time")] + public TimeOnly? BeginDateTime { get; set; } /// /// 结束时间 /// - [SugarColumn(IsNullable = false, ColumnDataType = "time")] - public TimeOnly EndDateTime { get; set; } + [SugarColumn(IsNullable = true, ColumnDataType = "time")] + public TimeOnly? EndDateTime { get; set; } /// /// 出差类型 diff --git a/Src/Dlhis.ScheduledTask/Common/Response/SapBusinessTripInfoResponse.cs b/Src/Dlhis.ScheduledTask/Common/Response/SapBusinessTripInfoResponse.cs index d8a10d25..d705dc69 100644 --- a/Src/Dlhis.ScheduledTask/Common/Response/SapBusinessTripInfoResponse.cs +++ b/Src/Dlhis.ScheduledTask/Common/Response/SapBusinessTripInfoResponse.cs @@ -41,13 +41,13 @@ public class SapBusinessTripInfoItem /// 开始时间 /// [JsonProperty("OV_BEGUZ")] - public TimeOnly BeginDateTime { get; set; } + public TimeOnly? BeginDateTime { get; set; } /// /// 结束时间 /// [JsonProperty("OV_ENDUZ")] - public TimeOnly EndDateTime { get; set; } + public TimeOnly? EndDateTime { get; set; } /// /// 出差类型 @@ -72,7 +72,7 @@ public class SapBusinessTripInfoItem /// [JsonProperty("OV_ABWTG")] public double Day { get; set; } - + /// /// 出差目的地 /// diff --git a/Src/Dlhis.ScheduledTask/TaskAssignment/Response/DeviceTaskAssignmentResponse.cs b/Src/Dlhis.ScheduledTask/TaskAssignment/Response/DeviceTaskAssignmentResponse.cs index 91416427..45309110 100644 --- a/Src/Dlhis.ScheduledTask/TaskAssignment/Response/DeviceTaskAssignmentResponse.cs +++ b/Src/Dlhis.ScheduledTask/TaskAssignment/Response/DeviceTaskAssignmentResponse.cs @@ -95,4 +95,9 @@ public class DeviceTaskAssignmentResponse return LastHeartbeatTime.AddSeconds(HeartbeatInterval) < DateTime.Now; } } + + /// + /// 创建人 + /// + public int CreateBy { get; set; } } \ No newline at end of file diff --git a/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs b/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs index d410e4a1..028e3bbb 100644 --- a/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs +++ b/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs @@ -70,6 +70,7 @@ public class DeviceTaskAssignmentService : IDeviceTaskAssignmentService LastHeartbeatTime = deviceRegistry.LastHeartbeatTime, HeartbeatInterval = device.HeartbeatInterval, DeployPlace = device.DeployPlace, + CreateBy = deviceTask.CreatedBy }) .ToPageListAsync(request); diff --git a/Src/Dlhis.Sys/Menu/Services/Implements/MenuService.cs b/Src/Dlhis.Sys/Menu/Services/Implements/MenuService.cs index 011e3844..4e6f7036 100644 --- a/Src/Dlhis.Sys/Menu/Services/Implements/MenuService.cs +++ b/Src/Dlhis.Sys/Menu/Services/Implements/MenuService.cs @@ -143,7 +143,7 @@ public class MenuService : IMenuService if (!allCodes.Any()) { //todo 管理员 - if (_currentUser.GetName() == "admin") + if (_currentUser.GetIntSubjectId() == 1) { return await GetListAsync(PlatformEnumType.PCAdmin); }