| | |
| | | using Quartz; |
| | | using SqlSugar; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Comm.Http; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.Helper; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | |
| | | // åºåº |
| | | if (conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !STB && !ACK)//åºåº |
| | | { |
| | | if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))//éè´å
¥åº |
| | | if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, 2011, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, 1111, item.StationCode); |
| | | |
| | | Dt_Task dt_Ta = _taskService.GetOutTaskInfo2(conveyorLineInfoRead.Barcode); |
| | | if (dt_Ta != null) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, dt_Ta.OutboundPlatform, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, dt_Ta.TaskNum, item.StationCode); |
| | | |
| | | //å é¤ä»»å¡ |
| | | _taskRepository.DeleteData(dt_Ta); |
| | | } |
| | | } |
| | | } |
| | | else if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !STB && ACK) |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !STB && !ACK && conveyorLineInfoRead.TaskNo == 0)//åºåº |
| | | else if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !STB && !ACK)//åºåº |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()); |
| | | if (task != null) |
| | | |
| | | Dt_Task dt_Ta = _taskService.GetOutTaskInfo(item.StationCode); |
| | | if (dt_Ta != null) |
| | | { |
| | | //å åæºä»»å¡å®æä¸ä¸å°åæ¹æè¾é线ä¸ä¸å°åï¼è®¾å¤ç¼å·æ¹æè¾é线 |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode); |
| | | Dt_Router dt_Router = _routerRepository.QueryFirst(x => x.StartPosi == dt_Ta.TargetAddress); |
| | | |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, dt_Ta.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, dt_Router.NextPosi, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | //å åæºä»»å¡å®æä¸ä¸å°åæ¹æè¾é线ä¸ä¸å°åï¼è®¾å¤ç¼å·æ¹æè¾é线 |
| | | _taskService.UpdateTaskStatusToNext(dt_Ta.TaskNum); |
| | | |
| | | if (dt_Ta.TargetAddress !="2021" && dt_Ta.TargetAddress != "2020") |
| | | { |
| | | //å é¤ä»»å¡ |
| | | _taskRepository.DeleteData(dt_Ta); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | Dt_Task dt_Ta = _taskService.GetTaskIninfo(conveyorLineInfoRead.Barcode); |
| | | if(dt_Ta != null) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | |
| | | device.SetValue(W_ConveyorLineDB.EndPos, dt_Ta.SourceAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, dt_Ta.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | } |
| | | |
| | | } |
| | | |
| | | |