| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870 |
- using CallCenterApi.Interface.Controllers.Base;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- namespace CallCenterApi.Interface.Controllers.report
- {
- //[Authority]
- public class CallInController : BaseController
- {
- //来电数据分析
- //获取数据
- public ActionResult GetDataList(string stime,string endtime)
- {
- ActionResult res = NoToken("未知错误,请重新登录");
- DataTable dt = new DataTable();
- DataTable dtlist = new DataTable();
-
- Hashtable tab = new Hashtable();
- string sql = "";
- #region 查询数据
- //来电记录
- if (stime != null && stime.Trim() != "")
- {
- sql += " and BeginTime>='" + stime + " 00:00:00' ";
- }
- if (endtime != null && endtime.Trim() != "")
- {
- sql += " and BeginTime<='" + endtime + " 23:59:59' ";
- }
- #region 获取数据
- dtlist = new BLL.T_Call_CallRecords().GetList(" CallType=0 " + sql).Tables[0];
- #region 参数
- //总计
- int all_all_all_count = 0;
- int all_sq_all_count = 0;
- int all_sh_all_count = 0;
- int all_ts_all_count = 0;
- int all_qt_all_count = 0;
- //工作时间内小计
- int work_all_all_count = 0;
- int work_sq_all_count = 0;
- int work_sh_all_count = 0;
- int work_ts_all_count = 0;
- int work_qt_all_count = 0;
- //工作时间内小计-已接来电
- int work_jt_all_count = 0;
- int work_jt_sq_count = 0;
- int work_jt_sh_count = 0;
- int work_jt_ts_count = 0;
- int work_jt_qt_count = 0;
- #region 工作内未接
- int work_wjt_all_count1 = 0;
- int work_wjt_all_count2 = 0;
- int work_wjt_all_count3 = 0;
- int work_wjt_all_count4 = 0;
- int work_wjt_sq_count1 = 0;
- int work_wjt_sq_count2 = 0;
- int work_wjt_sq_count3 = 0;
- int work_wjt_sq_count4 = 0;
- int work_wjt_sh_count1 = 0;
- int work_wjt_sh_count2 = 0;
- int work_wjt_sh_count3 = 0;
- int work_wjt_sh_count4 = 0;
- int work_wjt_ts_count1 = 0;
- int work_wjt_ts_count2 = 0;
- int work_wjt_ts_count3 = 0;
- int work_wjt_ts_count4 = 0;
- int work_wjt_qt_count1 = 0;
- int work_wjt_qt_count2 = 0;
- int work_wjt_qt_count3 = 0;
- int work_wjt_qt_count4 = 0;
- #endregion
- #region 非工作时间接通参数
- int unwork1_jt_all_count = 0;
- int unwork1_jt_sq_count = 0;
- int unwork1_jt_sh_count = 0;
- int unwork1_jt_ts_count = 0;
- int unwork1_jt_qt_count = 0;
- int unwork2_jt_all_count = 0;
- int unwork2_jt_sq_count = 0;
- int unwork2_jt_sh_count = 0;
- int unwork2_jt_ts_count = 0;
- int unwork2_jt_qt_count = 0;
- int unwork3_jt_all_count = 0;
- int unwork3_jt_sq_count = 0;
- int unwork3_jt_sh_count = 0;
- int unwork3_jt_ts_count = 0;
- int unwork3_jt_qt_count = 0;
- #endregion
- #region 非工作内上班前2小时未接
- int unwork1_wjt_all_count1 = 0;
- int unwork1_wjt_all_count2 = 0;
- int unwork1_wjt_all_count3 = 0;
- int unwork1_wjt_all_count4 = 0;
- int unwork1_wjt_sq_count1 = 0;
- int unwork1_wjt_sq_count2 = 0;
- int unwork1_wjt_sq_count3 = 0;
- int unwork1_wjt_sq_count4 = 0;
- int unwork1_wjt_sh_count1 = 0;
- int unwork1_wjt_sh_count2 = 0;
- int unwork1_wjt_sh_count3 = 0;
- int unwork1_wjt_sh_count4 = 0;
- int unwork1_wjt_ts_count1 = 0;
- int unwork1_wjt_ts_count2 = 0;
- int unwork1_wjt_ts_count3 = 0;
- int unwork1_wjt_ts_count4 = 0;
- int unwork1_wjt_qt_count1 = 0;
- int unwork1_wjt_qt_count2 = 0;
- int unwork1_wjt_qt_count3 = 0;
- int unwork1_wjt_qt_count4 = 0;
- #endregion
- #region 非工作内下班后3小时未接
- int unwork2_wjt_all_count1 = 0;
- int unwork2_wjt_all_count2 = 0;
- int unwork2_wjt_all_count3 = 0;
- int unwork2_wjt_all_count4 = 0;
- int unwork2_wjt_sq_count1 = 0;
- int unwork2_wjt_sq_count2 = 0;
- int unwork2_wjt_sq_count3 = 0;
- int unwork2_wjt_sq_count4 = 0;
- int unwork2_wjt_sh_count1 = 0;
- int unwork2_wjt_sh_count2 = 0;
- int unwork2_wjt_sh_count3 = 0;
- int unwork2_wjt_sh_count4 = 0;
- int unwork2_wjt_ts_count1 = 0;
- int unwork2_wjt_ts_count2 = 0;
- int unwork2_wjt_ts_count3 = 0;
- int unwork2_wjt_ts_count4 = 0;
- int unwork2_wjt_qt_count1 = 0;
- int unwork2_wjt_qt_count2 = 0;
- int unwork2_wjt_qt_count3 = 0;
- int unwork2_wjt_qt_count4 = 0;
- #endregion
- #region 非工作内其他时间未接
- int unwork3_wjt_all_count1 = 0;
- int unwork3_wjt_all_count2 = 0;
- int unwork3_wjt_all_count3 = 0;
- int unwork3_wjt_all_count4 = 0;
- int unwork3_wjt_sq_count1 = 0;
- int unwork3_wjt_sq_count2 = 0;
- int unwork3_wjt_sq_count3 = 0;
- int unwork3_wjt_sq_count4 = 0;
- int unwork3_wjt_sh_count1 = 0;
- int unwork3_wjt_sh_count2 = 0;
- int unwork3_wjt_sh_count3 = 0;
- int unwork3_wjt_sh_count4 = 0;
- int unwork3_wjt_ts_count1 = 0;
- int unwork3_wjt_ts_count2 = 0;
- int unwork3_wjt_ts_count3 = 0;
- int unwork3_wjt_ts_count4 = 0;
- int unwork3_wjt_qt_count1 = 0;
- int unwork3_wjt_qt_count2 = 0;
- int unwork3_wjt_qt_count3 = 0;
- int unwork3_wjt_qt_count4 = 0;
- #endregion
- //非工作时间内小计
- int unwork_all_all_count = 0;
- int unwork_sq_all_count = 0;
- int unwork_sh_all_count = 0;
- int unwork_ts_all_count = 0;
- int unwork_qt_all_count = 0;
- #endregion
- if (dtlist != null)
- {
- #region 总计
- all_all_all_count = dtlist.Rows.Count;
- all_sq_all_count = dtlist.Select("BusinessType=1").Length;
- all_sh_all_count = dtlist.Select("BusinessType=2").Length;
- all_ts_all_count = dtlist.Select("BusinessType=3 or BusinessType=31 or BusinessType=32 ").Length;
- all_qt_all_count = all_all_all_count - all_sh_all_count - all_sq_all_count - all_ts_all_count;
- tab.Add("all_all_all_count", all_all_all_count.ToString());//总合计
- tab.Add("all_sq_all_count", all_sq_all_count.ToString());//总售前合计
- tab.Add("all_sh_all_count", all_sh_all_count.ToString());//总售后合计
- tab.Add("all_ts_all_count", all_ts_all_count.ToString());//总投诉合计
- tab.Add("all_qt_all_count", all_qt_all_count.ToString());//总其他合计
- #endregion
- #region 工作时间来电
- #region 工作时间来电小计
- //查询工作时间
- work_all_all_count = dtlist.Select("WorkTimesDiff=0").Length;
- work_sq_all_count = dtlist.Select("WorkTimesDiff=0 and BusinessType=1").Length;
- work_sh_all_count = dtlist.Select("WorkTimesDiff=0 and BusinessType=2").Length;
- work_ts_all_count = dtlist.Select("WorkTimesDiff=0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- work_qt_all_count = work_all_all_count - work_sq_all_count - work_sh_all_count - work_ts_all_count;
- tab.Add("work_all_all_count", work_all_all_count.ToString());//小计
- tab.Add("work_sq_all_count", work_sq_all_count.ToString());//售前小计
- tab.Add("work_sh_all_count", work_sh_all_count.ToString());//售后小计
- tab.Add("work_ts_all_count", work_ts_all_count.ToString());//投诉小计
- tab.Add("work_qt_all_count", work_qt_all_count.ToString());//其他小计
- #endregion
- #region 工作时间来电-已接来电
- work_jt_all_count = dtlist.Select("CallState=1 and WorkTimesDiff=0").Length;
- work_jt_sq_count = dtlist.Select("CallState=1 and WorkTimesDiff=0 and BusinessType=1").Length;
- work_jt_sh_count = dtlist.Select("CallState=1 and WorkTimesDiff=0 and BusinessType=2").Length;
- work_jt_ts_count = dtlist.Select("CallState=1 and WorkTimesDiff=0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- work_jt_qt_count = work_jt_all_count - work_jt_sq_count - work_jt_sh_count - work_jt_ts_count;
- tab.Add("work_jt_all_count", work_jt_all_count.ToString());//接通合计
- tab.Add("work_jt_sq_count", work_jt_sq_count.ToString());//售前接通合计
- tab.Add("work_jt_sh_count", work_jt_sh_count.ToString());//售后接通合计
- tab.Add("work_jt_ts_count", work_jt_ts_count.ToString());//投诉接通合计
- tab.Add("work_jt_qt_count", work_jt_qt_count.ToString());//其他接通合计
- #endregion
- #region 工作时间来电-未接来电
- work_wjt_all_count1 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=1 ").Length;
- work_wjt_sq_count1 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=1 and BusinessType=1").Length;
- work_wjt_sh_count1 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=1 and BusinessType=2").Length;
- work_wjt_ts_count1 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=1 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- work_wjt_qt_count1 = work_wjt_all_count1 - work_wjt_sq_count1 - work_wjt_sh_count1 - work_wjt_ts_count1;
- tab.Add("work_wjt_all_count1", work_wjt_all_count1.ToString());//坐席未登录
- tab.Add("work_wjt_sq_count1", work_wjt_sq_count1.ToString());//售前坐席未登录
- tab.Add("work_wjt_sh_count1", work_wjt_sh_count1.ToString());//售后坐席未登录
- tab.Add("work_wjt_ts_count1", work_wjt_ts_count1.ToString());//投诉坐席未登录
- tab.Add("work_wjt_qt_count1", work_wjt_qt_count1.ToString());//其他坐席未登录
- work_wjt_all_count2 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=2 ").Length;
- work_wjt_sq_count2 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=2 and BusinessType=1").Length;
- work_wjt_sh_count2 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=2 and BusinessType=2").Length;
- work_wjt_ts_count2 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=2 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- work_wjt_qt_count2 = work_wjt_all_count2 - work_wjt_sq_count2 - work_wjt_sh_count2 - work_wjt_ts_count2;
- tab.Add("work_wjt_all_count2", work_wjt_all_count2.ToString());//坐席忙
- tab.Add("work_wjt_sq_count2", work_wjt_sq_count2.ToString());//售前坐席忙
- tab.Add("work_wjt_sh_count2", work_wjt_sh_count2.ToString());//售后坐席忙
- tab.Add("work_wjt_ts_count2", work_wjt_ts_count2.ToString());//投诉坐席忙
- tab.Add("work_wjt_qt_count2", work_wjt_qt_count2.ToString());//其他坐席忙
- work_wjt_all_count3 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=3 ").Length;
- work_wjt_sq_count3 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=3 and BusinessType=1").Length;
- work_wjt_sh_count3 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=3 and BusinessType=2").Length;
- work_wjt_ts_count3 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=3 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- work_wjt_qt_count3 = work_wjt_all_count3 - work_wjt_sq_count3 - work_wjt_sh_count3 - work_wjt_ts_count3;
- tab.Add("work_wjt_all_count3", work_wjt_all_count3.ToString());//振铃
- tab.Add("work_wjt_sq_count3", work_wjt_sq_count3.ToString());//售前振铃
- tab.Add("work_wjt_sh_count3", work_wjt_sh_count3.ToString());//售后振铃
- tab.Add("work_wjt_ts_count3", work_wjt_ts_count3.ToString());//投诉振铃
- tab.Add("work_wjt_qt_count3", work_wjt_qt_count3.ToString());//其他振铃
- work_wjt_all_count4 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=0 ").Length;
- work_wjt_sq_count4 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=0 and BusinessType=1").Length;
- work_wjt_sh_count4 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=0 and BusinessType=2").Length;
- work_wjt_ts_count4 = dtlist.Select("CallState=0 and WorkTimesDiff=0 and NoCallState=0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- work_wjt_qt_count4 = work_wjt_all_count4 - work_wjt_sq_count4 - work_wjt_sh_count4 - work_wjt_ts_count4;
- tab.Add("work_wjt_all_count4", work_wjt_all_count4.ToString());//其他
- tab.Add("work_wjt_sq_count4", work_wjt_sq_count4.ToString());//售前其他
- tab.Add("work_wjt_sh_count4", work_wjt_sh_count4.ToString());//售后其他
- tab.Add("work_wjt_ts_count4", work_wjt_ts_count4.ToString());//投诉其他
- tab.Add("work_wjt_qt_count4", work_wjt_qt_count4.ToString());//其他其他
- #endregion
- #region 工作时间来电占比
- #region 工作时间来电合计占比
- if (work_all_all_count != 0)
- {
- tab.Add("work_jt_all_zb", (Convert.ToDecimal(work_jt_all_count) * 100 / Convert.ToDecimal(work_all_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("work_wjt_all_zb1", (Convert.ToDecimal(work_wjt_all_count1) * 100 / Convert.ToDecimal(work_all_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("work_wjt_all_zb2", (Convert.ToDecimal(work_wjt_all_count2) * 100 / Convert.ToDecimal(work_all_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("work_wjt_all_zb3", (Convert.ToDecimal(work_wjt_all_count3) * 100 / Convert.ToDecimal(work_all_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("work_wjt_all_zb4", (Convert.ToDecimal(work_wjt_all_count4) * 100 / Convert.ToDecimal(work_all_all_count)).ToString("f") + "%");//其他合计占比
- }
- else
- {
- tab.Add("work_jt_all_zb", "-");//接通合计占比
- tab.Add("work_wjt_all_zb1", "-");//坐席未登录合计占比
- tab.Add("work_wjt_all_zb2", "-");//坐席忙合计占比
- tab.Add("work_wjt_all_zb3", "-");//振铃合计占比
- tab.Add("work_wjt_all_zb4", "-");//其他合计占比
- }
- #endregion
- #region 来电售前占比
- if (work_sq_all_count != 0)
- {
- tab.Add("work_jt_sq_zb", (Convert.ToDecimal(work_jt_sq_count) * 100 / Convert.ToDecimal(work_sq_all_count)).ToString("f") + "%");//接通售前占比
- tab.Add("work_wjt_sq_zb1", (Convert.ToDecimal(work_wjt_sq_count1) * 100 / Convert.ToDecimal(work_sq_all_count)).ToString("f") + "%");//坐席未登录售前占比
- tab.Add("work_wjt_sq_zb2", (Convert.ToDecimal(work_wjt_sq_count2) * 100 / Convert.ToDecimal(work_sq_all_count)).ToString("f") + "%");//坐席忙售前占比
- tab.Add("work_wjt_sq_zb3", (Convert.ToDecimal(work_wjt_sq_count3) * 100 / Convert.ToDecimal(work_sq_all_count)).ToString("f") + "%");//振铃售前占比
- tab.Add("work_wjt_sq_zb4", (Convert.ToDecimal(work_wjt_sq_count4) * 100 / Convert.ToDecimal(work_sq_all_count)).ToString("f") + "%");//其他售前占比
- }
- else
- {
- tab.Add("work_jt_sq_zb", "-");//接通售前占比
- tab.Add("work_wjt_sq_zb1", "-");//坐席未登录售前占比
- tab.Add("work_wjt_sq_zb2", "-");//坐席忙售前占比
- tab.Add("work_wjt_sq_zb3", "-");//振铃售前占比
- tab.Add("work_wjt_sq_zb4", "-");//其他售前占比
- }
- #endregion
- #region 来电售后占比
- if (work_sh_all_count != 0)
- {
- tab.Add("work_jt_sh_zb", (Convert.ToDecimal(work_jt_sh_count) * 100 / Convert.ToDecimal(work_sh_all_count)).ToString("f") + "%");//接通售后占比
- tab.Add("work_wjt_sh_zb1", (Convert.ToDecimal(work_wjt_sh_count1) * 100 / Convert.ToDecimal(work_sh_all_count)).ToString("f") + "%");//坐席未登录售后占比
- tab.Add("work_wjt_sh_zb2", (Convert.ToDecimal(work_wjt_sh_count2) * 100 / Convert.ToDecimal(work_sh_all_count)).ToString("f") + "%");//坐席忙售后占比
- tab.Add("work_wjt_sh_zb3", (Convert.ToDecimal(work_wjt_sh_count3) * 100 / Convert.ToDecimal(work_sh_all_count)).ToString("f") + "%");//振铃售后占比
- tab.Add("work_wjt_sh_zb4", (Convert.ToDecimal(work_wjt_sh_count4) * 100 / Convert.ToDecimal(work_sh_all_count)).ToString("f") + "%");//其他售后占比
- }
- else
- {
- tab.Add("work_jt_sh_zb", "-");//接通售后占比
- tab.Add("work_wjt_sh_zb1", "-");//坐席未登录售后占比
- tab.Add("work_wjt_sh_zb2", "-");//坐席忙售后占比
- tab.Add("work_wjt_sh_zb3", "-");//振铃售后占比
- tab.Add("work_wjt_sh_zb4", "-");//其他售后占比
- }
- #endregion
- #region 来电投诉占比
- if (work_ts_all_count != 0)
- {
- tab.Add("work_jt_ts_zb", (Convert.ToDecimal(work_jt_ts_count) * 100 / Convert.ToDecimal(work_ts_all_count)).ToString("f") + "%");//接通投诉占比
- tab.Add("work_wjt_ts_zb1", (Convert.ToDecimal(work_wjt_ts_count1) * 100 / Convert.ToDecimal(work_ts_all_count)).ToString("f") + "%");//坐席未登录投诉占比
- tab.Add("work_wjt_ts_zb2", (Convert.ToDecimal(work_wjt_ts_count2) * 100 / Convert.ToDecimal(work_ts_all_count)).ToString("f") + "%");//坐席忙投诉占比
- tab.Add("work_wjt_ts_zb3", (Convert.ToDecimal(work_wjt_ts_count3) * 100 / Convert.ToDecimal(work_ts_all_count)).ToString("f") + "%");//振铃投诉占比
- tab.Add("work_wjt_ts_zb4", (Convert.ToDecimal(work_wjt_ts_count4) * 100 / Convert.ToDecimal(work_ts_all_count)).ToString("f") + "%");//其他投诉占比
- }
- else
- {
- tab.Add("work_jt_sh_zb", "-");//接通投诉占比
- tab.Add("work_wjt_sh_zb1", "-");//坐席未登录投诉占比
- tab.Add("work_wjt_sh_zb2", "-");//坐席忙投诉占比
- tab.Add("work_wjt_sh_zb3", "-");//振铃投诉占比
- tab.Add("work_wjt_sh_zb4", "-");//其他投诉占比
- }
- #endregion
- #region 来电其他占比
- if (work_qt_all_count != 0)
- {
- tab.Add("work_jt_qt_zb", (Convert.ToDecimal(work_jt_qt_count) * 100 / Convert.ToDecimal(work_qt_all_count)).ToString("f") + "%");//接通其他占比
- tab.Add("work_wjt_qt_zb1", (Convert.ToDecimal(work_wjt_qt_count1) * 100 / Convert.ToDecimal(work_qt_all_count)).ToString("f") + "%");//坐席未登录其他占比
- tab.Add("work_wjt_qt_zb2", (Convert.ToDecimal(work_wjt_qt_count2) * 100 / Convert.ToDecimal(work_qt_all_count)).ToString("f") + "%");//坐席忙其他占比
- tab.Add("work_wjt_qt_zb3", (Convert.ToDecimal(work_wjt_qt_count3) * 100 / Convert.ToDecimal(work_qt_all_count)).ToString("f") + "%");//振铃其他占比
- tab.Add("work_wjt_qt_zb4", (Convert.ToDecimal(work_wjt_qt_count4) * 100 / Convert.ToDecimal(work_qt_all_count)).ToString("f") + "%");//其他其他占比
- }
- else
- {
- tab.Add("work_jt_qt_zb", "-");//接通其他占比
- tab.Add("work_wjt_qt_zb1", "-");//坐席未登录其他占比
- tab.Add("work_wjt_qt_zb2", "-");//坐席忙其他占比
- tab.Add("work_wjt_qt_zb3", "-");//振铃其他占比
- tab.Add("work_wjt_qt_zb4", "-");//其他其他占比
- }
- #endregion
- #endregion
- #endregion
- #region 非工作时间来电
- #region 非工作时间来电小计
- //查询非工作时间
- unwork_all_all_count = dtlist.Select("WorkTimesDiff<>0").Length;
- unwork_sq_all_count = dtlist.Select("WorkTimesDiff<>0 and BusinessType=1").Length;
- unwork_sh_all_count = dtlist.Select("WorkTimesDiff<>0 and BusinessType=2").Length;
- unwork_ts_all_count = dtlist.Select("WorkTimesDiff<>0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork_qt_all_count = unwork_all_all_count - unwork_sq_all_count - unwork_sh_all_count - unwork_ts_all_count;
- tab.Add("unwork_all_all_count", unwork_all_all_count.ToString());//小计
- tab.Add("unwork_sq_all_count", unwork_sq_all_count.ToString());//售前小计
- tab.Add("unwork_sh_all_count", unwork_sh_all_count.ToString());//售后小计
- tab.Add("unwork_ts_all_count", unwork_ts_all_count.ToString());//投诉小计
- tab.Add("unwork_qt_all_count", unwork_qt_all_count.ToString());//其他小计
- #endregion
- #region 非工作时间来电-已接来电
- #region 上班前2小时
- int pretime = -7200; //2小时7200秒
- unwork1_jt_all_count = dtlist.Select("CallState=1 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + "").Length;
- unwork1_jt_sq_count = dtlist.Select("CallState=1 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and BusinessType=1").Length;
- unwork1_jt_sh_count = dtlist.Select("CallState=1 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and BusinessType=2").Length;
- unwork1_jt_ts_count = dtlist.Select("CallState=1 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork1_jt_qt_count = unwork1_jt_all_count - unwork1_jt_sq_count - unwork1_jt_sh_count - unwork1_jt_ts_count;
- tab.Add("unwork1_jt_all_count", unwork1_jt_all_count.ToString());//接通合计
- tab.Add("unwork1_jt_sq_count", unwork1_jt_sq_count.ToString());//售前接通合计
- tab.Add("unwork1_jt_sh_count", unwork1_jt_sh_count.ToString());//售后接通合计
- tab.Add("unwork1_jt_ts_count", unwork1_jt_ts_count.ToString());//投诉接通合计
- tab.Add("unwork1_jt_qt_count", unwork1_jt_qt_count.ToString());//其他接通合计
- #endregion
- #region 下班后3小时
- int nexttime = 10800; //3小时10800秒
- unwork2_jt_all_count = dtlist.Select("CallState=1 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + "").Length;
- unwork2_jt_sq_count = dtlist.Select("CallState=1 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and BusinessType=1").Length;
- unwork2_jt_sh_count = dtlist.Select("CallState=1 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and BusinessType=2").Length;
- unwork2_jt_ts_count = dtlist.Select("CallState=1 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork2_jt_qt_count = unwork2_jt_all_count - unwork2_jt_sq_count - unwork2_jt_sh_count - unwork2_jt_ts_count;
- tab.Add("unwork2_jt_all_count", unwork2_jt_all_count.ToString());//接通合计
- tab.Add("unwork2_jt_sq_count", unwork2_jt_sq_count.ToString());//售前接通合计
- tab.Add("unwork2_jt_sh_count", unwork2_jt_sh_count.ToString());//售后接通合计
- tab.Add("unwork2_jt_ts_count", unwork2_jt_ts_count.ToString());//投诉接通合计
- tab.Add("unwork2_jt_qt_count", unwork2_jt_qt_count.ToString());//其他接通合计
- #endregion
- #region 其他非工作时间
- unwork3_jt_all_count = dtlist.Select("CallState=1 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ")").Length;
- unwork3_jt_sq_count = dtlist.Select("CallState=1 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and BusinessType=1").Length;
- unwork3_jt_sh_count = dtlist.Select("CallState=1 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and BusinessType=2").Length;
- unwork3_jt_ts_count = dtlist.Select("CallState=1 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork3_jt_qt_count = unwork3_jt_all_count - unwork3_jt_sq_count - unwork3_jt_sh_count - unwork3_jt_ts_count;
- tab.Add("unwork3_jt_all_count", unwork3_jt_all_count.ToString());//其他合计
- tab.Add("unwork3_jt_sq_count", unwork3_jt_sq_count.ToString());//售前其他合计
- tab.Add("unwork3_jt_sh_count", unwork3_jt_sh_count.ToString());//售后其他合计
- tab.Add("unwork3_jt_ts_count", unwork3_jt_ts_count.ToString());//投诉其他合计
- tab.Add("unwork3_jt_qt_count", unwork3_jt_qt_count.ToString());//其他其他合计
- #endregion
- #endregion
- #region 非工作时间来电-未接来电
- #region 上班前2小时
- unwork1_wjt_all_count1 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=1 ").Length;
- unwork1_wjt_sq_count1 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=1 and BusinessType=1").Length;
- unwork1_wjt_sh_count1 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=1 and BusinessType=2").Length;
- unwork1_wjt_ts_count1 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=1 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork1_wjt_qt_count1 = unwork1_wjt_all_count1 - unwork1_wjt_sq_count1 - unwork1_wjt_sh_count1 - unwork1_wjt_ts_count1;
- tab.Add("unwork1_wjt_all_count1", unwork1_wjt_all_count1.ToString());//坐席未登录
- tab.Add("unwork1_wjt_sq_count1", unwork1_wjt_sq_count1.ToString());//售前坐席未登录
- tab.Add("unwork1_wjt_sh_count1", unwork1_wjt_sh_count1.ToString());//售后坐席未登录
- tab.Add("unwork1_wjt_ts_count1", unwork1_wjt_ts_count1.ToString());//投诉坐席未登录
- tab.Add("unwork1_wjt_qt_count1", unwork1_wjt_qt_count1.ToString());//其他坐席未登录
- unwork1_wjt_all_count2 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=2 ").Length;
- unwork1_wjt_sq_count2 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=2 and BusinessType=1").Length;
- unwork1_wjt_sh_count2 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=2 and BusinessType=2").Length;
- unwork1_wjt_ts_count2 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=2 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork1_wjt_qt_count2 = unwork1_wjt_all_count2 - unwork1_wjt_sq_count2 - unwork1_wjt_sh_count2 - unwork1_wjt_ts_count2;
- tab.Add("unwork1_wjt_all_count2", unwork1_wjt_all_count2.ToString());//坐席忙
- tab.Add("unwork1_wjt_sq_count2", unwork1_wjt_sq_count2.ToString());//售前坐席忙
- tab.Add("unwork1_wjt_sh_count2", unwork1_wjt_sh_count2.ToString());//售后坐席忙
- tab.Add("unwork1_wjt_ts_count2", unwork1_wjt_ts_count2.ToString());//投诉坐席忙
- tab.Add("unwork1_wjt_qt_count2", unwork1_wjt_qt_count2.ToString());//其他坐席忙
- unwork1_wjt_all_count3 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=3 ").Length;
- unwork1_wjt_sq_count3 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=3 and BusinessType=1").Length;
- unwork1_wjt_sh_count3 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=3 and BusinessType=2").Length;
- unwork1_wjt_ts_count3 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=3 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork1_wjt_qt_count3 = unwork1_wjt_all_count3 - unwork1_wjt_sq_count3 - unwork1_wjt_sh_count3 - unwork1_wjt_ts_count3;
- tab.Add("unwork1_wjt_all_count3", unwork1_wjt_all_count3.ToString());//振铃
- tab.Add("unwork1_wjt_sq_count3", unwork1_wjt_sq_count3.ToString());//售前振铃
- tab.Add("unwork1_wjt_sh_count3", unwork1_wjt_sh_count3.ToString());//售后振铃
- tab.Add("unwork1_wjt_ts_count3", unwork1_wjt_ts_count3.ToString());//投诉振铃
- tab.Add("unwork1_wjt_qt_count3", unwork1_wjt_qt_count3.ToString());//其他振铃
- unwork1_wjt_all_count4 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=0 ").Length;
- unwork1_wjt_sq_count4 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=0 and BusinessType=1").Length;
- unwork1_wjt_sh_count4 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=0 and BusinessType=2").Length;
- unwork1_wjt_ts_count4 = dtlist.Select("CallState=0 and WorkTimesDiff<0 and WorkTimesDiff>" + pretime.ToString() + " and NoCallState=0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork1_wjt_qt_count4 = unwork1_wjt_all_count4 - unwork1_wjt_sq_count4 - unwork1_wjt_sh_count4 - unwork1_wjt_ts_count4;
- tab.Add("unwork1_wjt_all_count4", unwork1_wjt_all_count4.ToString());//其他
- tab.Add("unwork1_wjt_sq_count4", unwork1_wjt_sq_count4.ToString());//售前其他
- tab.Add("unwork1_wjt_sh_count4", unwork1_wjt_sh_count4.ToString());//售后其他
- tab.Add("unwork1_wjt_ts_count4", unwork1_wjt_ts_count4.ToString());//投诉其他
- tab.Add("unwork1_wjt_qt_count4", unwork1_wjt_qt_count4.ToString());//其他其他
- #endregion
- #region 下班后3小时
- unwork2_wjt_all_count1 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=1 ").Length;
- unwork2_wjt_sq_count1 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=1 and BusinessType=1").Length;
- unwork2_wjt_sh_count1 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=1 and BusinessType=2").Length;
- unwork2_wjt_ts_count1 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=1 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork2_wjt_qt_count1 = unwork2_wjt_all_count1 - unwork2_wjt_sq_count1 - unwork2_wjt_sh_count1 - unwork2_wjt_ts_count1;
- tab.Add("unwork2_wjt_all_count1", unwork2_wjt_all_count1.ToString());//坐席未登录
- tab.Add("unwork2_wjt_sq_count1", unwork2_wjt_sq_count1.ToString());//售前坐席未登录
- tab.Add("unwork2_wjt_sh_count1", unwork2_wjt_sh_count1.ToString());//售后坐席未登录
- tab.Add("unwork2_wjt_ts_count1", unwork2_wjt_ts_count1.ToString());//投诉坐席未登录
- tab.Add("unwork2_wjt_qt_count1", unwork2_wjt_qt_count1.ToString());//其他坐席未登录
- unwork2_wjt_all_count2 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=2 ").Length;
- unwork2_wjt_sq_count2 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=2 and BusinessType=1").Length;
- unwork2_wjt_sh_count2 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=2 and BusinessType=2").Length;
- unwork2_wjt_ts_count2 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=2 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork2_wjt_qt_count2 = unwork2_wjt_all_count2 - unwork2_wjt_sq_count2 - unwork2_wjt_sh_count2 - unwork2_wjt_ts_count2;
- tab.Add("unwork2_wjt_all_count2", unwork2_wjt_all_count2.ToString());//坐席忙
- tab.Add("unwork2_wjt_sq_count2", unwork2_wjt_sq_count2.ToString());//售前坐席忙
- tab.Add("unwork2_wjt_sh_count2", unwork2_wjt_sh_count2.ToString());//售后坐席忙
- tab.Add("unwork2_wjt_ts_count2", unwork2_wjt_ts_count2.ToString());//投诉坐席忙
- tab.Add("unwork2_wjt_qt_count2", unwork2_wjt_qt_count2.ToString());//其他坐席
- unwork2_wjt_all_count3 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=3 ").Length;
- unwork2_wjt_sq_count3 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=3 and BusinessType=1").Length;
- unwork2_wjt_sh_count3 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=3 and BusinessType=2").Length;
- unwork2_wjt_ts_count3 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=3 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork2_wjt_qt_count3 = unwork2_wjt_all_count3 - unwork2_wjt_sq_count3 - unwork2_wjt_sh_count3 - unwork2_wjt_ts_count3;
- tab.Add("unwork2_wjt_all_count3", unwork2_wjt_all_count3.ToString());//振铃
- tab.Add("unwork2_wjt_sq_count3", unwork2_wjt_sq_count3.ToString());//售前振铃
- tab.Add("unwork2_wjt_sh_count3", unwork2_wjt_sh_count3.ToString());//售后振铃
- tab.Add("unwork2_wjt_ts_count3", unwork2_wjt_ts_count3.ToString());//投诉振铃
- tab.Add("unwork2_wjt_qt_count3", unwork2_wjt_qt_count3.ToString());//其他振铃
- unwork2_wjt_all_count4 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=0 ").Length;
- unwork2_wjt_sq_count4 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=0 and BusinessType=1").Length;
- unwork2_wjt_sh_count4 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=0 and BusinessType=2").Length;
- unwork2_wjt_ts_count4 = dtlist.Select("CallState=0 and WorkTimesDiff>0 and WorkTimesDiff<" + nexttime.ToString() + " and NoCallState=0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork2_wjt_qt_count4 = unwork2_wjt_all_count4 - unwork2_wjt_sq_count4 - unwork2_wjt_sh_count4 - unwork2_wjt_ts_count4;
- tab.Add("unwork2_wjt_all_count4", unwork2_wjt_all_count4.ToString());//其他
- tab.Add("unwork2_wjt_sq_count4", unwork2_wjt_sq_count4.ToString());//售前其他
- tab.Add("unwork2_wjt_sh_count4", unwork2_wjt_sh_count4.ToString());//售后其他
- tab.Add("unwork2_wjt_ts_count4", unwork2_wjt_ts_count4.ToString());//投诉其他
- tab.Add("unwork2_wjt_qt_count4", unwork2_wjt_qt_count4.ToString());//其他其他
- #endregion
- #region 其他非工作时间
- unwork3_wjt_all_count1 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=1 ").Length;
- unwork3_wjt_sq_count1 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=1 and BusinessType=1").Length;
- unwork3_wjt_sh_count1 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=1 and BusinessType=2").Length;
- unwork3_wjt_ts_count1 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=1 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork3_wjt_qt_count1 = unwork3_wjt_all_count1 - unwork3_wjt_sq_count1 - unwork3_wjt_sh_count1 - unwork3_wjt_ts_count1;
- tab.Add("unwork3_wjt_all_count1", unwork3_wjt_all_count1.ToString());//坐席未登录
- tab.Add("unwork3_wjt_sq_count1", unwork3_wjt_sq_count1.ToString());//售前坐席未登录
- tab.Add("unwork3_wjt_sh_count1", unwork3_wjt_sh_count1.ToString());//售后坐席未登录
- tab.Add("unwork3_wjt_ts_count1", unwork3_wjt_ts_count1.ToString());//投诉坐席未登录
- tab.Add("unwork3_wjt_qt_count1", unwork3_wjt_qt_count1.ToString());//其他坐席未登录
- unwork3_wjt_all_count2 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=2 ").Length;
- unwork3_wjt_sq_count2 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=2 and BusinessType=1").Length;
- unwork3_wjt_sh_count2 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=2 and BusinessType=2").Length;
- unwork3_wjt_ts_count2 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=2 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork3_wjt_qt_count2 = unwork3_wjt_all_count2 - unwork3_wjt_sq_count2 - unwork3_wjt_sh_count2 - unwork3_wjt_ts_count2;
- tab.Add("unwork3_wjt_all_count2", unwork3_wjt_all_count2.ToString());//坐席忙
- tab.Add("unwork3_wjt_sq_count2", unwork3_wjt_sq_count2.ToString());//售前坐席忙
- tab.Add("unwork3_wjt_sh_count2", unwork3_wjt_sh_count2.ToString());//售后坐席忙
- tab.Add("unwork3_wjt_ts_count2", unwork3_wjt_ts_count2.ToString());//投诉坐席忙
- tab.Add("unwork3_wjt_qt_count2", unwork3_wjt_qt_count2.ToString());//其他坐席
- unwork3_wjt_all_count3 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=3 ").Length;
- unwork3_wjt_sq_count3 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=3 and BusinessType=1").Length;
- unwork3_wjt_sh_count3 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=3 and BusinessType=2").Length;
- unwork3_wjt_ts_count3 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=3 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork3_wjt_qt_count3 = unwork3_wjt_all_count3 - unwork3_wjt_sq_count3 - unwork3_wjt_sh_count3 - unwork3_wjt_ts_count3;
- tab.Add("unwork3_wjt_all_count3", unwork3_wjt_all_count3.ToString());//振铃
- tab.Add("unwork3_wjt_sq_count3", unwork3_wjt_sq_count3.ToString());//售前振铃
- tab.Add("unwork3_wjt_sh_count3", unwork3_wjt_sh_count3.ToString());//售后振铃
- tab.Add("unwork3_wjt_ts_count3", unwork3_wjt_ts_count3.ToString());//投诉振铃
- tab.Add("unwork3_wjt_qt_count3", unwork3_wjt_qt_count3.ToString());//其他振铃
- unwork3_wjt_all_count4 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=0 ").Length;
- unwork3_wjt_sq_count4 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=0 and BusinessType=1").Length;
- unwork3_wjt_sh_count4 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=0 and BusinessType=2").Length;
- unwork3_wjt_ts_count4 = dtlist.Select("CallState=0 and (WorkTimesDiff<=" + pretime.ToString() + " or WorkTimesDiff>=" + nexttime.ToString() + ") and NoCallState=0 and (BusinessType=3 or BusinessType=31 or BusinessType=32) ").Length;
- unwork3_wjt_qt_count4 = unwork3_wjt_all_count4 - unwork3_wjt_sq_count4 - unwork3_wjt_sh_count4 - unwork3_wjt_ts_count4;
- tab.Add("unwork3_wjt_all_count4", unwork3_wjt_all_count4.ToString());//其他
- tab.Add("unwork3_wjt_sq_count4", unwork3_wjt_sq_count4.ToString());//售前其他
- tab.Add("unwork3_wjt_sh_count4", unwork3_wjt_sh_count4.ToString());//售后其他
- tab.Add("unwork3_wjt_ts_count4", unwork3_wjt_ts_count4.ToString());//投诉其他
- tab.Add("unwork3_wjt_qt_count4", unwork3_wjt_qt_count4.ToString());//其他其他
- #endregion
- #endregion
- #region 非工作时间来电占比
- #region 非工作时间来电合计占比
- if (unwork_all_all_count != 0)
- {
- tab.Add("unwork1_jt_all_zb", (Convert.ToDecimal(unwork1_jt_all_count) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork1_wjt_all_zb1", (Convert.ToDecimal(unwork1_wjt_all_count1) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork1_wjt_all_zb2", (Convert.ToDecimal(unwork1_wjt_all_count2) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork1_wjt_all_zb3", (Convert.ToDecimal(unwork1_wjt_all_count3) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork1_wjt_all_zb4", (Convert.ToDecimal(unwork1_wjt_all_count4) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork2_jt_all_zb", (Convert.ToDecimal(unwork2_jt_all_count) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork2_wjt_all_zb1", (Convert.ToDecimal(unwork2_wjt_all_count1) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork2_wjt_all_zb2", (Convert.ToDecimal(unwork2_wjt_all_count2) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork2_wjt_all_zb3", (Convert.ToDecimal(unwork2_wjt_all_count3) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork2_wjt_all_zb4", (Convert.ToDecimal(unwork2_wjt_all_count4) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork3_jt_all_zb", (Convert.ToDecimal(unwork3_jt_all_count) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork3_wjt_all_zb1", (Convert.ToDecimal(unwork3_wjt_all_count1) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork3_wjt_all_zb2", (Convert.ToDecimal(unwork3_wjt_all_count2) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork3_wjt_all_zb3", (Convert.ToDecimal(unwork3_wjt_all_count3) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork3_wjt_all_zb4", (Convert.ToDecimal(unwork3_wjt_all_count4) * 100 / Convert.ToDecimal(unwork_all_all_count)).ToString("f") + "%");//其他合计占比
- }
- else
- {
- tab.Add("unwork1_jt_all_zb", "-");//接通合计占比
- tab.Add("unwork1_wjt_all_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork1_wjt_all_zb2", "-");//坐席忙合计占比
- tab.Add("unwork1_wjt_all_zb3", "-");//振铃合计占比
- tab.Add("unwork1_wjt_all_zb4", "-");//其他合计占比
- tab.Add("unwork2_jt_all_zb", "-");//接通合计占比
- tab.Add("unwork2_wjt_all_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork2_wjt_all_zb2", "-");//坐席忙合计占比
- tab.Add("unwork2_wjt_all_zb3", "-");//振铃合计占比
- tab.Add("unwork2_wjt_all_zb4", "-");//其他合计占比
- tab.Add("unwork3_jt_all_zb", "-");//接通合计占比
- tab.Add("unwork3_wjt_all_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork3_wjt_all_zb2", "-");//坐席忙合计占比
- tab.Add("unwork3_wjt_all_zb3", "-");//振铃合计占比
- tab.Add("unwork3_wjt_all_zb4", "-");//其他合计占比
- }
- #endregion
- #region 来电售前占比
- if (unwork_sq_all_count != 0)
- {
- tab.Add("unwork1_jt_sq_zb", (Convert.ToDecimal(unwork1_jt_sq_count) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork1_wjt_sq_zb1", (Convert.ToDecimal(unwork1_wjt_sq_count1) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork1_wjt_sq_zb2", (Convert.ToDecimal(unwork1_wjt_sq_count2) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork1_wjt_sq_zb3", (Convert.ToDecimal(unwork1_wjt_sq_count3) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork1_wjt_sq_zb4", (Convert.ToDecimal(unwork1_wjt_sq_count4) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork2_jt_sq_zb", (Convert.ToDecimal(unwork2_jt_sq_count) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork2_wjt_sq_zb1", (Convert.ToDecimal(unwork2_wjt_sq_count1) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork2_wjt_sq_zb2", (Convert.ToDecimal(unwork2_wjt_sq_count2) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork2_wjt_sq_zb3", (Convert.ToDecimal(unwork2_wjt_sq_count3) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork2_wjt_sq_zb4", (Convert.ToDecimal(unwork2_wjt_sq_count4) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork3_jt_sq_zb", (Convert.ToDecimal(unwork3_jt_sq_count) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork3_wjt_sq_zb1", (Convert.ToDecimal(unwork3_wjt_sq_count1) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork3_wjt_sq_zb2", (Convert.ToDecimal(unwork3_wjt_sq_count2) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork3_wjt_sq_zb3", (Convert.ToDecimal(unwork3_wjt_sq_count3) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork3_wjt_sq_zb4", (Convert.ToDecimal(unwork3_wjt_sq_count4) * 100 / Convert.ToDecimal(unwork_sq_all_count)).ToString("f") + "%");//其他合计占比
- }
- else
- {
- tab.Add("unwork1_jt_sq_zb", "-");//接通合计占比
- tab.Add("unwork1_wjt_sq_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork1_wjt_sq_zb2", "-");//坐席忙合计占比
- tab.Add("unwork1_wjt_sq_zb3", "-");//振铃合计占比
- tab.Add("unwork1_wjt_sq_zb4", "-");//其他合计占比
- tab.Add("unwork2_jt_sq_zb", "-");//接通合计占比
- tab.Add("unwork2_wjt_sq_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork2_wjt_sq_zb2", "-");//坐席忙合计占比
- tab.Add("unwork2_wjt_sq_zb3", "-");//振铃合计占比
- tab.Add("unwork2_wjt_sq_zb4", "-");//其他合计占比
- tab.Add("unwork3_jt_sq_zb", "-");//接通合计占比
- tab.Add("unwork3_wjt_sq_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork3_wjt_sq_zb2", "-");//坐席忙合计占比
- tab.Add("unwork3_wjt_sq_zb3", "-");//振铃合计占比
- tab.Add("unwork3_wjt_sq_zb4", "-");//其他合计占比
- }
- #endregion
- #region 来电售后占比
- if (unwork_sh_all_count != 0)
- {
- tab.Add("unwork1_jt_sh_zb", (Convert.ToDecimal(unwork1_jt_sh_count) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork1_wjt_sh_zb1", (Convert.ToDecimal(unwork1_wjt_sh_count1) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork1_wjt_sh_zb2", (Convert.ToDecimal(unwork1_wjt_sh_count2) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork1_wjt_sh_zb3", (Convert.ToDecimal(unwork1_wjt_sh_count3) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork1_wjt_sh_zb4", (Convert.ToDecimal(unwork1_wjt_sh_count4) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork2_jt_sh_zb", (Convert.ToDecimal(unwork2_jt_sh_count) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork2_wjt_sh_zb1", (Convert.ToDecimal(unwork2_wjt_sh_count1) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork2_wjt_sh_zb2", (Convert.ToDecimal(unwork2_wjt_sh_count2) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork2_wjt_sh_zb3", (Convert.ToDecimal(unwork2_wjt_sh_count3) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork2_wjt_sh_zb4", (Convert.ToDecimal(unwork2_wjt_sh_count4) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork3_jt_sh_zb", (Convert.ToDecimal(unwork3_jt_sh_count) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork3_wjt_sh_zb1", (Convert.ToDecimal(unwork3_wjt_sh_count1) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork3_wjt_sh_zb2", (Convert.ToDecimal(unwork3_wjt_sh_count2) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork3_wjt_sh_zb3", (Convert.ToDecimal(unwork3_wjt_sh_count3) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork3_wjt_sh_zb4", (Convert.ToDecimal(unwork3_wjt_sh_count4) * 100 / Convert.ToDecimal(unwork_sh_all_count)).ToString("f") + "%");//其他合计占比
- }
- else
- {
- tab.Add("unwork1_jt_sh_zb", "-");//接通合计占比
- tab.Add("unwork1_wjt_sh_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork1_wjt_sh_zb2", "-");//坐席忙合计占比
- tab.Add("unwork1_wjt_sh_zb3", "-");//振铃合计占比
- tab.Add("unwork1_wjt_sh_zb4", "-");//其他合计占比
- tab.Add("unwork2_jt_sh_zb", "-");//接通合计占比
- tab.Add("unwork2_wjt_sh_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork2_wjt_sh_zb2", "-");//坐席忙合计占比
- tab.Add("unwork2_wjt_sh_zb3", "-");//振铃合计占比
- tab.Add("unwork2_wjt_sh_zb4", "-");//其他合计占比
- tab.Add("unwork3_jt_sh_zb", "-");//接通合计占比
- tab.Add("unwork3_wjt_sh_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork3_wjt_sh_zb2", "-");//坐席忙合计占比
- tab.Add("unwork3_wjt_sh_zb3", "-");//振铃合计占比
- tab.Add("unwork3_wjt_sh_zb4", "-");//其他合计占比
- }
- #endregion
- #region 来电投诉占比
- if (unwork_ts_all_count != 0)
- {
- tab.Add("unwork1_jt_ts_zb", (Convert.ToDecimal(unwork1_jt_ts_count) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork1_wjt_ts_zb1", (Convert.ToDecimal(unwork1_wjt_ts_count1) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork1_wjt_ts_zb2", (Convert.ToDecimal(unwork1_wjt_ts_count2) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork1_wjt_ts_zb3", (Convert.ToDecimal(unwork1_wjt_ts_count3) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork1_wjt_ts_zb4", (Convert.ToDecimal(unwork1_wjt_ts_count4) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork2_jt_ts_zb", (Convert.ToDecimal(unwork2_jt_ts_count) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork2_wjt_ts_zb1", (Convert.ToDecimal(unwork2_wjt_ts_count1) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork2_wjt_ts_zb2", (Convert.ToDecimal(unwork2_wjt_ts_count2) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork2_wjt_ts_zb3", (Convert.ToDecimal(unwork2_wjt_ts_count3) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork2_wjt_ts_zb4", (Convert.ToDecimal(unwork2_wjt_ts_count4) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork3_jt_ts_zb", (Convert.ToDecimal(unwork3_jt_ts_count) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork3_wjt_ts_zb1", (Convert.ToDecimal(unwork3_wjt_ts_count1) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork3_wjt_ts_zb2", (Convert.ToDecimal(unwork3_wjt_ts_count2) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork3_wjt_ts_zb3", (Convert.ToDecimal(unwork3_wjt_ts_count3) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork3_wjt_ts_zb4", (Convert.ToDecimal(unwork3_wjt_ts_count4) * 100 / Convert.ToDecimal(unwork_ts_all_count)).ToString("f") + "%");//其他合计占比
- }
- else
- {
- tab.Add("unwork1_jt_ts_zb", "-");//接通合计占比
- tab.Add("unwork1_wjt_ts_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork1_wjt_ts_zb2", "-");//坐席忙合计占比
- tab.Add("unwork1_wjt_ts_zb3", "-");//振铃合计占比
- tab.Add("unwork1_wjt_ts_zb4", "-");//其他合计占比
- tab.Add("unwork2_jt_ts_zb", "-");//接通合计占比
- tab.Add("unwork2_wjt_ts_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork2_wjt_ts_zb2", "-");//坐席忙合计占比
- tab.Add("unwork2_wjt_ts_zb3", "-");//振铃合计占比
- tab.Add("unwork2_wjt_ts_zb4", "-");//其他合计占比
- tab.Add("unwork3_jt_ts_zb", "-");//接通合计占比
- tab.Add("unwork3_wjt_ts_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork3_wjt_ts_zb2", "-");//坐席忙合计占比
- tab.Add("unwork3_wjt_ts_zb3", "-");//振铃合计占比
- tab.Add("unwork3_wjt_ts_zb4", "-");//其他合计占比
- }
- #endregion
- #region 来电其他占比
- if (unwork_qt_all_count != 0)
- {
- tab.Add("unwork1_jt_qt_zb", (Convert.ToDecimal(unwork1_jt_qt_count) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork1_wjt_qt_zb1", (Convert.ToDecimal(unwork1_wjt_qt_count1) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork1_wjt_qt_zb2", (Convert.ToDecimal(unwork1_wjt_qt_count2) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork1_wjt_qt_zb3", (Convert.ToDecimal(unwork1_wjt_qt_count3) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork1_wjt_qt_zb4", (Convert.ToDecimal(unwork1_wjt_qt_count4) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork2_jt_qt_zb", (Convert.ToDecimal(unwork2_jt_qt_count) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork2_wjt_qt_zb1", (Convert.ToDecimal(unwork2_wjt_qt_count1) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork2_wjt_qt_zb2", (Convert.ToDecimal(unwork2_wjt_qt_count2) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork2_wjt_qt_zb3", (Convert.ToDecimal(unwork2_wjt_qt_count3) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork2_wjt_qt_zb4", (Convert.ToDecimal(unwork2_wjt_qt_count4) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//其他合计占比
- tab.Add("unwork3_jt_qt_zb", (Convert.ToDecimal(unwork3_jt_qt_count) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//接通合计占比
- tab.Add("unwork3_wjt_qt_zb1", (Convert.ToDecimal(unwork3_wjt_qt_count1) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//坐席未登录合计占比
- tab.Add("unwork3_wjt_qt_zb2", (Convert.ToDecimal(unwork3_wjt_qt_count2) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//坐席忙合计占比
- tab.Add("unwork3_wjt_qt_zb3", (Convert.ToDecimal(unwork3_wjt_qt_count3) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//振铃合计占比
- tab.Add("unwork3_wjt_qt_zb4", (Convert.ToDecimal(unwork3_wjt_qt_count4) * 100 / Convert.ToDecimal(unwork_qt_all_count)).ToString("f") + "%");//其他合计占比
- }
- else
- {
- tab.Add("unwork1_jt_qt_zb", "-");//接通合计占比
- tab.Add("unwork1_wjt_qt_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork1_wjt_qt_zb2", "-");//坐席忙合计占比
- tab.Add("unwork1_wjt_qt_zb3", "-");//振铃合计占比
- tab.Add("unwork1_wjt_qt_zb4", "-");//其他合计占比
- tab.Add("unwork2_jt_qt_zb", "-");//接通合计占比
- tab.Add("unwork2_wjt_qt_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork2_wjt_qt_zb2", "-");//坐席忙合计占比
- tab.Add("unwork2_wjt_qt_zb3", "-");//振铃合计占比
- tab.Add("unwork2_wjt_qt_zb4", "-");//其他合计占比
- tab.Add("unwork3_jt_qt_zb", "-");//接通合计占比
- tab.Add("unwork3_wjt_qt_zb1", "-");//坐席未登录合计占比
- tab.Add("unwork3_wjt_qt_zb2", "-");//坐席忙合计占比
- tab.Add("unwork3_wjt_qt_zb3", "-");//振铃合计占比
- tab.Add("unwork3_wjt_qt_zb4", "-");//其他合计占比
- }
- #endregion
- #endregion
- #endregion
- }
- #endregion
- #endregion
- res = Success("获取来电数据分析数据成功", tab);
-
- dtlist.Clear();
- dtlist.Dispose();
- dt.Clear();
- dt.Dispose();
-
- return res;
- }
- }
- }
|