dengjunjie
4 天以前 23f7d0e0cf31ea6a7cde81bf23ef07091bd4f3a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Pomelo.AspNetCore.TimedJob;
using WIDESEA_ISquareCabinServices;
using WIDESEA_IWMsInfoServices;
 
namespace WIDESEA_WMSServer
{
    public class OutOrderJob : Job
    {
        private readonly IBusiness _business;
        private readonly IMaterielInfoService _materielInfoService;
        public OutOrderJob(IBusiness business, IMaterielInfoService materielInfoService)
        {
            _business = business;
            _materielInfoService = materielInfoService;
        }
        //每隔1秒执行一次
        [Invoke(Begin = "2025-11-01", Interval = 1000 * 5, IsEnabled = true, SkipWhileExecuting = true)]
        public void Run()
        {
            //获取上游出库单数据
            _materielInfoService.ProductSynchronous();
            _business.EdiIn();
            _business.EdiOut();
            Console.WriteLine($"WCS任务执行结束:{DateTime.Now}");
        }
    }
}