From ff1f14aa3e83bf9084991c2e411f1d838a9ba81b Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 24 一月 2024 09:51:37 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs |  103 ++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 80 insertions(+), 23 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 81d8fa5..80ef9a6 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1339,7 +1339,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.Message = "鎮ㄥ凡鍒犻櫎鍗曟嵁鍙蜂负" + BillOld.omodel.HBillNo + "鐨勯攢鍞鍗曪紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1478,6 +1478,26 @@
                 }
                 if (IsAudit == 1) //鍙嶅鏍告彁浜�
                 {
+                    //鍙嶅鏍稿墠鎺у埗=========================================
+                    DataSet ds = oCN.RunProcReturn("Exec h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl " + lngBillKey, "h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl");
+                    if (ds == null)
+                    {
+                        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;
+                    }
+                    //=========================================================
+
                     //鍙嶅鏍告彁浜bandonCheck
                     if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                     {
@@ -1914,29 +1934,29 @@
                 }
                 else
                 {
-                    //string sql = "select * from Gy_UserCustomerRelation where HUserID = '" + CurUserID + "'";
-                    //ds = oCN.RunProcReturn(sql, "Gy_UserCustomerRelation");
-                    //if (ds == null || ds.Tables[0].Rows.Count == 0)
-                    //{
-                    //    sWhere = " and 1 = 0";
-                    //}
-                    //else
-                    //{
-                    //    sWhere = " and HCusID in (";
-                    //    for(var i = 0; i < ds.Tables[0].Rows.Count; i++)
-                    //    {
-                    //        if (i < ds.Tables[0].Rows.Count - 1)
-                    //        {
-                    //            sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ",";
-                    //        }
-                    //        else
-                    //        {
-                    //            sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ")";
-                    //        }
-                    //    }
-                    //}
+                    string sql = "select * from Gy_UserCustomerRelation where HUserID = '" + CurUserID + "'";
+                    ds = oCN.RunProcReturn(sql, "Gy_UserCustomerRelation");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        sWhere = " and 1 = 0";
+                    }
+                    else
+                    {
+                        sWhere = " and HCusID in (";
+                        for (var i = 0; i < ds.Tables[0].Rows.Count; i++)
+                        {
+                            if (i < ds.Tables[0].Rows.Count - 1)
+                            {
+                                sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ",";
+                            }
+                            else
+                            {
+                                sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ")";
+                            }
+                        }
+                    }
 
-                    sWhere = " and 1=1 ";
+                    //sWhere = " and 1=1 ";
                 }
 
                 objJsonResult.code = "1";
@@ -2133,5 +2153,42 @@
             }
         }
         #endregion
+
+        #region 閿�鍞鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栭攢鍞鍗曟暟鎹�
+        [Route("Xs_SeOrderBill/loadXs_SeOrderBill_Push")]
+        [HttpGet]
+        public object loadXs_SeOrderBill_Push(long HInterID,long HSubID)
+        {
+            try
+            {
+
+                ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_SeOrderBillList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1