|
|
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil; |
|
|
|
import com.alibaba.excel.EasyExcelFactory; |
|
|
|
import com.alibaba.excel.ExcelWriter; |
|
|
|
import com.alibaba.excel.write.metadata.WriteSheet; |
|
|
|
import com.qtzl.alterSales.config.ReportExcelConfig; |
|
|
|
import com.qtzl.alterSales.dao.entity.second.AflMchStatistics; |
|
|
|
import com.qtzl.alterSales.dao.excelVO.enums.ReportEnum; |
|
|
|
import com.qtzl.alterSales.dao.excelVO.enums.ReportExportDataEnum; |
|
|
@@ -57,6 +58,9 @@ public class AflReportExportServiceImpl implements AflReportExportService { |
|
|
|
private ConstantConfig constantConfig; |
|
|
|
@Resource |
|
|
|
private RedisUtils redisUtils; |
|
|
|
@Resource |
|
|
|
private ReportExcelConfig reportExcelConfig; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@@ -99,7 +103,7 @@ public class AflReportExportServiceImpl implements AflReportExportService { |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException(e.getMessage()); |
|
|
|
} finally { |
|
|
|
threadLocalDataQueue.remove(); |
|
|
|
if(file != null && blnDeleteFile) { |
|
|
|
if(file != null && reportExcelConfig.getBlnDeleteFile()) { |
|
|
|
try { |
|
|
|
Files.delete(file.toPath()); |
|
|
|
} catch (IOException e) { |
|
|
@@ -128,7 +132,7 @@ public class AflReportExportServiceImpl implements AflReportExportService { |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException(e.getMessage()); |
|
|
|
} finally { |
|
|
|
threadLocalDataQueue.remove(); |
|
|
|
if(file != null && blnDeleteFile) { |
|
|
|
if(file != null && reportExcelConfig.getBlnDeleteFile()) { |
|
|
|
try { |
|
|
|
// 删除本地临时文件 |
|
|
|
Files.delete(file.toPath()); |