| | |
| | | |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 99 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID) && conveyorLineInfoRead.WR_Task <= 0) //åºç«å°åé
ç®æ ç¹ |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 99 && conveyorLineInfoRead.WR_Task <= 0) //åºç«å°åé
ç®æ ç¹ |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.CurrentAddress == x.StartPosi); |
| | | Dt_Router? router = routers.FirstOrDefault(); |
| | | if (routers == null || routers.Count == 0 || router == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºè·¯ç±ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | if (routers.Count > 1) |
| | | { |
| | | WriteError(item.StationName, $"è·¯ç±ä¿¡æ¯é
ç½®é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | //åéç®æ ç¹ |
| | | device.SetValue(WR_CLineYLDB.WR_Task, task.TaskNum, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_Width, task.TaskLength, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_TMID, task.PalletCode, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_ToHode, router.NextPosi, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_ToHode, task.NextAddress, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); |
| | | _taskService.UpdateTask(task,TaskStatusEnum.Line_Executing,nextAddress: router.NextPosi); |
| | | _taskService.UpdateTask(task,TaskStatusEnum.Line_Executing); |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_Task > 0 && conveyorLineInfoRead.WR_Request == 98) //䏿¥¼èååºåºå£å®æ |