From dabfdd9dbf0364b1134daaad86af7e13f6437295 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 30 十月 2025 12:40:30 +0800
Subject: [PATCH] XJ,SJ,RKJ检验项目序号,LLJ单个检验项目FTP附件信息
---
StandardInterface/MES.Service/service/WomcaaManager.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 56 insertions(+), 1 deletions(-)
diff --git a/StandardInterface/MES.Service/service/WomcaaManager.cs b/StandardInterface/MES.Service/service/WomcaaManager.cs
index 2c03d6f..ef9344e 100644
--- a/StandardInterface/MES.Service/service/WomcaaManager.cs
+++ b/StandardInterface/MES.Service/service/WomcaaManager.cs
@@ -64,13 +64,65 @@
.IgnoreColumnsNull()
.ExecuteCommand() > 0;
- if (orUpdate && baOrUpdate) return true;
+ if (orUpdate && baOrUpdate)
+ {
+ //瀹氫箟杈撳叆鍙傛暟
+ var inputParam1 = new SugarParameter("P_WORK_NO", mesWomcaa.Caa001);
+ // 瀹氫箟杈撳嚭鍙傛暟
+ var outParam1 = new SugarParameter("c_Result", null, true);
+ var outParam2 = new SugarParameter("C_MSG", null, true);
+ // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼
+ Db.Ado.ExecuteCommand(
+ "BEGIN PRC_UPDATE_DAA2(:P_WORK_NO,:c_Result,:C_MSG); END;",
+ inputParam1, outParam1, outParam2);
+ // 鑾峰彇杈撳嚭鍙傛暟鐨勫��
+ var result = int.Parse((string)outParam1.Value);
+ var message = outParam2.Value == DBNull.Value
+ ? string.Empty
+ : (string)outParam2.Value;
+ if (result == 1)
+ {
+ //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊�
+ db.Ado.RollbackTran();
+ throw new Exception(message);
+ }
+
+ // 鎻愪氦浜嬪姟
+ db.Ado.CommitTran();
+ return true;
+ }
throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
}
private bool UpdateData(SqlSugarScope db, Womcaa mesWomcaa,
List<Womcab> mesWomcabs)
{
+
+ //瀹氫箟杈撳叆鍙傛暟
+ var inputParam1 = new SugarParameter("P_WORK_NO", mesWomcaa.Caa001);
+ // 瀹氫箟杈撳嚭鍙傛暟
+ var outParam1 = new SugarParameter("c_Result", null, true);
+ var outParam2 = new SugarParameter("C_MSG", null, true);
+ // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼
+ Db.Ado.ExecuteCommand(
+ "BEGIN PRC_UPDATE_DAA2(:P_WORK_NO,:c_Result,:C_MSG); END;",
+ inputParam1, outParam1, outParam2);
+ // 鑾峰彇杈撳嚭鍙傛暟鐨勫��
+ var result = int.Parse((string)outParam1.Value);
+ var message = outParam2.Value == DBNull.Value
+ ? string.Empty
+ : (string)outParam2.Value;
+ if (result == 1)
+ {
+ //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊�
+ db.Ado.RollbackTran();
+ throw new Exception(message);
+ }
+
+ // 鎻愪氦浜嬪姟
+ db.Ado.CommitTran();
+
+
var decimals = mesWomcabs.Select(s => s.Id).ToArray();
var update = true;
@@ -89,6 +141,7 @@
if (update && insertOrUpdate)
{
+
return true;
}
throw new NotImplementedException("鏇存柊澶辫触");
@@ -225,6 +278,7 @@
Sjxs=dto.SJ_xs,
Nextgx=dto.NEXT_Gx,
Rks=dto.RKS,
+ Khwlbm=dto.KHWLBM,
//娌冨皵鏂板
// WR_F_SCDD_SCTZD = dto.F_SCDD_SCTZD
//WR_F_SCDD_XH = dto.F_SCDD_XH
@@ -294,6 +348,7 @@
// Db.Deleteable<Womcab>().Where(s => s.Erpid == womcab.Erpid).ExecuteCommand();
womcab.Id = entity.Id;
}
+
womcabList.Add(womcab);
}
--
Gitblit v1.9.3