| | |
| | | Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint); |
| | | if (stationManagerStart == null) |
| | | { |
| | | return content.Error("æªæ¾å°åºåºç«å°ä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°åºåºç«å°ä¿¡æ¯"); |
| | | } |
| | | task = new Dt_Task() |
| | | { |
| | |
| | | |
| | | if (taskDTOs.EndPoint == "3004") |
| | | { |
| | | var newTask = BaseDal.QueryFirst(x => x.SourceAddress == "3001" && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState != (int)TaskInStatusEnum.HoistNew && x.TaskState != (int)TaskInStatusEnum.HoistInExecuting && x.TaskState > 225); |
| | | var newTask = BaseDal.QueryFirst(x => x.SourceAddress == "3002" && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState != (int)TaskInStatusEnum.HoistNew && x.TaskState != (int)TaskInStatusEnum.HoistInExecuting && x.TaskState > 225); |
| | | if (newTask != null) |
| | | { |
| | | return content.Error("å·²åå¨å
¥åºä»»å¡ï¼åºåºä»»å¡ä¸å¯ä¸å"); |
| | | throw new Exception("å·²åå¨å
¥åºä»»å¡ï¼åºåºä»»å¡ä¸å¯ä¸å"); |
| | | } |
| | | } |
| | | |
| | |
| | | Dt_StationManager stationManagerEnd = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint); |
| | | if (stationManagerEnd == null) |
| | | { |
| | | return content.Error("æªæ¾å°åºåºç«å°ä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°åºåºç«å°ä¿¡æ¯"); |
| | | } |
| | | |
| | | Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == GetScCode(Convert.ToInt32(targetCodes[0])) && x.stationType == 2 && x.stationFloor == stationManagerEnd.stationFloor); |
| | |
| | | } |
| | | if(taskDTOs.EndPoint == "1004") |
| | | { |
| | | return content.Error("该ç¹ä½ä¸æ¯åºåºç¹ä½"); |
| | | throw new Exception("该ç¹ä½ä¸æ¯åºåºç¹ä½"); |
| | | } |
| | | if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && taskDTOs.EndPoint == "1002") |
| | | { |
| | |
| | | Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.BeginPoint); |
| | | if (stationManagerStart == null) |
| | | { |
| | | return content.Error("æªæ¾å°åºåºç«å°ä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°åºåºç«å°ä¿¡æ¯"); |
| | | } |
| | | task = new Dt_Task() |
| | | { |
| | |
| | | task.TargetStation = stationManager.stationRemark; |
| | | |
| | | |
| | | if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && (taskDTOs.BeginPoint == "1030" || taskDTOs.EndPoint == "1029")) |
| | | if ((GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && (taskDTOs.BeginPoint == "1030" || taskDTOs.EndPoint == "1029")) || (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && task.RGVName == "RGV02")) |
| | | { |
| | | Dt_StationManager stationTransfer = _stationManagerRepository.QueryFirst(x => x.stationChildCode == "1026"); |
| | | task.TargetStation = stationTransfer.stationRemark; |
| | | task.Remark = "1026"; |
| | | } |
| | | |
| | | if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && (taskDTOs.BeginPoint == "1002" || taskDTOs.BeginPoint == "1004")) |
| | | if ((GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && (taskDTOs.BeginPoint == "1002" || taskDTOs.BeginPoint == "1004")) || (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && task.RGVName == "RGV01")) |
| | | { |
| | | Dt_StationManager stationTransfer = _stationManagerRepository.QueryFirst(x => x.stationChildCode == "1026"); |
| | | task.TargetStation = stationTransfer.stationRemark; |
| | |
| | | } |
| | | else |
| | | { |
| | | return content.Error($"æªæ¾å°è¯¥æçã{taskDTOs.TPbarcode}ãä»»å¡"); |
| | | throw new Exception($"æªæ¾å°è¯¥æçã{taskDTOs.TPbarcode}ãä»»å¡"); |
| | | } |
| | | } |
| | | } |
| | |
| | | Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress); |
| | | if (stationManager == null) |
| | | { |
| | | return content.Error("æªæ¾å°èµ·ç¹ç«å°"); |
| | | throw new Exception("æªæ¾å°èµ·ç¹ç«å°"); |
| | | } |
| | | |
| | | if (task != null) |
| | |
| | | { |
| | | return "SC04"; |
| | | } |
| | | else if (number >= 15 && number <= 18) |
| | | else if (number >= 15 && number <= 17) |
| | | { |
| | | return "SC05"; |
| | | } |
| | | else if (number >= 19 && number <= 22) |
| | | else if (number >= 18 && number <= 21) |
| | | { |
| | | return "SC06"; |
| | | } |
| | |
| | | /// <returns></returns> |
| | | public Dt_Task QueryRGVExecutingTask(string deviceNo) |
| | | { |
| | | return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish|| x.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS|| x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish) && x.RGVName == deviceNo); |
| | | return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish|| x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish) && x.RGVName == deviceNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | public Dt_Task QueryRGVExecutingTask(string deviceNo,int taskNum) |
| | | { |
| | | return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.RGVName == deviceNo&&x.TaskNum==taskNum); |
| | | return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.RGVName == deviceNo&&x.TaskNum==taskNum); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | public List<Dt_Task> QueryRGVTask() |
| | | { |
| | | return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish) && x.Floor == "1F"), TaskOrderBy); |
| | | return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish)) && x.Floor == "1F", TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |