Commit 2487e795 authored by huyuchen's avatar huyuchen

实缴合并导出限制

parent a561c46b
...@@ -299,6 +299,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -299,6 +299,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
@Override @Override
public void sumSearchExport(HttpServletResponse response, TPaymentInfoSearchVo searchVo) { public void sumSearchExport(HttpServletResponse response, TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
String fileName = PaymentConstants.PAYMENT_SEARCH_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = PaymentConstants.PAYMENT_SEARCH_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表 //获取要导出的列表
List<TPaymentInfoNewExportVo> list = new ArrayList<>(); List<TPaymentInfoNewExportVo> list = new ArrayList<>();
...@@ -309,6 +310,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -309,6 +310,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
if (count > 150000 && !CommonConstants.ONE_STRING.equals(user.getId())) {
out.write("导出量过大,请选择更多查询条件!如果确定要导出这些数据请联系管理员操作".getBytes("GBK"));
out.close();
return;
}
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfoNewExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build(); ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfoNewExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0; int index = 0;
......
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