diff --git a/API/Wood.Service/Controllers/CheryDataMaintenanceService.cs b/API/Wood.Service/Controllers/CheryDataMaintenanceService.cs new file mode 100644 index 0000000..88f15a0 --- /dev/null +++ b/API/Wood.Service/Controllers/CheryDataMaintenanceService.cs @@ -0,0 +1,86 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskManager.Entity; +using TaskManager.EntityFramework; +using Wood.Entity; + +namespace Wood.Service.Controllers +{ + public class CheryDataMaintenanceService:IScoped,IDoExecute + { + private readonly IServiceProvider _serviceProvider; + private readonly IConfiguration _configuration; + public CheryDataMaintenanceService(IServiceProvider serviceProvider, IConfiguration configuration) + { + _serviceProvider = serviceProvider; + _configuration = configuration; + + } + + public async Task ExecuteAsync(string url, string path, string takName, string client, int pageSize) + { + + using var scope = _serviceProvider.CreateScope(); + var db = scope.ServiceProvider.GetRequiredService(); + var tasklist=db.TaskConifgure.Where(p=>p.Client=="Chery").Select(x => x.TaskName); + + + //DateTime.Now.AddDays(-1).ToString("yyyyMMdd") + + foreach (var task in tasklist) + { + + + + + } + + + + + + + + + + } + public async Task SyncDataAsync(string version,string taskName) + { + + using var scope = _serviceProvider.CreateScope(); + var db = scope.ServiceProvider.GetRequiredService(); + + var list = db.TaskLogs.Where(x => x.TaskName == taskName && x.Version == version + + && !string.IsNullOrEmpty(x.Path) && x.Type == "应答"); + + if (list.Any()) + { + + + + + + + + + + + } + + + + + + } + + + + + } +} diff --git a/API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs b/API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs index bb5ad80..f8c0f6f 100644 --- a/API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs +++ b/API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs @@ -208,7 +208,7 @@ namespace TaskManager.Controllers itm.WriteState = true; } var result = await PostPageAsync(pagedRequest,sub.TaskId, DateTime.Now.ToString("yyyyMMdd")); - if (result.code == "200") + if(result.code == "200") { _jobDbContext.BulkUpdate(records); sub.SyncedPageCount = i; diff --git a/API/Wood.Service/Controllers/LogService.cs b/API/Wood.Service/Controllers/LogConsumerService.cs similarity index 100% rename from API/Wood.Service/Controllers/LogService.cs rename to API/Wood.Service/Controllers/LogConsumerService.cs diff --git a/API/Wood.Service/Controllers/LogController.cs b/API/Wood.Service/Controllers/LogController.cs index 41ae0a3..26e4cc3 100644 --- a/API/Wood.Service/Controllers/LogController.cs +++ b/API/Wood.Service/Controllers/LogController.cs @@ -17,18 +17,14 @@ using TaskManager.Entity; using TaskManager.EntityFramework; using TaskManager.EntityFramework.Repository; using Wood.Service.Controllers; +using System; +using System.Threading; +using System.Threading.Channels; +using System.Threading.Tasks; namespace TaskManager.Controllers { - using System; - using System.Threading; - using System.Threading.Channels; - using System.Threading.Tasks; - - - - public class LogController { diff --git a/API/Wood.Service/Controllers/RecurringJobBaseController.cs b/API/Wood.Service/Controllers/RecurringJobBaseController.cs index de469b9..03e859f 100644 --- a/API/Wood.Service/Controllers/RecurringJobBaseController.cs +++ b/API/Wood.Service/Controllers/RecurringJobBaseController.cs @@ -98,7 +98,7 @@ namespace TaskManager.Controllers - ////string jsonContent = System.IO.File.ReadAllText("采购订单.json"); + //string jsonContent = System.IO.File.ReadAllText("采购订单.json"); //// string jsonContent = System.IO.File.ReadAllText("过焊装未过总装.json"); //// string jsonContent = System.IO.File.ReadAllText("计划协议.json"); ////string jsonContent = System.IO.File.ReadAllText("奇瑞RDC共享库存.json"); @@ -106,7 +106,7 @@ namespace TaskManager.Controllers //string jsonContent = System.IO.File.ReadAllText("日物料需求计划.json"); ////string jsonContent = System.IO.File.ReadAllText("整车月度生产计划1.json"); - ///string jsonContent = System.IO.File.ReadAllText("M+6月物料需求计划1.json"); + //string jsonContent = System.IO.File.ReadAllText("M+6月物料需求计划1.json"); //string jsonContent = System.IO.File.ReadAllText("过涂装未过总装.json"); //return jsonContent;