|
|
@@ -151,11 +151,30 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
151
|
151
|
|
|
152
|
152
|
}
|
|
153
|
153
|
|
|
|
154
|
+ private string[] col()
|
|
|
155
|
+ {
|
|
|
156
|
+ string[] ccc = {
|
|
|
157
|
+
|
|
|
158
|
+ "工单编号", "反映问题","问题处理情况","问题分类","热点问题","处理部门"," 客户姓名"," 客户电话","坐席工号", "坐席姓名","创建时间","工单来源"
|
|
|
159
|
+ };
|
|
|
160
|
+ return ccc;
|
|
|
161
|
+ }
|
|
|
162
|
+
|
|
|
163
|
+ private string[] col2()
|
|
|
164
|
+ {
|
|
|
165
|
+ string[] ccc = {
|
|
|
166
|
+ "工单编号", "工单状态","反映问题","问题处理情况","问题分类","热点问题","处理部门"," 客户姓名"," 客户电话","坐席工号", "坐席姓名","创建时间","工单来源"
|
|
|
167
|
+ };
|
|
|
168
|
+ return ccc;
|
|
|
169
|
+ }
|
|
|
170
|
+
|
|
|
171
|
+
|
|
|
172
|
+
|
|
154
|
173
|
/// <summary>
|
|
155
|
174
|
/// 获取待处理工单列表
|
|
156
|
175
|
/// </summary>
|
|
157
|
176
|
/// <returns></returns>
|
|
158
|
|
- public ActionResult GetList()
|
|
|
177
|
+ public ActionResult GetList(int isexport=0)
|
|
159
|
178
|
{
|
|
160
|
179
|
string sql = " and isdel=0 ";
|
|
161
|
180
|
DataTable dt = new DataTable();
|
|
|
@@ -267,6 +286,44 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
267
|
286
|
{
|
|
268
|
287
|
pagesize = Convert.ToInt32(strpagesize);
|
|
269
|
288
|
}
|
|
|
289
|
+
|
|
|
290
|
+ if (isexport>0)
|
|
|
291
|
+ {
|
|
|
292
|
+
|
|
|
293
|
+
|
|
|
294
|
+
|
|
|
295
|
+ NPOIHelper npoi = new NPOIHelper();
|
|
|
296
|
+ if (strltype == "0")
|
|
|
297
|
+ {
|
|
|
298
|
+ string sqldcl = "select WorkOrderID,Detail,clcontent,InfoType,InfoTypeDetail, Unit, Customer, CustomerTel, CreateUser, dbo.GetUserName(CreateUser) CreateUserName,CreateTime,Source from T_Wo_WorkOrder where 1=1 "+sql+ " ORDER BY ID desc";
|
|
|
299
|
+ DataTable dtdcl = DbHelperSQL.Query(sqldcl).Tables[0];
|
|
|
300
|
+ if (npoi.ExportToExcel("待处理工单列表", dtdcl, col() ) == "")
|
|
|
301
|
+ {
|
|
|
302
|
+ return Success("导出成功");
|
|
|
303
|
+ }
|
|
|
304
|
+ else
|
|
|
305
|
+ {
|
|
|
306
|
+ return Error("导出失败");
|
|
|
307
|
+ }
|
|
|
308
|
+
|
|
|
309
|
+ }
|
|
|
310
|
+ if (strltype == "2")
|
|
|
311
|
+ {
|
|
|
312
|
+ string sqlycy = "select WorkOrderID,case when State = 2 then '已完成' else '待完成'end statename, Detail, clcontent, InfoType, InfoTypeDetail , Unit, Customer, CustomerTel, CreateUser, dbo.GetUserName(CreateUser) CreateUserName,CreateTime,Source from T_Wo_WorkOrder where 1=1 " + sql + " ORDER BY ID desc";
|
|
|
313
|
+ DataTable dtycy = DbHelperSQL.Query(sqlycy).Tables[0];
|
|
|
314
|
+ if (npoi.ExportToExcel("已参与工单列表", dtycy, col2()) == "")
|
|
|
315
|
+ {
|
|
|
316
|
+ return Success("导出成功");
|
|
|
317
|
+ }
|
|
|
318
|
+ else
|
|
|
319
|
+ {
|
|
|
320
|
+ return Error("导出失败");
|
|
|
321
|
+ }
|
|
|
322
|
+ }
|
|
|
323
|
+
|
|
|
324
|
+ }
|
|
|
325
|
+
|
|
|
326
|
+
|
|
270
|
327
|
int recordCount = 0;
|
|
271
|
328
|
dt = BLL.PagerBLL.GetListPager(
|
|
272
|
329
|
"T_Wo_WorkOrder",
|