Sfoglia il codice sorgente

点击外呼-弹屏调整
质检听录音调整
知识库调整
坐席报表导出调整

yuqian 8 anni fa
parent
commit
6bd5a47401

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

@@ -57,6 +57,7 @@
57 57
     <Compile Include="T_Call_CallRecordsLD.cs" />
58 58
     <Compile Include="T_Call_CallRecords_QC.cs" />
59 59
     <Compile Include="T_Call_LeaveRecord.cs" />
60
+    <Compile Include="T_Call_Answers.cs" />
60 61
     <Compile Include="T_Call_PageField.cs" />
61 62
     <Compile Include="T_Call_PageTemp.cs" />
62 63
     <Compile Include="T_Call_TaskTelNum.cs" />

+ 135 - 0
CallCenterApi/CallCenterApi.BLL/T_Call_Answers.cs

@@ -0,0 +1,135 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    /// <summary>
11
+	/// T_Call_Answers
12
+	/// </summary>
13
+	public partial class T_Call_Answers
14
+    {
15
+        private readonly CallCenterApi.DAL.T_Call_Answers dal = new CallCenterApi.DAL.T_Call_Answers();
16
+        public T_Call_Answers()
17
+        { }
18
+        #region  BasicMethod
19
+        /// <summary>
20
+        /// 增加一条数据
21
+        /// </summary>
22
+        public int Add(CallCenterApi.Model.T_Call_Answers model)
23
+        {
24
+            return dal.Add(model);
25
+        }
26
+
27
+        /// <summary>
28
+        /// 更新一条数据
29
+        /// </summary>
30
+        public bool Update(CallCenterApi.Model.T_Call_Answers model)
31
+        {
32
+            return dal.Update(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 删除一条数据
37
+        /// </summary>
38
+        public bool Delete(int F_AnswerID)
39
+        {
40
+
41
+            return dal.Delete(F_AnswerID);
42
+        }
43
+        public bool DeleteByTelid(int F_CusTelID, int F_TaskID)
44
+        {
45
+            return dal.DeleteByTelid(F_CusTelID, F_TaskID);
46
+        }
47
+        /// <summary>
48
+        /// 删除一条数据
49
+        /// </summary>
50
+        public bool DeleteList(string F_AnswerIDlist)
51
+        {
52
+            return dal.DeleteList(F_AnswerIDlist);
53
+        }
54
+
55
+        /// <summary>
56
+        /// 得到一个对象实体
57
+        /// </summary>
58
+        public CallCenterApi.Model.T_Call_Answers GetModel(int F_AnswerID)
59
+        {
60
+
61
+            return dal.GetModel(F_AnswerID);
62
+        }
63
+
64
+        /// <summary>
65
+        /// 获得数据列表
66
+        /// </summary>
67
+        public DataSet GetList(string strWhere)
68
+        {
69
+            return dal.GetList(strWhere);
70
+        }
71
+        /// <summary>
72
+        /// 获得前几行数据
73
+        /// </summary>
74
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
75
+        {
76
+            return dal.GetList(Top, strWhere, filedOrder);
77
+        }
78
+        /// <summary>
79
+        /// 获得数据列表
80
+        /// </summary>
81
+        public List<CallCenterApi.Model.T_Call_Answers> GetModelList(string strWhere)
82
+        {
83
+            DataSet ds = dal.GetList(strWhere);
84
+            return DataTableToList(ds.Tables[0]);
85
+        }
86
+        /// <summary>
87
+        /// 获得数据列表
88
+        /// </summary>
89
+        public List<CallCenterApi.Model.T_Call_Answers> DataTableToList(DataTable dt)
90
+        {
91
+            List<CallCenterApi.Model.T_Call_Answers> modelList = new List<CallCenterApi.Model.T_Call_Answers>();
92
+            int rowsCount = dt.Rows.Count;
93
+            if (rowsCount > 0)
94
+            {
95
+                CallCenterApi.Model.T_Call_Answers model;
96
+                for (int n = 0; n < rowsCount; n++)
97
+                {
98
+                    model = dal.DataRowToModel(dt.Rows[n]);
99
+                    if (model != null)
100
+                    {
101
+                        modelList.Add(model);
102
+                    }
103
+                }
104
+            }
105
+            return modelList;
106
+        }
107
+
108
+        /// <summary>
109
+        /// 获得数据列表
110
+        /// </summary>
111
+        public DataSet GetAllList()
112
+        {
113
+            return GetList("");
114
+        }
115
+
116
+        /// <summary>
117
+        /// 分页获取数据列表
118
+        /// </summary>
119
+        public int GetRecordCount(string strWhere)
120
+        {
121
+            return dal.GetRecordCount(strWhere);
122
+        }
123
+        /// <summary>
124
+        /// 分页获取数据列表
125
+        /// </summary>
126
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
127
+        {
128
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
129
+        }
130
+        #endregion  BasicMethod
131
+        #region  ExtensionMethod
132
+
133
+        #endregion  ExtensionMethod
134
+    }
135
+}

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

@@ -57,6 +57,7 @@
57 57
     <Compile Include="T_Call_CallRecordsLD.cs" />
58 58
     <Compile Include="T_Call_CallRecords_QC.cs" />
59 59
     <Compile Include="T_Call_LeaveRecord.cs" />
60
+    <Compile Include="T_Call_Answers.cs" />
60 61
     <Compile Include="T_Call_PageField.cs" />
61 62
     <Compile Include="T_Call_PageTemp.cs" />
62 63
     <Compile Include="T_Call_TaskTelNum.cs" />

+ 373 - 0
CallCenterApi/CallCenterApi.DAL/T_Call_Answers.cs

@@ -0,0 +1,373 @@
1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Data.SqlClient;
6
+using System.Linq;
7
+using System.Text;
8
+using System.Threading.Tasks;
9
+
10
+namespace CallCenterApi.DAL
11
+{
12
+    /// <summary>
13
+	/// 数据访问类:T_Call_Answers
14
+	/// </summary>
15
+	public partial class T_Call_Answers
16
+    {
17
+        public T_Call_Answers()
18
+        { }
19
+        #region  BasicMethod
20
+
21
+        /// <summary>
22
+        /// 增加一条数据
23
+        /// </summary>
24
+        public int Add(CallCenterApi.Model.T_Call_Answers model)
25
+        {
26
+            StringBuilder strSql = new StringBuilder();
27
+            strSql.Append("insert into T_Call_Answers(");
28
+            strSql.Append("F_TaskID,F_QID,F_QIID,F_Answer,F_CusTelID,F_CusID,F_OptBy,F_OptByName,F_OptOn,F_Expand1,F_Expand2,F_Expand3)");
29
+            strSql.Append(" values (");
30
+            strSql.Append("@F_TaskID,@F_QID,@F_QIID,@F_Answer,@F_CusTelID,@F_CusID,@F_OptBy,@F_OptByName,@F_OptOn,@F_Expand1,@F_Expand2,@F_Expand3)");
31
+            strSql.Append(";select @@IDENTITY");
32
+            SqlParameter[] parameters = {
33
+                    new SqlParameter("@F_TaskID", SqlDbType.Int,4),
34
+                    new SqlParameter("@F_QID", SqlDbType.Int,4),
35
+                    new SqlParameter("@F_QIID", SqlDbType.Int,4),
36
+                    new SqlParameter("@F_Answer", SqlDbType.NVarChar,3000),
37
+                    new SqlParameter("@F_CusTelID", SqlDbType.Int,4),
38
+                    new SqlParameter("@F_CusID", SqlDbType.Int,4),
39
+                    new SqlParameter("@F_OptBy", SqlDbType.Int,4),
40
+                    new SqlParameter("@F_OptByName", SqlDbType.NVarChar,50),
41
+                    new SqlParameter("@F_OptOn", SqlDbType.DateTime),
42
+                    new SqlParameter("@F_Expand1", SqlDbType.NVarChar,500),
43
+                    new SqlParameter("@F_Expand2", SqlDbType.NVarChar,500),
44
+                    new SqlParameter("@F_Expand3", SqlDbType.NVarChar,500)};
45
+            parameters[0].Value = model.F_TaskID;
46
+            parameters[1].Value = model.F_QID;
47
+            parameters[2].Value = model.F_QIID;
48
+            parameters[3].Value = model.F_Answer;
49
+            parameters[4].Value = model.F_CusTelID;
50
+            parameters[5].Value = model.F_CusID;
51
+            parameters[6].Value = model.F_OptBy;
52
+            parameters[7].Value = model.F_OptByName;
53
+            parameters[8].Value = model.F_OptOn;
54
+            parameters[9].Value = model.F_Expand1;
55
+            parameters[10].Value = model.F_Expand2;
56
+            parameters[11].Value = model.F_Expand3;
57
+
58
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
59
+            if (obj == null)
60
+            {
61
+                return 0;
62
+            }
63
+            else
64
+            {
65
+                return Convert.ToInt32(obj);
66
+            }
67
+        }
68
+        /// <summary>
69
+        /// 更新一条数据
70
+        /// </summary>
71
+        public bool Update(CallCenterApi.Model.T_Call_Answers model)
72
+        {
73
+            StringBuilder strSql = new StringBuilder();
74
+            strSql.Append("update T_Call_Answers set ");
75
+            strSql.Append("F_TaskID=@F_TaskID,");
76
+            strSql.Append("F_QID=@F_QID,");
77
+            strSql.Append("F_QIID=@F_QIID,");
78
+            strSql.Append("F_Answer=@F_Answer,");
79
+            strSql.Append("F_CusTelID=@F_CusTelID,");
80
+            strSql.Append("F_CusID=@F_CusID,");
81
+            strSql.Append("F_OptBy=@F_OptBy,");
82
+            strSql.Append("F_OptByName=@F_OptByName,");
83
+            strSql.Append("F_OptOn=@F_OptOn,");
84
+            strSql.Append("F_Expand1=@F_Expand1,");
85
+            strSql.Append("F_Expand2=@F_Expand2,");
86
+            strSql.Append("F_Expand3=@F_Expand3");
87
+            strSql.Append(" where F_AnswerID=@F_AnswerID");
88
+            SqlParameter[] parameters = {
89
+                    new SqlParameter("@F_TaskID", SqlDbType.Int,4),
90
+                    new SqlParameter("@F_QID", SqlDbType.Int,4),
91
+                    new SqlParameter("@F_QIID", SqlDbType.Int,4),
92
+                    new SqlParameter("@F_Answer", SqlDbType.NVarChar,3000),
93
+                    new SqlParameter("@F_CusTelID", SqlDbType.Int,4),
94
+                    new SqlParameter("@F_CusID", SqlDbType.Int,4),
95
+                    new SqlParameter("@F_OptBy", SqlDbType.Int,4),
96
+                    new SqlParameter("@F_OptByName", SqlDbType.NVarChar,50),
97
+                    new SqlParameter("@F_OptOn", SqlDbType.DateTime),
98
+                    new SqlParameter("@F_Expand1", SqlDbType.NVarChar,500),
99
+                    new SqlParameter("@F_Expand2", SqlDbType.NVarChar,500),
100
+                    new SqlParameter("@F_Expand3", SqlDbType.NVarChar,500),
101
+                    new SqlParameter("@F_AnswerID", SqlDbType.Int,4)};
102
+            parameters[0].Value = model.F_TaskID;
103
+            parameters[1].Value = model.F_QID;
104
+            parameters[2].Value = model.F_QIID;
105
+            parameters[3].Value = model.F_Answer;
106
+            parameters[4].Value = model.F_CusTelID;
107
+            parameters[5].Value = model.F_CusID;
108
+            parameters[6].Value = model.F_OptBy;
109
+            parameters[7].Value = model.F_OptByName;
110
+            parameters[8].Value = model.F_OptOn;
111
+            parameters[9].Value = model.F_Expand1;
112
+            parameters[10].Value = model.F_Expand2;
113
+            parameters[11].Value = model.F_Expand3;
114
+            parameters[12].Value = model.F_AnswerID;
115
+
116
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
117
+            if (rows > 0)
118
+            {
119
+                return true;
120
+            }
121
+            else
122
+            {
123
+                return false;
124
+            }
125
+        }
126
+
127
+        /// <summary>
128
+        /// 删除一条数据
129
+        /// </summary>
130
+        public bool Delete(int F_AnswerID)
131
+        {
132
+
133
+            StringBuilder strSql = new StringBuilder();
134
+            strSql.Append("delete from T_Call_Answers ");
135
+            strSql.Append(" where F_AnswerID=@F_AnswerID ");
136
+            SqlParameter[] parameters = {
137
+                    new SqlParameter("@F_AnswerID", SqlDbType.Int,4)
138
+            };
139
+            parameters[0].Value = F_AnswerID;
140
+
141
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
142
+            if (rows > 0)
143
+            {
144
+                return true;
145
+            }
146
+            else
147
+            {
148
+                return false;
149
+            }
150
+        }
151
+        public bool DeleteByTelid(int F_CusTelID,int F_TaskID)
152
+        {
153
+            StringBuilder strSql = new StringBuilder();
154
+            strSql.Append("delete from T_Call_Answers ");
155
+            strSql.Append(" where F_CusTelID=@F_CusTelID ");
156
+            strSql.Append(" and F_TaskID=@F_TaskID ");
157
+            SqlParameter[] parameters = {
158
+                    new SqlParameter("@F_CusTelID", SqlDbType.Int,4),
159
+                    new SqlParameter("@F_TaskID", SqlDbType.Int,4)
160
+            };
161
+            parameters[0].Value = F_CusTelID;
162
+            parameters[1].Value = F_TaskID;
163
+
164
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
165
+            if (rows > 0)
166
+            {
167
+                return true;
168
+            }
169
+            else
170
+            {
171
+                return false;
172
+            }
173
+        }
174
+        /// <summary>
175
+        /// 批量删除数据
176
+        /// </summary>
177
+        public bool DeleteList(string F_AnswerIDlist)
178
+        {
179
+            StringBuilder strSql = new StringBuilder();
180
+            strSql.Append("delete from T_Call_Answers ");
181
+            strSql.Append(" where F_AnswerID in (" + F_AnswerIDlist + ")  ");
182
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
183
+            if (rows > 0)
184
+            {
185
+                return true;
186
+            }
187
+            else
188
+            {
189
+                return false;
190
+            }
191
+        }
192
+
193
+
194
+        /// <summary>
195
+        /// 得到一个对象实体
196
+        /// </summary>
197
+        public CallCenterApi.Model.T_Call_Answers GetModel(int F_AnswerID)
198
+        {
199
+
200
+            StringBuilder strSql = new StringBuilder();
201
+            strSql.Append("select  top 1 F_AnswerID,F_TaskID,F_QID,F_QIID,F_Answer,F_CusTelID,F_CusID,F_OptBy,F_OptByName,F_OptOn,F_Expand1,F_Expand2,F_Expand3 from T_Call_Answers ");
202
+            strSql.Append(" where F_AnswerID=@F_AnswerID");
203
+            SqlParameter[] parameters = {
204
+                    new SqlParameter("@F_AnswerID", SqlDbType.Int,4)
205
+            };
206
+            parameters[0].Value = F_AnswerID;
207
+
208
+            CallCenterApi.Model.T_Call_Answers model = new CallCenterApi.Model.T_Call_Answers();
209
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
210
+            if (ds.Tables[0].Rows.Count > 0)
211
+            {
212
+                return DataRowToModel(ds.Tables[0].Rows[0]);
213
+            }
214
+            else
215
+            {
216
+                return null;
217
+            }
218
+        }
219
+
220
+
221
+        /// <summary>
222
+        /// 得到一个对象实体
223
+        /// </summary>
224
+        public CallCenterApi.Model.T_Call_Answers DataRowToModel(DataRow row)
225
+        {
226
+            CallCenterApi.Model.T_Call_Answers model = new CallCenterApi.Model.T_Call_Answers();
227
+            if (row != null)
228
+            {
229
+                if (row["F_AnswerID"] != null && row["F_AnswerID"].ToString() != "")
230
+                {
231
+                    model.F_AnswerID = int.Parse(row["F_AnswerID"].ToString());
232
+                }
233
+                if (row["F_TaskID"] != null && row["F_TaskID"].ToString() != "")
234
+                {
235
+                    model.F_TaskID = int.Parse(row["F_TaskID"].ToString());
236
+                }
237
+                if (row["F_QID"] != null && row["F_QID"].ToString() != "")
238
+                {
239
+                    model.F_QID = int.Parse(row["F_QID"].ToString());
240
+                }
241
+                if (row["F_QIID"] != null && row["F_QIID"].ToString() != "")
242
+                {
243
+                    model.F_QIID = int.Parse(row["F_QIID"].ToString());
244
+                }
245
+                if (row["F_Answer"] != null)
246
+                {
247
+                    model.F_Answer = row["F_Answer"].ToString();
248
+                }
249
+                if (row["F_CusTelID"] != null && row["F_CusTelID"].ToString() != "")
250
+                {
251
+                    model.F_CusTelID = int.Parse(row["F_CusTelID"].ToString());
252
+                }
253
+                if (row["F_CusID"] != null && row["F_CusID"].ToString() != "")
254
+                {
255
+                    model.F_CusID = int.Parse(row["F_CusID"].ToString());
256
+                }
257
+                if (row["F_OptBy"] != null && row["F_OptBy"].ToString() != "")
258
+                {
259
+                    model.F_OptBy = int.Parse(row["F_OptBy"].ToString());
260
+                }
261
+                if (row["F_OptByName"] != null)
262
+                {
263
+                    model.F_OptByName = row["F_OptByName"].ToString();
264
+                }
265
+                if (row["F_OptOn"] != null && row["F_OptOn"].ToString() != "")
266
+                {
267
+                    model.F_OptOn = DateTime.Parse(row["F_OptOn"].ToString());
268
+                }
269
+                if (row["F_Expand1"] != null)
270
+                {
271
+                    model.F_Expand1 = row["F_Expand1"].ToString();
272
+                }
273
+                if (row["F_Expand2"] != null)
274
+                {
275
+                    model.F_Expand2 = row["F_Expand2"].ToString();
276
+                }
277
+                if (row["F_Expand3"] != null)
278
+                {
279
+                    model.F_Expand3 = row["F_Expand3"].ToString();
280
+                }
281
+            }
282
+            return model;
283
+        }
284
+
285
+        /// <summary>
286
+        /// 获得数据列表
287
+        /// </summary>
288
+        public DataSet GetList(string strWhere)
289
+        {
290
+            StringBuilder strSql = new StringBuilder();
291
+            strSql.Append("select F_AnswerID,F_TaskID,F_QID,F_QIID,F_Answer,F_CusTelID,F_CusID,F_OptBy,F_OptByName,F_OptOn,F_Expand1,F_Expand2,F_Expand3 ");
292
+            strSql.Append(" FROM T_Call_Answers ");
293
+            if (strWhere.Trim() != "")
294
+            {
295
+                strSql.Append(" where " + strWhere);
296
+            }
297
+            return DbHelperSQL.Query(strSql.ToString());
298
+        }
299
+
300
+        /// <summary>
301
+        /// 获得前几行数据
302
+        /// </summary>
303
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
304
+        {
305
+            StringBuilder strSql = new StringBuilder();
306
+            strSql.Append("select ");
307
+            if (Top > 0)
308
+            {
309
+                strSql.Append(" top " + Top.ToString());
310
+            }
311
+            strSql.Append(" F_AnswerID,F_TaskID,F_QID,F_QIID,F_Answer,F_CusTelID,F_CusID,F_OptBy,F_OptByName,F_OptOn,F_Expand1,F_Expand2,F_Expand3 ");
312
+            strSql.Append(" FROM T_Call_Answers ");
313
+            if (strWhere.Trim() != "")
314
+            {
315
+                strSql.Append(" where " + strWhere);
316
+            }
317
+            strSql.Append(" order by " + filedOrder);
318
+            return DbHelperSQL.Query(strSql.ToString());
319
+        }
320
+
321
+        /// <summary>
322
+        /// 获取记录总数
323
+        /// </summary>
324
+        public int GetRecordCount(string strWhere)
325
+        {
326
+            StringBuilder strSql = new StringBuilder();
327
+            strSql.Append("select count(1) FROM T_Call_Answers ");
328
+            if (strWhere.Trim() != "")
329
+            {
330
+                strSql.Append(" where " + strWhere);
331
+            }
332
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
333
+            if (obj == null)
334
+            {
335
+                return 0;
336
+            }
337
+            else
338
+            {
339
+                return Convert.ToInt32(obj);
340
+            }
341
+        }
342
+        /// <summary>
343
+        /// 分页获取数据列表
344
+        /// </summary>
345
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
346
+        {
347
+            StringBuilder strSql = new StringBuilder();
348
+            strSql.Append("SELECT * FROM ( ");
349
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
350
+            if (!string.IsNullOrEmpty(orderby.Trim()))
351
+            {
352
+                strSql.Append("order by T." + orderby);
353
+            }
354
+            else
355
+            {
356
+                strSql.Append("order by T.F_AnswerID desc");
357
+            }
358
+            strSql.Append(")AS Row, T.*  from T_Call_Answers T ");
359
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
360
+            {
361
+                strSql.Append(" WHERE " + strWhere);
362
+            }
363
+            strSql.Append(" ) TT");
364
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
365
+            return DbHelperSQL.Query(strSql.ToString());
366
+        }
367
+
368
+        #endregion  BasicMethod
369
+        #region  ExtensionMethod
370
+
371
+        #endregion  ExtensionMethod
372
+    }
373
+}

+ 9 - 4
CallCenterApi/CallCenterApi.DAL/T_Call_BanCallOut.cs

@@ -28,10 +28,15 @@ namespace CallCenterApi.DAL
28 28
             Model.T_Call_BanCallOut model = new Model.T_Call_BanCallOut();
29 29
             var sql = "select F_Id,F_Phone,F_SetTime from T_Call_BanCallOut WHERE F_Phone=@F_Phone";
30 30
             var dt = DbHelperSQL.Query(sql, new SqlParameter("@F_Phone", phone)).Tables[0];
31
-            model.Id = Convert.ToInt32(dt.Rows[0]["F_Id"]);
32
-            model.F_Phone = dt.Rows[0]["F_Phone"] == null ? "" : dt.Rows[0]["F_Phone"].ToString();
33
-            model.F_SetTime = dt.Rows[0]["F_SetTime"] == null ? null : (DateTime?)Convert.ToDateTime(dt.Rows[0]["F_Phone"].ToString());
34
-            return model;
31
+            if (dt.Rows.Count > 0)
32
+            {
33
+                model.Id = dt.Rows[0]["F_Id"] == DBNull.Value ? 0 : Convert.ToInt32(dt.Rows[0]["F_Id"]);
34
+                model.F_Phone = dt.Rows[0]["F_Phone"] == DBNull.Value ? "" : dt.Rows[0]["F_Phone"].ToString();
35
+                model.F_SetTime = dt.Rows[0]["F_SetTime"] == DBNull.Value ? null : (DateTime?)Convert.ToDateTime(dt.Rows[0]["F_Phone"].ToString());
36
+                return model;
37
+            }
38
+            return null;
39
+
35 40
         }
36 41
     }
37 42
 }

+ 2 - 0
CallCenterApi/CallCenterApi.DAL/T_Call_TaskTelNum.cs

@@ -822,6 +822,8 @@ namespace CallCenterApi.DAL
822 822
                 model.F_HJJGId = ds.Tables[0].Rows[0]["F_AskRes"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["F_AskRes"]);
823 823
                 model.F_YHFKID = ds.Tables[0].Rows[0]["F_YHFKID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["F_YHFKID"]);
824 824
                 model.F_Remark = ds.Tables[0].Rows[0]["F_Remark"] == DBNull.Value ? "" : ds.Tables[0].Rows[0]["F_Remark"].ToString();
825
+                model.F_HJJGName = ds.Tables[0].Rows[0]["F_HJJGName"] == DBNull.Value ? "" : ds.Tables[0].Rows[0]["F_HJJGName"].ToString();
826
+                model.F_YHFKName = ds.Tables[0].Rows[0]["F_YHFKName"] == DBNull.Value ? "" : ds.Tables[0].Rows[0]["F_YHFKName"].ToString();
825 827
                 return model;
826 828
             }
827 829
             else

+ 103 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/CallPlanController.cs

@@ -31,6 +31,7 @@ namespace CallCenterApi.Interface.Controllers.callout
31 31
         private readonly BLL.T_Sys_SystemConfig systemConfigBLL = new BLL.T_Sys_SystemConfig();
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
+        private readonly BLL.T_Call_Answers ansBLL = new BLL.T_Call_Answers();
34 35
         #region 外呼任务
35 36
         /// <summary>
36 37
         /// 获取列表
@@ -790,7 +791,9 @@ namespace CallCenterApi.Interface.Controllers.callout
790 791
                         text = dicTitle[x.Key],
791 792
                         value = x.Value,
792 793
                     }),
793
-                    pagerid = task.y_TkModelId ?? 0
794
+                    pagerid = task.y_TkModelId ?? 0,
795
+                    taskid = task.TaskID,
796
+                    id = id
794 797
 
795 798
                 });
796 799
             }
@@ -808,11 +811,110 @@ namespace CallCenterApi.Interface.Controllers.callout
808 811
             model.F_HJJGId = input.HJJG;
809 812
             model.F_YHFKID = input.YHFK;
810 813
             model.F_Remark = input.Remark ?? "";
814
+
815
+
811 816
             if (taskTellNumBLL.Update(model))
812 817
                 return Success("更新成功");
813 818
             return Error("更新失败");
814 819
 
815 820
         }
821
+        #region 问卷回答
822
+        /// <summary>
823
+        /// 
824
+        /// </summary>
825
+        /// <param name="taskid">任务ID</param>
826
+        /// <param name="custelid">客户电话ID</param>
827
+        /// <param name="cusid">客户档案ID</param>
828
+        /// <param name="ans">答案,数组形式["15_20_单选选项内容","17_25|36|58_复选选项内容1|选项内容2|选项内容3","30_0_问答题"]</param>
829
+        /// <param name="hjjgid">呼叫结果</param>
830
+        /// <param name="yhfkid">用户反馈</param>
831
+        /// <returns></returns>
832
+        public ActionResult Answers(CallNumberInput input)
833
+        {
834
+            if (input.Ans != null)
835
+            {
836
+                int cc = 0;
837
+                var ansModel = new Model.T_Call_Answers();
838
+                string askqids = "";
839
+                string ansids = "";
840
+
841
+                //先删除 后添加
842
+                ansBLL.DeleteByTelid(input.Id, input.TaskId);
843
+
844
+                ansModel.F_TaskID = input.TaskId;
845
+                ansModel.F_CusTelID = input.Id;
846
+                //ansModel.F_CusID = cusid;
847
+                ansModel.F_OptBy = CurrentUser.UserData.F_UserId;
848
+                ansModel.F_OptByName = CurrentUser.UserData.F_UserName;
849
+                ansModel.F_OptOn = DateTime.Now;
850
+                foreach (var item in input.Ans)
851
+                {
852
+                    var nn = 0;
853
+                    var ii = item.Split('_');
854
+                    ansModel.F_QID = int.Parse(ii[0]);
855
+
856
+                    askqids += ii[0] + ",";
857
+                    ansids += ii[1] + ",";
858
+
859
+                    if (ii[1].IndexOf('|') > 0)
860
+                    {
861
+                        var iii = ii[1].Trim('|').Split('|');
862
+                        var iia = ii[2].Trim('|').Split('|');
863
+                        for (int i = 0; i < iii.Length; i++)
864
+                        {
865
+                            ansModel.F_QIID = int.Parse(iii[i]);
866
+                            ansModel.F_Answer = iia[i];
867
+                            if (ansBLL.Add(ansModel) > 0)
868
+                                nn++;
869
+                        }
870
+                        if (nn == iii.Length)
871
+                            cc++;
872
+                    }
873
+                    else
874
+                    {
875
+                        ansModel.F_QIID = int.Parse(ii[1]);
876
+                        ansModel.F_Answer = ii[2];
877
+                        if (ansBLL.Add(ansModel) > 0)
878
+                            cc++;
879
+                    }
880
+                }
881
+
882
+                if (input.Id > 0)
883
+                {
884
+                    var otnModel = taskTellNumBLL.GetModel(input.Id);
885
+                    if (otnModel != null)
886
+                    {
887
+                        otnModel.F_HJJGId = input.HJJG;
888
+                        var hjconfig = new BLL.T_Sys_DictionaryValue().GetModel(input.HJJG);
889
+                        if (hjconfig != null)
890
+                            otnModel.F_HJJGName = hjconfig.F_Name;
891
+                        otnModel.F_YHFKID = input.YHFK;
892
+                        var fkconfig = new BLL.T_Sys_DictionaryValue().GetModel(input.YHFK);
893
+                        if (fkconfig != null)
894
+                            otnModel.F_YHFKName = fkconfig.F_Name;
895
+                        otnModel.F_AskRes = askqids;
896
+                        otnModel.F_AskInfo = ansids;
897
+                        taskTellNumBLL.Update(otnModel);
898
+
899
+                        //记录日志
900
+                        //planrecord(otnModel);
901
+                    }
902
+                }
903
+
904
+                if (cc == input.Ans.Length)
905
+                {
906
+                    return Success("问卷答案提交成功!taskid=" + input.TaskId + ",custelid=" + input.Id + ",操作人:" + CurrentUser.UserData.F_UserCode);
907
+                }
908
+                else
909
+                {
910
+                    ansBLL.DeleteByTelid(input.Id, input.TaskId);
911
+                    return Error("问卷答案提交失败!taskid=" + input.TaskId + ",custelid=" + input.Id + ",操作人:" + CurrentUser.UserData.F_UserCode);
912
+                }
913
+            }
914
+            return Error("没有问卷答案提交");
915
+        }
916
+        #endregion
917
+
816 918
         #endregion
817 919
 
818 920
         #region 导入导出号码

+ 399 - 374
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/QCManageController.cs

@@ -19,114 +19,126 @@ namespace CallCenterApi.Interface.Controllers.quality
19 19
             string sql = " 1=1 ";
20 20
             DataTable dt = new DataTable();
21 21
 
22
-                string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
23
-                string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
24
-                string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
25
-                string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
26
-                string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
27
-                string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
28
-                string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
29
-                string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
30
-
31
-                string strpageindex = RequestString.GetQueryString("page");
32
-                int pageindex = 1;
33
-                string strpagesize = RequestString.GetQueryString("pagesize");
34
-                int pagesize = 10;
35
-
36
-                sql += " and CallState='1' and F_QCState<>1  ";
37
-
38
-                if (phone.Trim() != "")
39
-                {
40
-                    sql += " and CallNumber='" + phone + "'";
41
-                }
42
-                if (usercode.Trim() != "")
43
-                {
44
-                    sql += " and UserCode='" + usercode + "'";
45
-                }
46
-                if (calltype.Trim() != "")
47
-                {
48
-                    sql += " and CallType='" + calltype + "'";
49
-                }
50
-                if (starttime.Trim() == "" && endtime.Trim() == "")
51
-                {
52
-                    sql += " and DATEDIFF(week, BeginTime,getdate())=1 ";//默认显示上周记录
53
-                }
54
-                else
55
-                {
56
-                    if (starttime.Trim() != "")
57
-                    {
58
-                        sql += " and BeginTime>='" + starttime + "'";
59
-                    }
60
-                    if (endtime.Trim() != "")
61
-                    {
62
-                        sql += " and BeginTime<='" + endtime + "'";
63
-                    }
64
-                }
65
-                if (startl.Trim() != "")
22
+            string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
23
+            string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
24
+            string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
25
+            string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
26
+            string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
27
+            string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
28
+            string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
29
+            string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
30
+
31
+            string strpageindex = RequestString.GetQueryString("page");
32
+            int pageindex = 1;
33
+            string strpagesize = RequestString.GetQueryString("pagesize");
34
+            int pagesize = 10;
35
+
36
+            sql += " and CallState='1' and F_QCState<>1  ";
37
+
38
+            if (phone.Trim() != "")
39
+            {
40
+                sql += " and CallNumber='" + phone + "'";
41
+            }
42
+            if (usercode.Trim() != "")
43
+            {
44
+                sql += " and UserCode='" + usercode + "'";
45
+            }
46
+            if (calltype.Trim() != "")
47
+            {
48
+                sql += " and CallType='" + calltype + "'";
49
+            }
50
+            if (starttime.Trim() == "" && endtime.Trim() == "")
51
+            {
52
+                sql += " and DATEDIFF(week, BeginTime,getdate())=1 ";//默认显示上周记录
53
+            }
54
+            else
55
+            {
56
+                if (starttime.Trim() != "")
66 57
                 {
67
-                    sql += " and TalkLongTime>=" + startl + " ";
58
+                    sql += " and BeginTime>='" + starttime + "'";
68 59
                 }
69
-                if (endl.Trim() != "")
60
+                if (endtime.Trim() != "")
70 61
                 {
71
-                    sql += " and TalkLongTime<=" + endl + " ";
62
+                    sql += " and BeginTime<='" + endtime + "'";
72 63
                 }
64
+            }
65
+            if (startl.Trim() != "")
66
+            {
67
+                sql += " and TalkLongTime>=" + startl + " ";
68
+            }
69
+            if (endl.Trim() != "")
70
+            {
71
+                sql += " and TalkLongTime<=" + endl + " ";
72
+            }
73 73
 
74
-                if (strpageindex.Trim() != "")
75
-                {
76
-                    pageindex = Convert.ToInt32(strpageindex);
77
-                }
74
+            if (strpageindex.Trim() != "")
75
+            {
76
+                pageindex = Convert.ToInt32(strpageindex);
77
+            }
78
+
79
+            if (strpagesize.Trim() != "")
80
+            {
81
+                pagesize = Convert.ToInt32(strpagesize);
82
+            }
78 83
 
79
-                if (strpagesize.Trim() != "")
84
+            List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
85
+            List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
86
+            Model.PageData<object> pageData = new Model.PageData<object>();
87
+            var list = Plist.Select(d =>
88
+            {
89
+                int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
90
+                int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
91
+
92
+                string path = !string.IsNullOrWhiteSpace(d.FilePath) ? "" : d.FilePath;
93
+                var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
94
+                if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
80 95
                 {
81
-                    pagesize = Convert.ToInt32(strpagesize);
82
-                }
83
-                
84
-                List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
85
-                List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
86
-                Model.PageData<object> pageData = new Model.PageData<object>();
87
-                var list = Plist.Select(d => {
88
-                    int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
89
-                    int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
90
-                    return new
96
+                    var ym = config.F_ParamValue;
97
+                    if (ym.Substring(ym.Length - 1) == "/")
91 98
                     {
92
-                        _callnumber = d.CallNumber,
93
-                        _filepath = d.FilePath,
94
-                        _f_qcstate = d.F_QCState,
95
-                        _f_qcscore = d.F_QCScore,
96
-                        _f_qcquestion = d.F_QCQuestion,
97
-                        _f_qcadvise = d.F_QCAdvise,
98
-                        _calltype = d.CallType,
99
-                        _callstate = d.CallState,
100
-                        _usercode = d.UserCode,
101
-                        _username = d.UserName,
102
-                        _talkstarttime = d.TalkStartTime,
103
-                        _talkendtime = d.TalkEndTime,
104
-                        _talklongtime = d.TalkLongTime,
105
-                        _businesstype = d.BusinessType,
106
-                        _f_qclc = lc,
107
-                        _f_qcdc = dc,
108
-                        _callrecordsid = d.CallRecordsId
109
-                    };
110
-                }).ToList<object>();
111
-                //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
112
-                //pageData.Total = list.Count;
113
-
114
-                var obj = new
99
+                        ym = ym.Substring(0, ym.Length - 1);
100
+                    }
101
+                    d.FilePath = ym + path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
102
+                }
103
+                return new
115 104
                 {
116
-                    rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
117
-                    total = list.Count
105
+                    _callnumber = d.CallNumber,
106
+                    _filepath = d.FilePath,
107
+                    _f_qcstate = d.F_QCState,
108
+                    _f_qcscore = d.F_QCScore,
109
+                    _f_qcquestion = d.F_QCQuestion,
110
+                    _f_qcadvise = d.F_QCAdvise,
111
+                    _calltype = d.CallType,
112
+                    _callstate = d.CallState,
113
+                    _usercode = d.UserCode,
114
+                    _username = d.UserName,
115
+                    _talkstarttime = d.TalkStartTime,
116
+                    _talkendtime = d.TalkEndTime,
117
+                    _talklongtime = d.TalkLongTime,
118
+                    _businesstype = d.BusinessType,
119
+                    _f_qclc = lc,
120
+                    _f_qcdc = dc,
121
+                    _callrecordsid = d.CallRecordsId
118 122
                 };
123
+            }).ToList<object>();
124
+            //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
125
+            //pageData.Total = list.Count;
126
+            var obj = new
127
+            {
128
+                rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
129
+                total = list.Count
130
+            };
119 131
 
120
-                res = Content(obj.ToJson());
132
+            res = Content(obj.ToJson());
121 133
 
122
-                //if (pageData.Total > 0)
123
-                //{
124
-                //    res = Success("未质检列表加载成功", pageData);
125
-                //}
126
-                //else
127
-                //{
128
-                //    res = Error("未质检列表暂无数据");
129
-                //}
134
+            //if (pageData.Total > 0)
135
+            //{
136
+            //    res = Success("未质检列表加载成功", pageData);
137
+            //}
138
+            //else
139
+            //{
140
+            //    res = Error("未质检列表暂无数据");
141
+            //}
130 142
 
131 143
             return res;
132 144
         }
@@ -138,109 +150,122 @@ namespace CallCenterApi.Interface.Controllers.quality
138 150
             string sql = " 1=1 ";
139 151
             DataTable dt = new DataTable();
140 152
 
141
-                string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
142
-                string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
143
-                string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
144
-                string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
145
-                string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
146
-                string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
147
-                string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
148
-                string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
153
+            string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
154
+            string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
155
+            string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
156
+            string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
157
+            string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
158
+            string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
159
+            string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
160
+            string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
149 161
 
150
-                string strpageindex = RequestString.GetQueryString("page");
151
-                int pageindex = 1;
152
-                string strpagesize = RequestString.GetQueryString("pagesize");
153
-                int pagesize = 10;
162
+            string strpageindex = RequestString.GetQueryString("page");
163
+            int pageindex = 1;
164
+            string strpagesize = RequestString.GetQueryString("pagesize");
165
+            int pagesize = 10;
154 166
 
155
-                //已接通,已质检
156
-                sql += "  and CallState='1' and F_QCState=1 ";
167
+            //已接通,已质检
168
+            sql += "  and CallState='1' and F_QCState=1 ";
157 169
 
158
-                if (phone.Trim() != "")
159
-                {
160
-                    sql += " and CallNumber='" + phone + "'";
161
-                }
162
-                if (usercode.Trim() != "")
163
-                {
164
-                    sql += " and UserCode='" + usercode + "'";
165
-                }
166
-                if (calltype.Trim() != "")
167
-                {
168
-                    sql += " and CallType='" + calltype + "'";
169
-                }
170
-                if (starttime.Trim() != "")
171
-                {
172
-                    sql += " and BeginTime>='" + starttime + "'";
173
-                }
174
-                if (endtime.Trim() != "")
175
-                {
176
-                    sql += " and BeginTime<='" + endtime + "'";
177
-                }
178
-                if (startl.Trim() != "")
179
-                {
180
-                    sql += " and TalkLongTime>=" + startl + " ";
181
-                }
182
-                if (endl.Trim() != "")
183
-                {
184
-                    sql += " and TalkLongTime<=" + endl + " ";
185
-                }
170
+            if (phone.Trim() != "")
171
+            {
172
+                sql += " and CallNumber='" + phone + "'";
173
+            }
174
+            if (usercode.Trim() != "")
175
+            {
176
+                sql += " and UserCode='" + usercode + "'";
177
+            }
178
+            if (calltype.Trim() != "")
179
+            {
180
+                sql += " and CallType='" + calltype + "'";
181
+            }
182
+            if (starttime.Trim() != "")
183
+            {
184
+                sql += " and BeginTime>='" + starttime + "'";
185
+            }
186
+            if (endtime.Trim() != "")
187
+            {
188
+                sql += " and BeginTime<='" + endtime + "'";
189
+            }
190
+            if (startl.Trim() != "")
191
+            {
192
+                sql += " and TalkLongTime>=" + startl + " ";
193
+            }
194
+            if (endl.Trim() != "")
195
+            {
196
+                sql += " and TalkLongTime<=" + endl + " ";
197
+            }
186 198
 
187
-                if (strpageindex.Trim() != "")
188
-                {
189
-                    pageindex = Convert.ToInt32(strpageindex);
190
-                }
199
+            if (strpageindex.Trim() != "")
200
+            {
201
+                pageindex = Convert.ToInt32(strpageindex);
202
+            }
203
+
204
+            if (strpagesize.Trim() != "")
205
+            {
206
+                pagesize = Convert.ToInt32(strpagesize);
207
+            }
191 208
 
192
-                if (strpagesize.Trim() != "")
209
+            List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
210
+            List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
211
+            Model.PageData<object> pageData = new Model.PageData<object>();
212
+            var list = Plist.Select(d =>
213
+            {
214
+                int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
215
+                int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
216
+                string path = !string.IsNullOrWhiteSpace(d.FilePath) ? "" : d.FilePath;
217
+                var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
218
+                if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
193 219
                 {
194
-                    pagesize = Convert.ToInt32(strpagesize);
220
+                    var ym = config.F_ParamValue;
221
+                    if (ym.Substring(ym.Length - 1) == "/")
222
+                    {
223
+                        ym = ym.Substring(0, ym.Length - 1);
224
+                    }
225
+                    d.FilePath = ym + path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
195 226
                 }
196 227
 
197
-                List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
198
-                List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
199
-                Model.PageData<object> pageData = new Model.PageData<object>();
200
-                var list = Plist.Select(d => {
201
-                    int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
202
-                    int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
203
-                    return new
204
-                    {
205
-                        _callnumber = d.CallNumber,
206
-                        _filepath = d.FilePath,
207
-                        _f_qcstate = d.F_QCState,
208
-                        _f_qcscore = d.F_QCScore,
209
-                        _f_qcquestion = d.F_QCQuestion,
210
-                        _f_qcadvise = d.F_QCAdvise,
211
-                        _calltype = d.CallType,
212
-                        _callstate = d.CallState,
213
-                        _usercode = d.UserCode,
214
-                        _username = d.UserName,
215
-                        _talkstarttime = d.TalkStartTime,
216
-                        _talkendtime = d.TalkEndTime,
217
-                        _talklongtime = d.TalkLongTime,
218
-                        _businesstype = d.BusinessType,
219
-                        _f_qclc = lc,
220
-                        _f_qcdc = dc,
221
-                        _callrecordsid = d.CallRecordsId
222
-                    };
223
-                }).ToList<object>();
224
-
225
-                var obj = new
228
+                return new
226 229
                 {
227
-                    rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
228
-                    total = list.Count
230
+                    _callnumber = d.CallNumber,
231
+                    _filepath = d.FilePath,
232
+                    _f_qcstate = d.F_QCState,
233
+                    _f_qcscore = d.F_QCScore,
234
+                    _f_qcquestion = d.F_QCQuestion,
235
+                    _f_qcadvise = d.F_QCAdvise,
236
+                    _calltype = d.CallType,
237
+                    _callstate = d.CallState,
238
+                    _usercode = d.UserCode,
239
+                    _username = d.UserName,
240
+                    _talkstarttime = d.TalkStartTime,
241
+                    _talkendtime = d.TalkEndTime,
242
+                    _talklongtime = d.TalkLongTime,
243
+                    _businesstype = d.BusinessType,
244
+                    _f_qclc = lc,
245
+                    _f_qcdc = dc,
246
+                    _callrecordsid = d.CallRecordsId
229 247
                 };
248
+            }).ToList<object>();
249
+
250
+            var obj = new
251
+            {
252
+                rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
253
+                total = list.Count
254
+            };
230 255
 
231
-                res = Content(obj.ToJson());
256
+            res = Content(obj.ToJson());
232 257
 
233
-                //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
234
-                //pageData.Total = list.Count;
258
+            //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
259
+            //pageData.Total = list.Count;
235 260
 
236
-                //if (pageData.Total > 0)
237
-                //{
238
-                //    res = Success("已质检列表加载成功", pageData);
239
-                //}
240
-                //else
241
-                //{
242
-                //    res = Error("已质检列表暂无数据");
243
-                //}
261
+            //if (pageData.Total > 0)
262
+            //{
263
+            //    res = Success("已质检列表加载成功", pageData);
264
+            //}
265
+            //else
266
+            //{
267
+            //    res = Error("已质检列表暂无数据");
268
+            //}
244 269
 
245 270
             return res;
246 271
         }
@@ -253,206 +278,206 @@ namespace CallCenterApi.Interface.Controllers.quality
253 278
             DataTable dtindex = new DataTable();
254 279
             DataTable dtres = new DataTable();
255 280
 
256
-                dt = new BLL.T_QC_IndexCategory().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
257
-                dtindex = new BLL.T_QC_IndexBase().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
258
-                dtres = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
259
-                int i = 0;
260
-                int m = 0;
261
-                int indexcount = 0;
262
-                int allscore = 0;
263
-                int childscore = 0;
264
-                int childpf = 0;
265
-                int allpf = 0;
266
-                List<Model.QCModel> qclist = new List<Model.QCModel>();
267
-                object obj = null;
268
-
269
-                foreach (DataRow dr in dt.Select("F_ParentId=0"))
270
-                {
271
-                    Model.QCModel qcml = new Model.QCModel();
272
-                    List<Model.QCModel> qcclist = new List<Model.QCModel>();
273
-
274
-                    i = 0;
275
-                    indexcount = 0;
276
-                    childscore = 0;
277
-                    childpf = 0;
281
+            dt = new BLL.T_QC_IndexCategory().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
282
+            dtindex = new BLL.T_QC_IndexBase().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
283
+            dtres = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
284
+            int i = 0;
285
+            int m = 0;
286
+            int indexcount = 0;
287
+            int allscore = 0;
288
+            int childscore = 0;
289
+            int childpf = 0;
290
+            int allpf = 0;
291
+            List<Model.QCModel> qclist = new List<Model.QCModel>();
292
+            object obj = null;
293
+
294
+            foreach (DataRow dr in dt.Select("F_ParentId=0"))
295
+            {
296
+                Model.QCModel qcml = new Model.QCModel();
297
+                List<Model.QCModel> qcclist = new List<Model.QCModel>();
278 298
 
279
-                    string categoryid = dr["F_CategoryId"].ToString().Trim();
299
+                i = 0;
300
+                indexcount = 0;
301
+                childscore = 0;
302
+                childpf = 0;
280 303
 
281
-                    qcml.Qcid = categoryid;
282
-                    qcml.Qcname = dr["F_CategoryName"].ToString().Trim();
304
+                string categoryid = dr["F_CategoryId"].ToString().Trim();
283 305
 
284
-                    obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId in(select F_CategoryId from T_QC_IndexCategory where F_ParentId=" + dr["F_CategoryId"] + ")");
285
-                    qcml.Rowspan = obj.ToString();
286
-                    foreach (DataRow childdr in dt.Select("F_ParentId=" + categoryid + ""))
287
-                    {
288
-                        Model.QCModel qcmlc = new Model.QCModel();
289
-                        List<Model.QCModel> qccrlist = new List<Model.QCModel>();
290
-                        m = 0;
291
-                        #region 子分类
292
-                        string childcategoryid = childdr["F_CategoryId"].ToString().Trim();
293
-                        DataRow[] arrchild = dtindex.Select("F_CategoryId=" + childcategoryid + "");
294
-                        indexcount += arrchild.Length;
295
-
296
-                        //加载项
297
-                        qcmlc.Qcid = categoryid + "-" + childcategoryid;
298
-                        qcmlc.Qcname = childdr["F_CategoryName"].ToString().Trim();
299
-                        obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId=" + childdr["F_CategoryId"]);
300
-                        qcmlc.Rowspan = obj.ToString();
301
-                        #endregion
302
-                        foreach (DataRow indexdr in arrchild)
303
-                        {
304
-                            Model.QCModel qcmlcr = new Model.QCModel();
305
-                            string indexid = indexdr["F_IndexId"].ToString().Trim();
306
-                            string pf = "0";
307
-                            try
308
-                            {
309
-                                //分类分数合计
310
-                                childscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
311
-                                //总计合计
312
-                                allscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
313
-                            }
314
-                            catch
315
-                            { }
316
-                            try
317
-                            {
318
-                                pf = dtres.Select("F_IndexId=" + indexid + "")[0]["F_QCScore"].ToString().Trim();
319
-                                childpf += Convert.ToInt32(pf);//分类评分合计
320
-                                allpf += Convert.ToInt32(pf);//评分总计
321
-                            }
322
-                            catch
323
-                            {
324
-                            }
325
-
326
-                            #region 指标
327
-                            //加载指标
328
-                            qcmlcr.Qcid = categoryid + "-" + childcategoryid + "-" + indexid;
329
-                            qcmlcr.Qcname = indexdr["F_Title"].ToString().Trim();
330
-                            qcmlcr.Qcscore = indexdr["F_Score"].ToString().Trim();
331
-                            qcmlcr.Qcpf = pf;
332
-                            qcmlcr.Rowspan = "0";
333
-                            qcmlcr.Colspan = "0";
334
-                            #endregion
335
-                            m++;
336
-
337
-                            qccrlist.Add(qcmlcr);
338
-                            
339
-                        }
340
-                        i++;
341
-                        qcmlc.Qclist = qccrlist;
342
-                        qcclist.Add(qcmlc);
343
-                    }
344
-                    //合计
345
-                    qcml.Qcscore = childscore.ToString().Trim();
346
-                    qcml.Qcpf = childpf.ToString().Trim();
347
-                    qcml.Qclist = qcclist;
348
-                    qcml.Colspan = "2";
349
-                    qclist.Add(qcml);
350
-                }
351
-                Model.QCModel qcmlhj = new Model.QCModel();
352
-                qcmlhj.Qcid = "0";
353
-                qcmlhj.Qcname = "总计";
354
-                qcmlhj.Qcscore = allscore.ToString().Trim();
355
-                qcmlhj.Qcpf = allpf.ToString().Trim();
356
-                qcmlhj.Qclist = qclist;
357
-                qcmlhj.Colspan = "3";
358
-
359
-                res = Success("质检部分加载成功",qcmlhj);
360
-            
361
-  
362
-                dtres.Clear();
363
-                dtres.Dispose();
364
-                dtindex.Clear();
365
-                dtindex.Dispose();
366
-                dt.Clear();
367
-                dt.Dispose();
368
-            
369
-            return res;
370
-        }
371
-        
306
+                qcml.Qcid = categoryid;
307
+                qcml.Qcname = dr["F_CategoryName"].ToString().Trim();
372 308
 
373
-        //保存质检得分
374
-        public ActionResult SaveData(string id,string xmlinfo)
375
-        {
376
-            ActionResult res = NoToken("未知错误,请重新登录");
377
-            DataTable dt = new DataTable();
378
-       
379
-                //string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
380
-                //string userid = HttpUtility.UrlDecode(RequestString.GetQueryString("userid"));
381
-                //string username = HttpUtility.UrlDecode(RequestString.GetQueryString("username"));
382
-                //string xmlinfo = HttpUtility.UrlDecode(RequestString.GetQueryString("xmlinfo"));
383
-                //string question = HttpUtility.UrlDecode(RequestString.GetQueryString("question"));
384
-                //string advise = HttpUtility.UrlDecode(RequestString.GetQueryString("advise"));
385
-                dt = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
386
-                int allscore = 0;
387
-                foreach (string scoreinfo in xmlinfo.Trim(';').Split(';'))
309
+                obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId in(select F_CategoryId from T_QC_IndexCategory where F_ParentId=" + dr["F_CategoryId"] + ")");
310
+                qcml.Rowspan = obj.ToString();
311
+                foreach (DataRow childdr in dt.Select("F_ParentId=" + categoryid + ""))
388 312
                 {
389
-                    //判断存在该指标评估则修改,无则添加
390
-                    string idsss= scoreinfo.Split(':')[0];
391
-                    string indexid = idsss.Split('-')[2];
392
-                    if (dt.Select(" F_IndexId=" + indexid + " ").Length > 0)
313
+                    Model.QCModel qcmlc = new Model.QCModel();
314
+                    List<Model.QCModel> qccrlist = new List<Model.QCModel>();
315
+                    m = 0;
316
+                    #region 子分类
317
+                    string childcategoryid = childdr["F_CategoryId"].ToString().Trim();
318
+                    DataRow[] arrchild = dtindex.Select("F_CategoryId=" + childcategoryid + "");
319
+                    indexcount += arrchild.Length;
320
+
321
+                    //加载项
322
+                    qcmlc.Qcid = categoryid + "-" + childcategoryid;
323
+                    qcmlc.Qcname = childdr["F_CategoryName"].ToString().Trim();
324
+                    obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId=" + childdr["F_CategoryId"]);
325
+                    qcmlc.Rowspan = obj.ToString();
326
+                    #endregion
327
+                    foreach (DataRow indexdr in arrchild)
393 328
                     {
394
-                        Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
395
-                        model.F_Id = Convert.ToInt32(dt.Select(" F_IndexId=" + indexid + " ")[0]["F_Id"].ToString());
396
-                        model.CallRecordsId = Convert.ToInt32(id);
397
-                        try
398
-                        {
399
-                            model.F_IndexId = Convert.ToInt32(indexid);
400
-                        }
401
-                        catch
402
-                        { }
329
+                        Model.QCModel qcmlcr = new Model.QCModel();
330
+                        string indexid = indexdr["F_IndexId"].ToString().Trim();
331
+                        string pf = "0";
403 332
                         try
404 333
                         {
405
-                            model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
406
-                            allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
334
+                            //分类分数合计
335
+                            childscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
336
+                            //总计合计
337
+                            allscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
407 338
                         }
408 339
                         catch
409 340
                         { }
410
-                        new BLL.T_QC_IndexRes().Update(model);
411
-                    }
412
-                    else
413
-                    {
414
-                        Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
415
-                        model.CallRecordsId = Convert.ToInt32(id);
416 341
                         try
417 342
                         {
418
-                            model.F_IndexId = Convert.ToInt32(indexid);
343
+                            pf = dtres.Select("F_IndexId=" + indexid + "")[0]["F_QCScore"].ToString().Trim();
344
+                            childpf += Convert.ToInt32(pf);//分类评分合计
345
+                            allpf += Convert.ToInt32(pf);//评分总计
419 346
                         }
420 347
                         catch
421
-                        { }
422
-                        try
423 348
                         {
424
-                            model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
425
-                            allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
426 349
                         }
427
-                        catch
428
-                        { }
429
-                        new BLL.T_QC_IndexRes().Add(model);
350
+
351
+                        #region 指标
352
+                        //加载指标
353
+                        qcmlcr.Qcid = categoryid + "-" + childcategoryid + "-" + indexid;
354
+                        qcmlcr.Qcname = indexdr["F_Title"].ToString().Trim();
355
+                        qcmlcr.Qcscore = indexdr["F_Score"].ToString().Trim();
356
+                        qcmlcr.Qcpf = pf;
357
+                        qcmlcr.Rowspan = "0";
358
+                        qcmlcr.Colspan = "0";
359
+                        #endregion
360
+                        m++;
361
+
362
+                        qccrlist.Add(qcmlcr);
363
+
430 364
                     }
365
+                    i++;
366
+                    qcmlc.Qclist = qccrlist;
367
+                    qcclist.Add(qcmlc);
431 368
                 }
369
+                //合计
370
+                qcml.Qcscore = childscore.ToString().Trim();
371
+                qcml.Qcpf = childpf.ToString().Trim();
372
+                qcml.Qclist = qcclist;
373
+                qcml.Colspan = "2";
374
+                qclist.Add(qcml);
375
+            }
376
+            Model.QCModel qcmlhj = new Model.QCModel();
377
+            qcmlhj.Qcid = "0";
378
+            qcmlhj.Qcname = "总计";
379
+            qcmlhj.Qcscore = allscore.ToString().Trim();
380
+            qcmlhj.Qcpf = allpf.ToString().Trim();
381
+            qcmlhj.Qclist = qclist;
382
+            qcmlhj.Colspan = "3";
383
+
384
+            res = Success("质检部分加载成功", qcmlhj);
385
+
386
+
387
+            dtres.Clear();
388
+            dtres.Dispose();
389
+            dtindex.Clear();
390
+            dtindex.Dispose();
391
+            dt.Clear();
392
+            dt.Dispose();
393
+
394
+            return res;
395
+        }
396
+
397
+
398
+        //保存质检得分
399
+        public ActionResult SaveData(string id, string xmlinfo)
400
+        {
401
+            ActionResult res = NoToken("未知错误,请重新登录");
402
+            DataTable dt = new DataTable();
432 403
 
433
-                Model.T_Call_CallRecords_QC callmodel = new Model.T_Call_CallRecords_QC();
434
-                callmodel.CallRecordsId = Convert.ToInt32(id);
435
-                callmodel.F_QCState = 1;
436
-                callmodel.F_QCScore = allscore;
437
-                callmodel.F_QCUserId = CurrentUser.UserData.F_UserId;
438
-                callmodel.F_QCUserName = CurrentUser.UserData.F_UserName;
439
-                callmodel.F_QCTime = DateTime.Now;
440
-                callmodel.F_QCIsSelect = 0;
441
-                callmodel.F_QCRemark = "";
442
-                //callmodel.F_QCQuestion = question;
443
-                //callmodel.F_QCAdvise = advise;
444
-                if (new BLL.T_Call_CallRecords_QC().UpdateQC(callmodel))
404
+            //string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
405
+            //string userid = HttpUtility.UrlDecode(RequestString.GetQueryString("userid"));
406
+            //string username = HttpUtility.UrlDecode(RequestString.GetQueryString("username"));
407
+            //string xmlinfo = HttpUtility.UrlDecode(RequestString.GetQueryString("xmlinfo"));
408
+            //string question = HttpUtility.UrlDecode(RequestString.GetQueryString("question"));
409
+            //string advise = HttpUtility.UrlDecode(RequestString.GetQueryString("advise"));
410
+            dt = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
411
+            int allscore = 0;
412
+            foreach (string scoreinfo in xmlinfo.Trim(';').Split(';'))
413
+            {
414
+                //判断存在该指标评估则修改,无则添加
415
+                string idsss = scoreinfo.Split(':')[0];
416
+                string indexid = idsss.Split('-')[2];
417
+                if (dt.Select(" F_IndexId=" + indexid + " ").Length > 0)
445 418
                 {
446
-                    res = Success("保存成功");
419
+                    Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
420
+                    model.F_Id = Convert.ToInt32(dt.Select(" F_IndexId=" + indexid + " ")[0]["F_Id"].ToString());
421
+                    model.CallRecordsId = Convert.ToInt32(id);
422
+                    try
423
+                    {
424
+                        model.F_IndexId = Convert.ToInt32(indexid);
425
+                    }
426
+                    catch
427
+                    { }
428
+                    try
429
+                    {
430
+                        model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
431
+                        allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
432
+                    }
433
+                    catch
434
+                    { }
435
+                    new BLL.T_QC_IndexRes().Update(model);
447 436
                 }
448 437
                 else
449 438
                 {
450
-                    res = Error("保存质检评分信息失败");
439
+                    Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
440
+                    model.CallRecordsId = Convert.ToInt32(id);
441
+                    try
442
+                    {
443
+                        model.F_IndexId = Convert.ToInt32(indexid);
444
+                    }
445
+                    catch
446
+                    { }
447
+                    try
448
+                    {
449
+                        model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
450
+                        allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
451
+                    }
452
+                    catch
453
+                    { }
454
+                    new BLL.T_QC_IndexRes().Add(model);
451 455
                 }
452
-      
453
-                dt.Clear();
454
-                dt.Dispose();
455
-            
456
+            }
457
+
458
+            Model.T_Call_CallRecords_QC callmodel = new Model.T_Call_CallRecords_QC();
459
+            callmodel.CallRecordsId = Convert.ToInt32(id);
460
+            callmodel.F_QCState = 1;
461
+            callmodel.F_QCScore = allscore;
462
+            callmodel.F_QCUserId = CurrentUser.UserData.F_UserId;
463
+            callmodel.F_QCUserName = CurrentUser.UserData.F_UserName;
464
+            callmodel.F_QCTime = DateTime.Now;
465
+            callmodel.F_QCIsSelect = 0;
466
+            callmodel.F_QCRemark = "";
467
+            //callmodel.F_QCQuestion = question;
468
+            //callmodel.F_QCAdvise = advise;
469
+            if (new BLL.T_Call_CallRecords_QC().UpdateQC(callmodel))
470
+            {
471
+                res = Success("保存成功");
472
+            }
473
+            else
474
+            {
475
+                res = Error("保存质检评分信息失败");
476
+            }
477
+
478
+            dt.Clear();
479
+            dt.Dispose();
480
+
456 481
             return res;
457 482
         }
458 483
 
@@ -461,20 +486,20 @@ namespace CallCenterApi.Interface.Controllers.quality
461 486
         {
462 487
             ActionResult res = NoToken("未知错误,请重新登录");
463 488
 
464
-                string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
465
-                //string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
466
-                //string optby = HttpUtility.UrlDecode(RequestString.GetQueryString("optby"));
467
-                string type = HttpUtility.UrlDecode(RequestString.GetQueryString("type"));
489
+            string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
490
+            //string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
491
+            //string optby = HttpUtility.UrlDecode(RequestString.GetQueryString("optby"));
492
+            string type = HttpUtility.UrlDecode(RequestString.GetQueryString("type"));
468 493
 
469
-                bool r = addldlog(int.Parse(id), CurrentUser.UserData.F_UserId, CurrentUser.UserData.F_UserName, int.Parse(type));
470
-                if (r)
471
-                {
472
-                    res = Success("添加日志成功");
473
-                }
474
-                else
475
-                {
476
-                    res = Error("添加日志失败");
477
-                }
494
+            bool r = addldlog(int.Parse(id), CurrentUser.UserData.F_UserId, CurrentUser.UserData.F_UserName, int.Parse(type));
495
+            if (r)
496
+            {
497
+                res = Success("添加日志成功");
498
+            }
499
+            else
500
+            {
501
+                res = Error("添加日志失败");
502
+            }
478 503
 
479 504
             return res;
480 505
         }

File diff suppressed because it is too large
+ 555 - 555
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/ZuoXiWorkTotalController.cs


+ 3 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -92,7 +92,7 @@ namespace CallCenterApi.Interface.Controllers.tel
92 92
                 }
93 93
                 if (username.Trim() != "")
94 94
                 {
95
-                    sql += " and UserName like '%" + username.Trim() + "%'";
95
+                    sql += " and T_Sys_UserAccount.F_UserName like '%" + username.Trim() + "%'";
96 96
                 }
97 97
 
98 98
                 if (strpageindex.Trim() != "")
@@ -106,9 +106,9 @@ namespace CallCenterApi.Interface.Controllers.tel
106 106
                 }
107 107
                 int recordCount = 0;
108 108
                 dt = BLL.PagerBLL.GetListPager(
109
-                    "T_Call_CallRecords",
109
+                    "T_Call_CallRecords left join T_Sys_UserAccount ON T_Sys_UserAccount.F_UserCode=T_Call_CallRecords.UserCode",
110 110
                     "CallRecordsId",
111
-                    "*",
111
+                    "*,T_Sys_UserAccount.F_UserName",
112 112
                     sql,
113 113
                     "ORDER BY CallRecordsId desc",
114 114
                     pagesize,

+ 2 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/CallNumberInput.cs

@@ -11,5 +11,7 @@ namespace CallCenterApi.Interface.Models.Input
11 11
         public int HJJG { get; set; } = 0;
12 12
         public int YHFK { get; set; } = 0;
13 13
         public string Remark { get; set; } = "";
14
+        public string[] Ans { get; set; }
15
+        public int TaskId { get; set; } = 0;
14 16
     }
15 17
 }

+ 1 - 0
CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj

@@ -62,6 +62,7 @@
62 62
     <Compile Include="T_Call_CallRecordsLD.cs" />
63 63
     <Compile Include="T_Call_CallRecords_QC.cs" />
64 64
     <Compile Include="T_Call_LeaveRecord.cs" />
65
+    <Compile Include="T_Call_Answers.cs" />
65 66
     <Compile Include="T_Call_PageField.cs" />
66 67
     <Compile Include="T_Call_PageTemp.cs" />
67 68
     <Compile Include="T_Call_TaskTelNum.cs" />

+ 138 - 0
CallCenterApi/CallCenterApi.Model/T_Call_Answers.cs

@@ -0,0 +1,138 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace CallCenterApi.Model
8
+{
9
+    /// <summary>
10
+	/// T_Call_Answers:实体类(属性说明自动提取数据库字段的描述信息)
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_Call_Answers
14
+    {
15
+        public T_Call_Answers()
16
+        { }
17
+        #region Model
18
+        private int _f_answerid;
19
+        private int? _f_taskid;
20
+        private int? _f_qid;
21
+        private int? _f_qiid;
22
+        private string _f_answer;
23
+        private int? _f_custelid;
24
+        private int? _f_cusid;
25
+        private int? _f_optby;
26
+        private string _f_optbyname;
27
+        private DateTime? _f_opton = DateTime.Now;
28
+        private string _f_expand1;
29
+        private string _f_expand2;
30
+        private string _f_expand3;
31
+        /// <summary>
32
+        /// 
33
+        /// </summary>
34
+        public int F_AnswerID
35
+        {
36
+            set { _f_answerid = value; }
37
+            get { return _f_answerid; }
38
+        }
39
+        /// <summary>
40
+        /// 外呼计划ID
41
+        /// </summary>
42
+        public int? F_TaskID
43
+        {
44
+            set { _f_taskid = value; }
45
+            get { return _f_taskid; }
46
+        }
47
+        /// <summary>
48
+        /// 试题ID
49
+        /// </summary>
50
+        public int? F_QID
51
+        {
52
+            set { _f_qid = value; }
53
+            get { return _f_qid; }
54
+        }
55
+        /// <summary>
56
+        /// 选择答案ID
57
+        /// </summary>
58
+        public int? F_QIID
59
+        {
60
+            set { _f_qiid = value; }
61
+            get { return _f_qiid; }
62
+        }
63
+        /// <summary>
64
+        /// 答案
65
+        /// </summary>
66
+        public string F_Answer
67
+        {
68
+            set { _f_answer = value; }
69
+            get { return _f_answer; }
70
+        }
71
+        /// <summary>
72
+        /// 客户计划ID
73
+        /// </summary>
74
+        public int? F_CusTelID
75
+        {
76
+            set { _f_custelid = value; }
77
+            get { return _f_custelid; }
78
+        }
79
+        /// <summary>
80
+        /// 客户ID
81
+        /// </summary>
82
+        public int? F_CusID
83
+        {
84
+            set { _f_cusid = value; }
85
+            get { return _f_cusid; }
86
+        }
87
+        /// <summary>
88
+        /// 操作人ID
89
+        /// </summary>
90
+        public int? F_OptBy
91
+        {
92
+            set { _f_optby = value; }
93
+            get { return _f_optby; }
94
+        }
95
+        /// <summary>
96
+        /// 操作人
97
+        /// </summary>
98
+        public string F_OptByName
99
+        {
100
+            set { _f_optbyname = value; }
101
+            get { return _f_optbyname; }
102
+        }
103
+        /// <summary>
104
+        /// 操作时间
105
+        /// </summary>
106
+        public DateTime? F_OptOn
107
+        {
108
+            set { _f_opton = value; }
109
+            get { return _f_opton; }
110
+        }
111
+        /// <summary>
112
+        /// 
113
+        /// </summary>
114
+        public string F_Expand1
115
+        {
116
+            set { _f_expand1 = value; }
117
+            get { return _f_expand1; }
118
+        }
119
+        /// <summary>
120
+        /// 
121
+        /// </summary>
122
+        public string F_Expand2
123
+        {
124
+            set { _f_expand2 = value; }
125
+            get { return _f_expand2; }
126
+        }
127
+        /// <summary>
128
+        /// 
129
+        /// </summary>
130
+        public string F_Expand3
131
+        {
132
+            set { _f_expand3 = value; }
133
+            get { return _f_expand3; }
134
+        }
135
+        #endregion Model
136
+
137
+    }
138
+}

+ 2 - 0
CallCenterApi/CallCenterApi.Model/T_Call_TaskTelNum.cs

@@ -189,7 +189,9 @@ namespace CallCenterApi.Model
189 189
             get { return _f_createtime; }
190 190
         }
191 191
         public int F_HJJGId { get; set; }
192
+        public string F_HJJGName { get; set; }
192 193
         public int F_YHFKID { get; set; }
194
+        public string F_YHFKName { get; set; }
193 195
         public string F_Remark { get; set; }
194 196
         /// <summary>
195 197
         ///