diff --git a/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs b/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs
index d0097416..a288af24 100644
--- a/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs
+++ b/Src/Dlhis.Entity/Visitor/Entity/BusinessTripEntity.cs
@@ -32,12 +32,14 @@ public class BusinessTripEntity : SugarBaseEntity
///
/// 开始时间
///
- public DateTime BeginDateTime { get; set; }
+ [SugarColumn(IsNullable = false, ColumnDataType = "time")]
+ public TimeOnly BeginDateTime { get; set; }
///
/// 结束时间
///
- public DateTime EndDateTime { get; set; }
+ [SugarColumn(IsNullable = false, 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 86af6eea..34c88b79 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 DateTime BeginDateTime { get; set; }
+ public TimeOnly BeginDateTime { get; set; }
///
/// 结束时间
///
[JsonProperty("OV_ENDUZ")]
- public DateTime EndDateTime { get; set; }
+ public TimeOnly EndDateTime { get; set; }
///
/// 出差类型
@@ -82,6 +82,6 @@ public class SapBusinessTripInfoItem
///
/// 出差目的地描述
///
- [JsonProperty("OV_CCMDDM")]
+ [JsonProperty("OV_CCMDDMS")]
public string DestinationDesc { get; set; }
}
\ No newline at end of file
diff --git a/Src/Dlhis.ScheduledTask/Jobs/SyncBusinessTripJob.cs b/Src/Dlhis.ScheduledTask/Jobs/SyncBusinessTripJob.cs
index 24d38d8e..f7a0aaf2 100644
--- a/Src/Dlhis.ScheduledTask/Jobs/SyncBusinessTripJob.cs
+++ b/Src/Dlhis.ScheduledTask/Jobs/SyncBusinessTripJob.cs
@@ -25,15 +25,16 @@ public class SyncBusinessTripJob : BaseJob
var validDepartments = tops.ToList();
tops.ForEach(x => RecursionGetNext(x, departments, validDepartments));
- foreach (var departmentNos in validDepartments.Select(x => x.No).Chunk(100))
+ foreach (var departmentNos in validDepartments.Select(x => x.No).Chunk(20))
{
try
{
var tripResponse = await jipService.GetTravelInfosByDepartmentsAsync(today, today, departmentNos.ToList());
foreach (var tripInfoItem in tripResponse.Items)
{
- if (await DbContext.Queryable().Where(x => x.Code == tripInfoItem.Code && x.BeginDate == tripInfoItem.BeginDate && x.EndDate == tripInfoItem.EndDate)
- .AnyAsync())
+ if (await DbContext.Queryable().Where(x => x.Code == tripInfoItem.Code
+ && x.BeginDate == tripInfoItem.BeginDate
+ && x.EndDate == tripInfoItem.EndDate).AnyAsync())
{
continue;
}
@@ -44,7 +45,7 @@ public class SyncBusinessTripJob : BaseJob
}
catch (Exception e)
{
- Logger.LogError(e, "获取部门出差数据执行失败:{message}", e.Message);
+ Logger.LogError(e, "获取部门出差数据执行失败:{message}", e.Message);
}
}
}