From c2461f320a6b36390d8dd26d4ce11a62baa0e215 Mon Sep 17 00:00:00 2001 From: xxyy <cathay_xy@163.com> Date: 星期五, 28 二月 2025 10:42:35 +0800 Subject: [PATCH] 更新 .gitignore 和优化任务处理逻辑 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs index 6485266..d185ef3 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs @@ -194,6 +194,7 @@ (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; @@ -895,7 +896,7 @@ 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); @@ -1026,6 +1027,7 @@ var boxing = CreateBoxingInfo(result, input.PalletCode); if (boxing == null) return content.Error("缁勭洏澶辫触"); + input.ProductionLine = result.ProductionLine; return await ProcessBasedOnProcessCode(boxing, area, input, result); } } @@ -1126,7 +1128,7 @@ } 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) { @@ -1280,7 +1282,7 @@ 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(); @@ -1731,7 +1733,8 @@ TaskType = (int)TaskInboundTypeEnum.Inbound, TaskNum = await BaseDal.GetTaskNo(), Creater = "Systeam", - ProductionLine = result.ProductionLine + ProductionLine = result.ProductionLine, + ProcessCode = result.ProcessCode, }; // 鍒涘缓WMS浠诲姟 @@ -1768,7 +1771,8 @@ TaskType = (int)TaskInboundTypeEnum.InTray, TaskNum = await BaseDal.GetTaskNo(), Creater = "Systeam", - ProductionLine = result.ProductionLine + ProductionLine = result.ProductionLine, + ProcessCode = result.ProcessCode, }; // 鍒涘缓WMS浠诲姟 WMSTaskDTO taskDTO = CreateWMSTaskDTO(task); @@ -2030,7 +2034,7 @@ 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; // 鍒涘缓鍘嗗彶浠诲姟 @@ -2043,7 +2047,7 @@ { 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; } -- Gitblit v1.9.3