From 1b7bc6d187a47b42e10b36c1d4d0215e58ed28ca Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 24 三月 2025 19:44:22 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/车间管理/ClsSc_StationEntrustOutBill.cs |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationEntrustOutBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationEntrustOutBill.cs"
index 37c8bf9..d5b2abf 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationEntrustOutBill.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationEntrustOutBill.cs"
@@ -1042,7 +1042,7 @@
         }
 
 
-        public bool DeleteBill(long HInterID, long HProcExchInterID, long HProcExchEntryID, ref string sReturn)
+        public bool DeleteBill(long HInterID, long HProcExchInterID, long HProcExchEntryID, string HBillNo, string procName, string user, ref string sReturn)
         {
             try
             {
@@ -1050,7 +1050,6 @@
                 //鍒犻櫎鍏宠仈
 
 
-                //////
                 oCn.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID.ToString() + ",-1");
                 oCn.RunProc("exec h_p_WW_EntrustWorkOrderRelationQty_Out " + HInterID.ToString() + ",-1");
                 //
@@ -1058,8 +1057,26 @@
                 //鍒犻櫎鍗曟嵁
                 oCn.RunProc("delete Sc_StationOutBillMain   where HInterID=" + HInterID);
                 oCn.RunProc("delete Sc_StationOutBillSub   where HInterID=" + HInterID);
-               // oCn.RunProc("delete Sc_StationOutBillSub_Item   where HInterID=" + HInterID);
-              //oCn.RunProc("update Sc_ProcessExchangeBillsub set HRelEndDate=null where HInterID=" + HProcExchInterID + " and HEntryID=" + HProcExchEntryID);
+                // oCn.RunProc("delete Sc_StationOutBillSub_Item   where HInterID=" + HInterID);
+                //oCn.RunProc("update Sc_ProcessExchangeBillsub set HRelEndDate=null where HInterID=" + HProcExchInterID + " and HEntryID=" + HProcExchEntryID);
+
+                //鍒犻櫎鍚庢帶鍒�==================================================================================      
+                string sql2 = "exec " + procName + " " + HInterID + ",'" + HBillNo + "','" + user + "'";
+                DataSet ds = oCn.RunProcReturn(sql2, procName);
+                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                {
+
+                    sReturn = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                {
+                    sReturn = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+                    oCn.RollBack();
+                    return false;
+                }
+                //==============================================================================================
 
                 oCn.Commit();
                 return true;

--
Gitblit v1.9.1