From 1957681f84da30970ce52ab79d4da066595b15dd Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期日, 03 三月 2024 18:33:19 +0800
Subject: [PATCH] 根据用户关联客户显示数据优化

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

diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 5df7cf7..f81653f 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -2218,29 +2218,7 @@
                 }
                 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() + ")";
-                            }
-                        }
-                    }
-
-                    //sWhere = " and 1=1 ";
+                    sWhere = " and HCusID in (select hcusid from Gy_UserCustomerRelation Where HUserID = '" + CurUserID + "') ";
                 }
 
                 objJsonResult.code = "1";

--
Gitblit v1.9.1