From f1b49e6d69ba09cc5fc874bcb6eb37d666f8adab Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期六, 02 三月 2024 09:45:18 +0800
Subject: [PATCH] 生产订单变更单:审核报错问题解决

---
 WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs |   44 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 42 insertions(+), 2 deletions(-)

diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
index 933decb..4b34ab8 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
@@ -262,7 +262,7 @@
             try
             {
                 //鍒犻櫎鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                 //{
                 //    objJsonResult.code = "0";
                 //    objJsonResult.count = 0;
@@ -385,7 +385,7 @@
             {
                 oCN1.BeginTran();
                 //瀹℃牳鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Check", 1, true, HChecker))
+                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Check", 1, false, HChecker))
                 {
                     oCN1.RollBack();
                     objJsonResult.code = "0";
@@ -621,6 +621,26 @@
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 bool bResult2 = false;
                 oCN.BeginTran();
+                //淇濆瓨鍓嶆帶鍒�=========================================              
+                ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_BeforeSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_BeforeSaveCtrl");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //=========================================================
                 //淇濆瓨
                 oCN.RunProc("exec h_p_save_Sc_QualityReportBill " + HInterID);
                 //鍒ゆ柇鏄惁鍏佽淇濆瓨锛屼笉鍏佽鍒欏洖婊�
@@ -634,6 +654,26 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+                //淇濆瓨鍚庢帶鍒�=========================================              
+                ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_AfterSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_AfterSaveCtrl");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //=========================================================
                 oCN.Commit();
                 //鑾峰彇鑷姩瀹℃牳鍙傛暟
                 string sReturn = "";

--
Gitblit v1.9.1