| | |
| | | private readonly IRouterService _routerService; |
| | | private readonly IRepository<Dt_Task> _taskRepository; |
| | | private readonly IRepository<Dt_StationManger> _stationMangerRepository; |
| | | private readonly ITaskHtyService _taskHtyService; |
| | | |
| | | |
| | | public CommonConveyorLineJob(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_StationManger> stationMangerRepository, IRepository<Dt_Task> taskRepository, IRouterRepository routerRepository, IRouterService routerService) |
| | | |
| | | public CommonConveyorLineJob(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_StationManger> stationMangerRepository, IRepository<Dt_Task> taskRepository, IRouterRepository routerRepository, IRouterService routerService, ITaskHtyService taskHtyService) |
| | | { |
| | | _cacheService = cacheService; |
| | | _taskService = taskService; |
| | |
| | | _routerService = routerService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _taskRepository = taskRepository; |
| | | _taskHtyService = taskHtyService; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | |
| | | |
| | | //å é¤ä»»å¡ |
| | | _taskRepository.DeleteData(dt_Ta); |
| | | |
| | | _taskHtyService.AddTaskHistory(dt_Ta, "èªå¨å®æ"); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | bool res = _taskRepository.DeleteData(dt_Ta); |
| | | if (res) |
| | | { |
| | | TaskService.AddTaskHistory(dt_Ta, "èªå¨å®æ"); |
| | | _taskHtyService.AddTaskHistory(dt_Ta, "èªå¨å®æ"); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (conveyorLineInfoRead.TaskNo == 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)&& dt_Task != null)//éè´å
¥åº |
| | | { |
| | | Dt_Task dt_Ta = _taskService.GetTaskIninfo(conveyorLineInfoRead.Barcode); //éè¿æ¡ç 廿¥è¯¢ä»»å¡ |
| | | //if (dt_Ta.SourceAddress == "2021" || dt_Ta.SourceAddress == "2020") |
| | | //{ |
| | | // bool IsOccupied2008 = device.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2008"); |
| | | // bool IsOccupied2009 = device.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2009"); |
| | | // bool IsOccupied2015 = device.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2015"); |
| | | // bool IsOccupied2016 = device.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2016"); |
| | | // //夿æ¯å¦æç« |
| | | // if (IsOccupied2008 || IsOccupied2009 || IsOccupied2015 || IsOccupied2016) |
| | | // { |
| | | // return null; |
| | | // } |
| | | //} |
| | | if (dt_Ta != null) |
| | | { |
| | | bool endpos = device.SetValue(W_ConveyorLineDB.EndPos, dt_Ta.SourceAddress, item.StationCode); |