From ddf9b07946b294ab02b326bd46c0834ec5b4e8ba Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期日, 18 二月 2024 08:30:13 +0800
Subject: [PATCH] 设备保养记录单, 设备点检记录单,设备故障登记单,设备维修记录单,首件检验单, 巡检单,工序检验单,发货通知单,退货通知单   增加 调用 删除前控制 和删除后控制

---
 WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 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 b756254..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"
@@ -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