From 6bd0d63edace62af469ddb690783b27e11443614 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 15 十一月 2023 19:29:31 +0800
Subject: [PATCH] 销售订单变更单:审核时需要检验源单是否为审核状态,不是则审核失败

---
 WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs |   96 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index c79a8a0..134b1ca 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1896,5 +1896,101 @@
             }
         }
         #endregion
+
+        #region 閿�鍞鍗� 鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈瀹㈡埛杩囨护鏉′欢
+        [Route("Xs_SeOrderBill/getCusIDListByUser")]
+        [HttpGet]
+        public object getCusIDListByUser(string CurUserID, string CurUserName)
+        {
+            string sWhere = "";
+            string ModRightNameCheck = "Gy_UserLookAllCus";
+            DBUtility.ClsPub.CurUserName = CurUserName;
+            try
+            {
+                //鏉冮檺鍒ゆ柇锛氭槸鍚﹀彲浠ユ煡鐪嬫墍鏈夊鎴�
+                if (DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    sWhere = "";
+                }
+                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() + ")";
+                            }
+                        }
+                    }
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = sWhere;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                sWhere = " and 1=0 ";
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = sWhere;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 閿�鍞鍗� 涓嬫帹鐢熶骇璁㈠崟(鏃犲垪琛�)-鑾峰彇鏁版嵁
+        [Route("Xs_SeOrderBill/loadXs_SeOrderBill_InitICMO")]
+        [HttpGet]
+        public object loadXs_SeOrderBill_InitICMO(long HInterID,long HEntryID)
+        {
+            try
+            {
+                string sql = "select * from h_v_IF_SeOrderBillList where hmainid = " + HInterID + " and HSubID = " + HEntryID;
+                ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "false锛�";
+                    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