From 8d1395e1114e65f2d5b83e7c38472d155cfcbaef 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 15:04:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93-=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E8=AE=B0=E5=BD=95=EF=BC=8C=E5=BD=93=E4=B8=BA0?= =?UTF-8?q?=E6=97=B6=E5=88=A0=E9=99=A4=E6=88=90=E5=93=81=E5=BA=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Service/mes/wms/WmGoodsOutProductionService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ZR.Service/mes/wms/WmGoodsOutProductionService.cs b/ZR.Service/mes/wms/WmGoodsOutProductionService.cs index 96f034de..01791947 100644 --- a/ZR.Service/mes/wms/WmGoodsOutProductionService.cs +++ b/ZR.Service/mes/wms/WmGoodsOutProductionService.cs @@ -81,7 +81,14 @@ namespace ZR.Service.mes.wms { updateModel.GoodsNumAction = 0; } - Context.Updateable(updateModel).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + if (updateModel.GoodsNumAction == 0) + { + Context.Deleteable().Where(it => it.Id == updateModel.Id).ExecuteCommand(); + } + else + { + Context.Updateable(updateModel).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + } return Context.Insertable(model).ExecuteReturnEntity(); }