diff --git a/Src/Dlhis.Entity/Device/Entities/DeviceTask.cs b/Src/Dlhis.Entity/Device/Entities/DeviceTaskEntity.cs
similarity index 96%
rename from Src/Dlhis.Entity/Device/Entities/DeviceTask.cs
rename to Src/Dlhis.Entity/Device/Entities/DeviceTaskEntity.cs
index f1348681..22d404b6 100644
--- a/Src/Dlhis.Entity/Device/Entities/DeviceTask.cs
+++ b/Src/Dlhis.Entity/Device/Entities/DeviceTaskEntity.cs
@@ -44,6 +44,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
///
/// 处理结果
///
+ [SugarColumn(ColumnDataType = "longtext")]
public string ResultMessage { get; set; }
public string TenantId { get; set; }
diff --git a/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateGetUploadRecordJob.cs b/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateGetUploadRecordJob.cs
index c66584a7..d11caa4c 100644
--- a/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateGetUploadRecordJob.cs
+++ b/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateGetUploadRecordJob.cs
@@ -10,17 +10,20 @@ namespace Dlhis.ScheduledTask.TaskAssignment.Job;
public class CreateGetUploadRecordJob
{
private readonly IDbContext _dbContext;
- private readonly ILogger _logger;
+ private readonly ILogger _logger;
+ private readonly ISqlSugarOptionsService _sqlSugarOptionsService;
- public CreateGetUploadRecordJob(IDbContext dbContext, ILogger logger)
+ public CreateGetUploadRecordJob(IDbContext dbContext, ILogger logger, ISqlSugarOptionsService sqlSugarOptionsService)
{
_logger = logger;
+ _sqlSugarOptionsService = sqlSugarOptionsService;
_dbContext = dbContext;
}
public async Task RunAsync()
{
_dbContext.Client.QueryFilter.ClearAndBackup();
+ _sqlSugarOptionsService.IgnoreTenant = true;
try
{
var devices = await _dbContext.Queryable()
@@ -60,6 +63,7 @@ public class CreateGetUploadRecordJob
}
finally
{
+ _sqlSugarOptionsService.IgnoreTenant = false;
_dbContext.Client.QueryFilter.Restore();
}
}
diff --git a/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateSyncServerDateTimeJob.cs b/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateSyncServerDateTimeJob.cs
index 789d6722..a8efb1c1 100644
--- a/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateSyncServerDateTimeJob.cs
+++ b/Src/Dlhis.ScheduledTask/TaskAssignment/Job/CreateSyncServerDateTimeJob.cs
@@ -10,17 +10,20 @@ namespace Dlhis.ScheduledTask.TaskAssignment.Job
{
private readonly IDbContext _dbContext;
private readonly ILogger _logger;
+ private readonly ISqlSugarOptionsService _sqlSugarOptionsService;
- public CreateSyncServerDateTimeJob(IDbContext dbContext, ILogger logger)
+ public CreateSyncServerDateTimeJob(IDbContext dbContext, ILogger logger, ISqlSugarOptionsService sqlSugarOptionsService)
{
_dbContext = dbContext;
_logger = logger;
+ _sqlSugarOptionsService = sqlSugarOptionsService;
}
public async Task RunAsync()
{
_dbContext.Client.QueryFilter.ClearAndBackup();
+ _sqlSugarOptionsService.IgnoreTenant = true;
try
{
var deviceUniqueNos = await _dbContext.Queryable()
@@ -60,6 +63,7 @@ namespace Dlhis.ScheduledTask.TaskAssignment.Job
}
finally
{
+ _sqlSugarOptionsService.IgnoreTenant = false;
_dbContext.Client.QueryFilter.Restore();
}
}
diff --git a/Src/Dlhis.ScheduledTask/appsettings.json b/Src/Dlhis.ScheduledTask/appsettings.json
index 6ab2844d..2fe0bba9 100644
--- a/Src/Dlhis.ScheduledTask/appsettings.json
+++ b/Src/Dlhis.ScheduledTask/appsettings.json
@@ -13,16 +13,13 @@
"AppName": "yiliantong"
},
"SqlSugarOptions": {
- "DefaultConnectionString": "server=10.27.21.22;port=3306;userid=root;password=dlhis123;database=yikatong;charset=utf8mb4;",
+ "DefaultConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=yikatong;charset=utf8mb4;",
"SlaveConnectionString": [],
- "FaceConnectionString": "server=10.27.21.20;port=3306;userid=root;password=dlhis123;database=face;charset=utf8mb4;",
+ "FaceConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=face;charset=utf8mb4;",
"Timeout": 30,
"SlowSqlTime": 1,
"EnableSqlLog": false
},
- "ConnectionStrings": {
- "HangfireConnection": "server=10.27.21.22;port=3306;userid=root;password=dlhis123;database=hangfire;default command timeout=100;Connection Timeout=30;Charset=utf8mb4;Allow User Variables=true;IgnoreCommandTransaction=true"
- },
"FaceUrlOptions": {
"Url": "https://yikatong.isawesome.cn/api/basic/gainfos/face?token=",
"Limit": 7200
@@ -86,7 +83,7 @@
{
"Name": "MySQL",
"Args": {
- "connectionString": "server=10.27.21.22;port=3306;userid=root;password=dlhis123;database=log;charset=utf8mb4;",
+ "connectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=log;charset=utf8mb4;",
"tableName": "Logs",
"autoCreateSqlTable": true
}