diff --git a/Src/Dlhis.Basic/Device/Request/DevicePageRequest.cs b/Src/Dlhis.Basic/Device/Request/DevicePageRequest.cs
index 6811b1bf..ff56245f 100644
--- a/Src/Dlhis.Basic/Device/Request/DevicePageRequest.cs
+++ b/Src/Dlhis.Basic/Device/Request/DevicePageRequest.cs
@@ -8,6 +8,4 @@ public class DevicePageRequest : PageDto
/// 平台
///
public string Brand { get; set; }
-
- public string MyProperty { get; set; }
}
diff --git a/Src/Dlhis.Basic/Device/Response/DeviceUnderGroupResponse.cs b/Src/Dlhis.Basic/Device/Response/DeviceUnderGroupResponse.cs
index 8313672e..806a7d9b 100644
--- a/Src/Dlhis.Basic/Device/Response/DeviceUnderGroupResponse.cs
+++ b/Src/Dlhis.Basic/Device/Response/DeviceUnderGroupResponse.cs
@@ -14,6 +14,8 @@ public class DeviceUnderGroupResponse
///
public string Brand { get; set; }
-
+ ///
+ /// 是否启用
+ ///
public bool Enable { get; set; }
}
diff --git a/Src/Dlhis.Entity/Device/Entities/DeviceTask.cs b/Src/Dlhis.Entity/Device/Entities/DeviceTask.cs
index 0ed03883..94df132e 100644
--- a/Src/Dlhis.Entity/Device/Entities/DeviceTask.cs
+++ b/Src/Dlhis.Entity/Device/Entities/DeviceTask.cs
@@ -1,5 +1,7 @@
-using Kurisu.SqlSugar;
+using Dlhis.Entity.Device.Enums;
+using Kurisu.SqlSugar;
using SqlSugar;
+using SqlSugar.DbConvert;
namespace Dlhis.Entity.Device.Entities;
@@ -9,10 +11,16 @@ namespace Dlhis.Entity.Device.Entities;
[SugarTable(TableName = "DeviceTask")]
public class DeviceTaskEntity : SugarBaseEntity
{
+ ///
+ /// 任务类型
+ ///
+ [SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
+ public DeviceTaskEnumType Type { get; set; }
+
///
/// 用户档案号
///
- public string UserId { get; set; }
+ public string UserNo { get; set; }
///
/// 用户学工号
@@ -34,6 +42,11 @@ public class DeviceTaskEntity : SugarBaseEntity
///
public int RetryCount { get; set; }
+ ///
+ /// 任务下发状态
+ ///
+ [SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
+ public DeviceTaskStatusEnumType Status { get; set; }
///
/// 处理结果
diff --git a/Src/Dlhis.Entity/Device/Enums/DeviceTaskEnumType.cs b/Src/Dlhis.Entity/Device/Enums/DeviceTaskEnumType.cs
new file mode 100644
index 00000000..780ff55d
--- /dev/null
+++ b/Src/Dlhis.Entity/Device/Enums/DeviceTaskEnumType.cs
@@ -0,0 +1,30 @@
+using System.ComponentModel;
+
+namespace Dlhis.Entity.Device.Enums;
+
+///
+/// 设备任务类型
+///
+[Description("设备任务类型")]
+public enum DeviceTaskEnumType
+{
+ // 状态:ADD-准备下发;ADDOK-下发成功;DEL-准备删除;DELOK-删除成功;AERR-下发错误;DERR-删除错误;UUU-先删除后下发;
+
+ ///
+ /// 添加
+ ///
+ [Description("添加")]
+ Add = 1,
+
+ ///
+ /// 删除
+ ///
+ [Description("删除")]
+ Delete = 2,
+
+ ///
+ /// 删除后添加
+ ///
+ [Description("删除后添加")]
+ AddAfterDelete = 3,
+}
diff --git a/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs b/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs
new file mode 100644
index 00000000..3c2009af
--- /dev/null
+++ b/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs
@@ -0,0 +1,34 @@
+using System.ComponentModel;
+
+namespace Dlhis.Entity.Device.Enums;
+
+///
+/// 设备任务下发状态
+///
+[Description("设备任务下发状态")]
+public enum DeviceTaskStatusEnumType
+{
+ ///
+ /// 待下发
+ ///
+ [Description("待下发")]
+ Wait = 0,
+
+ ///
+ /// 处理中
+ ///
+ [Description("处理中")]
+ Process = 5,
+
+ ///
+ /// 下发完成
+ ///
+ [Description("下发完成")]
+ Success = 10,
+
+ ///
+ /// 异常
+ ///
+ [Description("异常")]
+ Error = 99,
+}
diff --git a/Src/Dlhis.ScheduledTask/App.config b/Src/Dlhis.ScheduledTask/App.config
deleted file mode 100644
index fb37bfe6..00000000
--- a/Src/Dlhis.ScheduledTask/App.config
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj b/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj
index 7a7f1fcc..1ea33e79 100644
--- a/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj
+++ b/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj
@@ -2,7 +2,7 @@
net6.0
- enable
+ disable
enable
Linux
..\..
diff --git a/Src/Dlhis.ScheduledTask/Job/SyncPersonJob.cs b/Src/Dlhis.ScheduledTask/Job/SyncPersonJob.cs
index e5c0a746..c7e27c9b 100644
--- a/Src/Dlhis.ScheduledTask/Job/SyncPersonJob.cs
+++ b/Src/Dlhis.ScheduledTask/Job/SyncPersonJob.cs
@@ -10,19 +10,18 @@ using System.Text;
using Dlhis.ScheduledTask.Configurations;
using Kurisu.SqlSugar.Services;
using Dlhis.Entity.Basic.Entity;
-using Dlhis.ScheduledTask.Wsproxy.Dlhis.JinkoHr.WsProxy;
using Dlhis.Entity.Basic.Enums;
namespace Dlhis.ScheduledTask.Job
{
- public class SyncPersonJob
+ public class SyncPersonJob
{
private List lastUpdatedPersonList = new List();
private List lastUpdatedOrgList = new List();
private List lastUpdatedPositionList = new List();
private readonly ServiceSettings serviceSettings;
- private readonly ZHRS_WERKS[] werks;
+
private readonly IDbContext _dbContext;
public SyncPersonJob(IDbContext dbContext)
{
@@ -242,58 +241,58 @@ namespace Dlhis.ScheduledTask.Job
var headerValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(credentials));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", headerValue);
- List persons = new List();
- foreach (var item in werks)
- {
- try
- {
- var body = new
- {
- T_WERKS = new
- {
- item = new List