zhupei il y a 4 ans
Parent
commit
b47ce580d3

+ 1 - 1
RMYY_CallCenter_Api.Bll/T_Sys_DictionaryBase.cs

9
     /// </summary>
9
     /// </summary>
10
     public partial class T_Sys_DictionaryBase
10
     public partial class T_Sys_DictionaryBase
11
     {
11
     {
12
-        private readonly RMYY_CallCenter_Api.DAL.T_Sys_DictionaryBase dal = new RMYY_CallCenter_Api.DAL.T_Sys_DictionaryBase();
12
+        private readonly RMYY_CallCenter_Api.Dal.T_Sys_DictionaryBase dal = new RMYY_CallCenter_Api.Dal.T_Sys_DictionaryBase();
13
         public T_Sys_DictionaryBase()
13
         public T_Sys_DictionaryBase()
14
         { }
14
         { }
15
         #region  BasicMethod
15
         #region  BasicMethod

+ 1 - 1
RMYY_CallCenter_Api.Bll/T_Sys_DictionaryValue.cs

9
     /// </summary>
9
     /// </summary>
10
     public partial  class T_Sys_DictionaryValue
10
     public partial  class T_Sys_DictionaryValue
11
     {
11
     {
12
-        private readonly RMYY_CallCenter_Api.DAL.T_Sys_DictionaryValue dal = new RMYY_CallCenter_Api.DAL.T_Sys_DictionaryValue();
12
+        private readonly RMYY_CallCenter_Api.Dal.T_Sys_DictionaryValue dal = new RMYY_CallCenter_Api.Dal.T_Sys_DictionaryValue();
13
         public T_Sys_DictionaryValue()
13
         public T_Sys_DictionaryValue()
14
         { }
14
         { }
15
         #region  BasicMethod
15
         #region  BasicMethod

+ 1 - 1
RMYY_CallCenter_Api.Bll/T_Sys_GongDan.cs

9
     /// </summary>
9
     /// </summary>
10
     public partial class T_Sys_GongDan
10
     public partial class T_Sys_GongDan
11
     {
11
     {
12
-        private readonly RMYY_CallCenter_Api.DAL.T_Sys_GongDan dal = new RMYY_CallCenter_Api.DAL.T_Sys_GongDan();
12
+        private readonly RMYY_CallCenter_Api.Dal.T_Sys_GongDan dal = new RMYY_CallCenter_Api.Dal.T_Sys_GongDan();
13
         public T_Sys_GongDan()
13
         public T_Sys_GongDan()
14
         { }
14
         { }
15
         #region  BasicMethod
15
         #region  BasicMethod

+ 1 - 1
RMYY_CallCenter_Api.Bll/T_Sys_GongDanType.cs

9
     /// </summary>
9
     /// </summary>
10
     public partial class T_Sys_GongDanType
10
     public partial class T_Sys_GongDanType
11
     {
11
     {
12
-        private readonly RMYY_CallCenter_Api.DAL.T_Sys_GongDanType dal = new RMYY_CallCenter_Api.DAL.T_Sys_GongDanType();
12
+        private readonly RMYY_CallCenter_Api.Dal.T_Sys_GongDanType dal = new RMYY_CallCenter_Api.Dal.T_Sys_GongDanType();
13
         public T_Sys_GongDanType()
13
         public T_Sys_GongDanType()
14
         { }
14
         { }
15
         #region  BasicMethod
15
         #region  BasicMethod

+ 5 - 5
RMYY_CallCenter_Api.Dal/T_Sys_DictionaryBase.cs

4
 using System.Data.SqlClient;
4
 using System.Data.SqlClient;
5
 using RMYY_CallCenter_Api.DB;
5
 using RMYY_CallCenter_Api.DB;
6
 
6
 
7
-namespace RMYY_CallCenter_Api.DAL
7
+namespace RMYY_CallCenter_Api.Dal
8
 {
8
 {
9
     /// <summary>
9
     /// <summary>
10
     /// 数据访问类:T_Sys_DictionaryBase
10
     /// 数据访问类:T_Sys_DictionaryBase
148
         {
148
         {
149
 
149
 
150
             StringBuilder strSql = new StringBuilder();
150
             StringBuilder strSql = new StringBuilder();
151
-            strSql.Append("select  top 1 F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State from T_Sys_DictionaryBase ");
151
+            strSql.Append("select  top 1 F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State from T_Sys_DictionaryBase with(nolock)");
152
             strSql.Append(" where F_DictionaryFlag=@F_DictionaryFlag ");
152
             strSql.Append(" where F_DictionaryFlag=@F_DictionaryFlag ");
153
             SqlParameter[] parameters = {
153
             SqlParameter[] parameters = {
154
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50)         };
154
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50)         };
213
         {
213
         {
214
             StringBuilder strSql = new StringBuilder();
214
             StringBuilder strSql = new StringBuilder();
215
             strSql.Append("select F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State ");
215
             strSql.Append("select F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State ");
216
-            strSql.Append(" FROM T_Sys_DictionaryBase ");
216
+            strSql.Append(" FROM T_Sys_DictionaryBase (NOLOCK) ");
217
             if (strWhere.Trim() != "")
217
             if (strWhere.Trim() != "")
218
             {
218
             {
219
                 strSql.Append(" where " + strWhere);
219
                 strSql.Append(" where " + strWhere);
233
                 strSql.Append(" top " + Top.ToString());
233
                 strSql.Append(" top " + Top.ToString());
234
             }
234
             }
235
             strSql.Append(" F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State ");
235
             strSql.Append(" F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State ");
236
-            strSql.Append(" FROM T_Sys_DictionaryBase ");
236
+            strSql.Append(" FROM T_Sys_DictionaryBase (NOLOCK) ");
237
             if (strWhere.Trim() != "")
237
             if (strWhere.Trim() != "")
238
             {
238
             {
239
                 strSql.Append(" where " + strWhere);
239
                 strSql.Append(" where " + strWhere);
248
         public int GetRecordCount(string strWhere)
248
         public int GetRecordCount(string strWhere)
249
         {
249
         {
250
             StringBuilder strSql = new StringBuilder();
250
             StringBuilder strSql = new StringBuilder();
251
-            strSql.Append("select count(1) FROM T_Sys_DictionaryBase ");
251
+            strSql.Append("select count(1) FROM T_Sys_DictionaryBase (NOLOCK)");
252
             if (strWhere.Trim() != "")
252
             if (strWhere.Trim() != "")
253
             {
253
             {
254
                 strSql.Append(" where " + strWhere);
254
                 strSql.Append(" where " + strWhere);

+ 6 - 6
RMYY_CallCenter_Api.Dal/T_Sys_DictionaryValue.cs

4
 using System.Data.SqlClient;
4
 using System.Data.SqlClient;
5
 using RMYY_CallCenter_Api.DB;
5
 using RMYY_CallCenter_Api.DB;
6
 
6
 
7
-namespace RMYY_CallCenter_Api.DAL
7
+namespace RMYY_CallCenter_Api.Dal
8
 {
8
 {
9
     /// <summary>
9
     /// <summary>
10
     /// 数据访问类:T_Sys_DictionaryValue
10
     /// 数据访问类:T_Sys_DictionaryValue
20
         public bool Exists(int F_DictionaryValueId)
20
         public bool Exists(int F_DictionaryValueId)
21
         {
21
         {
22
             StringBuilder strSql = new StringBuilder();
22
             StringBuilder strSql = new StringBuilder();
23
-            strSql.Append("select count(1) from T_Sys_DictionaryValue");
23
+            strSql.Append("select count(1) from T_Sys_DictionaryValue with(nolock)");
24
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
24
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
25
             SqlParameter[] parameters = {
25
             SqlParameter[] parameters = {
26
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)
26
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)
158
         {
158
         {
159
 
159
 
160
             StringBuilder strSql = new StringBuilder();
160
             StringBuilder strSql = new StringBuilder();
161
-            strSql.Append("select  top 1 F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State from T_Sys_DictionaryValue ");
161
+            strSql.Append("select  top 1 F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State from T_Sys_DictionaryValue with(nolock)");
162
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
162
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
163
             SqlParameter[] parameters = {
163
             SqlParameter[] parameters = {
164
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)
164
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)
231
         public DataSet GetList(string strWhere)
231
         public DataSet GetList(string strWhere)
232
         {
232
         {
233
             StringBuilder strSql = new StringBuilder();
233
             StringBuilder strSql = new StringBuilder();
234
-            strSql.Append("select F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State ");
234
+            strSql.Append("select F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State with(nolock) ");
235
             strSql.Append(" FROM T_Sys_DictionaryValue ");
235
             strSql.Append(" FROM T_Sys_DictionaryValue ");
236
             if (strWhere.Trim() != "")
236
             if (strWhere.Trim() != "")
237
             {
237
             {
252
                 strSql.Append(" top " + Top.ToString());
252
                 strSql.Append(" top " + Top.ToString());
253
             }
253
             }
254
             strSql.Append(" F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State ");
254
             strSql.Append(" F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State ");
255
-            strSql.Append(" FROM T_Sys_DictionaryValue ");
255
+            strSql.Append(" FROM T_Sys_DictionaryValue with(nolock)");
256
             if (strWhere.Trim() != "")
256
             if (strWhere.Trim() != "")
257
             {
257
             {
258
                 strSql.Append(" where " + strWhere);
258
                 strSql.Append(" where " + strWhere);
267
         public int GetRecordCount(string strWhere)
267
         public int GetRecordCount(string strWhere)
268
         {
268
         {
269
             StringBuilder strSql = new StringBuilder();
269
             StringBuilder strSql = new StringBuilder();
270
-            strSql.Append("select count(1) FROM T_Sys_DictionaryValue ");
270
+            strSql.Append("select count(1) FROM T_Sys_DictionaryValue with(nolock) ");
271
             if (strWhere.Trim() != "")
271
             if (strWhere.Trim() != "")
272
             {
272
             {
273
                 strSql.Append(" where " + strWhere);
273
                 strSql.Append(" where " + strWhere);

+ 6 - 6
RMYY_CallCenter_Api.Dal/T_Sys_GongDan.cs

4
 using System.Data.SqlClient;
4
 using System.Data.SqlClient;
5
 using RMYY_CallCenter_Api.DB;
5
 using RMYY_CallCenter_Api.DB;
6
 
6
 
7
-namespace RMYY_CallCenter_Api.DAL
7
+namespace RMYY_CallCenter_Api.Dal
8
 {
8
 {
9
     /// <summary>
9
     /// <summary>
10
     /// 数据访问类:T_Sys_GongDan
10
     /// 数据访问类:T_Sys_GongDan
20
         public bool Exists(int F_GDId)
20
         public bool Exists(int F_GDId)
21
         {
21
         {
22
             StringBuilder strSql = new StringBuilder();
22
             StringBuilder strSql = new StringBuilder();
23
-            strSql.Append("select count(1) from T_Sys_GongDan");
23
+            strSql.Append("select count(1) from T_Sys_GongDan with(nolock)");
24
             strSql.Append(" where F_GDId=@F_GDId");
24
             strSql.Append(" where F_GDId=@F_GDId");
25
             SqlParameter[] parameters = {
25
             SqlParameter[] parameters = {
26
                     new SqlParameter("@F_GDId", SqlDbType.Int,4)
26
                     new SqlParameter("@F_GDId", SqlDbType.Int,4)
163
         {
163
         {
164
 
164
 
165
             StringBuilder strSql = new StringBuilder();
165
             StringBuilder strSql = new StringBuilder();
166
-            strSql.Append("select  top 1 F_GDId,F_ParentID,F_Name,F_Remark,F_Sort,F_CreateTime,F_TypeId,F_ImgUrl from T_Sys_GongDan ");
166
+            strSql.Append("select  top 1 F_GDId,F_ParentID,F_Name,F_Remark,F_Sort,F_CreateTime,F_TypeId,F_ImgUrl from T_Sys_GongDan with(nolock)");
167
             strSql.Append(" where F_GDId=@F_GDId");
167
             strSql.Append(" where F_GDId=@F_GDId");
168
             SqlParameter[] parameters = {
168
             SqlParameter[] parameters = {
169
                     new SqlParameter("@F_GDId", SqlDbType.Int,4)
169
                     new SqlParameter("@F_GDId", SqlDbType.Int,4)
234
         {
234
         {
235
             StringBuilder strSql = new StringBuilder();
235
             StringBuilder strSql = new StringBuilder();
236
             strSql.Append("select F_GDId,F_ParentID,F_Name,F_Remark,F_Sort,F_CreateTime,F_TypeId,F_ImgUrl ");
236
             strSql.Append("select F_GDId,F_ParentID,F_Name,F_Remark,F_Sort,F_CreateTime,F_TypeId,F_ImgUrl ");
237
-            strSql.Append(" FROM T_Sys_GongDan ");
237
+            strSql.Append(" FROM T_Sys_GongDan with(nolock)");
238
             if (strWhere.Trim() != "")
238
             if (strWhere.Trim() != "")
239
             {
239
             {
240
                 strSql.Append(" where " + strWhere);
240
                 strSql.Append(" where " + strWhere);
254
                 strSql.Append(" top " + Top.ToString());
254
                 strSql.Append(" top " + Top.ToString());
255
             }
255
             }
256
             strSql.Append(" F_GDId,F_ParentID,F_Name,F_Remark,F_Sort,F_CreateTime,F_TypeId,F_ImgUrl ");
256
             strSql.Append(" F_GDId,F_ParentID,F_Name,F_Remark,F_Sort,F_CreateTime,F_TypeId,F_ImgUrl ");
257
-            strSql.Append(" FROM T_Sys_GongDan ");
257
+            strSql.Append(" FROM T_Sys_GongDan with(nolock)");
258
             if (strWhere.Trim() != "")
258
             if (strWhere.Trim() != "")
259
             {
259
             {
260
                 strSql.Append(" where " + strWhere);
260
                 strSql.Append(" where " + strWhere);
269
         public int GetRecordCount(string strWhere)
269
         public int GetRecordCount(string strWhere)
270
         {
270
         {
271
             StringBuilder strSql = new StringBuilder();
271
             StringBuilder strSql = new StringBuilder();
272
-            strSql.Append("select count(1) FROM T_Sys_GongDan ");
272
+            strSql.Append("select count(1) FROM T_Sys_GongDan with(nolock)");
273
             if (strWhere.Trim() != "")
273
             if (strWhere.Trim() != "")
274
             {
274
             {
275
                 strSql.Append(" where " + strWhere);
275
                 strSql.Append(" where " + strWhere);

+ 6 - 6
RMYY_CallCenter_Api.Dal/T_Sys_GongDanType.cs

4
 using System.Data.SqlClient;
4
 using System.Data.SqlClient;
5
 using RMYY_CallCenter_Api.DB;
5
 using RMYY_CallCenter_Api.DB;
6
 
6
 
7
-namespace RMYY_CallCenter_Api.DAL
7
+namespace RMYY_CallCenter_Api.Dal
8
 {
8
 {
9
     /// <summary>
9
     /// <summary>
10
     /// 数据访问类:T_Sys_GongDanType
10
     /// 数据访问类:T_Sys_GongDanType
20
         public bool Exists(int F_TypeId)
20
         public bool Exists(int F_TypeId)
21
         {
21
         {
22
             StringBuilder strSql = new StringBuilder();
22
             StringBuilder strSql = new StringBuilder();
23
-            strSql.Append("select count(1) from T_Sys_GongDanType");
23
+            strSql.Append("select count(1) from T_Sys_GongDanType with(nolock)");
24
             strSql.Append(" where F_TypeId=@F_TypeId");
24
             strSql.Append(" where F_TypeId=@F_TypeId");
25
             SqlParameter[] parameters = {
25
             SqlParameter[] parameters = {
26
                     new SqlParameter("@F_TypeId", SqlDbType.Int,4)
26
                     new SqlParameter("@F_TypeId", SqlDbType.Int,4)
148
         {
148
         {
149
 
149
 
150
             StringBuilder strSql = new StringBuilder();
150
             StringBuilder strSql = new StringBuilder();
151
-            strSql.Append("select  top 1 F_TypeId,F_TypeName,F_TypeCode,F_Remark,F_CreateTime from T_Sys_GongDanType ");
151
+            strSql.Append("select  top 1 F_TypeId,F_TypeName,F_TypeCode,F_Remark,F_CreateTime from T_Sys_GongDanType with(nolock)");
152
             strSql.Append(" where F_TypeId=@F_TypeId");
152
             strSql.Append(" where F_TypeId=@F_TypeId");
153
             SqlParameter[] parameters = {
153
             SqlParameter[] parameters = {
154
                     new SqlParameter("@F_TypeId", SqlDbType.Int,4)
154
                     new SqlParameter("@F_TypeId", SqlDbType.Int,4)
207
         {
207
         {
208
             StringBuilder strSql = new StringBuilder();
208
             StringBuilder strSql = new StringBuilder();
209
             strSql.Append("select F_TypeId,F_TypeName,F_TypeCode,F_Remark,F_CreateTime ");
209
             strSql.Append("select F_TypeId,F_TypeName,F_TypeCode,F_Remark,F_CreateTime ");
210
-            strSql.Append(" FROM T_Sys_GongDanType ");
210
+            strSql.Append(" FROM T_Sys_GongDanType with(nolock)");
211
             if (strWhere.Trim() != "")
211
             if (strWhere.Trim() != "")
212
             {
212
             {
213
                 strSql.Append(" where " + strWhere);
213
                 strSql.Append(" where " + strWhere);
227
                 strSql.Append(" top " + Top.ToString());
227
                 strSql.Append(" top " + Top.ToString());
228
             }
228
             }
229
             strSql.Append(" F_TypeId,F_TypeName,F_TypeCode,F_Remark,F_CreateTime ");
229
             strSql.Append(" F_TypeId,F_TypeName,F_TypeCode,F_Remark,F_CreateTime ");
230
-            strSql.Append(" FROM T_Sys_GongDanType ");
230
+            strSql.Append(" FROM T_Sys_GongDanType with(nolock)");
231
             if (strWhere.Trim() != "")
231
             if (strWhere.Trim() != "")
232
             {
232
             {
233
                 strSql.Append(" where " + strWhere);
233
                 strSql.Append(" where " + strWhere);
242
         public int GetRecordCount(string strWhere)
242
         public int GetRecordCount(string strWhere)
243
         {
243
         {
244
             StringBuilder strSql = new StringBuilder();
244
             StringBuilder strSql = new StringBuilder();
245
-            strSql.Append("select count(1) FROM T_Sys_GongDanType ");
245
+            strSql.Append("select count(1) FROM T_Sys_GongDanType with(nolock)");
246
             if (strWhere.Trim() != "")
246
             if (strWhere.Trim() != "")
247
             {
247
             {
248
                 strSql.Append(" where " + strWhere);
248
                 strSql.Append(" where " + strWhere);

+ 25 - 78
RMYY_CallCenter_Api/Controllers/DictionaryController.cs

11
 using RMYY_CallCenter_Api.Model;
11
 using RMYY_CallCenter_Api.Model;
12
 using RMYY_CallCenter_Api.Models;
12
 using RMYY_CallCenter_Api.Models;
13
 
13
 
14
-namespace CallCenterApi.Interface.Controllers
14
+namespace RMYY_CallCenter_Api.Controllers
15
 {
15
 {
16
     
16
     
17
     public class DictionaryController : BaseController
17
     public class DictionaryController : BaseController
28
         /// <returns></returns>
28
         /// <returns></returns>
29
         public ActionResult GetList(FilterDictionary filter)
29
         public ActionResult GetList(FilterDictionary filter)
30
         {
30
         {
31
-            ActionResult res = NoToken("未知错误,请重新登录");
32
-            if (Request.IsAuthenticated)
33
-            {
34
                 var sql = " and F_State=1 ";
31
                 var sql = " and F_State=1 ";
35
                 var recordCount = 0;
32
                 var recordCount = 0;
36
                 var dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
33
                 var dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
54
                     }),
51
                     }),
55
                     total = recordCount
52
                     total = recordCount
56
                 };
53
                 };
57
-                res = Content(obj.ToJson());
58
-            }
59
-            return res;
54
+                return  Content(obj.ToJson());
60
         }
55
         }
61
 
56
 
62
         /// <summary>
57
         /// <summary>
66
         /// <returns></returns>
61
         /// <returns></returns>
67
         public ActionResult GetDic(string dicFlag)
62
         public ActionResult GetDic(string dicFlag)
68
         {
63
         {
69
-            ActionResult res = NoToken("未知错误,请重新登录");
70
-            if (Request.IsAuthenticated)
71
-            {
72
                 T_Sys_DictionaryBase baseModel = dictionaryBaseBLL.GetModel(dicFlag);
64
                 T_Sys_DictionaryBase baseModel = dictionaryBaseBLL.GetModel(dicFlag);
73
                 if (baseModel != null)
65
                 if (baseModel != null)
74
-                    res = Success("加载字典成功", new
66
+                    return Success("加载字典成功", new
75
                     {
67
                     {
76
                         name = baseModel.F_DictionaryName,
68
                         name = baseModel.F_DictionaryName,
77
                         flag = baseModel.F_DictionaryFlag,
69
                         flag = baseModel.F_DictionaryFlag,
78
                         sort = baseModel.F_Sort
70
                         sort = baseModel.F_Sort
79
                     });
71
                     });
80
                 else
72
                 else
81
-                    res = Error("加载字典失败");
82
-            }
83
-            return res;
73
+                    return Error("加载字典失败");
84
         }
74
         }
85
         //[Authority]
75
         //[Authority]
86
         /// <summary>
76
         /// <summary>
90
         /// <returns></returns>
80
         /// <returns></returns>
91
         public ActionResult AddDic(DictionaryBaseInput input)
81
         public ActionResult AddDic(DictionaryBaseInput input)
92
         {
82
         {
93
-            ActionResult res = NoToken("未知错误,请重新登录");
94
-            if (Request.IsAuthenticated)
95
-            {
96
                 T_Sys_DictionaryBase orderModel = new T_Sys_DictionaryBase();
83
                 T_Sys_DictionaryBase orderModel = new T_Sys_DictionaryBase();
97
                 var model = dictionaryBaseBLL.GetModel(input.DicFlag.Trim());
84
                 var model = dictionaryBaseBLL.GetModel(input.DicFlag.Trim());
98
                 if (model != null)
85
                 if (model != null)
104
                 orderModel.F_Sort = input.Sort;
91
                 orderModel.F_Sort = input.Sort;
105
 
92
 
106
                 if (dictionaryBaseBLL.Add(orderModel))
93
                 if (dictionaryBaseBLL.Add(orderModel))
107
-                    res = Success("字典添加成功");
94
+                    return Success("字典添加成功");
108
                 else
95
                 else
109
-                    res = Error("字典添加失败");
110
-            }
111
-            return res;
96
+                    return Error("字典添加失败");
112
         }
97
         }
113
 
98
 
114
         //[Authority]
99
         //[Authority]
119
         /// <returns></returns>
104
         /// <returns></returns>
120
         public ActionResult EditDic(DictionaryBaseInput input)
105
         public ActionResult EditDic(DictionaryBaseInput input)
121
         {
106
         {
122
-            ActionResult res = NoToken("未知错误,请重新登录");
123
-            if (Request.IsAuthenticated)
124
-            {
125
                 T_Sys_DictionaryBase orderModel = dictionaryBaseBLL.GetModel(input.DicFlag.Trim());
107
                 T_Sys_DictionaryBase orderModel = dictionaryBaseBLL.GetModel(input.DicFlag.Trim());
126
                 if (orderModel == null)
108
                 if (orderModel == null)
127
                     return Error("字典对象不存在");
109
                     return Error("字典对象不存在");
130
                 orderModel.F_Describe = input.Remark;
112
                 orderModel.F_Describe = input.Remark;
131
                 orderModel.F_Sort = input.Sort;
113
                 orderModel.F_Sort = input.Sort;
132
                 if (dictionaryBaseBLL.Update(orderModel))
114
                 if (dictionaryBaseBLL.Update(orderModel))
133
-                    res = Success("字典添加成功");
115
+                    return Success("字典添加成功");
134
                 else
116
                 else
135
-                    res = Error("字典添加失败");
136
-            }
137
-            return res;
117
+                    return Error("字典添加失败");
138
         }
118
         }
139
 
119
 
140
         //[Authority]
120
         //[Authority]
145
         /// <returns></returns>
125
         /// <returns></returns>
146
         public ActionResult DelDic(string[] ids)
126
         public ActionResult DelDic(string[] ids)
147
         {
127
         {
148
-            ActionResult res = NoToken("未知错误,请重新登录");
149
-            if (Request.IsAuthenticated)
150
-            {
151
                 if (ids == null || ids.Length <= 0)
128
                 if (ids == null || ids.Length <= 0)
152
                     return Error("获取参数失败");
129
                     return Error("获取参数失败");
153
                 StringBuilder sb = new StringBuilder();
130
                 StringBuilder sb = new StringBuilder();
156
                     sb.Append("'" + item + "',");
133
                     sb.Append("'" + item + "',");
157
                 }
134
                 }
158
                 if (dictionaryBaseBLL.DeleteList(sb.ToString().Trim(',')))
135
                 if (dictionaryBaseBLL.DeleteList(sb.ToString().Trim(',')))
159
-                    res = Success("删除成功");
136
+                return Success("删除成功");
160
                 else
137
                 else
161
-                    res = Error("删除失败");
162
-            }
163
-            return res;
138
+                return Error("删除失败");
164
         }
139
         }
165
         #endregion
140
         #endregion
166
 
141
 
169
         //获取字典值列表
144
         //获取字典值列表
170
         public ActionResult GetDicValueList(FilterDictionary filter)
145
         public ActionResult GetDicValueList(FilterDictionary filter)
171
         {
146
         {
172
-             ActionResult res = NoToken("未知错误,请重新登录");
173
-            if (Request.IsAuthenticated)
174
-            {
147
+            
175
                 string sql = "";
148
                 string sql = "";
176
                 DataTable dt = new DataTable();
149
                 DataTable dt = new DataTable();
177
 
150
 
210
                     total = recordCount
183
                     total = recordCount
211
                 };
184
                 };
212
 
185
 
213
-                res = Content(obj.ToJson());
214
-            }
215
-            return res;
186
+            return Content(obj.ToJson());
187
+
216
         }
188
         }
217
 
189
 
218
         //获取字典值列表
190
         //获取字典值列表
219
         public ActionResult GetDicValueListByFlag(string flag)
191
         public ActionResult GetDicValueListByFlag(string flag)
220
         {
192
         {
221
-            ActionResult res = NoToken("未知错误,请重新登录");
222
-            if (Request.IsAuthenticated)
223
-            {
224
-
225
-                DataTable dt = new DataTable();
193
+    
226
 
194
 
227
-                dt = dictionaryValueBLL.GetList(" F_DictionaryFlag='" + flag + "' and F_State=1 ").Tables[0];
195
+             DataTable dt = new DataTable();
196
+             dt = dictionaryValueBLL.GetList(" F_DictionaryFlag='" + flag + "' and F_State=1 ").Tables[0];
197
+            return Success("列表加载成功", dt);
228
 
198
 
229
-                res = Success("列表加载成功", dt);
230
-            }
231
-            return res;
232
         }        
199
         }        
233
 
200
 
234
         //加载字典值
201
         //加载字典值
235
         public ActionResult GetDicValue(int dicValueId = 0)
202
         public ActionResult GetDicValue(int dicValueId = 0)
236
         {
203
         {
237
-            ActionResult res = NoToken("未知错误,请重新登录");
238
-            if (Request.IsAuthenticated)
239
-            {
240
                 if (dicValueId <= 0)
204
                 if (dicValueId <= 0)
241
                     return Error("字典值标识传输失败");
205
                     return Error("字典值标识传输失败");
242
                 T_Sys_DictionaryValue valueModel = dictionaryValueBLL.GetModel(dicValueId);
206
                 T_Sys_DictionaryValue valueModel = dictionaryValueBLL.GetModel(dicValueId);
243
                 if (valueModel != null)
207
                 if (valueModel != null)
244
-                    res = Success("加载字典值成功", new
208
+                return Success("加载字典值成功", new
245
                     {
209
                     {
246
                         id = valueModel.F_DictionaryValueId,
210
                         id = valueModel.F_DictionaryValueId,
247
                         dicflag = valueModel.F_DictionaryFlag,
211
                         dicflag = valueModel.F_DictionaryFlag,
250
                         sort = valueModel.F_Sort,
214
                         sort = valueModel.F_Sort,
251
                     });
215
                     });
252
                 else
216
                 else
253
-                    res = Error("加载字典值失败");
254
-            }
255
-            return res;
217
+                return Error("加载字典值失败");
256
         }
218
         }
257
 
219
 
258
         //[Authority]
220
         //[Authority]
259
         //添加字典值
221
         //添加字典值
260
         public ActionResult AddDicValue(DictionaryValueInput input)
222
         public ActionResult AddDicValue(DictionaryValueInput input)
261
         {
223
         {
262
-            ActionResult res = NoToken("未知错误,请重新登录");
263
-            if (Request.IsAuthenticated)
264
-            {
265
                 T_Sys_DictionaryValue orderModel = new T_Sys_DictionaryValue();
224
                 T_Sys_DictionaryValue orderModel = new T_Sys_DictionaryValue();
266
                
225
                
267
                 orderModel.F_Name = input.DicvName;
226
                 orderModel.F_Name = input.DicvName;
273
 
232
 
274
 
233
 
275
                 if (dictionaryValueBLL.Add(orderModel) > 0)
234
                 if (dictionaryValueBLL.Add(orderModel) > 0)
276
-                    res = Success("字典值添加成功");
235
+                return Success("字典值添加成功");
277
                 else
236
                 else
278
-                    res = Error("字典值添加失败");
279
-            }
280
-            return res;
237
+                return Error("字典值添加失败");
281
         }
238
         }
282
         ////[Authority]
239
         ////[Authority]
283
         //编辑字典值
240
         //编辑字典值
284
         public ActionResult EditDicValue(DictionaryValueInput input)
241
         public ActionResult EditDicValue(DictionaryValueInput input)
285
         {
242
         {
286
-            ActionResult res = NoToken("未知错误,请重新登录");
287
-            if (Request.IsAuthenticated)
288
-            {
289
                 if (input.DicVid <= 0)
243
                 if (input.DicVid <= 0)
290
                     return Error("字典值id获取失败");
244
                     return Error("字典值id获取失败");
291
                 T_Sys_DictionaryValue orderModel = dictionaryValueBLL.GetModel(input.DicVid);
245
                 T_Sys_DictionaryValue orderModel = dictionaryValueBLL.GetModel(input.DicVid);
297
                 orderModel.F_DictionaryFlag = input.DicFlag;
251
                 orderModel.F_DictionaryFlag = input.DicFlag;
298
                 orderModel.F_Sort = input.Sort;
252
                 orderModel.F_Sort = input.Sort;
299
                 if (dictionaryValueBLL.Update(orderModel))
253
                 if (dictionaryValueBLL.Update(orderModel))
300
-                    res = Success("字典值编辑成功");
254
+                return Success("字典值编辑成功");
301
                 else
255
                 else
302
-                    res = Error("字典值编辑失败");
303
-            }
304
-            return res;
256
+                return Error("字典值编辑失败");
305
         }
257
         }
306
         //[Authority]
258
         //[Authority]
307
         //删除字典值
259
         //删除字典值
308
         public ActionResult DelDicValue(string[] ids)
260
         public ActionResult DelDicValue(string[] ids)
309
         {
261
         {
310
-            ActionResult res = NoToken("未知错误,请重新登录");
311
-            if (Request.IsAuthenticated)
312
-            {
313
                 if (ids == null || ids.Length <= 0)
262
                 if (ids == null || ids.Length <= 0)
314
                     return Error("获取参数失败");
263
                     return Error("获取参数失败");
315
                 var idStr = string.Join(",", ids);
264
                 var idStr = string.Join(",", ids);
316
                 if (dictionaryValueBLL.DeleteList(idStr))
265
                 if (dictionaryValueBLL.DeleteList(idStr))
317
-                    res = Success("删除成功");
266
+                return Success("删除成功");
318
                 else
267
                 else
319
-                    res = Error("删除失败");
320
-            }
321
-            return res;
268
+                return Error("删除失败");
322
         }
269
         }
323
         #endregion
270
         #endregion
324
 
271
 

+ 3 - 30
RMYY_CallCenter_Api/Controllers/GongDanTypeController.cs

48
         /// <returns></returns>
48
         /// <returns></returns>
49
         public ActionResult AddGongDan(T_Sys_GongDan input)
49
         public ActionResult AddGongDan(T_Sys_GongDan input)
50
         {
50
         {
51
-            //ActionResult res = NoToken("未知错误,请重新登录");
52
-            //if (Request.IsAuthenticated)
53
-            //{
54
             T_Sys_GongDan model = new T_Sys_GongDan();
51
             T_Sys_GongDan model = new T_Sys_GongDan();
55
             model.F_Name = input.F_Name;
52
             model.F_Name = input.F_Name;
56
             model.F_Remark = input.F_Remark;
53
             model.F_Remark = input.F_Remark;
66
             {
63
             {
67
                 return Error("添加失败,请重试");
64
                 return Error("添加失败,请重试");
68
             }
65
             }
69
-            //}
70
-            //return res;
71
 
66
 
72
         }
67
         }
73
 
68
 
169
         /// </summary>
164
         /// </summary>
170
         /// <returns></returns>
165
         /// <returns></returns>
171
         public ActionResult GetTypeList(FilterDictionary filter)
166
         public ActionResult GetTypeList(FilterDictionary filter)
172
-        {
173
-            //ActionResult res = NoToken("未知错误,请重新登录");
174
-            //if (Request.IsAuthenticated)
175
-            //{
167
+        {  
176
                 var recordCount = 0;
168
                 var recordCount = 0;
177
                 var dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
169
                 var dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
178
                   "T_Sys_GongDanType",
170
                   "T_Sys_GongDanType",
195
                     total = recordCount
187
                     total = recordCount
196
                 };
188
                 };
197
               return  Content(obj.ToJson());
189
               return  Content(obj.ToJson());
198
-            //}
199
-            //return res;
200
         }
190
         }
201
-        //[Authority]
202
         /// <summary>
191
         /// <summary>
203
         /// 添加类型
192
         /// 添加类型
204
         /// </summary>
193
         /// </summary>
206
         /// <returns></returns>
195
         /// <returns></returns>
207
         public ActionResult AddType(T_Sys_GongDanType input)
196
         public ActionResult AddType(T_Sys_GongDanType input)
208
         {
197
         {
209
-            //ActionResult res = NoToken("未知错误,请重新登录");
210
-            //if (Request.IsAuthenticated)
211
-            //{
212
                 T_Sys_GongDanType orderModel = new T_Sys_GongDanType();
198
                 T_Sys_GongDanType orderModel = new T_Sys_GongDanType();
213
                 orderModel.F_TypeName = input.F_TypeName;
199
                 orderModel.F_TypeName = input.F_TypeName;
214
                 orderModel.F_Remark = input.F_Remark;
200
                 orderModel.F_Remark = input.F_Remark;
217
                    return  Success("添加成功");
203
                    return  Success("添加成功");
218
                 else
204
                 else
219
                    return  Error("添加失败");
205
                    return  Error("添加失败");
220
-            //}
221
-            //return res;
222
-        }
223
 
206
 
224
-        //[Authority]
207
+        }
225
         /// <summary>
208
         /// <summary>
226
         /// 编辑类型
209
         /// 编辑类型
227
         /// </summary>
210
         /// </summary>
229
         /// <returns></returns>
212
         /// <returns></returns>
230
         public ActionResult EditType(T_Sys_GongDanType input)
213
         public ActionResult EditType(T_Sys_GongDanType input)
231
         {
214
         {
232
-            //ActionResult res = NoToken("未知错误,请重新登录");
233
-            //if (Request.IsAuthenticated)
234
-            //{
235
                 T_Sys_GongDanType orderModel = gongdanTypeBll.GetModel(input.F_TypeId);             
215
                 T_Sys_GongDanType orderModel = gongdanTypeBll.GetModel(input.F_TypeId);             
236
                 orderModel.F_TypeName = input.F_TypeName;
216
                 orderModel.F_TypeName = input.F_TypeName;
237
                 orderModel.F_Remark = input.F_Remark;
217
                 orderModel.F_Remark = input.F_Remark;
240
                     return Success("修改成功");
220
                     return Success("修改成功");
241
                 else
221
                 else
242
                     return Error("修改失败");
222
                     return Error("修改失败");
243
-            //}
244
-            //return res;
245
         }
223
         }
246
 
224
 
247
         //[Authority]
225
         //[Authority]
251
         /// <param name="ids"></param>
229
         /// <param name="ids"></param>
252
         /// <returns></returns>
230
         /// <returns></returns>
253
         public ActionResult DelType(string[] ids)
231
         public ActionResult DelType(string[] ids)
254
-        {
255
-            //ActionResult res = NoToken("未知错误,请重新登录");
256
-            //if (Request.IsAuthenticated)
257
-            //{
232
+        {        
258
                 if (ids == null || ids.Length <= 0)
233
                 if (ids == null || ids.Length <= 0)
259
                     return Error("获取参数失败");
234
                     return Error("获取参数失败");
260
                 StringBuilder sb = new StringBuilder();
235
                 StringBuilder sb = new StringBuilder();
266
                 return Success("删除成功");
241
                 return Success("删除成功");
267
                 else
242
                 else
268
                     return Error("删除失败");
243
                     return Error("删除失败");
269
-            //}
270
-            //return res;
271
         }
244
         }
272
         #endregion
245
         #endregion
273
     }
246
     }

+ 0 - 21
RMYY_CallCenter_Api/Models/Filter/FilterCallPlan.cs

1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterCallPlan : ListBase
10
-    {
11
-        /// <summary>
12
-        /// 任务类型, 1=点击外呼; 2=自动外呼; 默认为2
13
-        /// </summary>
14
-        public int TaskType { get; set; } = 2;
15
-        /// <summary>
16
-        /// 任务名称
17
-        /// </summary>
18
-        public string Name { get; set; }
19
-
20
-    }
21
-}

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterCategory.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterCategory : ListBase
9
     public class FilterCategory : ListBase
10
     {
10
     {

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterDictionary.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterDictionary : ListBase
9
     public class FilterDictionary : ListBase
10
     {
10
     {

+ 0 - 14
RMYY_CallCenter_Api/Models/Filter/FilterExpress.cs

1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterExpress : ListBase
10
-    {
11
-        public string Name { get; set; }
12
-
13
-    }
14
-}

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterLog.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterLog : ListBase
9
     public class FilterLog : ListBase
10
     {
10
     {

+ 0 - 13
RMYY_CallCenter_Api/Models/Filter/FilterModuleFunction.cs

1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterModuleFunction : ListBase
10
-    {
11
-        public int ModuleFunctionId { get; set; } = 0;
12
-    }
13
-}

+ 0 - 14
RMYY_CallCenter_Api/Models/Filter/FilterOrder.cs

1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterOrder : ListBase
10
-    {
11
-        
12
-
13
-    }
14
-}

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterPagerInfo.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterPagerInfo : ListBase
9
     public class FilterPagerInfo : ListBase
10
     {
10
     {

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterProduct.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterProduct : ListBase
9
     public class FilterProduct : ListBase
10
     {
10
     {

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterQuestion.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterQuestion : ListBase
9
     public class FilterQuestion : ListBase
10
     {
10
     {

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterSysConfig.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterSysConfig : ListBase
9
     public class FilterSysConfig : ListBase
10
     {
10
     {

+ 0 - 48
RMYY_CallCenter_Api/Models/Filter/FilterTalkRecord.cs

1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterTalkRecord : ListBase
10
-    {
11
-        /// <summary>
12
-        /// 通话号码
13
-        /// </summary>
14
-        public string Phone { get; set; }
15
-        /// <summary>
16
-        /// 通话类型   
17
-        /// 1=未转坐席;
18
-        /// 2=转坐席未接通;
19
-        /// 3=转坐席接通;
20
-        /// </summary>
21
-        public int CallType { get; set; } = 0;
22
-        /// <summary>
23
-        /// 坐席工号
24
-        /// </summary>
25
-        public string UserCode { get; set; }
26
-        /// <summary>
27
-        /// 页容量
28
-        /// </summary>
29
-        public new int PageSize { get; set; } = 100;
30
-        /// <summary>
31
-        /// 排序  排序字段,升降序
32
-        /// </summary>
33
-        public string SortField { get; set; }
34
-        /// <summary>
35
-        /// 开始时间
36
-        /// </summary>
37
-        public DateTime? StartTime { get; set; }
38
-        /// <summary>
39
-        /// 结束时间
40
-        /// </summary>
41
-        public DateTime? EndTime { get; set; }
42
-        /// <summary>
43
-        /// 通话时长
44
-        /// </summary>
45
-        public string TalkTime { get; set; }
46
-
47
-    }
48
-}

+ 1 - 1
RMYY_CallCenter_Api/Models/Filter/FilterUserAccount.cs

4
 using System.Linq;
4
 using System.Linq;
5
 using System.Web;
5
 using System.Web;
6
 
6
 
7
-namespace CallCenterApi.Interface.Models.Filter
7
+namespace RMYY_CallCenter_Api.Models
8
 {
8
 {
9
     public class FilterUserAccount : ListBase
9
     public class FilterUserAccount : ListBase
10
     {
10
     {

+ 0 - 5
RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj

135
     <Compile Include="Global.asax.cs">
135
     <Compile Include="Global.asax.cs">
136
       <DependentUpon>Global.asax</DependentUpon>
136
       <DependentUpon>Global.asax</DependentUpon>
137
     </Compile>
137
     </Compile>
138
-    <Compile Include="Models\Filter\FilterCallPlan.cs" />
139
     <Compile Include="Models\Filter\FilterCategory.cs" />
138
     <Compile Include="Models\Filter\FilterCategory.cs" />
140
     <Compile Include="Models\Filter\FilterDictionary.cs" />
139
     <Compile Include="Models\Filter\FilterDictionary.cs" />
141
-    <Compile Include="Models\Filter\FilterExpress.cs" />
142
     <Compile Include="Models\Filter\FilterLog.cs" />
140
     <Compile Include="Models\Filter\FilterLog.cs" />
143
-    <Compile Include="Models\Filter\FilterModuleFunction.cs" />
144
-    <Compile Include="Models\Filter\FilterOrder.cs" />
145
     <Compile Include="Models\Filter\FilterPagerInfo.cs" />
141
     <Compile Include="Models\Filter\FilterPagerInfo.cs" />
146
     <Compile Include="Models\Filter\FilterProduct.cs" />
142
     <Compile Include="Models\Filter\FilterProduct.cs" />
147
     <Compile Include="Models\Filter\FilterQuestion.cs" />
143
     <Compile Include="Models\Filter\FilterQuestion.cs" />
148
     <Compile Include="Models\Filter\FilterSysConfig.cs" />
144
     <Compile Include="Models\Filter\FilterSysConfig.cs" />
149
-    <Compile Include="Models\Filter\FilterTalkRecord.cs" />
150
     <Compile Include="Models\Filter\FilterUserAccount.cs" />
145
     <Compile Include="Models\Filter\FilterUserAccount.cs" />
151
     <Compile Include="Models\FormsPrincipal.cs" />
146
     <Compile Include="Models\FormsPrincipal.cs" />
152
     <Compile Include="Models\Input\DictionaryInput.cs" />
147
     <Compile Include="Models\Input\DictionaryInput.cs" />