优化
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user