From 50c163d99127dd1af9526646c0a41438e9d2b486 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期二, 30 一月 2024 13:18:00 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/仓库管理/ClsKf_SellOutBillForLayUI.cs |   66 +++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)

diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
index 38e38ca..5503ce8 100644
--- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
@@ -96,6 +96,22 @@
         {
             try
             {
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_SellOutBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_SellOutBill_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();
 
@@ -276,6 +292,23 @@
                 AddNewRelation(ref sReturn, omodel.HInterID);
                 //鎺у埗鍏宠仈鏁伴噺
 
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("h_p_Kf_SellOutBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_SellOutBill_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;
+                }
+                //============================
+
+
                 //
                 sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
@@ -305,6 +338,22 @@
                 {
                     omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                 }
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_SellOutBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_SellOutBill_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();
                 //涓昏〃
@@ -484,6 +533,23 @@
                 //鎺у埗鍏宠仈鏁伴噺
 
                 //
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("h_p_Kf_SellOutBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_SellOutBill_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;
+                }
+                //============================
+
+
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;

--
Gitblit v1.9.1