| | |
| | | { |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneStationCode == task.NextAddress && x.StackerCraneCode==deviceCode); |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode==deviceCode); |
| | | if (stationManger == null) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | |
| | | /// <returns></returns> |
| | | private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | //夿æ¯å¦ææ£æ§è¡çä»»å¡ï¼å¦ææåä¸ä¸å |
| | | Dt_Task? taskOld = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.Roadway == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt()); |
| | | if (taskOld!=null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | Dt_Task task; |
| | | if (commonStackerCrane.LastTaskType == null) |
| | | { |
| | |
| | | short command = client.GetValue<R_ConveyorLineCPDB, short>(R_ConveyorLineCPDB.Command, stationManger.StationCode); |
| | | if (command==3)//åºåºç«å°æªè¢«å ç¨ |
| | | { |
| | | task.NextAddress = stationManger.StackerCraneStationCode; |
| | | _taskRepository.UpdateData(task); |
| | | //task.NextAddress = stationManger.StackerCraneStationCode; |
| | | //_taskRepository.UpdateData(task); |
| | | return task; |
| | | } |
| | | else |
| | |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)//夿æ¯å¦æ¯åºåºä»»å¡ |
| | | { |
| | | string[] targetCodes = task.NextAddress.Split("-"); |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode == task.DeviceCode); |
| | | string[] targetCodes = stationManger.StackerCraneStationCode.Split("-"); |
| | | if (targetCodes.Length == 3) |
| | | { |
| | | stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]); |