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;