From a5019b475f8620dba3b495da983f4db9e32f7ca8 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期四, 10 七月 2025 08:18:36 +0800 Subject: [PATCH] AOI --- MES.Service/service/WomcaaWWManager.cs | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MES.Service/service/WomcaaWWManager.cs b/MES.Service/service/WomcaaWWManager.cs index 692661b..afc91ae 100644 --- a/MES.Service/service/WomcaaWWManager.cs +++ b/MES.Service/service/WomcaaWWManager.cs @@ -60,6 +60,7 @@ } var orUpdate = base.Insert(mesWomcaa); var baOrUpdate = _womcabWWManager.InsertRange(mesWomcabs); + db.Ado.CommitTran(); if (orUpdate && baOrUpdate) { //瀹氫箟杈撳叆鍙傛暟 @@ -75,11 +76,11 @@ if (result == 1) { //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊� - db.Ado.RollbackTran(); + //db.Ado.RollbackTran(); throw new Exception(message); } // 鎻愪氦浜嬪姟 - db.Ado.CommitTran(); + //db.Ado.CommitTran(); return true; } throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�"); @@ -97,7 +98,7 @@ } var orUpdate = base.Insert(mesWomcaa); var baOrUpdate = _womcabWWManager.InsertRange(mesWomcabss); - + db.Ado.CommitTran(); if (orUpdate && baOrUpdate) { //瀹氫箟杈撳叆鍙傛暟 @@ -113,11 +114,11 @@ if (result == 1) { //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊� - db.Ado.RollbackTran(); + //db.Ado.RollbackTran(); throw new Exception(message); } // 鎻愪氦浜嬪姟 - db.Ado.CommitTran(); + //db.Ado.CommitTran(); return true; } @@ -252,7 +253,7 @@ Denominator = Convert.ToDecimal(dto.FDenominator), SCRAPQTY = Convert.ToDecimal(dto.FFixScrapQty), SCRAPRATE = Convert.ToDecimal(dto.FScrapRate), - SalesOrder = dto.FXSHTBH, + SalesOrder = dto.F_WWC_TEXT, }; var entity = Db.Queryable<Womcab>().Where(s => s.Erpid == womcab.Erpid).Single(); -- Gitblit v1.9.3