|
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil; |
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|
|
import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
|
|
import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
import cn.hutool.poi.excel.ExcelUtil; |
|
|
import cn.hutool.poi.excel.ExcelUtil; |
|
|
import com.alibaba.excel.EasyExcel; |
|
|
import com.alibaba.excel.EasyExcel; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
@@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
|
import com.google.common.collect.Lists; |
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.basic.util.CollUtils; |
|
|
import com.ningdatech.basic.util.CollUtils; |
|
@@ -414,9 +416,9 @@ public class AnnualPlanLibManage { |
|
|
temp.setSheetName(new String[] {"实施类(新建)", "实施类(续建)"}); |
|
|
temp.setSheetName(new String[] {"实施类(新建)", "实施类(续建)"}); |
|
|
Map<String, Object> map = new HashMap<>(4); |
|
|
Map<String, Object> map = new HashMap<>(4); |
|
|
map.put("mapList", list); |
|
|
map.put("mapList", list); |
|
|
map.put("mapList1", null); |
|
|
|
|
|
|
|
|
map.put("mapList1", Lists.newArrayList()); |
|
|
Workbook workbook = ExcelExportUtil.exportExcel(temp, map); |
|
|
Workbook workbook = ExcelExportUtil.exportExcel(temp, map); |
|
|
if (workbook == null) { |
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(list)) { |
|
|
// 输出空模板 |
|
|
// 输出空模板 |
|
|
// 获取本地目录的年度计划编辑表空Excel模板 |
|
|
// 获取本地目录的年度计划编辑表空Excel模板 |
|
|
String emptyTemplate = "丽水市" + year + "年数字化项目年度计划编辑表(空)"; |
|
|
String emptyTemplate = "丽水市" + year + "年数字化项目年度计划编辑表(空)"; |
|
@@ -443,6 +445,9 @@ public class AnnualPlanLibManage { |
|
|
} |
|
|
} |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
if (workbook == null){ |
|
|
|
|
|
throw new BizException("读取编辑表模板失败!"); |
|
|
|
|
|
} |
|
|
// 重置响应对象 |
|
|
// 重置响应对象 |
|
|
response.reset(); |
|
|
response.reset(); |
|
|
try { |
|
|
try { |
|
|