duhongyu 3 yıl önce
ebeveyn
işleme
174a33adb7

+ 6 - 0
CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

@@ -30,6 +30,9 @@
30 30
     <WarningLevel>4</WarningLevel>
31 31
   </PropertyGroup>
32 32
   <ItemGroup>
33
+    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
34
+      <HintPath>..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
35
+    </Reference>
33 36
     <Reference Include="System" />
34 37
     <Reference Include="System.Core" />
35 38
     <Reference Include="System.Xml.Linq" />
@@ -186,6 +189,9 @@
186 189
       <Name>CallCenterApi.Model</Name>
187 190
     </ProjectReference>
188 191
   </ItemGroup>
192
+  <ItemGroup>
193
+    <None Include="packages.config" />
194
+  </ItemGroup>
189 195
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
190 196
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
191 197
        Other similar extension points exist, see Microsoft.Common.targets.

+ 1 - 1
CallCenterApi/CallCenterApi.BLL/T_Sys_Area.cs

@@ -113,7 +113,7 @@ namespace CallCenterApi.BLL
113 113
 		/// </summary>
114 114
 		public DataSet GetList(string strWhere, string filedOrder="")
115 115
 		{
116
-            var dt = GetRedis();
116
+           var dt = GetRedis();
117 117
             if (dt != null)
118 118
             {
119 119
                 var ds = new DataSet();

+ 58 - 55
CallCenterApi/CallCenterApi.BLL/T_Sys_DictionaryValue.cs

@@ -4,6 +4,7 @@ using System.Collections.Generic;
4 4
 
5 5
 using CallCenterApi.Model;
6 6
 using CallCenter.Utility;
7
+using Newtonsoft.Json;
7 8
 
8 9
 namespace CallCenterApi.BLL
9 10
 {
@@ -70,23 +71,24 @@ namespace CallCenterApi.BLL
70 71
         /// </summary>
71 72
         public CallCenterApi.Model.T_Sys_DictionaryValue GetModel(int F_ValueId)
72 73
 		{
73
-            var dt = GetRedis();
74
-            if (dt != null)
75
-            {
76
-                var dr = dt.Select("F_ValueId=" + F_ValueId);
77
-                if (dr != null && dr.Length > 0)
78
-                {
79
-                    return dal.DataRowToModel(dr[0]);
80
-                }
81
-                else
82
-                {
83
-                    return null;
84
-                }
85
-            }
86
-            else
87
-            {
88
-                return dal.GetModel(F_ValueId);
89
-            }
74
+            //var dt = GetRedis();
75
+            //if (dt != null)
76
+            //{
77
+            //    var dr = dt.Select("F_ValueId=" + F_ValueId);
78
+            //    if (dr != null && dr.Length > 0)
79
+            //    {
80
+            //        return dal.DataRowToModel(dr[0]);
81
+            //    }
82
+            //    else
83
+            //    {
84
+            //        return null;
85
+            //    }
86
+            //}
87
+            //else
88
+            //{
89
+            //    return dal.GetModel(F_ValueId);
90
+            //}
91
+            return dal.GetModel(F_ValueId);
90 92
         }
91 93
 
92 94
         /// <summary>
@@ -118,27 +120,27 @@ namespace CallCenterApi.BLL
118 120
         /// </summary>
119 121
         public DataSet GetList(string strWhere, string filedOrder = "")
120 122
         {
121
-            var dt = GetRedis();
122
-            if (dt != null)
123
-            {
124
-                var ds = new DataSet();
125
-
126
-                var drs = dt.Select(strWhere, filedOrder);
127
-                if (drs.Length > 0)
128
-                {
129
-                    ds.Tables.Add(drs.CopyToDataTable());
130
-                }
131
-                else
132
-                {
133
-                    ds.Tables.Add(new DataTable());
134
-                }
135
-                return ds;
136
-            }
137
-            else
138
-            {
139
-                return dal.GetList(strWhere);
140
-            }
123
+            //var dt = GetRedis();
124
+            //if (dt != null)
125
+            //{
126
+            //    var ds = new DataSet();
141 127
 
128
+            //    var drs = dt.Select(strWhere, filedOrder);
129
+            //    if (drs.Length > 0)
130
+            //    {
131
+            //        ds.Tables.Add(drs.CopyToDataTable());
132
+            //    }
133
+            //    else
134
+            //    {
135
+            //        ds.Tables.Add(new DataTable());
136
+            //    }
137
+            //    return ds;
138
+            //}
139
+            //else
140
+            //{
141
+            //    return dal.GetList(strWhere);
142
+            //}
143
+            return dal.GetList(strWhere);
142 144
         }
143 145
 
144 146
         /// <summary>
@@ -160,22 +162,24 @@ namespace CallCenterApi.BLL
160 162
 		/// </summary>
161 163
 		public List<CallCenterApi.Model.T_Sys_DictionaryValue> GetModelList(string strWhere, string filedOrder = "")
162 164
 		{
163
-            var dt = GetRedis();
164
-            if (dt != null)
165
-            {
166
-                var dtnew = new DataTable();
167
-                var drs = dt.Select(strWhere, filedOrder);
168
-                if (drs.Length > 0)
169
-                {
170
-                    dtnew = drs.CopyToDataTable();
171
-                }
172
-                return DataTableToList(dtnew);
173
-            }
174
-            else
175
-            {
176
-                DataSet ds = dal.GetList(strWhere, filedOrder);
177
-                return DataTableToList(ds.Tables[0]);
178
-            }
165
+            //var dt = GetRedis();
166
+            //if (dt != null)
167
+            //{
168
+            //    var dtnew = new DataTable();
169
+            //    var drs = dt.Select(strWhere, filedOrder);
170
+            //    if (drs.Length > 0)
171
+            //    {
172
+            //        dtnew = drs.CopyToDataTable();
173
+            //    }
174
+            //    return DataTableToList(dtnew);
175
+            //}
176
+            //else
177
+            //{
178
+            //    DataSet ds = dal.GetList(strWhere, filedOrder);
179
+            //    return DataTableToList(ds.Tables[0]);
180
+            //}
181
+            DataSet ds = dal.GetList(strWhere, filedOrder);
182
+            return DataTableToList(ds.Tables[0]);
179 183
         }
180 184
 
181 185
         /// <summary>
@@ -270,8 +274,7 @@ namespace CallCenterApi.BLL
270 274
         private DataTable InRedis()
271 275
         {
272 276
             var dt = dal.GetList("").Tables[0];
273
-
274
-            RedisHelper1.StringSet("T_Sys_DictionaryValue", dt.ToJson(), new TimeSpan(24, 0, 0));
277
+            RedisHelper1.StringSet("T_Sys_DictionaryValue", dt.ToJson (), new TimeSpan(24, 0, 0));
275 278
 
276 279
             return dt;
277 280
         }

+ 81 - 76
CallCenterApi/CallCenterApi.BLL/T_Sys_UserAccount.cs

@@ -83,23 +83,24 @@ namespace CallCenterApi.BLL
83 83
         public Model.T_Sys_UserAccount GetModel(int F_UserId)
84 84
         {
85 85
 
86
-            var dt = GetRedis();
87
-            if (dt != null)
88
-            {
89
-                var dr = dt.Select("F_UserId=" + F_UserId);
90
-                if (dr != null && dr.Count() > 0)
91
-                {
92
-                    return dal.DataRowToModel(dr[0]);
93
-                }
94
-                else
95
-                {
96
-                    return null;
97
-                }
98
-            }
99
-            else
100
-            {
101
-                return dal.GetModel(F_UserId);
102
-            }
86
+            //var dt = GetRedis();
87
+            //if (dt != null)
88
+            //{
89
+            //    var dr = dt.Select("F_UserId=" + F_UserId);
90
+            //    if (dr != null && dr.Count() > 0)
91
+            //    {
92
+            //        return dal.DataRowToModel(dr[0]);
93
+            //    }
94
+            //    else
95
+            //    {
96
+            //        return null;
97
+            //    }
98
+            //}
99
+            //else
100
+            //{
101
+            //    return dal.GetModel(F_UserId);
102
+            //}
103
+            return dal.GetModel(F_UserId);
103 104
         }
104 105
         /// <summary>
105 106
         /// 得到一个对象实体
@@ -107,23 +108,24 @@ namespace CallCenterApi.BLL
107 108
         public Model.T_Sys_UserAccount GetModel(string F_UserCode)
108 109
         {
109 110
 
110
-            var dt = GetRedis();
111
-            if (dt != null)
112
-            {
113
-                var dr = dt.Select("F_UserCode='" + F_UserCode+"'");
114
-                if (dr != null&& dr.Count()>0)
115
-                {
116
-                    return dal.DataRowToModel(dr[0]);
117
-                }
118
-                else
119
-                {
120
-                    return null;
121
-                }
122
-            }
123
-            else
124
-            {
125
-                return dal.GetModel(F_UserCode);
126
-            }
111
+            //var dt = GetRedis();
112
+            //if (dt != null)
113
+            //{
114
+            //    var dr = dt.Select("F_UserCode='" + F_UserCode+"'");
115
+            //    if (dr != null&& dr.Count()>0)
116
+            //    {
117
+            //        return dal.DataRowToModel(dr[0]);
118
+            //    }
119
+            //    else
120
+            //    {
121
+            //        return null;
122
+            //    }
123
+            //}
124
+            //else
125
+            //{
126
+            //    return dal.GetModel(F_UserCode);
127
+            //}
128
+            return dal.GetModel(F_UserCode);
127 129
         }
128 130
         /// <summary>
129 131
         /// 得到一个对象实体
@@ -171,33 +173,34 @@ namespace CallCenterApi.BLL
171 173
         /// </summary>
172 174
         public DataSet GetList(string strWhere, string filedOrder = "")
173 175
         {
174
-            var dt = GetRedis();
175
-            if (dt != null)
176
-            {
177
-                var ds = new DataSet();
178
-                if (string.IsNullOrEmpty(strWhere))
179
-                {
180
-                    ds.Tables.Add(dt.Copy());
181
-                }
182
-                else
183
-                {
184
-                    var drs = dt.Select(strWhere, filedOrder);
185
-                    if (drs.Length > 0)
186
-                    {
187
-                        ds.Tables.Add(drs.CopyToDataTable());
188
-                    }
189
-                    else
190
-                    {
191
-                        ds.Tables.Add(new DataTable());
192
-                    }
193
-                }
176
+            //var dt = GetRedis();
177
+            //if (dt != null)
178
+            //{
179
+            //    var ds = new DataSet();
180
+            //    if (string.IsNullOrEmpty(strWhere))
181
+            //    {
182
+            //        ds.Tables.Add(dt.Copy());
183
+            //    }
184
+            //    else
185
+            //    {
186
+            //        var drs = dt.Select(strWhere, filedOrder);
187
+            //        if (drs.Length > 0)
188
+            //        {
189
+            //            ds.Tables.Add(drs.CopyToDataTable());
190
+            //        }
191
+            //        else
192
+            //        {
193
+            //            ds.Tables.Add(new DataTable());
194
+            //        }
195
+            //    }
194 196
 
195
-                return ds;
196
-            }
197
-            else
198
-            {
199
-                return dal.GetList(strWhere, filedOrder);
200
-            }
197
+            //    return ds;
198
+            //}
199
+            //else
200
+            //{
201
+            //    return dal.GetList(strWhere, filedOrder);
202
+            //}
203
+            return dal.GetList(strWhere, filedOrder);
201 204
         }
202 205
 
203 206
         /// <summary>
@@ -232,22 +235,24 @@ namespace CallCenterApi.BLL
232 235
         /// </summary>
233 236
         public List<Model.T_Sys_UserAccount> GetModelList(string strWhere, string filedOrder = "")
234 237
         {
235
-            var dt = GetRedis();
236
-            if (dt != null)
237
-            {
238
-                var dtnew = new DataTable();
239
-                var drs = dt.Select(strWhere, filedOrder);
240
-                if (drs.Length > 0)
241
-                {
242
-                    dtnew = drs.CopyToDataTable();
243
-                }
244
-                return DataTableToList(dtnew);
245
-            }
246
-            else
247
-            {
248
-                DataSet ds = dal.GetList(strWhere, filedOrder);
249
-                return DataTableToList(ds.Tables[0]);
250
-            }
238
+            //var dt = GetRedis();
239
+            //if (dt != null)
240
+            //{
241
+            //    var dtnew = new DataTable();
242
+            //    var drs = dt.Select(strWhere, filedOrder);
243
+            //    if (drs.Length > 0)
244
+            //    {
245
+            //        dtnew = drs.CopyToDataTable();
246
+            //    }
247
+            //    return DataTableToList(dtnew);
248
+            //}
249
+            //else
250
+            //{
251
+            //    DataSet ds = dal.GetList(strWhere, filedOrder);
252
+            //    return DataTableToList(ds.Tables[0]);
253
+            //}
254
+            DataSet ds = dal.GetList(strWhere, filedOrder);
255
+            return DataTableToList(ds.Tables[0]);
251 256
         }
252 257
 
253 258
         /// <summary>

+ 3 - 0
CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

@@ -182,6 +182,9 @@
182 182
       <Name>CallCenterApi.Model</Name>
183 183
     </ProjectReference>
184 184
   </ItemGroup>
185
+  <ItemGroup>
186
+    <Content Include="log4net.config" />
187
+  </ItemGroup>
185 188
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
186 189
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
187 190
        Other similar extension points exist, see Microsoft.Common.targets.

+ 129 - 0
CallCenterApi/CallCenterApi.DAL/log4net.config

@@ -0,0 +1,129 @@
1
+<?xml version="1.0" encoding="utf-8" ?>
2
+<configuration>
3
+  <configSections>
4
+    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
5
+  </configSections>
6
+
7
+  <log4net>
8
+    <!--根配置-->
9
+    <root>
10
+      <!--日志级别:可选值: ERROR > WARN > INFO > DEBUG -->
11
+      <level value="ERROR"/>
12
+      <level value="WARN"/>
13
+      <level value="INFO"/>
14
+      <level value="DEBUG"/>
15
+      <appender-ref ref="ErrorLog" />
16
+      <appender-ref ref="WarnLog" />
17
+      <appender-ref ref="InfoLog" />
18
+      <appender-ref ref="DebugLog" />
19
+    </root>
20
+    <!-- 错误 Error.log-->
21
+    <appender name="ErrorLog" type="log4net.Appender.RollingFileAppender">
22
+      <!--目录路径,可以是相对路径或绝对路径-->
23
+      <param name="File" value="D:\CallCenter_log"/>
24
+      <!--文件名,按日期生成文件夹-->
25
+      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Error.log&quot;"/>
26
+      <!--追加到文件-->
27
+      <appendToFile value="true"/>
28
+      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
29
+      <rollingStyle value="Composite"/>
30
+      <!--写到一个文件-->
31
+      <staticLogFileName value="false"/>
32
+      <!--单个文件大小。单位:KB|MB|GB-->
33
+      <maximumFileSize value="20MB"/>
34
+      <!--最多保留的文件数,设为"-1"则不限-->
35
+      <maxSizeRollBackups value="-1"/>
36
+      <!--日志格式-->
37
+      <layout type="log4net.Layout.PatternLayout">
38
+        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
39
+      </layout>
40
+      <filter type="log4net.Filter.LevelRangeFilter">
41
+        <param name="LevelMin" value="ERROR" />
42
+        <param name="LevelMax" value="ERROR" />
43
+      </filter>
44
+    </appender>
45
+
46
+    <!-- 警告 Warn.log-->
47
+    <appender name="WarnLog" type="log4net.Appender.RollingFileAppender">
48
+      <!--目录路径,可以是相对路径或绝对路径-->
49
+      <param name="File" value="D:\CallCenter_log"/>
50
+      <!--文件名,按日期生成文件夹-->
51
+      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Warn.log&quot;"/>
52
+      <!--追加到文件-->
53
+      <appendToFile value="true"/>
54
+      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
55
+      <rollingStyle value="Composite"/>
56
+      <!--写到一个文件-->
57
+      <staticLogFileName value="false"/>
58
+      <!--单个文件大小。单位:KB|MB|GB-->
59
+      <maximumFileSize value="20MB"/>
60
+      <!--最多保留的文件数,设为"-1"则不限-->
61
+      <maxSizeRollBackups value="-1"/>
62
+      <!--日志格式-->
63
+      <layout type="log4net.Layout.PatternLayout">
64
+        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
65
+      </layout>
66
+      <filter type="log4net.Filter.LevelRangeFilter">
67
+        <param name="LevelMin" value="WARN" />
68
+        <param name="LevelMax" value="WARN" />
69
+      </filter>
70
+    </appender>
71
+
72
+    <!-- 信息 Info.log-->
73
+    <appender name="InfoLog" type="log4net.Appender.RollingFileAppender">
74
+      <!--目录路径,可以是相对路径或绝对路径-->
75
+      <param name="File" value="D:\CallCenter_log"/>
76
+      <!--文件名,按日期生成文件夹-->
77
+      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Info.log&quot;"/>
78
+      <!--追加到文件-->
79
+      <appendToFile value="true"/>
80
+      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
81
+      <rollingStyle value="Composite"/>
82
+      <!--写到一个文件-->
83
+      <staticLogFileName value="false"/>
84
+      <!--单个文件大小。单位:KB|MB|GB-->
85
+      <maximumFileSize value="20MB"/>
86
+      <!--最多保留的文件数,设为"-1"则不限-->
87
+      <maxSizeRollBackups value="-1"/>
88
+      <!--日志格式-->
89
+      <layout type="log4net.Layout.PatternLayout">
90
+        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
91
+      </layout>
92
+      <filter type="log4net.Filter.LevelRangeFilter">
93
+        <param name="LevelMin" value="INFO" />
94
+        <param name="LevelMax" value="INFO" />
95
+      </filter>
96
+    </appender>
97
+
98
+    <!-- 调试 Debug.log-->
99
+    <appender name="DebugLog" type="log4net.Appender.RollingFileAppender">
100
+      <!--目录路径,可以是相对路径或绝对路径-->
101
+      <param name="File" value="D:\CallCenter_log"/>
102
+      <!--文件名,按日期生成文件夹-->
103
+      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Debug.log&quot;"/>
104
+      <!--追加到文件-->
105
+      <appendToFile value="true"/>
106
+      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
107
+      <rollingStyle value="Composite"/>
108
+      <!--写到一个文件-->
109
+      <staticLogFileName value="false"/>
110
+      <!--单个文件大小。单位:KB|MB|GB-->
111
+      <maximumFileSize value="20MB"/>
112
+      <!--最多保留的文件数,设为"-1"则不限-->
113
+      <maxSizeRollBackups value="-1"/>
114
+      <!--日志格式-->
115
+      <layout type="log4net.Layout.PatternLayout">
116
+        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
117
+      </layout>
118
+      <filter type="log4net.Filter.LevelRangeFilter">
119
+        <param name="LevelMin" value="DEBUG" />
120
+        <param name="LevelMax" value="DEBUG" />
121
+      </filter>
122
+    </appender>
123
+
124
+
125
+  </log4net>
126
+  <startup>
127
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
128
+  </startup>
129
+</configuration>

+ 48 - 48
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs

@@ -31,15 +31,15 @@ namespace CallCenterApi.Interface.Controllers
31 31
                 pid = "0";
32 32
                 sql += " and F_PrentId=0   ";
33 33
             }
34
-            if (pid == "0")
35
-            {
36
-                var strList = RedisHelper1.StringGet("ZTreeList_0");
37
-                if (strList != null)
38
-                {
39
-                    return Success("加载成功",strList.ToString().ToObject<List<Model.TreeModel>>());
40
-                }
34
+            //if (pid == "0")
35
+            //{
36
+            //    var strList = RedisHelper1.StringGet("ZTreeList_0");
37
+            //    if (strList != null)
38
+            //    {
39
+            //        return Success("加载成功",strList.ToString().ToObject<List<Model.TreeModel>>());
40
+            //    }
41 41
               
42
-            }
42
+            //}
43 43
           
44 44
 
45 45
             dt = new BLL.T_Sys_DictionaryValue().GetList(" 1=1 " + sql).Tables[0];
@@ -57,7 +57,7 @@ namespace CallCenterApi.Interface.Controllers
57 57
             List<Model.TreeModel> modelList = BindTree(dt, "0", tab2);
58 58
             if (pid == "0")
59 59
             {
60
-                RedisHelper1.StringSet("ZTreeList_0", modelList.ToJson());
60
+              //  RedisHelper1.StringSet("ZTreeList_0", modelList.ToJson());
61 61
             }
62 62
             if (modelList.Count > 0)
63 63
             {
@@ -81,14 +81,14 @@ namespace CallCenterApi.Interface.Controllers
81 81
                 pid = "0";
82 82
                 sql += " and F_PrentId=0   ";
83 83
             }
84
-            if (pid=="38")
85
-            {
86
-                string rjson = RedisHelper1.StringGet("ztree_38new")?.ToString() ?? "";
87
-                if (!string.IsNullOrEmpty(rjson))
88
-                {
89
-                    return Success("加载成功", rjson);
90
-                }
91
-            }
84
+            //if (pid=="38")
85
+            //{
86
+            //    string rjson = RedisHelper1.StringGet("ztree_38new")?.ToString() ?? "";
87
+            //    if (!string.IsNullOrEmpty(rjson))
88
+            //    {
89
+            //        return Success("加载成功", rjson);
90
+            //    }
91
+            //}
92 92
            
93 93
 
94 94
             dt = new BLL.T_Sys_DictionaryValue().GetList(" 1=1 " + sql).Tables[0];
@@ -100,7 +100,7 @@ namespace CallCenterApi.Interface.Controllers
100 100
             List<TreeModelNew> modelList = BindTreeNew(dt, "0", tab2);
101 101
             if (pid == "38")
102 102
             {
103
-                RedisHelper1.StringSet("ztree_38new", modelList.ToJson());
103
+              //  RedisHelper1.StringSet("ztree_38new", modelList.ToJson());
104 104
             }
105 105
             if (modelList.Count > 0)
106 106
             {
@@ -228,15 +228,15 @@ namespace CallCenterApi.Interface.Controllers
228 228
         {
229 229
             DataTable dt = new DataTable();
230 230
             string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));
231
-            if (pid == "38")
232
-            {
233
-                string rjson = RedisHelper1.StringGet("ztree_38")?.ToString()??"";
234
-                if (!string.IsNullOrEmpty(rjson))
235
-                {
236
-                    return Success("加载成功", rjson.ToObject<DataTable>());
237
-                }
238
-
239
-            }
231
+            //if (pid == "38")
232
+            //{
233
+            //    string rjson = RedisHelper1.StringGet("ztree_38")?.ToString()??"";
234
+            //    if (!string.IsNullOrEmpty(rjson))
235
+            //    {
236
+            //        return Success("加载成功", rjson.ToObject<DataTable>());
237
+            //    }
238
+
239
+            //}
240 240
             string sql = " and F_State=0 ";
241 241
             if (pid.Trim() != "")
242 242
             {
@@ -255,7 +255,7 @@ namespace CallCenterApi.Interface.Controllers
255 255
 
256 256
             if (pid == "38")
257 257
             {
258
-                RedisHelper1.StringSet("ztree_38", tab2.ToJson());
258
+               // RedisHelper1.StringSet("ztree_38", tab2.ToJson());
259 259
             }
260 260
 
261 261
             return Success("加载成功", tab2);
@@ -265,28 +265,28 @@ namespace CallCenterApi.Interface.Controllers
265 265
         {
266 266
             DataTable dt = new DataTable();
267 267
 
268
-            string rjson = RedisHelper1.StringGet("key_38")?.ToString() ?? "";
269
-            if (!string.IsNullOrEmpty(rjson))
270
-            {
271
-                dt = rjson.ToObject<DataTable>();
272
-                var dtnew = new DataTable();
273
-                if (string.IsNullOrEmpty(key))
274
-                {
275
-                    dtnew = dt;
276
-                }
277
-                else
278
-                {
279
-                    var drs = dt.Select(" name like '%" + key + "%'","names");
280
-                    if (drs.Length > 0)
281
-                    {
282
-                        dtnew = drs.CopyToDataTable();
283
-                    }
284
-                }
285
-                return Success("加载成功", dtnew);
286
-            }
268
+            //string rjson = RedisHelper1.StringGet("key_38")?.ToString() ?? "";
269
+            //if (!string.IsNullOrEmpty(rjson))
270
+            //{
271
+            //    dt = rjson.ToObject<DataTable>();
272
+            //    var dtnew = new DataTable();
273
+            //    if (string.IsNullOrEmpty(key))
274
+            //    {
275
+            //        dtnew = dt;
276
+            //    }
277
+            //    else
278
+            //    {
279
+            //        var drs = dt.Select(" name like '%" + key + "%'","names");
280
+            //        if (drs.Length > 0)
281
+            //        {
282
+            //            dtnew = drs.CopyToDataTable();
283
+            //        }
284
+            //    }
285
+            //    return Success("加载成功", dtnew);
286
+            //}
287 287
 
288 288
             var tab2 = DbHelperSQL.Query("select * from View_Keys").Tables[0];
289
-            RedisHelper1.StringSet("key_38", tab2.ToJson());
289
+           // RedisHelper1.StringSet("key_38", tab2.ToJson());
290 290
 
291 291
             string sql = "";
292 292
             if (string.IsNullOrEmpty(key))

+ 6 - 6
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -452,15 +452,15 @@ namespace CallCenterApi.Interface.Controllers
452 452
         public ActionResult GetSeatList()
453 453
         {
454 454
             //List<Model.T_Sys_UserAccount> userSeartList = sysUserAccountBll.GetModelList(" f_seatflag=1 ");
455
-            var drs = sysUserAccountBll.GetList("").Tables[0].Select("f_seatflag=1");
455
+            var drs = sysUserAccountBll.GetModelList ("f_seatflag=1");
456 456
             var userSeartList = from r in drs select new {
457
-                F_UserId = r["F_UserId"].ToString(),
458
-                F_UserName = r["F_UserName"].ToString(),
459
-                F_UserCode = r["F_UserCode"].ToString()
457
+                F_UserId =r .F_UserId ,
458
+                F_UserName = r.F_UserName,
459
+                F_UserCode = r.F_UserCode
460 460
             };
461
-            var result = userSeartList.OrderBy(p => p.F_UserName.Substring(p.F_UserName.Length - 1)).ToList();
461
+           // var result = userSeartList.OrderBy(p => p.F_UserName.Substring(p.F_UserName.Length - 1)).ToList();
462 462
 
463
-            return Success("列表加载成功", result);
463
+            return Success("列表加载成功", userSeartList);
464 464
         }
465 465
         //根据角色获取用户
466 466
         public ActionResult GetUsersList(string rolecode)

+ 7 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -8626,11 +8626,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
8626 8626
 
8627 8627
                        
8628 8628
                         var bldt = DbHelperSQL.Query(blsql).Tables[0];
8629
-
8630
-                        if (User.F_RoleCode == "WLDW" && bldt.Rows[0]["F_MainDeptId"].ToString() != User.F_DeptId.ToString())
8629
+                        if (bldt != null && bldt.Rows.Count > 0)
8631 8630
                         {
8632
-                            bldt.Rows[0]["F_Result"] = "";
8631
+                            if (User.F_RoleCode == "WLDW" && bldt.Rows[0]["F_CreateDeptId"].ToString() != User.F_DeptId.ToString())
8632
+                            {
8633
+
8634
+                                bldt.Rows[0]["F_Result"] = "";
8635
+                            }
8633 8636
                         }
8637
+                           
8634 8638
                         if (configfj != null)
8635 8639
                         {
8636 8640
                             bldt = BindFileDatas(bldt, configfj.F_ParamValue);

+ 3 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs

@@ -314,7 +314,7 @@ namespace CallCenterApi.Interface.Models.Common
314 314
                     if (code == "ZJZY")
315 315
                         buttons.Add(edit());
316 316
                     //调度专员 中心领导管理员 管理员
317
-                    if (code == "ZXLD" || code == "YSZY" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "MTDD")
317
+                    if (code == "ZXLD" || code == "YSZY" || code == "GLY" || code == "ZXLDGLYGLY" || code == "DDZG" || code == "MTDD")
318 318
                     {
319 319
                         if (issh ==2 && code == "MTDD")
320 320
                         {
@@ -362,7 +362,7 @@ namespace CallCenterApi.Interface.Models.Common
362 362
                     break;
363 363
                 case "4":
364 364
                     //二级网络单位 管理员
365
-                    if (code == "WLDW" || code == "GLY" || code == "DDZG")
365
+                    if (code == "WLDW" || code == "DDZG")
366 366
                     {
367 367
                         buttons.Add(feedback());// buttons.Add(reback());
368 368
                         if (iszbdw == "1" || code == "GLY" || code == "DDZG")
@@ -714,6 +714,7 @@ namespace CallCenterApi.Interface.Models.Common
714 714
             //调度专员 中心领导管理员 管理员
715 715
             if (state != "0" && state != "9" && (code == "ZXLD" || code == "YSZY" || code == "MTDD"|| code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG"))
716 716
             {
717
+               
717 718
                 buttons.Add(forceend());
718 719
             }
719 720
             return buttons;