From cf5ef52a94c25e2ce92d0a0b7ebca62d81852873 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 02 9月 2025 16:20:21 +0800 Subject: [PATCH] 数据清理 --- wcs/yunneiWCS/yunneiWCS/DataAccess/OutInStockRecord_V2_MesHandler.cs | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/wcs/yunneiWCS/yunneiWCS/DataAccess/OutInStockRecord_V2_MesHandler.cs b/wcs/yunneiWCS/yunneiWCS/DataAccess/OutInStockRecord_V2_MesHandler.cs index 2fc7319..8d99096 100644 --- a/wcs/yunneiWCS/yunneiWCS/DataAccess/OutInStockRecord_V2_MesHandler.cs +++ b/wcs/yunneiWCS/yunneiWCS/DataAccess/OutInStockRecord_V2_MesHandler.cs @@ -27,7 +27,7 @@ /// <param name="productStocks"></param> /// <param name="currentTaskType"></param> public static void AddRecordForPersonDelete(dbmodel mod, OutInFlag _outInFlag, string remark, - System.Collections.Generic.List<productStockList> productStocks, productStock modfiyStock) + System.Collections.Generic.List<productStockList> productStocks, productStock modfiyStock, string positionName) { try { @@ -43,7 +43,7 @@ Wms_outInStockRecord_V2_Mes log = new Wms_outInStockRecord_V2_Mes() { ID = Yitter.IdGenerator.YitIdHelper.NextId(), - sourcePlace = "", + sourcePlace = positionName, toPlace = "", containerCode = modfiyStock.containerCode, @@ -83,9 +83,11 @@ { ID = d_id, mainId = log.ID, + containerCode = log.containerCode, productCode = item.productCode, productName = item.productName, - serialNumber = item.serialNumber + serialNumber = item.serialNumber, + CreateTime = DateTime.Now }; mod.Wms_outInStockRecord_Details_V2_Mes.Add(wms_OutInStockRecord_Details_V2_Mes); } @@ -95,7 +97,7 @@ throw ex; } } - private static void AddRecord(dbmodel mod, OutInFlag _outInFlag, string sourcePlace, string toPlace, task _task, string remark, + private static void AddRecord(dbmodel mod, OutInFlag _outInFlag, string positionName, task _task, string remark, System.Collections.Generic.List<productStockList> productStocks, taskType currentTaskType) { try @@ -112,8 +114,8 @@ Wms_outInStockRecord_V2_Mes log = new Wms_outInStockRecord_V2_Mes() { ID = Yitter.IdGenerator.YitIdHelper.NextId(), - sourcePlace = sourcePlace, - toPlace = toPlace, + sourcePlace = positionName, + toPlace = "", containerCode = _task.containerCode, LastModifier = _task.creator, @@ -149,9 +151,11 @@ { ID = Yitter.IdGenerator.YitIdHelper.NextId(), mainId = log.ID, + containerCode = log.containerCode, productCode = item.productCode, productName = item.productName, - serialNumber = item.serialNumber + serialNumber = item.serialNumber, + CreateTime = DateTime.Now }; mod.Wms_outInStockRecord_Details_V2_Mes.Add(wms_OutInStockRecord_Details_V2_Mes); } @@ -162,14 +166,14 @@ } } - public static void AddRecord(dbmodel mod, OutInFlag _outInFlag, string sourcePlace, string toPlace, task _task, string remark, + public static void AddRecord(dbmodel mod, OutInFlag _outInFlag, string positionName, task _task, string remark, taskType currentTaskType) { var stock = mod.productStock.Where(a => a.containerCode == _task.containerCode).FirstOrDefault(); if (stock != null) { System.Collections.Generic.List<productStockList> productStocks = mod.productStockList.Where(a => a.stockId == stock.stockId).ToList(); - AddRecord(mod, _outInFlag, sourcePlace, toPlace, _task, remark, + AddRecord(mod, _outInFlag, positionName, _task, remark, productStocks, currentTaskType); } } -- Gitblit v1.9.3