This commit is contained in:
tongfei
2024-01-16 09:30:07 +08:00
parent cbefd35401
commit 2e4c2fd391

View File

@@ -37,6 +37,11 @@ namespace WMS.Web.Domain.TimedJob
//30分钟执行一次 //30分钟执行一次
[Invoke(Begin = "2024-01-15 17:43", Interval = 1000 * 60 * 30, SkipWhileExecuting = true)] [Invoke(Begin = "2024-01-15 17:43", Interval = 1000 * 60 * 30, SkipWhileExecuting = true)]
public void Run() public void Run()
{
this.SyscErpBaseData();
}
public void SyscErpBaseData()
{ {
string tip = ""; string tip = "";
_logger.LogInformation($"----------异步:定时任务拉取---------"); _logger.LogInformation($"----------异步:定时任务拉取---------");
@@ -45,7 +50,7 @@ namespace WMS.Web.Domain.TimedJob
if (materials == null || materials.Count == 0) if (materials == null || materials.Count == 0)
ErpBaseDataSync.SyncMaterial(sercice); ErpBaseDataSync.SyncMaterial(sercice);
else else
tip=tip + "物料缓存未失效;"; tip = tip + "物料缓存未失效;";
var orgs = _memoryCache.Get<List<ErpOrgDto>>(_erpOptions.cache_org_key); var orgs = _memoryCache.Get<List<ErpOrgDto>>(_erpOptions.cache_org_key);
if (orgs == null || orgs.Count == 0) if (orgs == null || orgs.Count == 0)