| | |
| | | using Pomelo.AspNetCore.TimedJob; |
| | | using WIDESEA_ISquareCabinServices; |
| | | using WIDESEA_ISystemService; |
| | | using WIDESEA_IWMsInfoServices; |
| | | using static WIDESEA_DTO.SquareCabin.TowcsDto; |
| | | |
| | | |
| | | namespace WIDESEA_WMSServer |
| | | { |
| | | public class GoodsJob : Job |
| | | { |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | | public GoodsJob(IMaterielInfoService materielInfoService) |
| | | private readonly ISys_LogService _logger; |
| | | public GoodsJob(IMaterielInfoService materielInfoService, ISys_LogService logger) |
| | | { |
| | | _materielInfoService = materielInfoService; |
| | | _logger=logger; |
| | | } |
| | | //æ¯é1ç§æ§è¡ä¸æ¬¡ |
| | | [Invoke(Begin = "2025-09-01", Interval = 1000 * 5, IsEnabled = false, SkipWhileExecuting = true)] |
| | | [Invoke(Begin = "2025-09-01", Interval = 1000 * 60 * 60 * 24 * 7, IsEnabled = true, SkipWhileExecuting = true)] |
| | | public void Run() |
| | | { |
| | | Console.WriteLine($"ç©æä¿¡æ¯ä»»å¡æ§è¡ç»æï¼{DateTime.Now}"); |
| | | _logger.ScheduledDeletion(); |
| | | Console.WriteLine($"å 餿¥å¿æ§è¡ç»æï¼{DateTime.Now}"); |
| | | //Console.WriteLine($"ç©æä¿¡æ¯ä»»å¡æ§è¡ç»æï¼{DateTime.Now}"); |
| | | } |
| | | } |
| | | } |