From 41ecad7e49a93c493832282b5ecd6c69f464b648 Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期一, 23 五月 2022 01:07:51 +0800
Subject: [PATCH] 日志文件合并处理

---
 web/web/GwClient.aspx.cs |  169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 164 insertions(+), 5 deletions(-)

diff --git a/web/web/GwClient.aspx.cs b/web/web/GwClient.aspx.cs
index 4acc808..e579884 100644
--- a/web/web/GwClient.aspx.cs
+++ b/web/web/GwClient.aspx.cs
@@ -13,6 +13,7 @@
 {
 
     protected List<SysUser> SysUserList;
+    protected List<GwProduct> GwProductList;
 
     protected void Page_Load(object sender, EventArgs e)
     {
@@ -29,16 +30,26 @@
             this.SysUserList = userDao.LoadInfoList(out recordCount, int1, int2);
 
         }
+
+        //鑾峰彇鍚敤鐨勪骇鍝�
+        using (GwProductDao gwProductDao = new GwProductDao())
+        {
+            GwProduct bean = new GwProduct();
+            bean.Classes = 1;
+            bean.IsDefault = -1;
+            bean.IsEnable = -1;
+            this.GwProductList = gwProductDao.getAllList(bean);
+        }
     }
 
 
-    //鑾峰彇浜у搧鍒嗙被淇℃伅
-    public string SysUserOptions(int userId)
+    //褰掑睘涓氬姟鍛�
+    public string salesmanOptions(int userId)
     {
         StringBuilder stringBuilder = new StringBuilder();
         if (this.SysUserList.Count == 0)
             return "<option value=''>鏃�</option>";
-        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)0, (object)"鏃�");
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"鏃�");
         foreach (SysUser bean in this.SysUserList)
         {
             //鍋滅敤鐨勭敤鎴蜂笉鍐嶆樉绀�
@@ -46,8 +57,8 @@
             {
                 continue;
             }
-            //杩囨护瓒呯骇绠$悊鍛�
-            if (bean.UserID == 1)
+            //杩囨护鐢ㄦ埛绫诲瀷 1-绠$悊鍛�;2-涓氬姟鍛�--鍏ㄥ憳;3-涓氬姟涓荤;4-涓氬姟鎬荤洃;5-瀹㈡湇浜哄憳;6-璐㈠姟浜哄憳;99-鍏朵粬
+            if (bean.UserType == 6 || bean.UserType == 99)
             {
                 continue;
             }
@@ -60,4 +71,152 @@
         return stringBuilder.ToString();
     }
 
+    //褰掑睘瀹㈡埛缁忕悊
+    public string customerManagerOptions(int userId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.SysUserList.Count == 0)
+            return "<option value=''>鏃�</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"鏃�");
+        foreach (SysUser bean in this.SysUserList)
+        {
+            //鍋滅敤鐨勭敤鎴蜂笉鍐嶆樉绀�
+            if (bean.Status == 0)
+            {
+                continue;
+            }
+            //杩囨护鐢ㄦ埛绫诲瀷 1-绠$悊鍛�;2-涓氬姟鍛�--鍏ㄥ憳;3-涓氬姟涓荤;4-涓氬姟鎬荤洃;5-瀹㈡湇浜哄憳;6-璐㈠姟浜哄憳;99-鍏朵粬
+            if (bean.UserType == 2)
+            {
+                continue;
+            }
+
+            if (userId == bean.UserID)
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+        }
+        return stringBuilder.ToString();
+    }
+
+    //褰掑睘瀹㈡湇浜哄憳
+    public string supportStaffOptions(int userId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.SysUserList.Count == 0)
+            return "<option value=''>鏃�</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"鏃�");
+        foreach (SysUser bean in this.SysUserList)
+        {
+            //鍋滅敤鐨勭敤鎴蜂笉鍐嶆樉绀�
+            if (bean.Status == 0)
+            {
+                continue;
+            }
+            //杩囨护鐢ㄦ埛绫诲瀷 1-绠$悊鍛�;2-涓氬姟鍛�--鍏ㄥ憳;3-涓氬姟涓荤;4-涓氬姟鎬荤洃;5-瀹㈡湇浜哄憳;6-璐㈠姟浜哄憳;99-鍏朵粬
+            if (bean.UserType != 1 && bean.UserType != 5 )
+            {
+                continue;
+            }
+
+            if (userId == bean.UserID)
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+        }
+        return stringBuilder.ToString();
+    }
+
+    //褰掑睘璐㈠姟浜哄憳
+    public string financialStaffOptions(int userId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.SysUserList.Count == 0)
+            return "<option value=''>鏃�</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"鏃�");
+        foreach (SysUser bean in this.SysUserList)
+        {
+            //鍋滅敤鐨勭敤鎴蜂笉鍐嶆樉绀�
+            if (bean.Status == 0)
+            {
+                continue;
+            }
+            //杩囨护鐢ㄦ埛绫诲瀷 1-绠$悊鍛�;2-涓氬姟鍛�--鍏ㄥ憳;3-涓氬姟涓荤;4-涓氬姟鎬荤洃;5-瀹㈡湇浜哄憳;6-璐㈠姟浜哄憳;99-鍏朵粬
+            if (bean.UserType != 1 && bean.UserType != 6)
+            {
+                continue;
+            }
+
+            if (userId == bean.UserID)
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+        }
+        return stringBuilder.ToString();
+    }
+
+
+    //鑾峰彇浜у搧淇℃伅
+    public string GetProductOptions(string productId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.GwProductList.Count == 0)
+            return "<option value=''>鏃�</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"鏃�");
+        foreach (GwProduct bean in this.GwProductList)
+        {
+            //鍋滅敤鐨勪骇鍝佸垎绫讳笉鍐嶆樉绀�
+            if (bean.IsEnable == 0)
+            {
+                continue;
+            }
+            //杩囨护浜у搧绫诲埆
+            if (bean.Classes == 0)
+            {
+                continue;
+            }
+
+            if (productId.Equals(bean.Id))
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+        }
+        return stringBuilder.ToString();
+    }
+
+
+    //鑾峰彇涓�т骇鍝佷俊鎭�
+    public string GetPersonalityProductOptions(string productId)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (this.GwProductList.Count == 0)
+            return "<option value=''>鏃�</option>";
+        stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"鏃�");
+        foreach (GwProduct bean in this.GwProductList)
+        {
+            //鍋滅敤鐨勪骇鍝佸垎绫讳笉鍐嶆樉绀�
+            if (bean.IsEnable == 0)
+            {
+                continue;
+            }
+            //杩囨护浜у搧绫诲埆
+            if (bean.Classes == 0)
+            {
+                continue;
+            }
+            //杩囨护鎺ㄥ箍鏂瑰紡
+            if (bean.IsDefault == 1)
+            {
+                continue;
+            }
+
+            if (productId.Equals(bean.Id))
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+            else
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+        }
+        return stringBuilder.ToString();
+    }
+
+
 }

--
Gitblit v1.9.1