From 36455fe2877dd5410aa59ed6199c1dc100f41118 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 08 十一月 2023 11:46:51 +0800
Subject: [PATCH] 销售订单:根据用户带出销售员、销售部门、销售主管

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

diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 7ac3215..ea7d9a5 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1809,5 +1809,54 @@
             }
         }
         #endregion
+
+        #region 閿�鍞鍗� 鏍规嵁鐢ㄦ埛鑾峰彇閿�鍞憳銆侀攢鍞儴闂ㄣ�侀攢鍞富绠�
+        [Route("Xs_SeOrderBill/getCzyglByUser")]
+        [HttpGet]
+        public object getCzyglByUser(string CurUserName)
+        {
+            try
+            {
+                string sql = @"select 
+                            c.HEmpID
+                            ,e.HName HEmpName
+                            ,c.HDeptID
+                            ,d.HName HDeptName
+                            ,d.HEmpID HManagerID
+                            ,e1.HName HManagerName
+                            from Gy_Czygl as c
+                            left join Gy_Employee as e on c.HEmpID = e.HItemID
+                            left join Gy_Department as d on c.HDeptID = d.HItemID
+                            left join Gy_Employee as e1 on d.HEmpID = e1.HItemID
+                            where c.Czymc = '" + CurUserName + "'";
+                ds = oCN.RunProcReturn(sql, "Gy_Czygl");
+
+                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