From 1ea312d30a52a5814485a1d5b581adf623947858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Tue, 23 Apr 2024 11:02:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93-20240422=E6=99=9A=E5=BC=80?= =?UTF-8?q?=E4=BC=9A=E5=90=8E=E4=BF=AE=E6=94=B9=E6=8B=BC=E7=AE=B1=E6=8B=86?= =?UTF-8?q?=E7=AE=B1=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=9C=80=E8=A6=81=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=89=AB=E7=A0=81=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Service/mes/wms/WmGoodsActionService.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ZR.Service/mes/wms/WmGoodsActionService.cs b/ZR.Service/mes/wms/WmGoodsActionService.cs index 3cca748f..ad97ae63 100644 --- a/ZR.Service/mes/wms/WmGoodsActionService.cs +++ b/ZR.Service/mes/wms/WmGoodsActionService.cs @@ -53,14 +53,14 @@ namespace ZR.Service.Business if (num == 1) { - description = "\n主箱:" + package.PatchCode + ",\n次箱:"; + description = "\n主箱:" + package.PatchCode+" 数量:"+ package.Quantity + ",\n次箱:"; quantityCount += package.Quantity; continue; } if(num==2) { secondId = check1.Id; - description += package.PatchCode + ","; + description += package.PatchCode + " 数量:" + package.Quantity + ","; } // 第二箱数量为正数且比箱子总数量小 if (num == 2 && secondNum < package.Quantity && secondNum > 0) @@ -68,12 +68,14 @@ namespace ZR.Service.Business isDelete = false; secondHas = package.Quantity - secondNum; quantityCount += secondNum; + description += "\n移动数量" + secondNum; } else { isDelete = true; secondHas = 0; quantityCount += package.Quantity; + description += "\n移动数量" + package.Quantity; } } ResultionPackageCodeDto mainPackage = list[0]; @@ -130,7 +132,7 @@ namespace ZR.Service.Business } } } - description += "\n拼箱结果:" + newPatchCode; + description += "\n拼箱结果:" + newPatchCode + " 总数量:" + quantityCount; DateTime nowTime = DateTime.Now.ToLocalTime(); var jsonObject = new { @@ -167,6 +169,10 @@ namespace ZR.Service.Business nowProduction.GoodsNumLogic = quantityCount; nowProduction.GoodsNumAction = quantityCount; nowProduction.Remark = "拼箱整箱"; + //TODO 20240422开会讨论结果:拼箱完需要重新扫码入库,原数据删除 + Context.Deleteable().Where(it => it.Id == nowProduction.Id).ExecuteCommand(); + Context.Deleteable().Where(it => it.Id == secondId).ExecuteCommand(); + return log; // 修改主箱 Context.Updateable(nowProduction).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); // 次箱操作 @@ -192,6 +198,7 @@ namespace ZR.Service.Business + "^Qty=" + secondHas; nowProduction2.GoodsNumLogic = secondHas; nowProduction2.GoodsNumAction = secondHas; + nowProduction2.LocationCode = "LS"; nowProduction2.Remark = "拼箱零头箱"; Context.Updateable(nowProduction2).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); } @@ -211,7 +218,7 @@ namespace ZR.Service.Business return null; } - description += "\n由主箱:" + mainPackage.PatchCode + "拆分:"; + description += "\n由主箱:" + mainPackage.PatchCode + " 数量:" + mainPackage.Quantity + "拆分:"; // 短批次 string shortPatchCode = mainPackage.PatchCode.Split('_')[0]; // 该批次最后一个拼箱记录 @@ -294,6 +301,9 @@ namespace ZR.Service.Business Type = 2 }; Context.Insertable(log).ExecuteReturnEntity(); + //TODO 20240422开会讨论结果:拆箱完需要重新扫码入库,原主箱数据删除 + Context.Deleteable().Where(it => it.Id == mainNowProduction.Id).ExecuteCommand(); + return log; // 执行修改 // 1.主箱修改为1号分箱参数 WmGoodsNowProduction newPackage1 = mainNowProduction;