|
|
@@ -48,7 +48,7 @@ public partial class Report_TotalCount_Report : System.Web.UI.Page
|
|
48
|
48
|
html.Append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" >");
|
|
49
|
49
|
try
|
|
50
|
50
|
{
|
|
51
|
|
- //标题第一行
|
|
|
51
|
+ #region 标题第一行
|
|
52
|
52
|
html.Append("<tr style=\"text-align: center;\"><td class=\"formtabletitle\" style=\"height: 35px;background-color: #D5EDFE;border:1px solid #CCCCCC;padding: 3px 3px 3px 3px;text-align:center;\">小时/时间</td>");
|
|
53
|
53
|
html.Append("<td class=\"formtabletitle1\"style=\"height: 25px;background-color: #D5EDFE;border-left: 0px solid #FFFFFF;border-right: 1px solid #CCCCCC;border-top: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;padding: 3px 3px 3px 3px;text-align:center;\">00时-01时 呼出量</td>");
|
|
54
|
54
|
html.Append("<td class=\"formtabletitle1\"style=\"height: 25px;background-color: #D5EDFE;border-left: 0px solid #FFFFFF;border-right: 1px solid #CCCCCC;border-top: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;padding: 3px 3px 3px 3px;text-align:center;\">00时-01时 呼入量</td>");
|
|
|
@@ -99,6 +99,17 @@ public partial class Report_TotalCount_Report : System.Web.UI.Page
|
|
99
|
99
|
html.Append("<td class=\"formtabletitle1\"style=\"height: 25px;background-color: #D5EDFE;border-left: 0px solid #FFFFFF;border-right: 1px solid #CCCCCC;border-top: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;padding: 3px 3px 3px 3px;text-align:center;\">23时-24时 呼出量</td>");
|
|
100
|
100
|
html.Append("<td class=\"formtabletitle1\"style=\"height: 25px;background-color: #D5EDFE;border-left: 0px solid #FFFFFF;border-right: 1px solid #CCCCCC;border-top: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;padding: 3px 3px 3px 3px;text-align:center;\">23时-24时 呼入量</td>");
|
|
101
|
101
|
html.Append("</tr>");
|
|
|
102
|
+ #endregion
|
|
|
103
|
+
|
|
|
104
|
+ string sql = "";
|
|
|
105
|
+ #region 筛选
|
|
|
106
|
+ if (string.IsNullOrEmpty(_operations[0]))
|
|
|
107
|
+ sql += " and BeginTime>'" + Convert.ToDateTime(_operations[0]).ToString("yyyy-MM-dd") + " 00:00:00' ";
|
|
|
108
|
+ if (string.IsNullOrEmpty(_operations[1]))
|
|
|
109
|
+ sql += " and BeginTime<'" + Convert.ToDateTime(_operations[1]).ToString("yyyy-MM-dd") + " 23:59:59' ";
|
|
|
110
|
+ #endregion
|
|
|
111
|
+
|
|
|
112
|
+ DataTable dtnew = bll_T_Report.GetCallCountReport3(sql);
|
|
102
|
113
|
//SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
|
|
103
|
114
|
//DateTime ssss = sim.parse(_operations[0]);
|
|
104
|
115
|
for (DateTime dttime = Convert.ToDateTime(_operations[0]); dttime < Convert.ToDateTime(_operations[1]).AddDays(1);dttime= dttime.AddDays(1))
|
|
|
@@ -110,32 +121,44 @@ public partial class Report_TotalCount_Report : System.Web.UI.Page
|
|
110
|
121
|
html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">" + dttime.ToString().Substring(0,dttime.ToString().Length-7) + " </td>");
|
|
111
|
122
|
for (int i = 0; i < 24;i++ )
|
|
112
|
123
|
{
|
|
113
|
|
- if (i == 23)
|
|
114
|
|
- {
|
|
115
|
|
- dt = bll_T_Report.GetCallCountReport2("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
116
|
|
- //dt = bll_T_Report.GetCallCountReport1("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
117
|
|
- }
|
|
118
|
|
- else
|
|
119
|
|
- {
|
|
120
|
|
- int j = i + 1;
|
|
121
|
|
- dt = bll_T_Report.GetCallCountReport2("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
122
|
|
- //dt = bll_T_Report.GetCallCountReport1("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
123
|
|
- }
|
|
124
|
|
- html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">"+dt.Rows[0][0].ToString()+" </td>");
|
|
125
|
|
- if (i == 23)
|
|
126
|
|
- {
|
|
127
|
|
- dt = bll_T_Report.GetCallCountReport2("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
128
|
|
- //dt = bll_T_Report.GetCallCountReport1("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
129
|
|
- }
|
|
130
|
|
- else
|
|
131
|
|
- {
|
|
132
|
|
- int j = i + 1;
|
|
133
|
|
- dt = bll_T_Report.GetCallCountReport2("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
134
|
|
- //dt = bll_T_Report.GetCallCountReport1("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
135
|
|
- }
|
|
136
|
|
- html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">"+dt.Rows[0][0].ToString()+" </td>");
|
|
|
124
|
+ var drIn = dtnew.Select("dates='" + dttime.ToString("yyyyMMdd") + "' and hh='" + i + "' and calltype=0");
|
|
|
125
|
+ int conIn = (from DataRow dr in drIn select dr.Field<int>("con")).FirstOrDefault();
|
|
|
126
|
+
|
|
|
127
|
+ var drOut = dtnew.Select("dates='" + dttime.ToString("yyyyMMdd") + "' and hh='" + i + "' and calltype=1");
|
|
|
128
|
+ int conOut = (from DataRow dr in drOut select dr.Field<int>("con")).FirstOrDefault();
|
|
|
129
|
+
|
|
|
130
|
+ html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">" + conOut.ToString() + " </td>");
|
|
|
131
|
+ html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">" + conIn.ToString() + " </td>");
|
|
|
132
|
+
|
|
|
133
|
+
|
|
|
134
|
+ #region 优化 20190730
|
|
|
135
|
+ //if (i == 23)
|
|
|
136
|
+ //{
|
|
|
137
|
+ // dt = bll_T_Report.GetCallCountReport2("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
|
138
|
+ // //dt = bll_T_Report.GetCallCountReport1("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
|
139
|
+ //}
|
|
|
140
|
+ //else
|
|
|
141
|
+ //{
|
|
|
142
|
+ // int j = i + 1;
|
|
|
143
|
+ // dt = bll_T_Report.GetCallCountReport2("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
|
144
|
+ // //dt = bll_T_Report.GetCallCountReport1("and CallType=1 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
|
145
|
+ //}
|
|
|
146
|
+ //html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">"+dt.Rows[0][0].ToString()+" </td>");
|
|
|
147
|
+ //if (i == 23)
|
|
|
148
|
+ //{
|
|
|
149
|
+ // dt = bll_T_Report.GetCallCountReport2("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
|
150
|
+ // //dt = bll_T_Report.GetCallCountReport1("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " 23:59:59'");
|
|
|
151
|
+ //}
|
|
|
152
|
+ //else
|
|
|
153
|
+ //{
|
|
|
154
|
+ // int j = i + 1;
|
|
|
155
|
+ // dt = bll_T_Report.GetCallCountReport2("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
|
156
|
+ // //dt = bll_T_Report.GetCallCountReport1("and CallType=0 and BeginTime>'" + dttime1 + " " + i + ":00:00' and BeginTime<'" + dttime1 + " " + j + ":00:00'");
|
|
|
157
|
+ //}
|
|
|
158
|
+ //html.Append("<td class=\"formtable_td\" style=\"vertical-align: middle;border-top: 0px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 2px;height: 25px;padding-top: 3px;padding-bottom: 3px;\">"+dt.Rows[0][0].ToString()+" </td>");
|
|
|
159
|
+ #endregion
|
|
137
|
160
|
}
|
|
138
|
|
- html.Append("</tr>");
|
|
|
161
|
+ html.Append("</tr>");
|
|
139
|
162
|
|
|
140
|
163
|
}
|
|
141
|
164
|
////合计
|