| | |
| | | (var loc, var tas) = UpdateStockAndTaskStatus(stock, task); |
| | | var taskHty = task.Adapt<Dt_Task_Hty>(); |
| | | taskHty.FinishTime = DateTime.Now; |
| | | taskHty.OperateType = (int)OperateTypeEnum.自动完成; |
| | | |
| | | DtStockInfo_Hty stockInfo_Hty = stock.Adapt<DtStockInfo_Hty>(); |
| | | stockInfo_Hty.ModifyDate = DateTime.Now; |
| | |
| | | List<string> strings = stationManagers.Roadway.Split(',').ToList(); |
| | | Console.WriteLine(strings.ToJsonString() + "b-----------------------"); |
| | | //// 调用CreateNewTask方法,创建新任务 |
| | | content = await CreateNewTask(input, result.ProductionLine,result.ProcessCode, strings); |
| | | content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings); |
| | | if (content.Status) |
| | | { |
| | | var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing); |
| | |
| | | var boxing = CreateBoxingInfo(result, input.PalletCode); |
| | | if (boxing == null) return content.Error("组盘失败"); |
| | | |
| | | input.ProductionLine = result.ProductionLine; |
| | | return await ProcessBasedOnProcessCode(boxing, area, input, result); |
| | | } |
| | | } |
| | |
| | | } |
| | | List<string> strings = stationManagers.Roadway.Split(',').ToList(); |
| | | |
| | | return await CreateNewTask(input, result.ProductionLine, result.ProcessCode,strings, 1); |
| | | return await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 1); |
| | | } |
| | | catch (Exception) |
| | | { |
| | |
| | | |
| | | var devices = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>() |
| | | .Where(x => x.DeviceStatus == "1") |
| | | .Where(x => x.DeviceRemark == "1") |
| | | .Where(x => x.DeviceCode.Contains("CWSC")) |
| | | .ToList(); |
| | | var deviceCode = devices.Select(x => x.DeviceCode).ToList(); |
| | | |
| | |
| | | TaskType = (int)TaskInboundTypeEnum.Inbound, |
| | | TaskNum = await BaseDal.GetTaskNo(), |
| | | Creater = "Systeam", |
| | | ProductionLine = result.ProductionLine |
| | | ProductionLine = result.ProductionLine, |
| | | ProcessCode = result.ProcessCode, |
| | | }; |
| | | |
| | | // 创建WMS任务 |
| | |
| | | TaskType = (int)TaskInboundTypeEnum.InTray, |
| | | TaskNum = await BaseDal.GetTaskNo(), |
| | | Creater = "Systeam", |
| | | ProductionLine = result.ProductionLine |
| | | ProductionLine = result.ProductionLine, |
| | | ProcessCode = result.ProcessCode, |
| | | }; |
| | | // 创建WMS任务 |
| | | WMSTaskDTO taskDTO = CreateWMSTaskDTO(task); |
| | |
| | | private Dt_Task_Hty CreateHistoricalTask(Dt_Task task, bool isHand = false) |
| | | { |
| | | // 更新任务状态 |
| | | task.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt(); |
| | | task.TaskState = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish; |
| | | task.CurrentAddress = task.NextAddress; |
| | | |
| | | // 创建历史任务 |
| | |
| | | { |
| | | taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System"; |
| | | } |
| | | taskHty.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt(); |
| | | taskHty.TaskState = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish; |
| | | return taskHty; |
| | | } |
| | | |