|
|
@@ -25,6 +25,9 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
25
|
25
|
private readonly BLL.T_Ask_QuestionItems questionItemBLL = new BLL.T_Ask_QuestionItems();
|
|
26
|
26
|
private readonly BLL.T_Ask_PagerInfo pagerInfoBLL = new BLL.T_Ask_PagerInfo();
|
|
27
|
27
|
|
|
|
28
|
+ private readonly BLL.T_Ask_QuestionCategory qcBLL = new BLL.T_Ask_QuestionCategory();
|
|
|
29
|
+
|
|
|
30
|
+
|
|
28
|
31
|
#region 计划信息
|
|
29
|
32
|
public ActionResult GetTaskList(string key, int pagesize = 10, int pageindex = 1)
|
|
30
|
33
|
{
|
|
|
@@ -252,6 +255,9 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
252
|
255
|
modelPhoneImport.ExpandVchField14 = CurrentUser.UserData.F_UserId.ToString();//导入坐席ID
|
|
253
|
256
|
modelPhoneImport.ExpandVchField13 = CurrentUser.UserData.F_UserName;
|
|
254
|
257
|
|
|
|
258
|
+
|
|
|
259
|
+
|
|
|
260
|
+
|
|
255
|
261
|
modelPhoneImport.F_TaskId = taskid;
|
|
256
|
262
|
modelPhoneImport.ExpandIntField6 = vfileid;//导入文件id
|
|
257
|
263
|
#endregion
|
|
|
@@ -265,9 +271,36 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
265
|
271
|
{
|
|
266
|
272
|
string dddddd = dr[1].ToString();
|
|
267
|
273
|
#region 导入表内容
|
|
268
|
|
- modelPhoneImport.F_CusName = dr[0].ToString();//客户名称
|
|
269
|
|
- modelPhoneImport.F_Phone = dr[1].ToString();//号码
|
|
270
|
|
- modelPhoneImport.ExpandVchField12 = dr[2].ToString();//地址
|
|
|
274
|
+ //目标分类、营业部、电话号码、宽带账号、地址、入网时间、入网渠道、营服、套餐、是否融合、状态
|
|
|
275
|
+ modelPhoneImport.ExpandVchField1 = dr[0].ToString();//目标分类
|
|
|
276
|
+ //modelPhoneImport.ExpandVchField2 = dr[1].ToString();//营业部
|
|
|
277
|
+ //modelPhoneImport.ExpandVchField3 = dr[3].ToString();//宽带账号
|
|
|
278
|
+ //modelPhoneImport.ExpandVchField4 = dr[5].ToString();//入网时间
|
|
|
279
|
+
|
|
|
280
|
+ modelPhoneImport.Expandfield2 = dr[1].ToString();//营业部
|
|
|
281
|
+ modelPhoneImport.Expandfield3 = dr[3].ToString();//宽带账号
|
|
|
282
|
+ modelPhoneImport.Expandfield4 = dr[5].ToString();//入网时间
|
|
|
283
|
+
|
|
|
284
|
+
|
|
|
285
|
+ modelPhoneImport.F_Phone = dr[2].ToString();//号码
|
|
|
286
|
+ modelPhoneImport.ExpandVchField3 = dr[3].ToString();//宽带账号
|
|
|
287
|
+
|
|
|
288
|
+ modelPhoneImport.ExpandVchField12 = dr[4].ToString();//地址
|
|
|
289
|
+
|
|
|
290
|
+ modelPhoneImport.ExpandVchField4 = dr[5].ToString();//入网时间
|
|
|
291
|
+
|
|
|
292
|
+ modelPhoneImport.ExpandVchField5= dr[6].ToString(); //入网渠道
|
|
|
293
|
+ modelPhoneImport.ExpandVchField6 = dr[7].ToString(); //营服
|
|
|
294
|
+ modelPhoneImport.ExpandVchField7 = dr[8].ToString(); //套餐
|
|
|
295
|
+ modelPhoneImport.ExpandVchField8 = dr[9].ToString(); //是否融合
|
|
|
296
|
+ modelPhoneImport.ExpandVchField9 = dr[10].ToString(); //状态
|
|
|
297
|
+ // modelPhoneImport.F_CusName = dr[0].ToString();//客户名称
|
|
|
298
|
+
|
|
|
299
|
+
|
|
|
300
|
+
|
|
|
301
|
+
|
|
|
302
|
+
|
|
|
303
|
+
|
|
271
|
304
|
#endregion
|
|
272
|
305
|
|
|
273
|
306
|
#region 查重
|
|
|
@@ -522,7 +555,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
522
|
555
|
|
|
523
|
556
|
dt = new DataTable(sheet.SheetName);
|
|
524
|
557
|
//for (int i = firstCellNum; i < lastCellNum; i++)
|
|
525
|
|
- for (int i = firstCellNum; i < 5; i++)
|
|
|
558
|
+ for (int i = firstCellNum; i < 12; i++)
|
|
526
|
559
|
{
|
|
527
|
560
|
if (row.GetCell(i) != null)
|
|
528
|
561
|
{
|
|
|
@@ -539,7 +572,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
539
|
572
|
if (sheet.GetRow(i).GetCell(1) != null && sheet.GetRow(i).GetCell(1).ToString() != "")
|
|
540
|
573
|
{
|
|
541
|
574
|
DataRow newRow = dt.Rows.Add();
|
|
542
|
|
- for (int j = firstCellNum; j < 5; j++)
|
|
|
575
|
+ for (int j = firstCellNum; j < 12; j++)
|
|
543
|
576
|
{
|
|
544
|
577
|
if (sheet.GetRow(i).GetCell(j) != null)
|
|
545
|
578
|
{
|
|
|
@@ -637,7 +670,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
637
|
670
|
return Error("分配外呼计划任务失败" + ",操作人:" + CurrentUser.UserData.F_UserCode);
|
|
638
|
671
|
}
|
|
639
|
672
|
//未分配列表
|
|
640
|
|
- public ActionResult GetTaskWPF(string key, int pagesize = 10, int pageindex = 1)
|
|
|
673
|
+ public ActionResult GetTaskWPF(string key,string yingyebu, int pagesize = 10, int pageindex = 1)
|
|
641
|
674
|
{
|
|
642
|
675
|
StringBuilder sb = new StringBuilder();
|
|
643
|
676
|
|
|
|
@@ -648,6 +681,11 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
648
|
681
|
{
|
|
649
|
682
|
sql += " and F_Phone like '%" + key + "%' or F_TaskName like '%" + key + "%' or F_TaskRemark like '%" + key + "%'";
|
|
650
|
683
|
}
|
|
|
684
|
+ if (!string.IsNullOrWhiteSpace(yingyebu))
|
|
|
685
|
+ {
|
|
|
686
|
+ sql += " and Expandfield2 ='"+ yingyebu + "'";
|
|
|
687
|
+ }
|
|
|
688
|
+
|
|
651
|
689
|
sb.Append(" and F_Taskid in (select F_TaskID from T_Call_OutTask where F_IsStart=1 and F_DeleteFlag=0 "+sql+" ) ");
|
|
652
|
690
|
|
|
653
|
691
|
var recordCount = 0;
|
|
|
@@ -704,6 +742,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
704
|
742
|
{
|
|
705
|
743
|
UserCode = x.F_UserCode,
|
|
706
|
744
|
UserName = x.F_UserName,
|
|
|
745
|
+ Deparment = x.F_DeptName,
|
|
707
|
746
|
WWCCount = dtCount.Select(" F_UserId=" + x.F_UserId).Count()
|
|
708
|
747
|
}),
|
|
709
|
748
|
total = recordCount
|
|
|
@@ -738,6 +777,28 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
738
|
777
|
taskmodel.F_Phone = cusmodel.F_Telephone;//号码
|
|
739
|
778
|
taskmodel.F_Telephone = cusmodel.F_Mobile;//手机号码
|
|
740
|
779
|
taskmodel.F_City = cusmodel.F_City;//乡镇
|
|
|
780
|
+
|
|
|
781
|
+ taskmodel.F_ordernature = model.ExpandVchField1;
|
|
|
782
|
+ taskmodel.F_broadbandaccount = model.Expandfield3;
|
|
|
783
|
+
|
|
|
784
|
+ taskmodel.F_accesstime = model.Expandfield4;
|
|
|
785
|
+ taskmodel.F_channel = model.ExpandVchField5;
|
|
|
786
|
+
|
|
|
787
|
+
|
|
|
788
|
+ taskmodel.F_service = model.ExpandVchField6;
|
|
|
789
|
+ taskmodel.F_packaget = model.ExpandVchField7;
|
|
|
790
|
+
|
|
|
791
|
+ taskmodel.F_fusion = model.ExpandVchField8;
|
|
|
792
|
+
|
|
|
793
|
+ taskmodel.F_status = model.ExpandVchField9;
|
|
|
794
|
+
|
|
|
795
|
+
|
|
|
796
|
+ //用户分类、电话号码、宽带账号、地址、入网时间、入网渠道、营服、套餐、是否融合、状态
|
|
|
797
|
+
|
|
|
798
|
+
|
|
|
799
|
+
|
|
|
800
|
+
|
|
|
801
|
+
|
|
741
|
802
|
}
|
|
742
|
803
|
}
|
|
743
|
804
|
taskmodel.F_Id = model.F_Id;//号码id
|
|
|
@@ -857,8 +918,11 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
857
|
918
|
//sb.Append(" and F_TaskID in (select F_TaskID from T_Call_OutTask where F_IsStart=1 and F_DeleteFlag=0 " + sqlwhere + ") ");
|
|
858
|
919
|
#endregion
|
|
859
|
920
|
var recordCount = 0;
|
|
|
921
|
+ string tablenew = "( select a.*, b.F_typeValue1,b.F_typeValue2,b.F_typeValue3,b.F_typeValue4,b.F_typeValue5,b.F_typeValue6 from T_Call_OutTaskTelNum a left join T_TypeResult b on a.F_id=b.F_phoneid) as t";
|
|
|
922
|
+
|
|
860
|
923
|
var dt = BLL.PagerBLL.GetListPager(
|
|
861
|
|
- "T_Call_OutTaskTelNum",
|
|
|
924
|
+ //"T_Call_OutTaskTelNum",
|
|
|
925
|
+ tablenew,
|
|
862
|
926
|
"F_Id",
|
|
863
|
927
|
"*",
|
|
864
|
928
|
sb.ToString(),
|
|
|
@@ -867,7 +931,14 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
867
|
931
|
pageindex,
|
|
868
|
932
|
true,
|
|
869
|
933
|
out recordCount);
|
|
870
|
|
- #region 判断是否已存在工单
|
|
|
934
|
+
|
|
|
935
|
+ //dt.Columns.Add("type1");
|
|
|
936
|
+ //dt.Columns.Add("type2");
|
|
|
937
|
+ //dt.Columns.Add("type3");
|
|
|
938
|
+ //dt.Columns.Add("type4");
|
|
|
939
|
+ //dt.Columns.Add("type5");
|
|
|
940
|
+ //dt.Columns.Add("type6");
|
|
|
941
|
+ #region 判断是否已存在工单 ;再判断 如果问题里包括那六大类的问题,给分数赋值
|
|
871
|
942
|
foreach (DataRow item in dt.Rows)
|
|
872
|
943
|
{
|
|
873
|
944
|
string wjid = item["F_Id"].ToString();
|
|
|
@@ -878,8 +949,52 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
878
|
949
|
}
|
|
879
|
950
|
else
|
|
880
|
951
|
item["ExpandSintField1"] = 0;
|
|
|
952
|
+
|
|
|
953
|
+ ////如果问题里包括那六大类的问题,给分数赋值
|
|
|
954
|
+ ////移网上网质量;移网通话质量;光网网络质量;装维服务;营业厅服务;套餐资费
|
|
|
955
|
+
|
|
|
956
|
+
|
|
|
957
|
+ //int F_TaskId = Convert.ToInt32(item["F_TaskId"].ToString());
|
|
|
958
|
+
|
|
|
959
|
+ //var model = otnBLL.GetModel(Convert.ToInt32(wjid));
|
|
|
960
|
+
|
|
|
961
|
+ //if(model!=null)
|
|
|
962
|
+ //{
|
|
|
963
|
+ // int cusid= model.F_CusID.Value;
|
|
|
964
|
+
|
|
|
965
|
+ //string sql1 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId+" and F_CusID = "+ cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网上网质量') and F_SortModel = 0)";
|
|
|
966
|
+
|
|
|
967
|
+ //item["type1"] = DbHelperSQL.GetSingle(sql1);
|
|
|
968
|
+ //string sql2 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网通话质量') and F_SortModel = 0)";
|
|
|
969
|
+
|
|
|
970
|
+ //item["type2"] = DbHelperSQL.GetSingle(sql2);
|
|
|
971
|
+
|
|
|
972
|
+ //string sql3 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '光网网络质量') and F_SortModel = 0)";
|
|
|
973
|
+
|
|
|
974
|
+ //item["type3"] = DbHelperSQL.GetSingle(sql3);
|
|
|
975
|
+ //string sql4 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '装维服务') and F_SortModel = 0)";
|
|
|
976
|
+
|
|
|
977
|
+ //item["type4"] = DbHelperSQL.GetSingle(sql4);
|
|
|
978
|
+
|
|
|
979
|
+ //string sql5 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '营业厅服务') and F_SortModel = 0)";
|
|
|
980
|
+
|
|
|
981
|
+ //item["type5"] = DbHelperSQL.GetSingle(sql5);
|
|
|
982
|
+ //string sql6 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '套餐资费') and F_SortModel = 0)";
|
|
|
983
|
+
|
|
|
984
|
+ //item["type6"] = DbHelperSQL.GetSingle(sql6);
|
|
|
985
|
+
|
|
|
986
|
+ //}
|
|
|
987
|
+
|
|
|
988
|
+
|
|
|
989
|
+
|
|
|
990
|
+
|
|
881
|
991
|
}
|
|
882
|
992
|
#endregion
|
|
|
993
|
+
|
|
|
994
|
+
|
|
|
995
|
+
|
|
|
996
|
+
|
|
|
997
|
+
|
|
883
|
998
|
var obj = new
|
|
884
|
999
|
{
|
|
885
|
1000
|
rows = dt,
|
|
|
@@ -887,6 +1002,125 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
887
|
1002
|
};
|
|
888
|
1003
|
return Content(obj.ToJson());
|
|
889
|
1004
|
}
|
|
|
1005
|
+
|
|
|
1006
|
+ public ActionResult ExportGetMyResultList(string key, string sdate, string edate, int hjjgid = 0, int yhfkid = 0)
|
|
|
1007
|
+ {
|
|
|
1008
|
+ StringBuilder sb = new StringBuilder();
|
|
|
1009
|
+ int userid = CurrentUser.UserData.F_UserId;
|
|
|
1010
|
+ #region 条件查询
|
|
|
1011
|
+ sb.Append(" and F_UserId=" + userid);
|
|
|
1012
|
+ sb.Append(" and F_DeleteFlag=0 ");
|
|
|
1013
|
+ if (!string.IsNullOrWhiteSpace(sdate))
|
|
|
1014
|
+ sb.Append(" and DATEDIFF(day,ExpandDatField1,'" + sdate.Trim() + "')<=0");
|
|
|
1015
|
+ if (!string.IsNullOrWhiteSpace(edate))
|
|
|
1016
|
+ sb.Append(" and DATEDIFF(day,ExpandDatField1,'" + edate.Trim() + "')>=0");
|
|
|
1017
|
+ if (hjjgid != 0)
|
|
|
1018
|
+ {
|
|
|
1019
|
+ sb.Append(" and F_HJJGId=" + hjjgid);
|
|
|
1020
|
+ }
|
|
|
1021
|
+ else
|
|
|
1022
|
+ {
|
|
|
1023
|
+ sb.Append(" and isnull(F_HJJGId,'')!=''");
|
|
|
1024
|
+ }
|
|
|
1025
|
+
|
|
|
1026
|
+ if (!string.IsNullOrWhiteSpace(key))
|
|
|
1027
|
+ {
|
|
|
1028
|
+ sb.Append(" and F_Phone like '%" + key.Trim() + "%'");
|
|
|
1029
|
+ }
|
|
|
1030
|
+
|
|
|
1031
|
+ #endregion
|
|
|
1032
|
+ //modelPhoneImport.ExpandVchField1 = dr[0].ToString();//目标分类
|
|
|
1033
|
+ //modelPhoneImport.ExpandVchField2 = dr[1].ToString();//营业部
|
|
|
1034
|
+ //modelPhoneImport.F_Phone = dr[2].ToString();//号码
|
|
|
1035
|
+ //modelPhoneImport.ExpandVchField3 = dr[3].ToString();//宽带账号
|
|
|
1036
|
+
|
|
|
1037
|
+ //modelPhoneImport.ExpandVchField12 = dr[4].ToString();//地址
|
|
|
1038
|
+
|
|
|
1039
|
+ //modelPhoneImport.ExpandVchField4 = dr[5].ToString();//入网时间
|
|
|
1040
|
+
|
|
|
1041
|
+ //modelPhoneImport.ExpandVchField5 = dr[6].ToString(); //入网渠道
|
|
|
1042
|
+ //modelPhoneImport.ExpandVchField6 = dr[7].ToString(); //营服
|
|
|
1043
|
+ //modelPhoneImport.ExpandVchField7 = dr[8].ToString(); //套餐
|
|
|
1044
|
+ //modelPhoneImport.ExpandVchField8 = dr[9].ToString(); //是否融合
|
|
|
1045
|
+ //modelPhoneImport.ExpandVchField9 = dr[10].ToString(); //状态
|
|
|
1046
|
+
|
|
|
1047
|
+ string sql = " select Expandfield2,ExpandVchField1,F_Phone, F_UserName,F_HJJGName,ExpandDatField1,b.F_typeValue1,b.F_typeValue2,b.F_typeValue3,b.F_typeValue4,b.F_typeValue5,b.F_typeValue6 from T_Call_OutTaskTelNum a left join T_TypeResult b on a.F_id=b.F_phoneid where " + sb.ToString() + " ORDER BY ExpandDatField1 desc,F_Id desc";
|
|
|
1048
|
+
|
|
|
1049
|
+ DataTable dt = DbHelperSQL.Query(sql).Tables[0];
|
|
|
1050
|
+
|
|
|
1051
|
+ //dt.Columns.Add("type1");
|
|
|
1052
|
+ //dt.Columns.Add("type2");
|
|
|
1053
|
+ //dt.Columns.Add("type3");
|
|
|
1054
|
+ //dt.Columns.Add("type4");
|
|
|
1055
|
+ //dt.Columns.Add("type5");
|
|
|
1056
|
+ //dt.Columns.Add("type6");
|
|
|
1057
|
+ //#region 判断是否已存在工单 ;再判断 如果问题里包括那六大类的问题,给分数赋值
|
|
|
1058
|
+ //foreach (DataRow item in dt.Rows)
|
|
|
1059
|
+ //{
|
|
|
1060
|
+ // string wjid = item["F_Id"].ToString();
|
|
|
1061
|
+
|
|
|
1062
|
+ // //如果问题里包括那六大类的问题,给分数赋值
|
|
|
1063
|
+ // //移网上网质量;移网通话质量;光网网络质量;装维服务;营业厅服务;套餐资费
|
|
|
1064
|
+
|
|
|
1065
|
+
|
|
|
1066
|
+ // int F_TaskId = Convert.ToInt32(item["F_TaskId"].ToString());
|
|
|
1067
|
+
|
|
|
1068
|
+ // var model = otnBLL.GetModel(Convert.ToInt32(wjid));
|
|
|
1069
|
+
|
|
|
1070
|
+ // if (model != null)
|
|
|
1071
|
+ // {
|
|
|
1072
|
+ // int cusid = model.F_CusID.Value;
|
|
|
1073
|
+
|
|
|
1074
|
+ // string sql1 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网上网质量') and F_SortModel = 0)";
|
|
|
1075
|
+
|
|
|
1076
|
+ // item["type1"] = DbHelperSQL.GetSingle(sql1);
|
|
|
1077
|
+ // string sql2 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网通话质量') and F_SortModel = 0)";
|
|
|
1078
|
+
|
|
|
1079
|
+ // item["type2"] = DbHelperSQL.GetSingle(sql2);
|
|
|
1080
|
+
|
|
|
1081
|
+ // string sql3 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '光网网络质量') and F_SortModel = 0)";
|
|
|
1082
|
+
|
|
|
1083
|
+ // item["type3"] = DbHelperSQL.GetSingle(sql3);
|
|
|
1084
|
+ // string sql4 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '装维服务') and F_SortModel = 0)";
|
|
|
1085
|
+
|
|
|
1086
|
+ // item["type4"] = DbHelperSQL.GetSingle(sql4);
|
|
|
1087
|
+
|
|
|
1088
|
+ // string sql5 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '营业厅服务') and F_SortModel = 0)";
|
|
|
1089
|
+
|
|
|
1090
|
+ // item["type5"] = DbHelperSQL.GetSingle(sql5);
|
|
|
1091
|
+ // string sql6 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '套餐资费') and F_SortModel = 0)";
|
|
|
1092
|
+
|
|
|
1093
|
+ // item["type6"] = DbHelperSQL.GetSingle(sql6);
|
|
|
1094
|
+ // }
|
|
|
1095
|
+
|
|
|
1096
|
+ //}
|
|
|
1097
|
+ //#endregion
|
|
|
1098
|
+
|
|
|
1099
|
+
|
|
|
1100
|
+
|
|
|
1101
|
+ NPOIHelper npoi = new NPOIHelper();
|
|
|
1102
|
+ if (npoi.ExportToExcel("我的任务结果数据", dt, col()) == "")
|
|
|
1103
|
+ {
|
|
|
1104
|
+ return Success("导出成功");
|
|
|
1105
|
+ }
|
|
|
1106
|
+ else
|
|
|
1107
|
+ {
|
|
|
1108
|
+ return Error("导出失败");
|
|
|
1109
|
+ }
|
|
|
1110
|
+
|
|
|
1111
|
+
|
|
|
1112
|
+
|
|
|
1113
|
+
|
|
|
1114
|
+ }
|
|
|
1115
|
+ private string[] col()
|
|
|
1116
|
+ {
|
|
|
1117
|
+ string[] ccc = {
|
|
|
1118
|
+ //用户分类、营业部、电话号码、【移网质量、渠道服务、光网质量、装维服务、套餐资费】(五大类所对应的分值)、分配坐席、呼叫结果、调查时间
|
|
|
1119
|
+ "用户分类", "营业部","电话号码", "分配坐席","呼叫结果","调查时间" ,"移网上网质量","移网通话质量","光网网络质量"," 装维服务"," 营业厅服务","套餐资fei"
|
|
|
1120
|
+ };
|
|
|
1121
|
+ return ccc;
|
|
|
1122
|
+ }
|
|
|
1123
|
+
|
|
890
|
1124
|
//获取总体任务结果
|
|
891
|
1125
|
public ActionResult GetResultList(string key, string sdate, string edate, int userid = 0, int hjjgid = 0, int yhfkid = 0, int pagesize = 10, int pageindex = 1)
|
|
892
|
1126
|
{
|
|
|
@@ -924,9 +1158,11 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
924
|
1158
|
//}
|
|
925
|
1159
|
//sb.Append(" and F_TaskID in (select F_TaskID from T_Call_OutTask where F_IsStart=1 and F_DeleteFlag=0 " + sqlwhere + ") ");
|
|
926
|
1160
|
#endregion
|
|
|
1161
|
+ string tablenew = "( select a.*, b.F_typeValue1,b.F_typeValue2,b.F_typeValue3,b.F_typeValue4,b.F_typeValue5,b.F_typeValue6 from T_Call_OutTaskTelNum a left join T_TypeResult b on a.F_id=b.F_phoneid) as t";
|
|
927
|
1162
|
var recordCount = 0;
|
|
928
|
1163
|
var dt = BLL.PagerBLL.GetListPager(
|
|
929
|
|
- "T_Call_OutTaskTelNum",
|
|
|
1164
|
+ //"T_Call_OutTaskTelNum",
|
|
|
1165
|
+ tablenew,
|
|
930
|
1166
|
"F_Id",
|
|
931
|
1167
|
"*",
|
|
932
|
1168
|
sb.ToString(),
|
|
|
@@ -936,6 +1172,13 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
936
|
1172
|
true,
|
|
937
|
1173
|
out recordCount);
|
|
938
|
1174
|
#region 判断是否已存在工单
|
|
|
1175
|
+ //dt.Columns.Add("type1");
|
|
|
1176
|
+ //dt.Columns.Add("type2");
|
|
|
1177
|
+ //dt.Columns.Add("type3");
|
|
|
1178
|
+ //dt.Columns.Add("type4");
|
|
|
1179
|
+ //dt.Columns.Add("type5");
|
|
|
1180
|
+ //dt.Columns.Add("type6");
|
|
|
1181
|
+ #region 判断是否已存在工单 ;再判断 如果问题里包括那六大类的问题,给分数赋值
|
|
939
|
1182
|
foreach (DataRow item in dt.Rows)
|
|
940
|
1183
|
{
|
|
941
|
1184
|
string wjid = item["F_Id"].ToString();
|
|
|
@@ -946,8 +1189,49 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
946
|
1189
|
}
|
|
947
|
1190
|
else
|
|
948
|
1191
|
item["ExpandSintField1"] = 0;
|
|
|
1192
|
+
|
|
|
1193
|
+ //如果问题里包括那六大类的问题,给分数赋值
|
|
|
1194
|
+ //移网上网质量;移网通话质量;光网网络质量;装维服务;营业厅服务;套餐资费
|
|
|
1195
|
+
|
|
|
1196
|
+
|
|
|
1197
|
+ //int F_TaskId = Convert.ToInt32(item["F_TaskId"].ToString());
|
|
|
1198
|
+
|
|
|
1199
|
+ //var model = otnBLL.GetModel(Convert.ToInt32(wjid));
|
|
|
1200
|
+
|
|
|
1201
|
+ //if (model != null)
|
|
|
1202
|
+ //{
|
|
|
1203
|
+ // int cusid = model.F_CusID.Value;
|
|
|
1204
|
+
|
|
|
1205
|
+ // string sql1 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网上网质量') and F_SortModel = 0)";
|
|
|
1206
|
+
|
|
|
1207
|
+ // item["type1"] = DbHelperSQL.GetSingle(sql1);
|
|
|
1208
|
+ // string sql2 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网通话质量') and F_SortModel = 0)";
|
|
|
1209
|
+
|
|
|
1210
|
+ // item["type2"] = DbHelperSQL.GetSingle(sql2);
|
|
|
1211
|
+
|
|
|
1212
|
+ // string sql3 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '光网网络质量') and F_SortModel = 0)";
|
|
|
1213
|
+
|
|
|
1214
|
+ // item["type3"] = DbHelperSQL.GetSingle(sql3);
|
|
|
1215
|
+ // string sql4 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '装维服务') and F_SortModel = 0)";
|
|
|
1216
|
+
|
|
|
1217
|
+ // item["type4"] = DbHelperSQL.GetSingle(sql4);
|
|
|
1218
|
+
|
|
|
1219
|
+ // string sql5 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '营业厅服务') and F_SortModel = 0)";
|
|
|
1220
|
+
|
|
|
1221
|
+ // item["type5"] = DbHelperSQL.GetSingle(sql5);
|
|
|
1222
|
+ // string sql6 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '套餐资费') and F_SortModel = 0)";
|
|
|
1223
|
+
|
|
|
1224
|
+ // item["type6"] = DbHelperSQL.GetSingle(sql6);
|
|
|
1225
|
+
|
|
|
1226
|
+ //}
|
|
|
1227
|
+
|
|
|
1228
|
+
|
|
|
1229
|
+
|
|
|
1230
|
+
|
|
949
|
1231
|
}
|
|
950
|
1232
|
#endregion
|
|
|
1233
|
+
|
|
|
1234
|
+ #endregion
|
|
951
|
1235
|
var obj = new
|
|
952
|
1236
|
{
|
|
953
|
1237
|
rows = dt,
|
|
|
@@ -956,6 +1240,110 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
956
|
1240
|
return Content(obj.ToJson());
|
|
957
|
1241
|
}
|
|
958
|
1242
|
|
|
|
1243
|
+ //获取总体任务结果
|
|
|
1244
|
+ public ActionResult ExportGetResultList(string key, string sdate, string edate, int userid = 0, int hjjgid = 0, int yhfkid = 0)
|
|
|
1245
|
+ {
|
|
|
1246
|
+ StringBuilder sb = new StringBuilder();
|
|
|
1247
|
+ #region 条件查询
|
|
|
1248
|
+ sb.Append(" and F_DeleteFlag=0 ");
|
|
|
1249
|
+ if (!string.IsNullOrWhiteSpace(sdate))
|
|
|
1250
|
+ sb.Append(" and DATEDIFF(day,ExpandDatField1,'" + sdate.Trim() + "')<=0");
|
|
|
1251
|
+ if (!string.IsNullOrWhiteSpace(edate))
|
|
|
1252
|
+ sb.Append(" and DATEDIFF(day,ExpandDatField1,'" + edate.Trim() + "')>=0");
|
|
|
1253
|
+ if (userid != 0)
|
|
|
1254
|
+ {
|
|
|
1255
|
+ sb.Append(" and F_UserId=" + userid);
|
|
|
1256
|
+ }
|
|
|
1257
|
+ if (hjjgid != 0)
|
|
|
1258
|
+ {
|
|
|
1259
|
+ sb.Append(" and F_HJJGId=" + hjjgid);
|
|
|
1260
|
+ }
|
|
|
1261
|
+ else
|
|
|
1262
|
+ {
|
|
|
1263
|
+ sb.Append(" and isnull(F_HJJGId,'')!=''");
|
|
|
1264
|
+ }
|
|
|
1265
|
+
|
|
|
1266
|
+ if (!string.IsNullOrWhiteSpace(key))
|
|
|
1267
|
+ {
|
|
|
1268
|
+ sb.Append(" and F_Phone like '%" + key.Trim() + "%'");
|
|
|
1269
|
+ }
|
|
|
1270
|
+ #endregion
|
|
|
1271
|
+ // string tablenew = "( select a.*, b.F_typeValue1,b.F_typeValue2,b.F_typeValue3,b.F_typeValue4,b.F_typeValue5,b.F_typeValue6 from T_Call_OutTaskTelNum a left join T_TypeResult b on a.F_id=b.F_phoneid) as t";
|
|
|
1272
|
+ string sql = " select Expandfield2,ExpandVchField1,F_Phone, F_UserName,F_HJJGName,ExpandDatField1 from T_Call_OutTaskTelNum a left join T_TypeResult b on a.F_id=b.F_phoneid where " + sb.ToString() + " ORDER BY ExpandDatField1 desc,F_Id desc";
|
|
|
1273
|
+
|
|
|
1274
|
+ DataTable dt = DbHelperSQL.Query(sql).Tables[0];
|
|
|
1275
|
+
|
|
|
1276
|
+ #region 判断是否已存在工单
|
|
|
1277
|
+ //dt.Columns.Add("type1");
|
|
|
1278
|
+ //dt.Columns.Add("type2");
|
|
|
1279
|
+ //dt.Columns.Add("type3");
|
|
|
1280
|
+ //dt.Columns.Add("type4");
|
|
|
1281
|
+ //dt.Columns.Add("type5");
|
|
|
1282
|
+ //dt.Columns.Add("type6");
|
|
|
1283
|
+ #region 判断是否已存在工单 ;再判断 如果问题里包括那六大类的问题,给分数赋值
|
|
|
1284
|
+ //foreach (DataRow item in dt.Rows)
|
|
|
1285
|
+ //{
|
|
|
1286
|
+ // string wjid = item["F_Id"].ToString();
|
|
|
1287
|
+
|
|
|
1288
|
+ // //如果问题里包括那六大类的问题,给分数赋值
|
|
|
1289
|
+ // //移网上网质量;移网通话质量;光网网络质量;装维服务;营业厅服务;套餐资费
|
|
|
1290
|
+
|
|
|
1291
|
+
|
|
|
1292
|
+ // int F_TaskId = Convert.ToInt32(item["F_TaskId"].ToString());
|
|
|
1293
|
+
|
|
|
1294
|
+ // var model = otnBLL.GetModel(Convert.ToInt32(wjid));
|
|
|
1295
|
+
|
|
|
1296
|
+ // if (model != null)
|
|
|
1297
|
+ // {
|
|
|
1298
|
+ // int cusid = model.F_CusID.Value;
|
|
|
1299
|
+
|
|
|
1300
|
+ // string sql1 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网上网质量') and F_SortModel = 0)";
|
|
|
1301
|
+
|
|
|
1302
|
+ // item["type1"] = DbHelperSQL.GetSingle(sql1);
|
|
|
1303
|
+ // string sql2 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '移网通话质量') and F_SortModel = 0)";
|
|
|
1304
|
+
|
|
|
1305
|
+ // item["type2"] = DbHelperSQL.GetSingle(sql2);
|
|
|
1306
|
+
|
|
|
1307
|
+ // string sql3 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '光网网络质量') and F_SortModel = 0)";
|
|
|
1308
|
+
|
|
|
1309
|
+ // item["type3"] = DbHelperSQL.GetSingle(sql3);
|
|
|
1310
|
+ // string sql4 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '装维服务') and F_SortModel = 0)";
|
|
|
1311
|
+
|
|
|
1312
|
+ // item["type4"] = DbHelperSQL.GetSingle(sql4);
|
|
|
1313
|
+
|
|
|
1314
|
+ // string sql5 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '营业厅服务') and F_SortModel = 0)";
|
|
|
1315
|
+
|
|
|
1316
|
+ // item["type5"] = DbHelperSQL.GetSingle(sql5);
|
|
|
1317
|
+ // string sql6 = " SELECT F_Answer FROM T_Call_OutAnswers where F_TaskID = " + F_TaskId + " and F_CusID = " + cusid + " and F_QID in (select F_QuestionId from T_Ask_Question where F_CategoryId in (select F_CategoryId from T_Ask_QuestionCategory where F_CategoryName = '套餐资费') and F_SortModel = 0)";
|
|
|
1318
|
+
|
|
|
1319
|
+ // item["type6"] = DbHelperSQL.GetSingle(sql6);
|
|
|
1320
|
+
|
|
|
1321
|
+ // }
|
|
|
1322
|
+
|
|
|
1323
|
+
|
|
|
1324
|
+
|
|
|
1325
|
+
|
|
|
1326
|
+ //}
|
|
|
1327
|
+ NPOIHelper npoi = new NPOIHelper();
|
|
|
1328
|
+ if (npoi.ExportToExcel("我的任务结果数据", dt, col()) == "")
|
|
|
1329
|
+ {
|
|
|
1330
|
+ return Success("导出成功");
|
|
|
1331
|
+ }
|
|
|
1332
|
+ else
|
|
|
1333
|
+ {
|
|
|
1334
|
+ return Error("导出失败");
|
|
|
1335
|
+ }
|
|
|
1336
|
+
|
|
|
1337
|
+
|
|
|
1338
|
+ #endregion
|
|
|
1339
|
+
|
|
|
1340
|
+ #endregion
|
|
|
1341
|
+
|
|
|
1342
|
+ }
|
|
|
1343
|
+
|
|
|
1344
|
+
|
|
|
1345
|
+
|
|
|
1346
|
+
|
|
959
|
1347
|
//获取任务结果详情
|
|
960
|
1348
|
public ActionResult GetTaskTelInfo(int id = 0)
|
|
961
|
1349
|
{
|
|
|
@@ -1189,6 +1577,33 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
1189
|
1577
|
}
|
|
1190
|
1578
|
#endregion
|
|
1191
|
1579
|
|
|
|
1580
|
+
|
|
|
1581
|
+ public ActionResult AddAnswers(int phoneid,string F_typeName1,string F_typeName2, string F_typeName3, string F_typeName4, string F_typeName5, string F_typeName6,string value1, string value2, string value3, string value4, string value5, string value6)
|
|
|
1582
|
+ {
|
|
|
1583
|
+
|
|
|
1584
|
+ Model.T_TypeResult remodel = new Model.T_TypeResult();
|
|
|
1585
|
+ remodel.F_PhoneID = phoneid;
|
|
|
1586
|
+ remodel.F_typeName1 = F_typeName1;
|
|
|
1587
|
+ remodel.F_typeName2 = F_typeName2;
|
|
|
1588
|
+ remodel.F_typeName3 = F_typeName3;
|
|
|
1589
|
+ remodel.F_typeName4 = F_typeName4;
|
|
|
1590
|
+ remodel.F_typeName5 = F_typeName5;
|
|
|
1591
|
+ remodel.F_typeName6 = F_typeName6;
|
|
|
1592
|
+
|
|
|
1593
|
+ remodel.F_typeValue1 = value1;
|
|
|
1594
|
+ remodel.F_typeValue2 = value2;
|
|
|
1595
|
+ remodel.F_typeValue3 = value3;
|
|
|
1596
|
+ remodel.F_typeValue4 = value4;
|
|
|
1597
|
+ remodel.F_typeValue5 = value5;
|
|
|
1598
|
+ remodel.F_typeValue6 = value6;
|
|
|
1599
|
+ remodel.F_userId = CurrentUser.UserData.F_UserId.ToString();
|
|
|
1600
|
+
|
|
|
1601
|
+ BLL.T_TypeResult bll = new BLL.T_TypeResult();
|
|
|
1602
|
+ bll.Add(remodel);
|
|
|
1603
|
+ return Success("保存成功");
|
|
|
1604
|
+
|
|
|
1605
|
+ }
|
|
|
1606
|
+
|
|
1192
|
1607
|
#region 客户档案
|
|
1193
|
1608
|
/// <summary>
|
|
1194
|
1609
|
/// 保存客户档案
|