zhoufan %!s(int64=4) %!d(string=hace) años
padre
commit
72db3fa3d4

+ 37 - 47
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/LogController.cs

21
         /// <returns></returns>
21
         /// <returns></returns>
22
         public ActionResult GetList(FilterLog filter)
22
         public ActionResult GetList(FilterLog filter)
23
         {
23
         {
24
-            var res = NoToken("未知错误,请重新登录");
25
-            
24
+            var sql = "";
25
+            int userId = CurrentUser.F_UserId;
26
+            int roleId = CurrentUser.F_RoleId;
27
+            #region 权限限制                        
28
+            sql += $" and F_LoginId = {userId} ";
29
+            #endregion
30
+            if (!string.IsNullOrWhiteSpace(filter.Name))
26
             {
31
             {
27
-                var sql = "";
28
-                int userId = CurrentUser.F_UserId;
29
-                int roleId = CurrentUser.F_RoleId;
30
-                #region 权限限制                        
31
-                sql += $" and F_LoginId = {userId} ";
32
-                #endregion
33
-                if (!string.IsNullOrWhiteSpace(filter.Name))
34
-                {
35
-                    sql += " and F_LoginName like '%" + filter.Name + "%' ";
36
-                }
37
-                if (filter.LoginDate != null)
38
-                {
39
-                    sql += " and CONVERT(varchar , F_LoginDate, 120)>=CONVERT(varchar , '" + filter.LoginDate.ToString() + " 00:00:01', 120) and CONVERT(varchar , F_LoginDate, 120)<=CONVERT(varchar , '" + filter.LoginDate.ToString() + " 23:59:59', 120) ";
40
-                }
41
-                int recordCount = 0;
42
-                var dt = BLL.PagerBLL.GetListPager(
43
-                     "T_Sys_LoginLogs",
44
-                     "F_Id",
45
-                     "*",
46
-                     sql,
47
-                     "ORDER BY F_Id desc",
48
-                     filter.PageSize,
49
-                     filter.PageIndex,
50
-                     true,
51
-                     out recordCount);
52
-
53
-                var obj = new
54
-                {
55
-                    rows = dt,
56
-                    total = recordCount
57
-                };
58
-                res = Content(obj.ToJson());
32
+                sql += " and F_LoginName like '%" + filter.Name + "%' ";
33
+            }
34
+            if (filter.LoginDate != null)
35
+            {
36
+                sql += " and CONVERT(varchar , F_LoginDate, 120)>=CONVERT(varchar , '" + filter.LoginDate.ToString() + " 00:00:01', 120) and CONVERT(varchar , F_LoginDate, 120)<=CONVERT(varchar , '" + filter.LoginDate.ToString() + " 23:59:59', 120) ";
59
             }
37
             }
60
-            return res;
38
+            int recordCount = 0;
39
+            var dt = BLL.PagerBLL.GetListPager(
40
+                 "T_Sys_LoginLogs",
41
+                 "F_Id",
42
+                 "*",
43
+                 sql,
44
+                 "ORDER BY F_Id desc",
45
+                 filter.PageSize,
46
+                 filter.PageIndex,
47
+                 true,
48
+                 out recordCount);
49
+
50
+            var obj = new
51
+            {
52
+                rows = dt,
53
+                total = recordCount
54
+            };
55
+            return Content(obj.ToJson());
61
         }
56
         }
62
 
57
 
63
         /// <summary>
58
         /// <summary>
67
         /// <returns></returns>
62
         /// <returns></returns>
68
         public ActionResult Delete(string[] ids)
63
         public ActionResult Delete(string[] ids)
69
         {
64
         {
70
-            var res = NoToken("未知错误,请重新登录");
71
-            
65
+            if (ids != null)
72
             {
66
             {
73
-                if (ids != null)
74
-                {
75
-                    var str = string.Join(",", ids);
76
-                    if (loginLogsBLL.DeleteList(str))
77
-                        res = Success("删除成功");
78
-                    else
79
-                        res = Error("删除失败");
80
-                }
67
+                var str = string.Join(",", ids);
68
+                if (loginLogsBLL.DeleteList(str))
69
+                    return Success("删除成功");
81
                 else
70
                 else
82
-                    res = Error("删除失败");
71
+                    return Error("删除失败");
83
             }
72
             }
84
-            return res;
73
+            else
74
+                return Error("删除失败");
85
         }
75
         }
86
     }
76
     }
87
 }
77
 }

+ 54 - 78
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SysConfigController.cs

23
         /// <returns></returns>
23
         /// <returns></returns>
24
         public ActionResult GetList(FilterSysConfig filter)
24
         public ActionResult GetList(FilterSysConfig filter)
25
         {
25
         {
26
-            var res = NoToken("未知错误,请重新登录");
27
-            
26
+            var sql = "";
27
+            if (!string.IsNullOrWhiteSpace(filter.Value))
28
             {
28
             {
29
-                var sql = "";
30
-                if (!string.IsNullOrWhiteSpace(filter.Value))
31
-                {
32
-                    sql += " and F_ParamValue like '%" + filter.Value + "%' ";
33
-                }
34
-                if (!string.IsNullOrWhiteSpace(filter.Code))
35
-                {
36
-                    sql += " and F_ParamCode like '%" + filter.Code + "%' ";
37
-                }
29
+                sql += " and F_ParamValue like '%" + filter.Value + "%' ";
30
+            }
31
+            if (!string.IsNullOrWhiteSpace(filter.Code))
32
+            {
33
+                sql += " and F_ParamCode like '%" + filter.Code + "%' ";
34
+            }
38
 
35
 
39
-                int recordCount = 0;
40
-                Model.PageData<Model.T_Sys_SystemConfig> pageModel = new Model.PageData<Model.T_Sys_SystemConfig>();
36
+            int recordCount = 0;
37
+            Model.PageData<Model.T_Sys_SystemConfig> pageModel = new Model.PageData<Model.T_Sys_SystemConfig>();
41
 
38
 
42
-                var dt = BLL.PagerBLL.GetListPager(
43
-                    "T_Sys_SystemConfig",
44
-                    "F_ParamId",
45
-                    "*",
46
-                    sql,
47
-                    "ORDER BY F_ParamId desc",
48
-                    filter.PageSize,
49
-                    filter.PageIndex,
50
-                    true,
51
-                    out recordCount);
52
-                var obj = new
53
-                {
54
-                    rows = dt,
55
-                    total = recordCount
56
-                };
57
-                res = Content(obj.ToJson());
58
-            }
59
-            return res;
39
+            var dt = BLL.PagerBLL.GetListPager(
40
+                "T_Sys_SystemConfig",
41
+                "F_ParamId",
42
+                "*",
43
+                sql,
44
+                "ORDER BY F_ParamId desc",
45
+                filter.PageSize,
46
+                filter.PageIndex,
47
+                true,
48
+                out recordCount);
49
+            var obj = new
50
+            {
51
+                rows = dt,
52
+                total = recordCount
53
+            };
54
+            return Content(obj.ToJson());
60
         }
55
         }
61
 
56
 
62
         /// <summary>
57
         /// <summary>
66
         /// <returns></returns>
61
         /// <returns></returns>
67
         public ActionResult GetModel(int id = 0)
62
         public ActionResult GetModel(int id = 0)
68
         {
63
         {
69
-            var res = NoToken("未知错误,请重新登录");
70
-            
71
-            {
72
                 var model = sysConfigBLL.GetModel(id);
64
                 var model = sysConfigBLL.GetModel(id);
73
                 if (model == null)
65
                 if (model == null)
74
                     return Error("获取失败,该条数据不存在");
66
                     return Error("获取失败,该条数据不存在");
75
 
67
 
76
                 return Success("获取成功", model);
68
                 return Success("获取成功", model);
77
-            }
78
-            return res;
79
         }
69
         }
80
 
70
 
81
         /// <summary>
71
         /// <summary>
85
         /// <returns></returns>
75
         /// <returns></returns>
86
         public ActionResult Add(SysConfigInput input)
76
         public ActionResult Add(SysConfigInput input)
87
         {
77
         {
88
-            var res = NoToken("未知错误,请重新登录");
89
-            
90
-            {
91
-                var sysConfig = new Model.T_Sys_SystemConfig();
92
-                sysConfig.F_ParamCode = input.Code;
93
-                sysConfig.F_ParamValue = input.Value;
94
-                sysConfig.F_ParamDes = input.Des;
95
-                sysConfig.F_State = 0;
96
-                if (sysConfigBLL.Add(sysConfig) > 0)
97
-                    res = Success("添加成功");
98
-                else
99
-                    res = Error("添加失败");
100
-            }
101
-            return res;
78
+            var sysConfig = new Model.T_Sys_SystemConfig();
79
+            sysConfig.F_ParamCode = input.Code;
80
+            sysConfig.F_ParamValue = input.Value;
81
+            sysConfig.F_ParamDes = input.Des;
82
+            sysConfig.F_State = 0;
83
+            if (sysConfigBLL.Add(sysConfig) > 0)
84
+                return Success("添加成功");
85
+            else
86
+                return Error("添加失败");
102
         }
87
         }
103
 
88
 
104
         /// <summary>
89
         /// <summary>
108
         /// <returns></returns>
93
         /// <returns></returns>
109
         public ActionResult Edit(SysConfigInput input)
94
         public ActionResult Edit(SysConfigInput input)
110
         {
95
         {
111
-            var res = NoToken("未知错误,请重新登录");
112
-            
113
-            {
114
-                if (input.Id <= 0) return Error("不存在此条数据");
115
-                var sysConfig = sysConfigBLL.GetModel(input.Id);
116
-                if (sysConfig == null) return Error("不存在此条数据");
117
-                sysConfig.F_ParamCode = input.Code;
118
-                sysConfig.F_ParamValue = input.Value;
119
-                sysConfig.F_ParamDes = input.Des;
120
-                sysConfig.F_State = 0;
121
-                if (sysConfigBLL.Update(sysConfig))
122
-                    res = Success("修改成功");
123
-                else
124
-                    res = Error("修改失败");
125
-            }
126
-            return res;
96
+            if (input.Id <= 0) return Error("不存在此条数据");
97
+            var sysConfig = sysConfigBLL.GetModel(input.Id);
98
+            if (sysConfig == null) return Error("不存在此条数据");
99
+            sysConfig.F_ParamCode = input.Code;
100
+            sysConfig.F_ParamValue = input.Value;
101
+            sysConfig.F_ParamDes = input.Des;
102
+            sysConfig.F_State = 0;
103
+            if (sysConfigBLL.Update(sysConfig))
104
+                return Success("修改成功");
105
+            else
106
+                return Error("修改失败");
127
         }
107
         }
128
 
108
 
129
         /// <summary>
109
         /// <summary>
133
         /// <returns></returns>
113
         /// <returns></returns>
134
         public ActionResult Delete(string[] ids)
114
         public ActionResult Delete(string[] ids)
135
         {
115
         {
136
-            var res = NoToken("未知错误,请重新登录");
137
-            
116
+            if (ids != null)
138
             {
117
             {
139
-                if (ids != null)
140
-                {
141
-                    var str = string.Join(",", ids);
142
-                    if (sysConfigBLL.DeleteList(str))
143
-                        res = Success("删除成功");
144
-                    else
145
-                        res = Error("删除失败");
146
-                }
118
+                var str = string.Join(",", ids);
119
+                if (sysConfigBLL.DeleteList(str))
120
+                    return Success("删除成功");
147
                 else
121
                 else
148
-                    res = Error("删除失败");
122
+                    return Error("删除失败");
149
             }
123
             }
150
-            return res;
124
+            else
125
+                return Error("删除失败");
126
+
151
         }
127
         }
152
 
128
 
153
         #region 坐席数量限制授权设置
129
         #region 坐席数量限制授权设置

+ 0 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/order/OrderController.cs

23
         /// <returns></returns>
23
         /// <returns></returns>
24
         public ActionResult GetList(FilterOrder filter)
24
         public ActionResult GetList(FilterOrder filter)
25
         {
25
         {
26
-            
27
-                return NoToken("未知错误,请重新登录");
28
             var sql = " ";
26
             var sql = " ";
29
             var recordCount = 0;
27
             var recordCount = 0;
30
             var dt = BLL.PagerBLL.GetListPager(
28
             var dt = BLL.PagerBLL.GetListPager(
67
         /// <returns></returns>
65
         /// <returns></returns>
68
         public ActionResult GetModel(int id)
66
         public ActionResult GetModel(int id)
69
         {
67
         {
70
-            
71
-                return NoToken("未知错误,请重新登录");
72
             var model = orderBLL.GetModel(id);
68
             var model = orderBLL.GetModel(id);
73
             return Success("获取成功", model);
69
             return Success("获取成功", model);
74
         }
70
         }
80
         /// <returns></returns>
76
         /// <returns></returns>
81
         public ActionResult CreateOrUpdate(OrderInput input)
77
         public ActionResult CreateOrUpdate(OrderInput input)
82
         {
78
         {
83
-            
84
-                return NoToken("未知错误,请重新登录");
85
             var model = new Model.orders();
79
             var model = new Model.orders();
86
             if (input.Id <= 0)
80
             if (input.Id <= 0)
87
             {
81
             {
130
         /// <returns></returns>
124
         /// <returns></returns>
131
         public ActionResult UpdateOrderState(string order)
125
         public ActionResult UpdateOrderState(string order)
132
         {
126
         {
133
-            
134
-                return NoToken("未知错误,请重新登录");
135
             return View();
127
             return View();
136
         }
128
         }
137
 
129