From 9c98f5d15e35587b7bcd9d7c8a506c467e758632 Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期三, 08 六月 2022 00:54:15 +0800
Subject: [PATCH] 客户信息导出

---
 web/web/ExportDocument.aspx.cs |   62 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/web/web/ExportDocument.aspx.cs b/web/web/ExportDocument.aspx.cs
index 6ad04c7..79b9573 100644
--- a/web/web/ExportDocument.aspx.cs
+++ b/web/web/ExportDocument.aspx.cs
@@ -24,13 +24,16 @@
         switch (this.AppContext.GetString("action"))
         {
             case "exPortGwSp":
-                this.ExPortGwSp();
+                this.ExPortGwSp(); 
                 break;
             case "exPortGwSm":
                 this.ExportGwSmData();
                 break;
             case "exportGwStatisV3"://瀵煎嚭缁熻鎶ヨ〃
                 this.ExprortGwStatisV3();
+                break;
+            case "exportGwClient":  //瀵煎嚭瀹㈡埛淇℃伅
+                this.ExportGwClientData();
                 break;
         }
     }
@@ -343,4 +346,61 @@
             webTool.Export(dataTable, dictionary, "鏃ュ織_" + sDate, this.Context.Response);
         }
     }
+
+    //瀵煎嚭瀹㈡埛淇℃伅
+    private void ExportGwClientData()
+    {
+
+        string ClientID = this.AppContext.GetString("ClientID");
+        string Company = this.AppContext.GetString("Company");
+        string ClientName = this.AppContext.GetString("ClientName");
+        string Telephone = this.AppContext.GetString("Telephone");
+        string Salesman = this.AppContext.GetString("Salesman");
+        string SupportStaff = this.AppContext.GetString("SupportStaff");
+        string ProductId = this.AppContext.GetString("ProductId");
+        string Agent = this.AppContext.GetString("Agent");
+        int IsEnable = this.AppContext.GetInt("IsEnable", -1);
+
+        int pageIndex = this.AppContext.GetInt("pageIndex", 1);
+        int recordCount = 0;
+        int pageSize = this.AppContext.GetInt("pageSize", 999999999);
+
+        string str = "";
+        using (GwClientDao dao = new GwClientDao())
+        {
+            string permissionsSQL = dao.GetClientPermissions(_userId, _userType, "gwc");
+            var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, IsEnable, permissionsSQL);
+            if (recordCount> 1000000)
+            {
+                this.Response.Write("<script type='text/javascript'>alert('瀵煎嚭鏁版嵁涓嶈兘澶т簬100涓囨潯锛�');location.href='GwClient.aspx?IsEnable=" + IsEnable + "';</script>");
+                this.Response.End();
+
+            }
+
+            DataTable dataTable = dao.LoadClientDataTable(ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, IsEnable, permissionsSQL);
+
+            WebTool webTool = new WebTool();
+            Dictionary<string, string> dictionary = new Dictionary<string, string>();
+            dictionary["瀹㈡埛璐﹀彿"] = "CLIENT_ID";
+            dictionary["鍏徃鍚嶇О"] = "COMPANY";
+            dictionary["鑱旂郴浜�"] = "CLIENT_NAME";
+            dictionary["鑱旂郴鐢佃瘽"] = "TELEPHONE";
+            dictionary["璐︽埛浣欓(鍏�)"] = "BALANCE";  //宸查櫎浠�1000
+            dictionary["绱鍏呭��(鍏�)"] = "TOP_UP_AMOUNT_TOTAL";  //宸查櫎浠�1000
+            dictionary["涓氬姟鍛�"] = "SALESMAN_NAME";
+            dictionary["宸插垎閰嶄釜鎬т骇鍝�(澶氫釜鎸夆��,鈥濆垎闅�) "] = "PRODUCT_IDS";
+            dictionary["鐘舵�� "] = "Is_Enable";
+
+            string isEnableStr = "";
+            if (IsEnable == 1)
+            {
+                isEnableStr = "姝e父";
+            }
+            else
+            {
+                isEnableStr = "鍋滅敤";
+            }
+            webTool.Export(dataTable, dictionary, isEnableStr + "瀹㈡埛淇℃伅_" + DateTime.Now, this.Context.Response);
+        }
+    }
 }

--
Gitblit v1.9.1