Commit 19b8f968 by zhangxingmin

push

parent 3c5620cf
package com.yd.csf.api.service.impl; package com.yd.csf.api.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yd.base.feign.client.exchangerate.ApiExchangeRateFeignClient; import com.yd.base.feign.client.exchangerate.ApiExchangeRateFeignClient;
...@@ -224,6 +225,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService { ...@@ -224,6 +225,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
public Result<ApiSalarySplitExportSummaryListResponse> export(ApiSalarySplitExportSummaryListRequest request) { public Result<ApiSalarySplitExportSummaryListResponse> export(ApiSalarySplitExportSummaryListRequest request) {
// 查询数据 // 查询数据
List<ApiSalarySplitSummaryPageDto> dataList = iSalarySplitService.summaryList(request); List<ApiSalarySplitSummaryPageDto> dataList = iSalarySplitService.summaryList(request);
log.info("导出-薪资拆分应发信息汇总列表:dataList,{}", JSON.toJSONString(dataList));
List<ApiSalarySplitSummaryExcelDto> excelDtoList = new ArrayList<>(); List<ApiSalarySplitSummaryExcelDto> excelDtoList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(dataList)) { if (CollectionUtils.isNotEmpty(dataList)) {
excelDtoList = dataList.stream().map(dto -> { excelDtoList = dataList.stream().map(dto -> {
...@@ -232,7 +234,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService { ...@@ -232,7 +234,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
return excelDto; return excelDto;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
log.info("导出-薪资拆分应发信息汇总列表:excelDtoList,{}", JSON.toJSONString(excelDtoList));
// 构建导出参数 // 构建导出参数
ExportParam exportParam = new ExportParam(); ExportParam exportParam = new ExportParam();
// 指定需要导出的字段(字段名必须与 DTO 中的属性名一致) // 指定需要导出的字段(字段名必须与 DTO 中的属性名一致)
...@@ -252,6 +254,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService { ...@@ -252,6 +254,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
exportRequest.setEntityClass(ApiSalarySplitSummaryExcelDto.class); exportRequest.setEntityClass(ApiSalarySplitSummaryExcelDto.class);
exportRequest.setExportParam(exportParam); exportRequest.setExportParam(exportParam);
log.info("导出-薪资拆分应发信息汇总列表:exportRequest,{}", JSON.toJSONString(exportRequest));
// 远程调用导出接口 // 远程调用导出接口
Result<ExportResult> result = apiExcelFeignClient.export(exportRequest); Result<ExportResult> result = apiExcelFeignClient.export(exportRequest);
if (result.getCode() != 200 || result.getData() == null) { if (result.getCode() != 200 || result.getData() == null) {
...@@ -263,6 +266,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService { ...@@ -263,6 +266,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
throw new BusinessException("导出失败:" + exportResult.getErrorMsg()); throw new BusinessException("导出失败:" + exportResult.getErrorMsg());
} }
log.info("导出-薪资拆分应发信息汇总列表:exportResult,{}", JSON.toJSONString(exportResult));
// 封装响应 // 封装响应
ApiSalarySplitExportSummaryListResponse response = new ApiSalarySplitExportSummaryListResponse(); ApiSalarySplitExportSummaryListResponse response = new ApiSalarySplitExportSummaryListResponse();
response.setUrl(exportResult.getOssUrl()); response.setUrl(exportResult.getOssUrl());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment