From 0b856be887c153661e28cfa20b04b0c56ad93c10 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 24 十月 2024 20:05:52 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/车间管理/ClsSc_WorkBeginDotCheckBillMain.cs |   67 ++++++++++++++++++++++++++++++++-
 1 files changed, 64 insertions(+), 3 deletions(-)

diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_WorkBeginDotCheckBillMain.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_WorkBeginDotCheckBillMain.cs"
index f0926b9..9aa9d87 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_WorkBeginDotCheckBillMain.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_WorkBeginDotCheckBillMain.cs"
@@ -37,6 +37,21 @@
             try
             {
 
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_WorkBeginDotCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sc_QualityReportBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+
                 oCn.BeginTran();
                 //鏇存柊涓昏〃
                 oCn.RunProc("UpDate Sc_WorkBeginDotCheckBillMain set  " +
@@ -89,9 +104,24 @@
                    "')";
                     oCn.RunProc(subSql);
                 }
-
-
                 sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("h_p_Sc_WorkBeginDotCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sc_QualityReportBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+
                 oCn.Commit();
                 return true;
             }
@@ -109,6 +139,21 @@
             {
 
                 DataSet ds;
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                 ds = oCn.RunProcReturn("Exec h_p_Sc_WorkBeginDotCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sc_QualityReportBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
 
                 oCn.BeginTran();
 
@@ -180,8 +225,24 @@
                         "')";
                     oCn.RunProc(subSql);
                 }
-
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("h_p_Sc_WorkBeginDotCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sc_QualityReportBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+
                 oCn.Commit();
                 return true;
             }

--
Gitblit v1.9.1