From 250fe743c3f1d8194f9b7a1388e0e389cd96d819 Mon Sep 17 00:00:00 2001 From: wbc <2597324127@qq.com> Date: 星期四, 15 五月 2025 14:41:40 +0800 Subject: [PATCH] erp用料清单变更后同步失败 --- MES.Service/service/WomcaaManager.cs | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MES.Service/service/WomcaaManager.cs b/MES.Service/service/WomcaaManager.cs index b4d469a..96d630b 100644 --- a/MES.Service/service/WomcaaManager.cs +++ b/MES.Service/service/WomcaaManager.cs @@ -58,6 +58,7 @@ } var orUpdate = base.Insert(mesWomcaa); var baOrUpdate = _womcabManager.InsertRange(mesWomcabs); + db.Ado.CommitTran(); if (orUpdate && baOrUpdate) { //瀹氫箟杈撳叆鍙傛暟 @@ -73,11 +74,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 = _womcabManager.InsertRange(mesWomcabs); - + 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; } throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�"); -- Gitblit v1.9.3