From 8a0e28f065e7414bef9386ed35b381a10bbabdc5 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 04 三月 2026 16:38:59 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 34 ++++++++++++++++++++++++----------
1 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 438e5f8..1605612 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -9475,6 +9475,7 @@
public object CheckSc_MouldDotCheckPlanBill(string HInterID, int Type, string user)
{
DAL.ClsSc_MouldDotCheckPlanBill BillOld = new DAL.ClsSc_MouldDotCheckPlanBill();
+ oCN.BeginTran();//寮�濮嬩簨鍔�
try
{
//鍒ゆ柇鏄惁鏈夊鏍告潈闄�
@@ -9484,6 +9485,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鏃犳潈闄愬鏍�!";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
@@ -9493,11 +9495,11 @@
objJsonResult.count = 0;
objJsonResult.Message = "HInterID涓虹┖锛�";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
ClsPub.CurUserName = user;
- oCN.BeginTran();//寮�濮嬩簨鍔�
//鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
if (BillOld.ShowBill(Convert.ToInt32(HInterID), ref DBUtility.ClsPub.sExeReturnInfo))
@@ -9508,6 +9510,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
if (BillOld.omodel.HDeleteMan.Trim() != "")
@@ -9516,6 +9519,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
if (Type == 1) //瀹℃牳鍒ゆ柇
@@ -9526,6 +9530,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
}
@@ -9537,6 +9542,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
}
@@ -9547,6 +9553,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
@@ -9559,7 +9566,7 @@
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
objJsonResult.data = null;
oCN.RollBack();
@@ -9569,7 +9576,7 @@
if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
objJsonResult.data = null;
oCN.RollBack();
@@ -9580,14 +9587,12 @@
if (!BillOld.CheckBill(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Sc_MouldDotCheckPlanBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
-
- //鑷姩鐢熸垚鐐规璁″垝鍗�
- oCN.RunProc("exec h_p_Sc_MouldDotCheckPlan_Auto " + HInterID);
}
else
{
@@ -9597,18 +9602,20 @@
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
//===========================================================
@@ -9616,14 +9623,20 @@
if (!BillOld.AbandonCheck(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Sc_MouldDotCheckPlanBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
}
oCN.Commit();//鎻愪氦浜嬪姟
+ if (Type == 1)
+ {
+ // 鍦ㄦ彁浜や簨鍔″悗鍐嶅皾璇曠敓鎴愬櫒鍏风偣妫�璁″垝鍗� 棰勯槻姝婚攣
+ oCN.RunProc("exec h_p_Sc_MouldDotCheckPlan_Auto " + HInterID);
+ }
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -9634,6 +9647,7 @@
}
catch (Exception e)
{
+ oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
--
Gitblit v1.9.1