Browse Source

更新版本

master
赵新宇 2 weeks ago
parent
commit
1aac16f705
  1. 2
      API/TaskManager.Entity/Entity.cs
  2. 5
      API/Wood.Admin.WebApi/Startup.cs
  3. 13
      API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs

2
API/TaskManager.Entity/Entity.cs

@ -541,10 +541,12 @@ namespace TaskManager.Entity
[ExporterHeader(DisplayName = "版本号")] [ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; } =0; public int Version { get; set; } =0;
[MaxLength(50)]
[JsonProperty("omterior")] [JsonProperty("omterior")]
[ExporterHeader(DisplayName = "内外饰")] // 推测拼写错误并自定义显示名 [ExporterHeader(DisplayName = "内外饰")] // 推测拼写错误并自定义显示名
public string? Omterior { get; set; } = String.Empty; public string? Omterior { get; set; } = String.Empty;
[MaxLength(50)]
[JsonProperty("salseDepartment")] [JsonProperty("salseDepartment")]
[ExporterHeader(DisplayName = "销售部门")] // 推测拼写错误并自定义显示名 [ExporterHeader(DisplayName = "销售部门")] // 推测拼写错误并自定义显示名
public string? SalseDepartment { get; set; } = String.Empty; public string? SalseDepartment { get; set; } = String.Empty;

5
API/Wood.Admin.WebApi/Startup.cs

@ -75,10 +75,6 @@ namespace Wood.Admin.WebApi
GlobalContext.Services = services; GlobalContext.Services = services;
GlobalContext.Configuration = Configuration; GlobalContext.Configuration = Configuration;
//初始化 eventbus //初始化 eventbus
services.AddEventBus(); services.AddEventBus();
@ -94,6 +90,7 @@ namespace Wood.Admin.WebApi
services.AddDbContext<JobDbContext>(options => services.AddDbContext<JobDbContext>(options =>
options.UseSqlServer(GlobalContext.SystemConfig.CustomerDb)); options.UseSqlServer(GlobalContext.SystemConfig.CustomerDb));
// 配置 Hangfire 使用 SQL Server 存储 // 配置 Hangfire 使用 SQL Server 存储
services.AddHangfire( services.AddHangfire(

13
API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs

@ -87,17 +87,11 @@ namespace TaskManager.Controllers
new JsonSerializerOptions new JsonSerializerOptions
{ {
PropertyNamingPolicy = JsonNamingPolicy.CamelCase, PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters = { new DecimalTrimConverter() }, Converters = { new DecimalTrimConverter() },
WriteIndented = false // 可选,用于格式化输出
WriteIndented = true // 可选,用于格式化输出
} }
); );
inputjson = RemoveWhitespace(inputjson); //inputjson = RemoveWhitespace(inputjson);
var content = await Post(Url, Path, inputjson,taskId,version); var content = await Post(Url, Path, inputjson,taskId,version);
if (!string.IsNullOrEmpty(content)) if (!string.IsNullOrEmpty(content))
{ {
@ -212,8 +206,7 @@ namespace TaskManager.Controllers
{ {
_jobDbContext.BulkUpdate(records); _jobDbContext.BulkUpdate(records);
sub.SyncedPageCount = i; sub.SyncedPageCount = i;
if (i == total)
if (result.data.totalGet == total)
{ {
sub.WriteState = true; sub.WriteState = true;
_jobDbContext.Set<TaskSub>().Update(sub); _jobDbContext.Set<TaskSub>().Update(sub);

Loading…
Cancel
Save