| | |
| | | var axis = _packaxisRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.StationCode == stationPackInfo.StationCode && x.PackType== stationPackInfo.PackType); |
| | | if (axis != null) |
| | | { |
| | | //寮哄埗缁撴墭 |
| | | if (PackState == 2 && Convert.ToInt32(PackNum) < axis.PackNum) |
| | | { |
| | | WebResponseContent responseContent = _packaxisTaskService.BoxingInBound(item.StationCode); |
| | | if (responseContent.Status) |
| | | { |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 2); |
| | | WriteInfo(item.StationName, $"{item.StationName}鍐欏叆宸ヤ綅寮哄埗缁撴墭淇″彿"); |
| | | } |
| | | else |
| | | { |
| | | WriteError(item.StationName, $"{responseContent.Message}"); |
| | | } |
| | | continue; |
| | | } |
| | | //杩涜缁撴墭 |
| | | if (Convert.ToInt32(PackNum) == axis.PackNum) |
| | | { |
| | |
| | | device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, 1); |
| | | //鍐欏叆涓嬪彂鏍囪瘑 |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDReceiveDone.ToString()).DeviceProDataBlock, 3); |
| | | packaxisTask.TaskState = TaskStatusEnum.Finish.ObjToInt(); |
| | | _packaxisTaskRepository.UpdateData(packaxisTask); |
| | | //浠诲姟瀹屾垚 |
| | | WebResponseContent webResponse = _packaxisTaskService.TaskCompleted(packaxisTask: packaxisTask); |
| | | if (!webResponse.Status) |