Просмотр исходного кода

新增员工坐席报表,未完结

zhengbingbing лет назад: 8
Родитель
Сommit
997eeff9c0

+ 12 - 0
code/BaseCallCenter.Web/HySoft.BaseCallCenter.Web.csproj

@@ -388,6 +388,7 @@
388 388
     <Content Include="reportmanage\operationdata\YearContrast.aspx" />
389 389
     <Content Include="reportmanage\operationdata\YearContrastPic.aspx" />
390 390
     <Content Include="reportmanage\operationdata\ZuoXiManYiDu.aspx" />
391
+    <Content Include="reportmanage\operationdata\ZuoXiReport.aspx" />
391 392
     <Content Include="reportmanage\operationdata\ZuoXiTongHua.aspx" />
392 393
     <Content Include="reportmanage\operationdata\ZuoXiWorkTotal.aspx" />
393 394
     <Content Include="reportmanage\switchedlosscallreport.aspx" />
@@ -1529,6 +1530,7 @@
1529 1530
     <Content Include="Web.config">
1530 1531
       <SubType>Designer</SubType>
1531 1532
     </Content>
1533
+    <Content Include="reportmanage\operationdata\controls\ZuoXiReport.ashx" />
1532 1534
     <None Include="Web.Debug.config">
1533 1535
       <DependentUpon>Web.config</DependentUpon>
1534 1536
     </None>
@@ -2235,6 +2237,9 @@
2235 2237
     <Compile Include="reportmanage\operationdata\controls\YearContrast.ashx.cs">
2236 2238
       <DependentUpon>YearContrast.ashx</DependentUpon>
2237 2239
     </Compile>
2240
+    <Compile Include="reportmanage\operationdata\controls\ZuoXiReport.ashx.cs">
2241
+      <DependentUpon>ZuoXiReport.ashx</DependentUpon>
2242
+    </Compile>
2238 2243
     <Compile Include="reportmanage\operationdata\controls\ZuoXiTongHua.ashx.cs">
2239 2244
       <DependentUpon>ZuoXiTongHua.ashx</DependentUpon>
2240 2245
     </Compile>
@@ -2300,6 +2305,13 @@
2300 2305
     <Compile Include="reportmanage\operationdata\ZuoXiManYiDu.aspx.designer.cs">
2301 2306
       <DependentUpon>ZuoXiManYiDu.aspx</DependentUpon>
2302 2307
     </Compile>
2308
+    <Compile Include="reportmanage\operationdata\ZuoXiReport.aspx.cs">
2309
+      <DependentUpon>ZuoXiReport.aspx</DependentUpon>
2310
+      <SubType>ASPXCodeBehind</SubType>
2311
+    </Compile>
2312
+    <Compile Include="reportmanage\operationdata\ZuoXiReport.aspx.designer.cs">
2313
+      <DependentUpon>ZuoXiReport.aspx</DependentUpon>
2314
+    </Compile>
2303 2315
     <Compile Include="reportmanage\operationdata\ZuoXiTongHua.aspx.cs">
2304 2316
       <DependentUpon>ZuoXiTongHua.aspx</DependentUpon>
2305 2317
       <SubType>ASPXCodeBehind</SubType>

+ 138 - 0
code/BaseCallCenter.Web/reportmanage/operationdata/ZuoXiReport.aspx

@@ -0,0 +1,138 @@
1
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZuoXiReport.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.reportmanage.operationdata.ZuoXiReport" %>
2
+
3
+<!DOCTYPE html>
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+<head runat="server">
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    <title>员工坐席报表</title>
9
+    <link href="../../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
10
+    <script src="../../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
11
+    <script src="../../scripts/ui/json2.js" type="text/javascript"></script>
12
+    <script src="../../scripts/ui/js/core/base.js" type="text/javascript"></script>
13
+    <script type="text/javascript" src="../../scripts/function.js"></script>
14
+    <script src="../../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
15
+    <link href="../../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
16
+    <link href="../../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
17
+    <script src="../../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
18
+    <script src="../../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
19
+    <script src="../../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
20
+    <script src="../../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
21
+    <script src="../../scripts/ui/js/plugins/ligerTab.js" type="text/javascript"></script>
22
+    <script src="../../scripts/ui/js/plugins/ligerDrag.js" type="text/javascript"></script>
23
+    <script src="../../scripts/CustomersData.js" type="text/javascript"></script>
24
+    <link href="../../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
25
+    <link href="../../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
26
+    <link href="../../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
27
+    <link href="../../images/style.css" rel="stylesheet" type="text/css" />
28
+    <script src="../../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
29
+    <script type="text/javascript">
30
+        var gridlist;
31
+        var count = 0;
32
+        var counts = 0;
33
+        $(function () {
34
+            InitList();
35
+        });
36
+        var arrayObj = new Array();
37
+        function InitList() {
38
+            count += 1;
39
+            counts = count;
40
+            var sql = GetSql();
41
+            try {
42
+                gridlist = $("#divDataList").ligerGrid({
43
+                    height: '96%',
44
+                    columns: [
45
+                        { display: '岗位', name: 'RoleName', width: 80, frozen: true },
46
+                        { display: '工号', name: 'UserCode', width: 80, frozen: true },
47
+                        { display: '姓名', name: 'UserName', width: 80, frozen: true },
48
+                        { display: '来话接听数量', name: 'LHJTL', width: 120 },
49
+                        { display: '受理座席转接量', name: 'SLZXZJL', width: 130 },
50
+                        { display: '接听电话总量', name: 'JTDHZL', width: 120 },
51
+                        { display: '外呼电话量', name: 'WHDHL', width: 120 },
52
+                        { display: '外呼电话接起量', name: 'WHDHJQL', width: 120 },
53
+                        { display: '签入时长', name: 'QRSC', width: 120 },
54
+                        { display: '来话接听时长(秒)', name: 'LDJTSC', width: 120 },
55
+                        { display: '转接电话接听时长(秒)', name: 'ZJDHJTSC', width: 170 },
56
+                        { display: '总接听时长(秒)', name: 'ZJTSC', width: 120 },
57
+                        { display: '平均来话接听时长(秒/次)', name: 'PJLHJTSC', width: 180 },
58
+                        { display: '平均转接电话接听时长(秒/次)', name: 'PJZJDHJTSC', width: 190 },
59
+                        { display: '平均接听通话时长(秒/次)', name: 'PJJTTHSC', width: 180 },
60
+                        { display: '总呼出通话时长(秒)', name: 'ZHCTHSC', width: 120 },
61
+                        { display: '总呼出成功通话时长(秒)', name: 'ZHCCGTHSC', width: 180 },
62
+                        { display: '平均呼出通话时长(秒/次)', name: 'PJHCTHSC', width: 180 },
63
+                        { display: '平均成功呼出通话时长(秒/次)', name: 'PJCGHCTHSC', width: 190 },
64
+                        { display: '来话话后置忙总时长(秒)', name: 'LHHHZMZSC', width: 180 },
65
+                        { display: '转接电话话后置忙总时长(秒)', name: 'ZJDHHHZMZSC', width: 190 },
66
+                        { display: '话后置忙总时长(秒)', name: 'HHZMZSC', width: 120 },
67
+                        { display: '来话话后置忙平均时长(秒/次)', name: 'LHHHZMPJSC', width: 190 },
68
+                        { display: '转接电话话后置忙平均时长(秒/次)', name: 'ZJDHHHZMPJSC', width: 200 },
69
+                        { display: '平均话后置忙时长(秒/次)', name: 'PJHHZMSC', width: 180 },
70
+                        { display: '来话持线等待总时长(秒)', name: 'LHCXDDZSC', width: 180 },
71
+                        { display: '转接电话持线等待总时长(秒)', name: 'ZJDHCXDDZSC', width: 190 },
72
+                        { display: '持线等待总时长(秒)', name: 'CXDDZSC', width: 120 },
73
+                        { display: '来话持线等待平均时长(秒/次)', name: 'LHCXDDPJSC', width: 190 },
74
+                        { display: '转接电话持线等待平均时长(秒/次)', name: 'ZJDHCXDDPJSC', width: 200 },
75
+                        { display: '持线等待平均时长(秒/次)', name: 'CXDDPJSC', width: 180 },
76
+                        { display: '未准备好总时长(秒)', name: 'WZBHZSC', width: 120 },
77
+                        { display: '示闲总时长(秒)', name: 'SXZSC', width: 120 },
78
+                        { display: '事后处理时长(秒)', name: 'SHCLSC', width: 120 },
79
+                        { display: '来电信息点击量', name: 'LDXXDJL', width: 120 },
80
+                        { display: '信息点击总量', name: 'XXDJZL', width: 120 }
81
+                    ],
82
+
83
+                    url: 'controls/ZuoXiReport.ashx?action=getlist' + sql, pageSize: 20, rownumbers: true
84
+
85
+                });
86
+            }
87
+            catch (e) {
88
+                alert(e.Message);
89
+            }
90
+            gridlist.changePage('first');
91
+            $("#pageloading").hide();
92
+        }
93
+        var sql = "";
94
+        function GetSql() {
95
+            if (document.getElementById("begintime").value != "") {
96
+                sql += "&starttime=" + escape(document.getElementById("begintime").value);
97
+            }
98
+            if (document.getElementById("endtime").value != "") {
99
+                sql += "&endtime=" + escape(document.getElementById("endtime").value);
100
+            }
101
+            if (document.getElementById("dtDpt").value != "" && document.getElementById("dtDpt").value != "请选择") {
102
+                sql += "&dpt=" + document.getElementById("dtDpt").value;
103
+            }
104
+            return sql;
105
+        }
106
+        function bSearch() {
107
+            sql = "";
108
+            InitList();
109
+        }
110
+
111
+        document.onkeydown = function (event) {
112
+            var e = event || window.event || arguments.callee.caller.arguments[0];
113
+            if (e && e.keyCode == 13) {
114
+                bSearch();
115
+            }
116
+        };
117
+    </script>
118
+</head>
119
+<body>
120
+    <form id="form1" runat="server">
121
+        <div class="tab_con"></div>
122
+        <div class="tools_box">
123
+            <div class="tools_bar">
124
+                <asp:HiddenField ID="HdUserid" runat="server" />
125
+                <div class="search_box">
126
+                    部门:
127
+                    <asp:DropDownList ID="dtDpt" runat="server" CssClass="select"></asp:DropDownList>&nbsp;&nbsp;
128
+                                    开始时间:<asp:TextBox ID="begintime" runat="server" CssClass="txtInput" Width="80px" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>&nbsp;&nbsp;-
129
+                                    结束时间:<asp:TextBox ID="endtime" runat="server" CssClass="txtInput" Width="80px" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>&nbsp;&nbsp;
130
+                                    <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="bSearch();" />&nbsp;&nbsp;
131
+                </div>
132
+            </div>
133
+        </div>
134
+        <div id="divDataList">
135
+        </div>
136
+    </form>
137
+</body>
138
+</html>

+ 29 - 0
code/BaseCallCenter.Web/reportmanage/operationdata/ZuoXiReport.aspx.cs

@@ -0,0 +1,29 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Web;
6
+using System.Web.UI;
7
+using System.Web.UI.WebControls;
8
+
9
+namespace HySoft.BaseCallCenter.Web.reportmanage.operationdata
10
+{
11
+    public partial class ZuoXiReport : System.Web.UI.Page
12
+    {
13
+        protected void Page_Load(object sender, EventArgs e)
14
+        {
15
+            begintime.Text = DateTime.Now.ToString("yyyy-MM-01");
16
+            endtime.Text = DateTime.Now.ToString("yyyy-MM-dd");
17
+            if (!this.IsPostBack)
18
+            {
19
+                DataTable dt = DBUtility.DbHelperSQL.Query("select F_DeptId,F_DeptName,F_Remark from  T_Sys_Department where F_ParentId!=0 and F_State=0").Tables[0];
20
+                this.dtDpt.DataTextField = "F_DeptName";
21
+                this.dtDpt.DataValueField = "F_DeptId";
22
+                this.dtDpt.DataSource = dt;
23
+                this.dtDpt.DataBind();
24
+                this.dtDpt.Items.Insert(0, new ListItem("请选择"));
25
+                this.dtDpt.SelectedIndex = 0;
26
+            }
27
+        }
28
+    }
29
+}

+ 60 - 0
code/BaseCallCenter.Web/reportmanage/operationdata/ZuoXiReport.aspx.designer.cs

@@ -0,0 +1,60 @@
1
+//------------------------------------------------------------------------------
2
+// <自动生成>
3
+//     此代码由工具生成。
4
+//
5
+//     对此文件的更改可能导致不正确的行为,如果
6
+//     重新生成代码,则所做更改将丢失。
7
+// </自动生成>
8
+//------------------------------------------------------------------------------
9
+
10
+namespace HySoft.BaseCallCenter.Web.reportmanage.operationdata {
11
+    
12
+    
13
+    public partial class ZuoXiReport {
14
+        
15
+        /// <summary>
16
+        /// form1 控件。
17
+        /// </summary>
18
+        /// <remarks>
19
+        /// 自动生成的字段。
20
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
21
+        /// </remarks>
22
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
23
+        
24
+        /// <summary>
25
+        /// HdUserid 控件。
26
+        /// </summary>
27
+        /// <remarks>
28
+        /// 自动生成的字段。
29
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
30
+        /// </remarks>
31
+        protected global::System.Web.UI.WebControls.HiddenField HdUserid;
32
+        
33
+        /// <summary>
34
+        /// dtDpt 控件。
35
+        /// </summary>
36
+        /// <remarks>
37
+        /// 自动生成的字段。
38
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
39
+        /// </remarks>
40
+        protected global::System.Web.UI.WebControls.DropDownList dtDpt;
41
+        
42
+        /// <summary>
43
+        /// begintime 控件。
44
+        /// </summary>
45
+        /// <remarks>
46
+        /// 自动生成的字段。
47
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
48
+        /// </remarks>
49
+        protected global::System.Web.UI.WebControls.TextBox begintime;
50
+        
51
+        /// <summary>
52
+        /// endtime 控件。
53
+        /// </summary>
54
+        /// <remarks>
55
+        /// 自动生成的字段。
56
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
57
+        /// </remarks>
58
+        protected global::System.Web.UI.WebControls.TextBox endtime;
59
+    }
60
+}

+ 1 - 0
code/BaseCallCenter.Web/reportmanage/operationdata/controls/ZuoXiReport.ashx

@@ -0,0 +1 @@
1
+<%@ WebHandler Language="C#" CodeBehind="ZuoXiReport.ashx.cs" Class="HySoft.BaseCallCenter.Web.reportmanage.operationdata.controls.ZuoXiReport" %>

+ 293 - 0
code/BaseCallCenter.Web/reportmanage/operationdata/controls/ZuoXiReport.ashx.cs

@@ -0,0 +1,293 @@
1
+using HySoft.Common;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Linq;
6
+using System.Web;
7
+
8
+namespace HySoft.BaseCallCenter.Web.reportmanage.operationdata.controls
9
+{
10
+    /// <summary>
11
+    /// ZuoXiReport 的摘要说明
12
+    /// </summary>
13
+    public class ZuoXiReport : IHttpHandler
14
+    {
15
+
16
+        public void ProcessRequest(HttpContext context)
17
+        {
18
+            context.Response.ContentType = "text/plain";
19
+            string action = context.Request.QueryString["action"];
20
+            switch (action)
21
+            {
22
+                case "getlist":
23
+                    context.Response.Write(GetDataList(context));//读取数据
24
+                    break;
25
+            }
26
+        }
27
+        #region
28
+        //岗位    工号    姓名    来话接听数量-lhjtl    受理座席转接量-slzxzjl   接听电话总量-jtdhzl 外呼电话量-whdhl 外呼电话接起量-whdhjql
29
+        //签入时长-qrsc  来话接听时长(秒)-ldjtsc	转接电话接听时长(秒)-zjdhjtsc    总接听时长(秒)-zjtsc
30
+        //平均来话接听时长(秒 / 次)-pjlhjtsc	平均转接电话接听时长(秒 / 次)-pjzjdhjtsc	平均接听通话时长(秒 / 次)-pjjtthsc	
31
+        //总呼出通话时长(秒)-zhcthsc	总呼出成功通话时长(秒)-zhccgthsc	
32
+        //平均呼出通话时长(秒 / 次)-pjhcthsc	平均成功呼出通话时长(秒 / 次)-pjcghcthsc
33
+        //来话话后置忙总时长(秒)-lhhhzmzsc	转接电话话后置忙总时长(秒)-zjdhhhzmzsc	话后置忙总时长(秒)-hhzmzsc	
34
+        //来话话后置忙平均时长(秒 / 次)-lhhhzmpjsc	转接电话话后置忙平均时长(秒 / 次)-zjdhhhzmpjsc	
35
+        //平均话后置忙时长(秒 / 次)-pjhhzmsc	
36
+        //来话持线等待总时长(秒)-lhcxddzsc	转接电话持线等待总时长(秒)-zjdhcxddzsc
37
+        //持线等待总时长(秒)-cxddzsc	来话持线等待平均时长(秒 / 次)-lhcxddpjsc	
38
+        //转接电话持线等待平均时长(秒 / 次)-zjdhcxddpjsc	持线等待平均时长(秒 / 次)-cxddpjsc
39
+        //未准备好总时长(秒)-wzbhzsc	示闲总时长(秒)-sxzsc	事后处理时长(秒)-shclsc	
40
+        //来电信息点击量 -ldxxdjl   信息点击总量-xxdjzl
41
+        int lhjtl = 0; int slzxzjl = 0; int jtdhzl = 0; int whdhl = 0; int whdhjql = 0;
42
+        int qrsc = 0; int ldjtsc = 0; int zjdhjtsc = 0; int zjtsc = 0;
43
+        string pjlhjtsc = "0"; string pjzjdhjtsc = "0"; string pjjtthsc = "0";
44
+        int zhcthsc = 0; int zhccgthsc = 0;
45
+        string pjhcthsc = "0"; string pjcghcthsc = "0";
46
+        int lhhhzmzsc = 0; int zjdhhhzmzsc = 0; int hhzmzsc = 0;
47
+        int lhhhzmpjsc = 0; int zjdhhhzmpjsc = 0;
48
+        string pjhhzmsc = "0";
49
+        int lhcxddzsc = 0; int zjdhcxddzsc = 0;
50
+        int cxddzsc = 0; string lhcxddpjsc = "0";
51
+        int zjdhcxddpjsc = 0; string cxddpjsc = "0";
52
+        int wzbhzsc = 0; int sxzsc = 0; int shclsc = 0; int ldxxdjl = 0; int xxdjzl = 0;
53
+        #endregion
54
+        private string GetDataList(HttpContext context)
55
+        {
56
+            string res = "";
57
+            try
58
+            {
59
+                string sqlu = "";
60
+                string dpt = CommonRequest.GetQueryString("dpt");
61
+                string txtStartTime = CommonRequest.GetQueryString("starttime");
62
+                string txtEndTime = CommonRequest.GetQueryString("endtime");
63
+
64
+                string strpageindex = context.Request.Params["page"];
65
+                int pageindex = 1;
66
+                string strpagesize = context.Request.Params["pagesize"];
67
+                int pagesize = 20;
68
+                sqlu = " F_SeatFlag=1 and F_DeleteFlag=0";
69
+                if (dpt.Trim() != "")
70
+                {
71
+                    sqlu += " and F_DeptId=" + dpt.Trim();
72
+                }
73
+                string sqltimeCallRecords = "";
74
+                string strsqlcall = " 1=1 ";
75
+                if (txtStartTime != null && txtStartTime.Trim() != "")
76
+                {
77
+                    sqltimeCallRecords += " and CONVERT(varchar , TimeAlerting, 120)>=CONVERT(varchar , '" + txtStartTime.Trim() + " 00:00:01', 120) ";
78
+                    strsqlcall += " and CONVERT(varchar , BeginTime, 120)>=CONVERT(varchar , '" + txtStartTime.Trim() + " 00:00:01', 120) ";
79
+                }
80
+                if (txtEndTime != null && txtEndTime.Trim() != "")
81
+                {
82
+                    sqltimeCallRecords += " and CONVERT(varchar , TimeAlerting, 120)<=CONVERT(varchar , '" + txtEndTime.Trim() + " 23:59:59', 120) ";
83
+                    strsqlcall += " and CONVERT(varchar , BeginTime, 120)<=CONVERT(varchar , '" + txtEndTime.Trim() + " 23:59:59', 120) ";
84
+                }
85
+
86
+                Model.PageData<object> pageData = new Model.PageData<object>();
87
+                var userslist = new BLL.T_Sys_UserAccount().GetModelList(sqlu);
88
+                var calllist = new BLL.T_Call_CallRecords().GetModelList(strsqlcall);
89
+                var rolelist = new BLL.T_Sys_RoleInfo().GetModelList("");
90
+                pageData.Rows = userslist.Select(n =>
91
+                {
92
+                    GetTimes(n.F_WorkNumber, sqltimeCallRecords, strsqlcall);
93
+                    lhjtl = calllist.Where(c => c.UserCode == n.F_WorkNumber && c.CallType == 0 && c.CallState == 1).ToList().Count();//来话接听数量
94
+                    whdhl = calllist.Where(c => c.UserCode == n.F_WorkNumber && c.CallType == 1).ToList().Count();//外呼电话量
95
+                    whdhjql = calllist.Where(c => c.UserCode == n.F_WorkNumber && c.CallType == 1 && c.CallState == 1).ToList().Count();//外呼电话接起量
96
+                    ldxxdjl = calllist.Where(c => c.UserCode == n.F_WorkNumber && c.F_ZXreasonid > 0).ToList().Count();//来电信息点击量
97
+                    string rolename = rolelist.Where(r => r.F_RoleId == n.F_RoleId).FirstOrDefault<Model.T_Sys_RoleInfo>().F_RoleName;
98
+                    return new
99
+                    {
100
+                        RoleName = rolename,
101
+                        UserCode = n.F_WorkNumber,
102
+                        UserName = n.F_UserName,
103
+                        LHJTL = lhjtl,
104
+                        SLZXZJL = slzxzjl,
105
+                        JTDHZL = jtdhzl,
106
+                        WHDHL = whdhl,
107
+                        WHDHJQL = whdhjql,
108
+                        QRSC = qrsc,
109
+                        LDJTSC = ldjtsc,
110
+                        ZJDHJTSC = zjdhjtsc,
111
+                        ZJTSC = zjtsc,
112
+                        PJLHJTSC = pjlhjtsc,
113
+                        PJZJDHJTSC = pjzjdhjtsc,
114
+                        PJJTTHSC = pjjtthsc,
115
+                        ZHCTHSC = zhcthsc,
116
+                        ZHCCGTHSC = zhccgthsc,
117
+                        PJHCTHSC = pjhcthsc,
118
+                        PJCGHCTHSC = pjcghcthsc,
119
+                        LHHHZMZSC = lhhhzmzsc,
120
+                        ZJDHHHZMZSC = zjdhhhzmzsc,
121
+                        HHZMZSC = hhzmzsc,
122
+                        LHHHZMPJSC = lhhhzmpjsc,
123
+                        ZJDHHHZMPJSC = zjdhhhzmpjsc,
124
+                        PJHHZMSC = pjhhzmsc,
125
+                        LHCXDDZSC = lhcxddzsc,
126
+                        ZJDHCXDDZSC = zjdhcxddzsc,
127
+                        CXDDZSC = cxddzsc,
128
+                        LHCXDDPJSC = lhcxddpjsc,
129
+                        ZJDHCXDDPJSC = zjdhcxddpjsc,
130
+                        CXDDPJSC = cxddpjsc,
131
+                        WZBHZSC = wzbhzsc,
132
+                        SXZSC = sxzsc,
133
+                        SHCLSC = shclsc,
134
+                        LDXXDJL = ldxxdjl,
135
+                        XXDJZL = xxdjzl
136
+                    };
137
+                }).ToList<object>().Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
138
+                pageData.Total = userslist.Count;
139
+
140
+                res = pageData.ToJson();
141
+            }
142
+            catch (Exception ex)
143
+            { }
144
+            return res;
145
+        }
146
+        private void GetTimes(string usercode, string sqltimeCallRecords, string strsqlcall)
147
+        {
148
+            //岗位    工号    姓名    *来话接听数量-lhjtl    受理座席转接量-slzxzjl   接听电话总量-jtdhzl *外呼电话量-whdhl *外呼电话接起量-whdhjql
149
+            //*签入时长-qrsc  *来话接听时长(秒)-ldjtsc	转接电话接听时长(秒)-zjdhjtsc    总接听时长(秒)-zjtsc
150
+            //*平均来话接听时长(秒 / 次)-pjlhjtsc	平均转接电话接听时长(秒 / 次)-pjzjdhjtsc	平均接听通话时长(秒 / 次)-pjjtthsc	
151
+            //*总呼出通话时长(秒)-zhcthsc	总呼出成功通话时长(秒)-zhccgthsc	
152
+            //*平均呼出通话时长(秒 / 次)-pjhcthsc	平均成功呼出通话时长(秒 / 次)-pjcghcthsc
153
+            //来话话后置忙总时长(秒)-lhhhzmzsc	转接电话话后置忙总时长(秒)-zjdhhhzmzsc	话后置忙总时长(秒)-hhzmzsc	
154
+            //来话话后置忙平均时长(秒 / 次)-lhhhzmpjsc	转接电话话后置忙平均时长(秒 / 次)-zjdhhhzmpjsc	
155
+            //平均话后置忙时长(秒 / 次)-pjhhzmsc	
156
+            //*来话持线等待总时长(秒)-lhcxddzsc	转接电话持线等待总时长(秒)-zjdhcxddzsc
157
+            //持线等待总时长(秒)-cxddzsc	*来话持线等待平均时长(秒 / 次)-lhcxddpjsc	
158
+            //转接电话持线等待平均时长(秒 / 次)-zjdhcxddpjsc	持线等待平均时长(秒 / 次)-cxddpjsc
159
+            //未准备好总时长(秒)-wzbhzsc	*示闲总时长(秒)-sxzsc	事后处理时长(秒)-shclsc	
160
+            //*来电信息点击量 -ldxxdjl   信息点击总量-xxdjzl
161
+
162
+            #region  来话持线等待总时长 来话持线等待平均时长
163
+            DataTable dtTrunk = DBUtility.DbHelperSQL.Query("select COUNT(*) as ct,SUM(DATEDIFF(Second,timewantagent,timeconnected)) as dd from rep_trunk_call_in where AgentId=" + usercode + " " + sqltimeCallRecords.Replace("TimeAlerting", "TimeCallIn")).Tables[0];
164
+            if (dtTrunk.Rows.Count > 0 )
165
+            {
166
+                int itrunkct = 0;
167
+                if (dtTrunk.Rows[0]["ct"].ToString() != "")
168
+                {
169
+                    itrunkct = int.Parse(dtTrunk.Rows[0]["ct"].ToString());
170
+                }
171
+                if (dtTrunk.Rows[0]["dd"].ToString() != "")
172
+                {
173
+                    lhcxddzsc = int.Parse(dtTrunk.Rows[0]["dd"].ToString());
174
+                }
175
+                else
176
+                {
177
+                    lhcxddzsc = 0;
178
+                }
179
+
180
+                if (itrunkct != 0)
181
+                {
182
+                    lhcxddpjsc = (lhcxddzsc / itrunkct).ToString();
183
+                }
184
+                else
185
+                {
186
+                    lhcxddpjsc = "0";
187
+                }
188
+            }
189
+            
190
+            #endregion
191
+
192
+            #region 来话接听时长 平均来话接听时长
193
+            int iLHjtcs = 0;
194
+            DataTable dtCallEvey = DBUtility.DbHelperSQL.Query("select COUNT(*) as ct,SUM(TalkLongTime) as sc from T_Call_CallRecords where CallState=1 and CallType=0 and  usercode=" + usercode + " " + strsqlcall).Tables[0];
195
+            if (dtCallEvey != null && dtCallEvey.Rows.Count > 0)
196
+            {
197
+                if (dtCallEvey.Rows[0]["ct"].ToString() != "")
198
+                {
199
+                    iLHjtcs = int.Parse(dtCallEvey.Rows[0]["ct"].ToString());//接听次数
200
+                }
201
+                if (dtCallEvey.Rows[0]["sc"].ToString() != "")
202
+                {
203
+                    ldjtsc = int.Parse(dtCallEvey.Rows[0]["sc"].ToString());//通话秒数
204
+                }
205
+                else
206
+                {
207
+                    ldjtsc = 0;
208
+                }
209
+                if (iLHjtcs != 0)
210
+                {
211
+                    pjlhjtsc = (ldjtsc / iLHjtcs).ToString();
212
+                }
213
+                else
214
+                    pjlhjtsc = "0";
215
+            }
216
+            #endregion
217
+
218
+            #region 总接听时长 平均接听通话时长
219
+            int iZjtcs = 0;
220
+            DataTable dtCallZEvey = DBUtility.DbHelperSQL.Query("select COUNT(*) as ct,SUM(TalkLongTime) as sc from T_Call_CallRecords where CallState=1 and  usercode=" + usercode + " " + strsqlcall).Tables[0];
221
+            if (dtCallZEvey != null && dtCallZEvey.Rows.Count > 0)
222
+            {
223
+                if (dtCallZEvey.Rows[0]["ct"].ToString() != "")
224
+                {
225
+                    iZjtcs = int.Parse(dtCallZEvey.Rows[0]["ct"].ToString());//接听次数
226
+                }
227
+                if (dtCallZEvey.Rows[0]["sc"].ToString() != "")
228
+                {
229
+                    zjtsc = int.Parse(dtCallZEvey.Rows[0]["sc"].ToString());//通话秒数
230
+                }
231
+                else
232
+                {
233
+                    zjtsc = 0;
234
+                }
235
+                if (iZjtcs != 0)
236
+                {
237
+                    pjjtthsc = (ldjtsc / iZjtcs).ToString();
238
+                }
239
+                else
240
+                    pjjtthsc = "0";
241
+            }
242
+            #endregion
243
+
244
+            #region 总呼出通话时长  平均呼出通话时长
245
+            zhcthsc = zjtsc - ldjtsc;
246
+            int iHCjtcs = 0;
247
+            iHCjtcs=iZjtcs - iLHjtcs;
248
+            if (iHCjtcs != 0)
249
+            {
250
+                pjhcthsc = (zhcthsc / iHCjtcs).ToString();
251
+            }
252
+            else
253
+                pjhcthsc = "0";
254
+            #endregion
255
+
256
+            #region 签入时长 示闲总时长
257
+            DataTable dtAgent = DBUtility.DbHelperSQL.Query("select COUNT(*) as dl,SUM(LoginTimes) as dlsc,SUM(reposenum) as zm,SUM(ReposeTimes) as xx from rep_agent_detail where AgentId=" + usercode + " " + sqltimeCallRecords.Replace("TimeAlerting", "TimeLogin")).Tables[0];
258
+            if (dtAgent != null && dtAgent.Rows.Count > 0)
259
+            {
260
+                if (dtAgent.Rows[0]["dlsc"] != null && dtAgent.Rows[0]["dlsc"].ToString() != "")
261
+                {
262
+                    qrsc = int.Parse(dtAgent.Rows[0]["dlsc"].ToString());//签入时长
263
+                }
264
+                else
265
+                {
266
+                    qrsc = 0;
267
+                }
268
+                if (dtAgent.Rows[0]["xx"] != null && dtAgent.Rows[0]["xx"].ToString() != "")
269
+                {
270
+                    sxzsc = int.Parse(dtAgent.Rows[0]["xx"].ToString());//示闲总时长
271
+                }
272
+                else
273
+                {
274
+                    sxzsc = 0;
275
+                }
276
+
277
+            }
278
+            else
279
+            {
280
+                qrsc = 0;
281
+                sxzsc = 0;
282
+            }
283
+            #endregion
284
+        }
285
+        public bool IsReusable
286
+        {
287
+            get
288
+            {
289
+                return false;
290
+            }
291
+        }
292
+    }
293
+}