| | |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (task != null) |
| | | { |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User == null ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚); |
| | | task.TaskState = TaskStatusEnum.Finish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚); |
| | | } |
| | | string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.FeedBackWMSTaskCompleted.ToString())?.ApiAddress; |
| | | if (string.IsNullOrEmpty(url)) |
| | |
| | | |
| | | if (routers.Count == 1) |
| | | { |
| | | if(taskTypeGroup == TaskTypeGroup.InboundGroup && item.TargetAddress == stationManger.StackerCraneCode) |
| | | if (taskTypeGroup == TaskTypeGroup.InboundGroup && item.TargetAddress == stationManger.StackerCraneCode) |
| | | { |
| | | task.NextAddress = router.NextPosi; |
| | | task.DeviceCode = stationManger.StationDeviceCode; |
| | |
| | | else |
| | | { |
| | | task.NextAddress = item.TargetAddress; |
| | | task.DeviceCode = stationManger.StationDeviceCode; |
| | | if (item.RoadWay.Contains("AGV")) |
| | | { |
| | | task.DeviceCode = item.RoadWay; |
| | | task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | } |
| | | else |
| | | { |
| | | task.DeviceCode = stationManger.StationDeviceCode; |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | { |
| | | if (taskTypeGroup == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi); |
| | | if (routers.FirstOrDefault() == null) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi); |
| | | if (routers.FirstOrDefault() == null) |
| | | { |