|
|
@@ -562,6 +562,30 @@ namespace SignTokenApi.Controllers
|
|
562
|
562
|
return Success("根据条件获取坐席数据成功", agentlist);
|
|
563
|
563
|
}
|
|
564
|
564
|
|
|
|
565
|
+
|
|
|
566
|
+ /// <summary>
|
|
|
567
|
+ /// 导出模板
|
|
|
568
|
+ /// </summary>
|
|
|
569
|
+ /// <returns></returns>
|
|
|
570
|
+ [HttpGet("downtemplate")]
|
|
|
571
|
+ [AllowAnonymous]
|
|
|
572
|
+ public IActionResult DownTemplateAsync()
|
|
|
573
|
+ {
|
|
|
574
|
+ string mbname = _configuration["upload:mbname"].ToString();
|
|
|
575
|
+ string mbkeys = _configuration["upload:mbkeys"].ToString();
|
|
|
576
|
+
|
|
|
577
|
+ NPOIHelper npoi = new NPOIHelper();
|
|
|
578
|
+ byte[] sm = npoi.ExportToExcelTemplate(mbkeys.Split(","));
|
|
|
579
|
+ if (sm != null)
|
|
|
580
|
+ {
|
|
|
581
|
+ return File(sm, "application/vnd.ms-excel", mbname);
|
|
|
582
|
+ }
|
|
|
583
|
+ else
|
|
|
584
|
+ {
|
|
|
585
|
+ return Error("下载失败");
|
|
|
586
|
+ }
|
|
|
587
|
+ }
|
|
|
588
|
+
|
|
565
|
589
|
/// <summary>
|
|
566
|
590
|
/// 上传文件并将设备信息导入数据库
|
|
567
|
591
|
/// </summary>
|