增加配置

This commit is contained in:
18942506660
2024-10-30 09:56:36 +08:00
parent 5fb483f455
commit c06db35af4
5 changed files with 9 additions and 1 deletions

View File

@@ -101,6 +101,7 @@
"JobStartExpreSend": "0 0 12,16,20 * * ?", "JobStartExpreSend": "0 0 12,16,20 * * ?",
"JobStartExpreMaterial": "0 30 23 * * ?", "JobStartExpreMaterial": "0 30 23 * * ?",
"JobStartErpDelete": "0 5 * * * ?", "JobStartErpDelete": "0 5 * * * ?",
"JobStartProductInventory": "0 0/30 * * * ?",
//a.是否启用集群:键和值 //a.是否启用集群:键和值
"JobStoreClusteredKey": "quartz.jobStore.clustered", "JobStoreClusteredKey": "quartz.jobStore.clustered",
"JobStoreClusteredValue": true, "JobStoreClusteredValue": true,

View File

@@ -103,6 +103,11 @@ namespace WMS.Web.Domain.Options
/// 监测金蝶删单 /// 监测金蝶删单
/// </summary> /// </summary>
public string JobStartErpDelete { get; set; } public string JobStartErpDelete { get; set; }
/// <summary>
/// 成品仓库即时库存
/// </summary>
public string JobStartProductInventory { get; set; }
/// <summary> /// <summary>
/// 是否启用集群:键 /// 是否启用集群:键
/// </summary> /// </summary>

View File

@@ -62,6 +62,7 @@ namespace WMS.Web.Domain.Services
{ {
//获取单点配置 //获取单点配置
var r = await _basicsRepositories.GetUcStockByHeadOfficeAsync("", 1); var r = await _basicsRepositories.GetUcStockByHeadOfficeAsync("", 1);
//r = r.Where(w => w.Code.Equals("CK001")).ToList();
var codes = r.Where(w => var codes = r.Where(w =>
w.ManagementSystem == 1 || w.ManagementSystem == 4).Select(s => (s.Code, s.ErpOrgCode)).ToList(); w.ManagementSystem == 1 || w.ManagementSystem == 4).Select(s => (s.Code, s.ErpOrgCode)).ToList();
if (codes.Count() <= 0) return Result.ReSuccess(); if (codes.Count() <= 0) return Result.ReSuccess();
@@ -69,6 +70,7 @@ namespace WMS.Web.Domain.Services
var str = string.Join(",", codes.Select(s => s.Code).ToList()); var str = string.Join(",", codes.Select(s => s.Code).ToList());
var res = await _erpInventoryService.GetInventory(str); var res = await _erpInventoryService.GetInventory(str);
_logger.LogInformation($"拉去金蝶数据结果:{res.IsSuccess} {res.Message} {res.Data.Count()}");
if (!res.IsSuccess) return res; if (!res.IsSuccess) return res;
//过滤掉不符合要求的组织和仓库组合 //过滤掉不符合要求的组织和仓库组合
List<ErpInventoryDto> listOld = new List<ErpInventoryDto>(); List<ErpInventoryDto> listOld = new List<ErpInventoryDto>();

View File

@@ -310,7 +310,7 @@ namespace WMS.Web.Repositories.DependencyInjection
.WithIdentity("InventoryQuartzJobTrigger") .WithIdentity("InventoryQuartzJobTrigger")
.ForJob(jobKey_Inventory) .ForJob(jobKey_Inventory)
.StartNow() .StartNow()
.WithCronSchedule(options.JobStartExpre) .WithCronSchedule(options.JobStartProductInventory)
//.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(options.JobStartHour[5], options.JobStartMinute[5])) //.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(options.JobStartHour[5], options.JobStartMinute[5]))
.WithDescription("InventoryQuartzJobTriggerDecs")); .WithDescription("InventoryQuartzJobTriggerDecs"));
#endregion #endregion