| | |
| | | Dt_Task task = null; |
| | | if (station.stationChildCode == "TC05") |
| | | { |
| | | //var executeTaks = _taskRepository.QueryData(x => (x.Roadway == "SC02" || x.Roadway == "SC04") && x.TaskState <= (int)TaskOutStatusEnum.SC_OutFinish).OrderBy(x => x.CreateDate).FirstOrDefault(); |
| | | |
| | | var leftTask = _taskRepository.QueryData(x => (x.Roadway == "SC02" || x.Roadway == "SC04") && x.TaskState <= (int)TaskOutStatusEnum.SC_OutFinish).OrderBy(x => x.CreateDate).FirstOrDefault(); |
| | | |
| | | if (leftTask != null && leftTask.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) |
| | | { |
| | | task = leftTask; |
| | | } |
| | | |
| | | if (task != null) |
| | | { |
| | | _taskService.UpdateTaskStatusToNext(task.TaskNum, (int)TaskOutStatusEnum.SC_OutFinish); |
| | | |
| | | var sattion = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.CurrentAddress); |
| | | WriteDebug("CommonConveyorLineTTJobä»»å¡", $"ä»»å¡ï¼{task.Serialize()}ï¼ç«å°ä¿¡æ¯ï¼{sattion.Serialize()}"); |
| | | conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.GetConvNo, Convert.ToInt16(sattion.stationTCLocation), station.stationChildCode); |
| | | conveyorLine.SetValue<ConveyorLineDBName, string>(ConveyorLineDBName.PVI_W, task.PVI, station.stationChildCode); |
| | | //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode); |
| | | } |
| | | } |
| | | else if (station.stationChildCode == "TC06") |
| | |
| | | { |
| | | task = rightTask; |
| | | } |
| | | } |
| | | |
| | | //var task = _taskRepository.QueryData(X => X.NextAddress == station.stationChildCode).OrderBy(x => x.CreateDate).FirstOrDefault(); |
| | | if (task != null) |
| | | { |
| | | _taskService.UpdateTaskStatusToNext(task.TaskNum); |
| | | var sattion = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.CurrentAddress); |
| | | conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.GetConvNo, Convert.ToInt16(sattion.stationTCLocation), station.stationChildCode); |
| | | conveyorLine.SetValue<ConveyorLineDBName, string>(ConveyorLineDBName.PVI_W, task.PVI, station.stationChildCode); |
| | | //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode); |
| | | if (task != null) |
| | | { |
| | | _taskService.UpdateTaskStatusToNext(task.TaskNum, (int)TaskOutStatusEnum.SC_OutFinish); |
| | | |
| | | var sattion = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.CurrentAddress); |
| | | WriteDebug("CommonConveyorLineTTJobä»»å¡", $"ä»»å¡ï¼{task.Serialize()}ï¼ç«å°ä¿¡æ¯ï¼{sattion.Serialize()}"); |
| | | conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.GetConvNo, Convert.ToInt16(sattion.stationTCLocation), station.stationChildCode); |
| | | conveyorLine.SetValue<ConveyorLineDBName, string>(ConveyorLineDBName.PVI_W, task.PVI, station.stationChildCode); |
| | | //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode); |
| | | } |
| | | } |
| | | //; |
| | | } |
| | | |
| | | var Putrequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.Spare2, station.stationChildCode);//横移æºè½½è´§æ¾è½¦ä¿¡å· |
| | |
| | | { |
| | | if (station.stationChildCode == "TC05") |
| | | { |
| | | var task = _taskRepository.QueryData(X => X.TargetAddress == "RB043" && (X.NextAddress == station.stationChildCode /*|| X.CurrentAddress == station.stationChildCode*/)).OrderBy(x => x.CreateDate).FirstOrDefault(); |
| | | _taskService.UpdatePosition(task.TaskNum, station.stationChildCode); |
| | | conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode); |
| | | var task = _taskRepository.QueryData(X => X.TargetAddress == "RB043" && (X.NextAddress == station.stationChildCode && X.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting/*|| X.CurrentAddress == station.stationChildCode*/)).OrderBy(x => x.CreateDate).FirstOrDefault(); |
| | | |
| | | if (task != null) |
| | | { |
| | | _taskService.UpdatePosition(task.TaskNum, station.stationChildCode); |
| | | conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode); |
| | | } |
| | | } |
| | | else |
| | | { |