using Pomelo.AspNetCore.TimedJob;
|
using WIDESEA_ISquareCabinServices;
|
|
namespace WIDESEA_WMSServer
|
{
|
public class InOrderJob : Job
|
{
|
private readonly IBusiness _business;
|
public InOrderJob(IBusiness business)
|
{
|
_business = business;
|
}
|
//每隔1秒执行一次
|
[Invoke(Begin = "2025-09-01", Interval = 1000 * 60 * 10, IsEnabled = true, SkipWhileExecuting = true)]
|
public void Run()
|
{
|
_business.GetUpstreamOrder();
|
_business.GetUpstreamOutOrder();
|
//_business.EdiIn();
|
//_business.CompleteAllOrders();
|
_business.CompleteAllOrders();
|
_business.CompleteAllOutOrders();
|
Console.WriteLine($"ERP任务执行结束:{DateTime.Now}");
|
}
|
}
|
}
|