| | |
| | | R_ConveyorLineYLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineYLInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //䏿¥¼æ¥æç§°éç«å°å
许å
¥åºç³è¯· |
| | | { |
| | | WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID); |
| | | WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID, weight: conveyorLineInfoRead.WR_Weight, thickness: conveyorLineInfoRead.WR_Height, wide: conveyorLineInfoRead.WR_Width); |
| | | if (content.Status) |
| | | { |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); |
| | |
| | | } |
| | | |
| | | } |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && conveyorLineInfoRead.WR_Task <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //䏿¥¼åé
ç«å°å
¥åºåé
ç®æ ç¹ |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && conveyorLineInfoRead.WR_Task <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //䏿¥¼åé
ç«å°å
¥åºåé
ç®æ ç¹(å¹³å°) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == conveyorLineInfoRead.WR_TMID && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.RfidCode == conveyorLineInfoRead.WR_TMID && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task == null) |
| | | { |
| | | WebResponseContent content = _taskService.RequestYLWMSTaskSimple(conveyorLineInfoRead.WR_TMID, item.StationCode); |
| | |
| | | { |
| | | device.SetValue(WR_CLineYLDB.WR_Task, task.TaskNum, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_ToHode, task.NextAddress, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_Width, task.TaskLength, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationCode, $"{conveyorLineInfoRead.Serialize()}"); |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && conveyorLineInfoRead.WR_Task > 0) //䏿¥¼åé
ç«å°å
¥åºåé
ç®æ ç¹ |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && conveyorLineInfoRead.WR_Task > 0) //䏿¥¼åé
ç«å°å
¥åºåé
ç®æ ç¹(åºå
) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.WR_Task && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.AGV_Finish.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | //åéä»»å¡ |
| | |
| | | |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 99 && 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); |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskNum == conveyorLineInfoRead.WR_Task && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | //åéç®æ ç¹ |
| | |
| | | { |
| | | //ä»»å¡åå¤ |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 98, item.StationCode); |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | WriteInfo(item.StationCode, $"ä»»å¡å·:{task.TaskNum}䏿¥¼åºåºè³èåæ¿å®æ"); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, deviceCode: "CL3_YL"); |
| | | WriteInfo(item.StationCode, $"ä»»å¡å·:{task.TaskNum}ï¼RIFD{task.RfidCode}䏿¥¼åºåºè³èåæ¿å®æ"); |
| | | } |
| | | } |
| | | } |