Преглед на файлове

数据库连接字符串修改
外呼任务分配部门
质检指标接口调整
部门下拉列表接口调整

yuqian преди 8 години
родител
ревизия
97bd8771f3

+ 4 - 0
CallCenterApi/CallCenterApi.BLL/T_CTI_Task.cs

@@ -278,6 +278,10 @@ namespace CallCenterApi.BLL
278 278
                     {
279 279
                         model.AgentGroupId = Convert.ToInt32(dt.Rows[n]["AgentGroupId"].ToString());
280 280
                     }
281
+                    if (dt.Rows[n]["DeptId"] != null && dt.Rows[n]["DeptId"].ToString() != "")
282
+                    {
283
+                        model.DeptId = Convert.ToInt32(dt.Rows[n]["DeptId"].ToString());
284
+                    }
281 285
                     modelList.Add(model);
282 286
                 }
283 287
             }

+ 3 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -177,7 +177,7 @@ namespace CallCenterApi.Interface.Controllers
177 177
         /// 获取部门列表
178 178
         /// </summary>
179 179
         /// <returns></returns>
180
-        public ActionResult GetDeptListForReport(int pId = 0)
180
+        public ActionResult GetDeptListForReport(int pId = 0, string text = "全部")
181 181
         {
182 182
             if (Request.IsAuthenticated)
183 183
             {
@@ -192,7 +192,7 @@ namespace CallCenterApi.Interface.Controllers
192 192
                         modelList.Insert(0, new Model.TreeModel
193 193
                         {
194 194
                             id = "-1",
195
-                            text = "全部"
195
+                            text = text
196 196
                         });
197 197
                         return Success("加载成功", modelList);
198 198
                     }
@@ -202,6 +202,7 @@ namespace CallCenterApi.Interface.Controllers
202 202
             return NoToken("未知错误,请重新登录");
203 203
         }
204 204
 
205
+
205 206
         /// <summary>
206 207
         /// tree  树形部门
207 208
         /// </summary>

+ 7 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/CallPlanController.cs

@@ -32,6 +32,7 @@ namespace CallCenterApi.Interface.Controllers.callout
32 32
         private readonly BLL.T_Call_PageField pageFieldBLL = new BLL.T_Call_PageField();
33 33
         private readonly BLL.T_Ask_PagerInfo pagerInfoBLL = new BLL.T_Ask_PagerInfo();
34 34
         private readonly BLL.T_Call_Answers ansBLL = new BLL.T_Call_Answers();
35
+        private readonly BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
35 36
         #region 外呼任务
36 37
         /// <summary>
37 38
         /// 获取列表
@@ -82,7 +83,8 @@ namespace CallCenterApi.Interface.Controllers.callout
82 83
             var agentGroupList = seatGroupBLL.DataTableToList(seatGroupBLL.GetList("").Tables[0]);
83 84
             //查询坐席
84 85
             var agentList = userAccount.DataTableToList(userAccount.GetList(" F_DeleteFlag=0 ").Tables[0]);
85
-
86
+            //查询部门
87
+            var deptList = departmentBLL.DataTableToList(departmentBLL.GetList(" F_State=1 ").Tables[0]);
86 88
             foreach (var model in modelList)
87 89
             {
88 90
                 //计算数据
@@ -103,11 +105,14 @@ namespace CallCenterApi.Interface.Controllers.callout
103 105
                 var agentGroupStr = model.AgentGroupId == -999 ? "不转坐席" : "";
104 106
                 var agentGroup = agentGroupList.SingleOrDefault(x => x.F_ZXZID == model.AgentGroupId);
105 107
                 var agentCount = agentList.Where(x => x.F_SeartGroupID == (agentGroup?.F_ZXZID ?? 0)).Count();
108
+
109
+                var dept = deptList.SingleOrDefault(y => y.F_DeptId == model.DeptId);
106 110
                 list.Add(new CallPlanDto
107 111
                 {
108 112
                     id = model.TaskID,
109 113
                     name = model.TaskName,
110 114
                     tasktype = model.TaskType == 1 ? "点击外呼" : "自动外呼",
115
+                    deptname = dept?.F_DeptName ?? "",
111 116
                     state = Enum.GetName(typeof(EnumTaskState), (model.State ?? -1)),
112 117
                     addtime = Convert.ToDateTime(model.AddTime).ToString("yyyy-MM-dd HH:mm:ss"),
113 118
                     talkid = model.y_TkModelId ?? 0,
@@ -241,7 +246,7 @@ namespace CallCenterApi.Interface.Controllers.callout
241 246
                 model.ConcurrencyType = input.ConcurrencyType;
242 247
                 model.Concurrency = input.ConcurrencyType == 0 ? (int)input.Concurrency : input.Concurrency;
243 248
                 model.RecordFileId = input.RecordPathId;
244
-                model.DeptId = CurrentUser.UserData.F_DeptId;
249
+                model.DeptId = input.DeptId <= 0 ? CurrentUser.UserData.F_DeptId : input.DeptId;
245 250
                 model.y_HMCount = 0;
246 251
                 model.y_HCCount = 0;
247 252
                 model.y_YJCount = 0;

+ 149 - 149
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/IndexBaseController.cs

@@ -18,61 +18,61 @@ namespace CallCenterApi.Interface.Controllers.quality
18 18
             string sql = "";
19 19
             DataTable dt = new DataTable();
20 20
 
21
-                string categoryid = RequestString.GetQueryString("categoryid");
22
-                string key = WebHelper.UrlDecode(RequestString.GetQueryString("key"));
21
+            string categoryid = RequestString.GetQueryString("categoryid");
22
+            string key = WebHelper.UrlDecode(RequestString.GetQueryString("key"));
23 23
 
24
-                string strpageindex = RequestString.GetQueryString("page");
25
-                int pageindex = 1;
26
-                string strpagesize = RequestString.GetQueryString("pagesize");
27
-                int pagesize = 10;
28
-                if (categoryid.Trim() != "")
29
-                {
30
-                    sql += " and (F_CategoryId=" + categoryid + " or F_CategoryId in (select F_CategoryId from T_QC_IndexCategory where F_ParentId=" + categoryid + " )) ";
31
-                }
24
+            string strpageindex = RequestString.GetQueryString("page");
25
+            int pageindex = 1;
26
+            string strpagesize = RequestString.GetQueryString("pagesize");
27
+            int pagesize = 10;
28
+            if (categoryid.Trim() != "")
29
+            {
30
+                sql += " and (F_CategoryId=" + categoryid + " or F_CategoryId in (select F_CategoryId from T_QC_IndexCategory where F_ParentId=" + categoryid + " )) ";
31
+            }
32 32
 
33
-                if (key.Trim() != "")
34
-                {
35
-                    sql += " and (F_Title like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%') ";
36
-                }
37
-                if (strpageindex.Trim() != "")
38
-                {
39
-                    pageindex = Convert.ToInt32(strpageindex);
40
-                }
33
+            if (key.Trim() != "")
34
+            {
35
+                sql += " and (F_Title like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%') ";
36
+            }
37
+            if (strpageindex.Trim() != "")
38
+            {
39
+                pageindex = Convert.ToInt32(strpageindex);
40
+            }
41 41
 
42
-                if (strpagesize.Trim() != "")
43
-                {
44
-                    pagesize = Convert.ToInt32(strpagesize);
45
-                }
46
-                int recordCount = 0;
47
-                dt = BLL.PagerBLL.GetListPager(
48
-                    "vw_QC_IndexBase",
49
-                    "F_IndexId",
50
-                    "*",
51
-                    " and F_DeleteFlag=0 " + sql,
52
-                    "ORDER BY F_Sort",
53
-                    pagesize,
54
-                    pageindex,
55
-                    true,
56
-                    out recordCount);
42
+            if (strpagesize.Trim() != "")
43
+            {
44
+                pagesize = Convert.ToInt32(strpagesize);
45
+            }
46
+            int recordCount = 0;
47
+            dt = BLL.PagerBLL.GetListPager(
48
+                "vw_QC_IndexBase",
49
+                "F_IndexId",
50
+                "*",
51
+                " and F_DeleteFlag=0 " + sql,
52
+                "ORDER BY F_Sort",
53
+                pagesize,
54
+                pageindex,
55
+                true,
56
+                out recordCount);
57 57
 
58
-                var obj = new
59
-                {
60
-                    rows = dt,
61
-                    total = recordCount
62
-                };
58
+            var obj = new
59
+            {
60
+                rows = dt,
61
+                total = recordCount
62
+            };
63 63
 
64
-                res = Content(obj.ToJson());
64
+            res = Content(obj.ToJson());
65 65
 
66
-                //System.Collections.Generic.List<Model.T_QC_IndexBase> modelList = new BLL.T_QC_IndexBase().DataTableToList(dt);
66
+            //System.Collections.Generic.List<Model.T_QC_IndexBase> modelList = new BLL.T_QC_IndexBase().DataTableToList(dt);
67 67
 
68
-                //if (modelList.Count > 0)
69
-                //{
70
-                //    res = Success("指标列表加载成功", modelList);
71
-                //}
72
-                //else
73
-                //{
74
-                //    res = Error("指标列表加载失败");
75
-                //}
68
+            //if (modelList.Count > 0)
69
+            //{
70
+            //    res = Success("指标列表加载成功", modelList);
71
+            //}
72
+            //else
73
+            //{
74
+            //    res = Error("指标列表加载失败");
75
+            //}
76 76
 
77 77
             return res;
78 78
         }
@@ -81,71 +81,71 @@ namespace CallCenterApi.Interface.Controllers.quality
81 81
         public ActionResult GetIndexBase(string id)
82 82
         {
83 83
             ActionResult res = NoToken("未知错误,请重新登录");
84
-    
85
-                if (id.Trim() != "")
84
+
85
+            if (id.Trim() != "")
86
+            {
87
+                BLL.T_QC_IndexBase dBLL = new BLL.T_QC_IndexBase();
88
+                Model.T_QC_IndexBase dModel = dBLL.GetModel(int.Parse(id.Trim()));
89
+                if (dModel != null)
86 90
                 {
87
-                    BLL.T_QC_IndexBase dBLL = new BLL.T_QC_IndexBase();
88
-                    Model.T_QC_IndexBase dModel = dBLL.GetModel(int.Parse(id.Trim()));
89
-                    if (dModel != null)
90
-                    {
91
-                        res = Success("获取指标成功", dModel);
92
-                    }
93
-                    else
94
-                    {
95
-                        res = Error("获取指标失败");
96
-                    }
91
+                    res = Success("获取指标成功", dModel);
97 92
                 }
98 93
                 else
99 94
                 {
100
-                    res = Error("获取参数失败");
95
+                    res = Error("获取指标失败");
101 96
                 }
97
+            }
98
+            else
99
+            {
100
+                res = Error("获取参数失败");
101
+            }
102 102
 
103 103
             return res;
104 104
         }
105 105
 
106 106
         //添加指标
107
-        public ActionResult AddIndexBase(string cid, string score, string sort, string title,string remark)
107
+        public ActionResult AddIndexBase(string cid, string score, string sort, string title, string remark)
108 108
         {
109 109
             ActionResult res = NoToken("未知错误,请重新登录");
110 110
             if (Request.IsAuthenticated)
111 111
             {
112
-               
113
-                    Model.T_QC_IndexBase dModel = new Model.T_QC_IndexBase();
114 112
 
115
-                    if (!string.IsNullOrWhiteSpace(cid.Trim()))
116
-                    {
117
-                        dModel.F_CategoryId = int.Parse(cid.Trim());
118
-                    }
119
-                    if (!string.IsNullOrWhiteSpace(sort.Trim()))
120
-                    {
121
-                        dModel.F_Sort = Convert.ToInt32(sort.Trim());
122
-                    }
123
-                    if (!string.IsNullOrWhiteSpace(sort.Trim()))
124
-                    {
125
-                        dModel.F_Score = Convert.ToInt32(sort.Trim());
126
-                    }
127
-                    if (!string.IsNullOrWhiteSpace(title.Trim()))
128
-                    {
129
-                        dModel.F_Title = WebHelper.UrlDecode(title.Trim());
130
-                    }
131
-                    if (!string.IsNullOrWhiteSpace(remark.Trim()))
132
-                    {
133
-                        dModel.F_Remark = WebHelper.UrlDecode(remark.Trim());
134
-                    }
113
+                Model.T_QC_IndexBase dModel = new Model.T_QC_IndexBase();
114
+
115
+                if (!string.IsNullOrWhiteSpace(cid.Trim()))
116
+                {
117
+                    dModel.F_CategoryId = int.Parse(cid.Trim());
118
+                }
119
+                if (!string.IsNullOrWhiteSpace(sort.Trim()))
120
+                {
121
+                    dModel.F_Sort = Convert.ToInt32(sort.Trim());
122
+                }
123
+                if (!string.IsNullOrWhiteSpace(sort.Trim()))
124
+                {
125
+                    dModel.F_Score = Convert.ToInt32(score.Trim());
126
+                }
127
+                if (!string.IsNullOrWhiteSpace(title.Trim()))
128
+                {
129
+                    dModel.F_Title = WebHelper.UrlDecode(title.Trim());
130
+                }
131
+                if (!string.IsNullOrWhiteSpace(remark.Trim()))
132
+                {
133
+                    dModel.F_Remark = WebHelper.UrlDecode(remark.Trim());
134
+                }
135 135
 
136
-                    dModel.F_CreateOn = DateTime.Now;
137
-                    dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
138
-                    dModel.F_DeleteFlag = 0;
136
+                dModel.F_CreateOn = DateTime.Now;
137
+                dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
138
+                dModel.F_DeleteFlag = 0;
139 139
 
140
-                    bool b = new BLL.T_QC_IndexBase().Add(dModel) > 0;
141
-                    if (b)
142
-                    {
143
-                        res = Success("添加成功");
144
-                    }
145
-                    else
146
-                    {
147
-                        res = Success("添加失败");
148
-                    }
140
+                bool b = new BLL.T_QC_IndexBase().Add(dModel) > 0;
141
+                if (b)
142
+                {
143
+                    res = Success("添加成功");
144
+                }
145
+                else
146
+                {
147
+                    res = Success("添加失败");
148
+                }
149 149
 
150 150
             }
151 151
             return res;
@@ -157,79 +157,79 @@ namespace CallCenterApi.Interface.Controllers.quality
157 157
             ActionResult res = NoToken("未知错误,请重新登录");
158 158
             if (Request.IsAuthenticated)
159 159
             {
160
-                
161
-                    if (cid.Trim() != "")
160
+
161
+                if (cid.Trim() != "")
162
+                {
163
+                    BLL.T_QC_IndexBase dBLL = new BLL.T_QC_IndexBase();
164
+                    Model.T_QC_IndexBase dModel = dBLL.GetModel(int.Parse(id.Trim()));
165
+                    if (dModel != null)
162 166
                     {
163
-                        BLL.T_QC_IndexBase dBLL = new BLL.T_QC_IndexBase();
164
-                        Model.T_QC_IndexBase dModel = dBLL.GetModel(int.Parse(id.Trim()));
165
-                        if (dModel != null)
167
+                        if (!string.IsNullOrWhiteSpace(cid.Trim()))
168
+                        {
169
+                            dModel.F_CategoryId = int.Parse(cid.Trim());
170
+                        }
171
+                        if (!string.IsNullOrWhiteSpace(sort.Trim()))
172
+                        {
173
+                            dModel.F_Sort = Convert.ToInt32(sort.Trim());
174
+                        }
175
+                        if (!string.IsNullOrWhiteSpace(sort.Trim()))
166 176
                         {
167
-                            if (!string.IsNullOrWhiteSpace(cid.Trim()))
168
-                            {
169
-                                dModel.F_CategoryId = int.Parse(cid.Trim());
170
-                            }
171
-                            if (!string.IsNullOrWhiteSpace(sort.Trim()))
172
-                            {
173
-                                dModel.F_Sort = Convert.ToInt32(sort.Trim());
174
-                            }
175
-                            if (!string.IsNullOrWhiteSpace(sort.Trim()))
176
-                            {
177
-                                dModel.F_Score = Convert.ToInt32(sort.Trim());
178
-                            }
179
-                            if (!string.IsNullOrWhiteSpace(title.Trim()))
180
-                            {
181
-                                dModel.F_Title = WebHelper.UrlDecode(title.Trim());
182
-                            }
183
-                            if (!string.IsNullOrWhiteSpace(remark.Trim()))
184
-                            {
185
-                                dModel.F_Remark = WebHelper.UrlDecode(remark.Trim());
186
-                            }
187
-                            bool b = dBLL.Update(dModel);
188
-                            if (b)
189
-                            {
190
-                                res = Success("编辑成功");
191
-                            }
192
-                            else
193
-                            {
194
-                                res = Success("编辑失败");
195
-                            }
177
+                            dModel.F_Score = Convert.ToInt32(score.Trim());
178
+                        }
179
+                        if (!string.IsNullOrWhiteSpace(title.Trim()))
180
+                        {
181
+                            dModel.F_Title = WebHelper.UrlDecode(title.Trim());
182
+                        }
183
+                        if (!string.IsNullOrWhiteSpace(remark.Trim()))
184
+                        {
185
+                            dModel.F_Remark = WebHelper.UrlDecode(remark.Trim());
186
+                        }
187
+                        bool b = dBLL.Update(dModel);
188
+                        if (b)
189
+                        {
190
+                            res = Success("编辑成功");
196 191
                         }
197 192
                         else
198
-                            res = Error("获取信息失败");
193
+                        {
194
+                            res = Success("编辑失败");
195
+                        }
199 196
                     }
200 197
                     else
201
-                    {
202
-                        res = Error("请选择要编辑的指标");
203
-                    }
204
-     
198
+                        res = Error("获取信息失败");
199
+                }
200
+                else
201
+                {
202
+                    res = Error("请选择要编辑的指标");
203
+                }
204
+
205 205
             }
206 206
             return res;
207 207
         }
208 208
 
209 209
         //删除指标记录
210
-        public ActionResult DelIndexBase(string id,string cid)
210
+        public ActionResult DelIndexBase(string id, string cid)
211 211
         {
212 212
             ActionResult res = NoToken("未知错误,请重新登录");
213 213
             DataTable dt = new DataTable();
214
-       
215
-                if (!string.IsNullOrEmpty(id.Trim()))
216
-                {
217
-                    if (new BLL.T_QC_IndexBase().Delete(Convert.ToInt32(id)))
218
-                    {
219
-                        SetScoreByCategory(cid);
220
-                        res = Success("删除成功");
221
-                    }
222
-                    else
223
-                    {
224
-                        res = Error("删除失败");
225
-                    }
226 214
 
215
+            if (!string.IsNullOrEmpty(id.Trim()))
216
+            {
217
+                if (new BLL.T_QC_IndexBase().Delete(Convert.ToInt32(id)))
218
+                {
219
+                    SetScoreByCategory(cid);
220
+                    res = Success("删除成功");
227 221
                 }
228 222
                 else
229 223
                 {
230
-                    res = Error("请选择要删除的记录");
224
+                    res = Error("删除失败");
231 225
                 }
232 226
 
227
+            }
228
+            else
229
+            {
230
+                res = Error("请选择要删除的记录");
231
+            }
232
+
233 233
             return res;
234 234
         }
235 235
 

+ 129 - 123
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/IndexCategoryController.cs

@@ -18,75 +18,81 @@ namespace CallCenterApi.Interface.Controllers.quality
18 18
             string sql = "";
19 19
             DataTable dt = new DataTable();
20 20
             string strpageindex = RequestString.GetQueryString("page");
21
-                int pageindex = 1;
22
-                string strpagesize = RequestString.GetQueryString("pagesize");
23
-                int pagesize = 10;
24
-                
25
-                if (strpageindex.Trim() != "")
26
-                {
27
-                    pageindex = Convert.ToInt32(strpageindex);
28
-                }
21
+            int pageindex = 1;
22
+            string strpagesize = RequestString.GetQueryString("pagesize");
23
+            int pagesize = 10;
29 24
 
30
-                if (strpagesize.Trim() != "")
31
-                {
32
-                    pagesize = Convert.ToInt32(strpagesize);
33
-                }
34
-                int recordCount = 0;
35
-                dt = BLL.PagerBLL.GetListPager(
36
-                    "T_QC_IndexCategory",
37
-                    "F_CategoryId",
38
-                    "*",
39
-                    sql,
40
-                    "ORDER BY F_CategoryId ",
41
-                    pagesize,
42
-                    pageindex,
43
-                    true,
44
-                    out recordCount);
45
-
46
-                var obj = new
47
-                {
48
-                    rows = dt,
49
-                    total = recordCount
50
-                };
25
+            if (strpageindex.Trim() != "")
26
+            {
27
+                pageindex = Convert.ToInt32(strpageindex);
28
+            }
29
+
30
+            if (strpagesize.Trim() != "")
31
+            {
32
+                pagesize = Convert.ToInt32(strpagesize);
33
+            }
34
+            int recordCount = 0;
35
+            dt = BLL.PagerBLL.GetListPager(
36
+                "T_QC_IndexCategory",
37
+                "F_CategoryId",
38
+                "*",
39
+                sql,
40
+                "ORDER BY F_CategoryId ",
41
+                pagesize,
42
+                pageindex,
43
+                true,
44
+                out recordCount);
45
+
46
+            var obj = new
47
+            {
48
+                rows = dt,
49
+                total = recordCount
50
+            };
51 51
 
52
-                res = Content(obj.ToJson());
52
+            res = Content(obj.ToJson());
53 53
 
54
-                //System.Collections.Generic.List<Model.T_QC_IndexCategory> modelList = new BLL.T_QC_IndexCategory().DataTableToList(dt);
54
+            //System.Collections.Generic.List<Model.T_QC_IndexCategory> modelList = new BLL.T_QC_IndexCategory().DataTableToList(dt);
55 55
 
56
-                //if (modelList.Count > 0)
57
-                //{
58
-                //    res = Success("指标分类列表加载成功", modelList);
59
-                //}
60
-                //else
61
-                //{
62
-                //    res = Error("指标分类列表加载失败");
63
-                //}
56
+            //if (modelList.Count > 0)
57
+            //{
58
+            //    res = Success("指标分类列表加载成功", modelList);
59
+            //}
60
+            //else
61
+            //{
62
+            //    res = Error("指标分类列表加载失败");
63
+            //}
64 64
 
65 65
             return res;
66 66
         }
67 67
 
68
+        public ActionResult GetAllList()
69
+        {
70
+            var list = new BLL.T_QC_IndexCategory().GetModelList("");
71
+            return Success("获取下拉指标分类成功", list);
72
+        }
73
+
68 74
         //获取指标分类
69 75
         public ActionResult GetIndexCategory(string cid)
70 76
         {
71 77
             ActionResult res = NoToken("未知错误,请重新登录");
72 78
 
73
-                if (cid.Trim() != "")
79
+            if (cid.Trim() != "")
80
+            {
81
+                BLL.T_QC_IndexCategory dBLL = new BLL.T_QC_IndexCategory();
82
+                Model.T_QC_IndexCategory dModel = dBLL.GetModel(int.Parse(cid.Trim()));
83
+                if (dModel != null)
74 84
                 {
75
-                    BLL.T_QC_IndexCategory dBLL = new BLL.T_QC_IndexCategory();
76
-                    Model.T_QC_IndexCategory dModel = dBLL.GetModel(int.Parse(cid.Trim()));
77
-                    if (dModel != null)
78
-                    {
79
-                        res = Success("获取指标分类成功", dModel);
80
-                    }
81
-                    else
82
-                    {
83
-                        res = Error("获取指标分类失败");
84
-                    }
85
+                    res = Success("获取指标分类成功", dModel);
85 86
                 }
86 87
                 else
87 88
                 {
88
-                    res = Error("获取参数失败");
89
+                    res = Error("获取指标分类失败");
89 90
                 }
91
+            }
92
+            else
93
+            {
94
+                res = Error("获取参数失败");
95
+            }
90 96
 
91 97
             return res;
92 98
         }
@@ -98,80 +104,80 @@ namespace CallCenterApi.Interface.Controllers.quality
98 104
             if (Request.IsAuthenticated)
99 105
             {
100 106
 
101
-                    Model.T_QC_IndexCategory dModel = new Model.T_QC_IndexCategory();
107
+                Model.T_QC_IndexCategory dModel = new Model.T_QC_IndexCategory();
102 108
 
103
-                    if (!string.IsNullOrWhiteSpace(categoryName.Trim()))
104
-                    {
105
-                        dModel.F_CategoryName = WebHelper.UrlDecode(categoryName.Trim());
106
-                    }
107
-                    if (!string.IsNullOrWhiteSpace(sort.Trim()))
108
-                    {
109
-                        dModel.F_Sort = Convert.ToInt32(sort.Trim());
110
-                    }
111
-                    if (!string.IsNullOrWhiteSpace(pid.Trim()))
112
-                    {
113
-                        dModel.F_ParentId = Convert.ToInt32(pid.Trim());
114
-                    }
115
-                    dModel.F_CreateOn = DateTime.Now;
116
-                    dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
117
-                    dModel.F_DeleteFlag = 0;
109
+                if (!string.IsNullOrWhiteSpace(categoryName.Trim()))
110
+                {
111
+                    dModel.F_CategoryName = WebHelper.UrlDecode(categoryName.Trim());
112
+                }
113
+                if (!string.IsNullOrWhiteSpace(sort.Trim()))
114
+                {
115
+                    dModel.F_Sort = Convert.ToInt32(sort.Trim());
116
+                }
117
+                if (!string.IsNullOrWhiteSpace(pid.Trim()))
118
+                {
119
+                    dModel.F_ParentId = Convert.ToInt32(pid.Trim());
120
+                }
121
+                dModel.F_CreateOn = DateTime.Now;
122
+                dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
123
+                dModel.F_DeleteFlag = 0;
118 124
 
119
-                    bool b = new BLL.T_QC_IndexCategory().Add(dModel) > 0;
120
-                    if (b)
121
-                    {
122
-                        res = Success("添加成功");
123
-                    }
124
-                    else
125
-                    {
126
-                        res = Success("添加失败");
127
-                    }
125
+                bool b = new BLL.T_QC_IndexCategory().Add(dModel) > 0;
126
+                if (b)
127
+                {
128
+                    res = Success("添加成功");
129
+                }
130
+                else
131
+                {
132
+                    res = Success("添加失败");
133
+                }
128 134
 
129 135
             }
130 136
             return res;
131 137
         }
132 138
 
133 139
         //编辑指标分类
134
-        public ActionResult EditIndexCategory(string cid,string categoryName, string sort, string pid)
140
+        public ActionResult EditIndexCategory(string cid, string categoryName, string sort, string pid)
135 141
         {
136 142
             ActionResult res = NoToken("未知错误,请重新登录");
137 143
             if (Request.IsAuthenticated)
138 144
             {
139 145
 
140
-                    if (cid.Trim() != "")
146
+                if (cid.Trim() != "")
147
+                {
148
+                    BLL.T_QC_IndexCategory dBLL = new BLL.T_QC_IndexCategory();
149
+                    Model.T_QC_IndexCategory dModel = dBLL.GetModel(int.Parse(cid.Trim()));
150
+                    if (dModel != null)
141 151
                     {
142
-                        BLL.T_QC_IndexCategory dBLL = new BLL.T_QC_IndexCategory();
143
-                        Model.T_QC_IndexCategory dModel = dBLL.GetModel(int.Parse(cid.Trim()));
144
-                        if (dModel != null)
152
+                        if (!string.IsNullOrWhiteSpace(categoryName.Trim()))
145 153
                         {
146
-                            if (!string.IsNullOrWhiteSpace(categoryName.Trim()))
147
-                            {
148
-                                dModel.F_CategoryName = WebHelper.UrlDecode(categoryName.Trim());
149
-                            }
150
-                            if (!string.IsNullOrWhiteSpace(sort.Trim()))
151
-                            {
152
-                                dModel.F_Sort = Convert.ToInt32(sort.Trim());
153
-                            }
154
-                            if (!string.IsNullOrWhiteSpace(pid.Trim()))
155
-                            {
156
-                                dModel.F_ParentId = Convert.ToInt32(pid.Trim());
157
-                            }
158
-                            bool b = dBLL.Update(dModel);
159
-                            if (b)
160
-                            {
161
-                                res = Success("编辑成功");
162
-                            }
163
-                            else
164
-                            {
165
-                                res = Success("编辑失败");
166
-                            }
154
+                            dModel.F_CategoryName = WebHelper.UrlDecode(categoryName.Trim());
155
+                        }
156
+                        if (!string.IsNullOrWhiteSpace(sort.Trim()))
157
+                        {
158
+                            dModel.F_Sort = Convert.ToInt32(sort.Trim());
159
+                        }
160
+                        if (!string.IsNullOrWhiteSpace(pid.Trim()))
161
+                        {
162
+                            dModel.F_ParentId = Convert.ToInt32(pid.Trim());
163
+                        }
164
+                        bool b = dBLL.Update(dModel);
165
+                        if (b)
166
+                        {
167
+                            res = Success("编辑成功");
167 168
                         }
168 169
                         else
169
-                            res = Error("获取信息失败");
170
+                        {
171
+                            res = Success("编辑失败");
172
+                        }
170 173
                     }
171 174
                     else
172
-                    {
173
-                        res = Error("请选择要编辑的分类");
174
-                    }
175
+                        res = Error("获取信息失败");
176
+                }
177
+                else
178
+                {
179
+                    res = Error("请选择要编辑的分类");
180
+                }
175 181
 
176 182
             }
177 183
             return res;
@@ -183,30 +189,30 @@ namespace CallCenterApi.Interface.Controllers.quality
183 189
             ActionResult res = NoToken("未知错误,请重新登录");
184 190
             DataTable dt = new DataTable();
185 191
 
186
-                if (!string.IsNullOrEmpty(id.Trim()))
192
+            if (!string.IsNullOrEmpty(id.Trim()))
193
+            {
194
+                dt = new BLL.T_QC_IndexBase().GetList(" F_CategoryId=" + id + " ").Tables[0];
195
+                if (dt.Rows.Count > 0)
187 196
                 {
188
-                    dt = new BLL.T_QC_IndexBase().GetList(" F_CategoryId=" + id + " ").Tables[0];
189
-                    if (dt.Rows.Count > 0)
197
+                    res = Error("请先删除此分类下的指标");
198
+                }
199
+                else
200
+                {
201
+                    if (new BLL.T_QC_IndexCategory().Delete(Convert.ToInt32(id)))
190 202
                     {
191
-                        res = Error("请先删除此分类下的指标");
203
+                        res = Success("删除成功");
192 204
                     }
193 205
                     else
194 206
                     {
195
-                        if (new BLL.T_QC_IndexCategory().Delete(Convert.ToInt32(id)))
196
-                        {
197
-                            res = Success("删除成功");
198
-                        }
199
-                        else
200
-                        {
201
-                            res = Error("删除失败");
202
-                        }
203
-
207
+                        res = Error("删除失败");
204 208
                     }
209
+
205 210
                 }
206
-                else
207
-                {
208
-                    res = Error("请选择要删除的记录");
209
-                }
211
+            }
212
+            else
213
+            {
214
+                res = Error("请选择要删除的记录");
215
+            }
210 216
 
211 217
             return res;
212 218
         }

+ 1 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Dto/CallPlan.cs

@@ -10,6 +10,7 @@ namespace CallCenterApi.Interface.Models.Dto
10 10
         public long id { get; set; }
11 11
         public string name { get; set; }
12 12
         public string tasktype { get; set; }
13
+        public string deptname { get; set; }
13 14
         public string state { get; set; }
14 15
         public string addtime { get; set; }
15 16
         public long talkid { get; set; }

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Filter/FilterCallPhone.cs

@@ -15,6 +15,6 @@ namespace CallCenterApi.Interface.Models.Filter
15 15
         public int YJState { get; set; } = -1;
16 16
         public int UserId { get; set; } = 0;
17 17
         public int TaskType { get; set; } = 1;
18
-
18
+        public int RequestType { get; set; } = 1;
19 19
     }
20 20
 }

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/CallPlanInput.cs

@@ -93,6 +93,6 @@ namespace CallCenterApi.Interface.Models.Input
93 93
         public string FilePath { get; set; }
94 94
         public string SelectIds { get; set; }
95 95
         public int TempId { get; set; } = 0;
96
-
96
+        public int DeptId { get; set; }
97 97
     }
98 98
 }

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Web.config

@@ -18,7 +18,7 @@
18 18
   </appSettings>
19 19
   <connectionStrings>
20 20
     <!--<add name="ConnectionString" connectionString="Data Source=117.158.196.116,11433;User ID=sa;pwd=800100;Initial Catalog=CallCenter_ZXZBNew;"/>-->
21
-    <add name="ConnectionString" connectionString="Data Source=192.168.4.18;User ID=sa;pwd=800100;Initial Catalog=CallCenter_ZYKJ;"/>
21
+    <add name="ConnectionString" connectionString="Data Source=192.168.4.18;User ID=sa;pwd=800100;Initial Catalog=CallCenter_ZYKJ2;"/>
22 22
     <!--<add name="ConnectionString" connectionString="Data Source=192.168.1.88;User ID=sa;pwd=800100;Initial Catalog=UUBase_CallCenter;"/>-->
23 23
     <!--<add name="ConnectionString" connectionString="Data Source=192.168.1.88;User ID=sa;pwd=800100;Initial Catalog=CallCenter_ZXZB2;"/>-->
24 24
   </connectionStrings>