|
@@ -4,6 +4,7 @@ using OASystem.API.OAMethodLib;
|
|
|
using OASystem.Domain.AesEncryption;
|
|
|
using OASystem.Domain.Dtos.CRM;
|
|
|
using OASystem.Domain.Entities.Customer;
|
|
|
+using OASystem.Domain.ViewModels.CRM;
|
|
|
using OASystem.Infrastructure.Repositories.CRM;
|
|
|
using System.Collections;
|
|
|
using System.Data;
|
|
@@ -584,14 +585,13 @@ namespace OASystem.API.Controllers
|
|
|
if (pageFunAuthView.FilesDownloadAuth == 0) return Ok(JsonView(false, "您没有文件下载权!"));
|
|
|
#endregion
|
|
|
|
|
|
- DataTable dt = await _clientDataRepository.NewClientDataExcelDownload(dto);
|
|
|
- dt.TableName = $"NCDDT";
|
|
|
+ var dt = await _clientDataRepository.NewClientDataExcelDownload(dto);
|
|
|
if (dt != null)
|
|
|
{
|
|
|
- string tempPath = (AppSettingsHelper.Get("ExcelBasePath") + "Template/团组费用统计模板.xls");
|
|
|
+ string tempPath = (AppSettingsHelper.Get("ExcelBasePath") + "Template/公司客户资料导出模板.xlsx");
|
|
|
var designer = new WorkbookDesigner();
|
|
|
designer.Workbook = new Workbook(tempPath);
|
|
|
- designer.SetDataSource(dt);
|
|
|
+ designer.SetDataSource("NCDDT", dt);
|
|
|
designer.Process();
|
|
|
|
|
|
//文件名
|
|
@@ -600,16 +600,23 @@ namespace OASystem.API.Controllers
|
|
|
string url = AppSettingsHelper.Get("ExcelBaseUrl") + "Office/Excel/NewClientDataExcelDownload/" + fileName;
|
|
|
|
|
|
#region 客户资料表操作记录
|
|
|
- await GeneralMethod.NewClientOperationRecord(dto.PortType, OperationEnum.Download, dto.OperationUserId, 0, "excel导出");
|
|
|
+ var respose = JsonView(true, "成功", url);
|
|
|
+ var paramData = new
|
|
|
+ {
|
|
|
+ APIName = @"MarketCustomerResources/NewClientDataExcelDownload",
|
|
|
+ RequestParam = dto,
|
|
|
+ ResposeParam = respose
|
|
|
+ };
|
|
|
+
|
|
|
+ await GeneralMethod.NewClientOperationRecord(dto.PortType, OperationEnum.Download, dto.OperationUserId, 0, JsonConvert.SerializeObject(paramData));
|
|
|
#endregion
|
|
|
|
|
|
- return Ok(JsonView(true, "成功", url));
|
|
|
+ return Ok(respose);
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- return Ok(JsonView(false));
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ return Ok(JsonView(false));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|