去除autopoi,引入easypoi

This commit is contained in:
lixuetao
2023-11-17 23:35:42 +08:00
parent 95e52713fe
commit b84fded287
87 changed files with 355 additions and 436 deletions
@@ -2,7 +2,7 @@ package com.jero.modules.message.entity;
import com.jero.common.aspect.annotation.Dict;
import com.jero.common.system.base.entity.JeroEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -1,7 +1,7 @@
package com.jero.modules.message.entity;
import com.jero.common.system.base.entity.JeroEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -5,7 +5,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.jero.common.system.base.entity.JeroEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
@Data
@TableName("oss_file")
@@ -16,11 +16,11 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
@@ -204,7 +204,7 @@ public class QuartzJobController {
// Step.1 组装查询条件
QueryWrapper<QuartzJob> queryWrapper = QueryGenerator.initQueryWrapper(quartzJob, request.getParameterMap());
// Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
List<QuartzJob> pageList = quartzJobService.list(queryWrapper);
// 导出文件名称
mv.addObject(JeroController.FILE_NAME, "定时任务列表");
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -52,7 +52,7 @@ public class QuartzJob implements Serializable {
@Excel(name="描述",width=40)
private java.lang.String description;
/**状态 0正常 -1停止*/
@Excel(name="状态",width=15,dicCode="quartz_status")
@Excel(name="状态",width=15, dict="quartz_status")
@Dict(dicCode = "quartz_status")
private java.lang.Integer status;
@@ -19,11 +19,11 @@ import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -189,7 +189,7 @@ public class SysCategoryController {
QueryWrapper<SysCategory> queryWrapper = QueryGenerator.initQueryWrapper(sysCategory, request.getParameterMap());
List<SysCategory> pageList = sysCategoryService.list(queryWrapper);
// Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
// 过滤选中数据
String selections = request.getParameter("selections");
if(oConvertUtils.isEmpty(selections)) {
@@ -25,11 +25,11 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.data.redis.core.RedisTemplate;
@@ -315,7 +315,7 @@ public class SysDepartController {
// Step.1 组装查询条件
QueryWrapper<SysDepart> queryWrapper = QueryGenerator.initQueryWrapper(sysDepart, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
List<SysDepart> pageList = sysDepartService.list(queryWrapper);
//按字典排序
Collections.sort(pageList,(SysDepart arg0, SysDepart arg1)-> arg0.getOrgCode().compareTo(arg1.getOrgCode()));
@@ -32,12 +32,11 @@ import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
@@ -440,14 +439,14 @@ public class SysDictController {
// Step.1 组装查询条件
QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
List<SysDictPage> pageList = new ArrayList<>();
List<SysDict> sysDictList = sysDictService.list(queryWrapper);
for (SysDict dictMain : sysDictList) {
SysDictPage vo = new SysDictPage();
BeanUtils.copyProperties(dictMain, vo);
// 查询机票
// 查询子列表
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByMainId(dictMain.getId());
vo.setSysDictItemList(sysDictItemList);
pageList.add(vo);
@@ -478,11 +477,6 @@ public class SysDictController {
params.setHeadRows(2);
params.setNeedSave(true);
try {
//导入Excel格式校验,看匹配的字段文本概率
Boolean t = ExcelImportCheckUtil.check(file.getInputStream(), SysDictPage.class, params);
if(Boolean.FALSE.equals(t)){
throw new JeroBootException("导入Excel校验失败 ");
}
List<SysDictPage> list = ExcelImportUtil.importExcel(file.getInputStream(), SysDictPage.class, params);
// 错误信息
List<String> errorMessage = new ArrayList<>();
@@ -28,10 +28,10 @@ import com.jero.modules.system.service.ISysPermissionDataRuleService;
import com.jero.modules.system.service.ISysPermissionService;
import com.jero.modules.system.service.ISysRolePermissionService;
import com.jero.modules.system.service.ISysRoleService;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -238,7 +238,7 @@ public class SysRoleController {
// Step.1 组装查询条件
QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(sysRole, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
List<SysRole> pageList = sysRoleService.list(queryWrapper);
//导出文件名称
mv.addObject(JeroController.FILE_NAME,"角色列表");
@@ -13,11 +13,11 @@ import com.jero.modules.system.service.ISysUserAgentService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@@ -186,14 +186,13 @@ public class SysUserAgentController {
// Step.1 组装查询条件
QueryWrapper<SysUserAgent> queryWrapper = QueryGenerator.initQueryWrapper(sysUserAgent, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
List<SysUserAgent> pageList = sysUserAgentService.list(queryWrapper);
//导出文件名称
mv.addObject(JeroController.FILE_NAME, "用户代理人设置列表");
mv.addObject(JeroController.CLASS, SysUserAgent.class);
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
ExportParams exportParams = new ExportParams("用户代理人设置列表数据", "导出人:"+user.getRealname(), "导出信息");
exportParams.setImageBasePath(upLoadPath);
mv.addObject(JeroController.PARAMS, exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
@@ -40,11 +40,11 @@ import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -516,7 +516,7 @@ public class SysUserController {
// Step.1 组装查询条件
QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(sysUser, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
//update-begin--Author:kangxiaolin Date:20180825 for[03]用户导出,如果选择数据则只导出相关数据--------------------
String selections = request.getParameter("selections");
if(!oConvertUtils.isEmpty(selections)){
@@ -534,7 +534,6 @@ public class SysUserController {
mv.addObject(JeroController.CLASS, SysUser.class);
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
ExportParams exportParams = new ExportParams("用户列表数据", "导出人:"+user.getRealname(), "导出信息");
exportParams.setImageBasePath(upLoadPath);
mv.addObject(JeroController.PARAMS, exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -58,26 +58,26 @@ public class SysAnnouncement implements Serializable {
/**
* 优先级(L低,M中,H高)
*/
@Excel(name = "优先级", width = 15, dicCode = "priority")
@Excel(name = "优先级", width = 15, dict = "priority")
@Dict(dicCode = "priority")
private java.lang.String priority;
/**
* 消息类型1:通知公告2:系统消息
*/
@Excel(name = "消息类型", width = 15, dicCode = "msg_category")
@Excel(name = "消息类型", width = 15, dict = "msg_category")
@Dict(dicCode = "msg_category")
private java.lang.String msgCategory;
/**
* 通告对象类型(USER:指定用户,ALL:全体用户)
*/
@Excel(name = "通告对象类型", width = 15, dicCode = "msg_type")
@Excel(name = "通告对象类型", width = 15, dict = "msg_type")
@Dict(dicCode = "msg_type")
private java.lang.String msgType;
/**
* 发布状态(0未发布,1已发布,2已撤销)
*/
@Excel(name = "发布状态", width = 15, dicCode = "send_status")
@Excel(name = "发布状态", width = 15, dict = "send_status")
@Dict(dicCode = "send_status")
private java.lang.String sendStatus;
/**
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -10,7 +10,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.jero.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
@@ -54,7 +54,7 @@ public class SysDataSource {
* 数据库类型
*/
@Dict(dicCode = "database_type")
@Excel(name = "数据库类型", width = 15, dicCode = "database_type")
@Excel(name = "数据库类型", width = 15, dict = "database_type")
@ApiModelProperty(value = "数据库类型")
private java.lang.String dbType;
/**
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.jero.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -46,7 +46,7 @@ public class SysDepart implements Serializable {
@Excel(name="描述",width=15)
private String description;
/**机构类别 1公司,2组织机构,2岗位*/
@Excel(name="机构类别",width=15,dicCode="org_category")
@Excel(name="机构类别",width=15, dict="org_category")
private String orgCategory;
/**机构类型*/
private String orgType;
@@ -8,7 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
/**
* @Description: 部门权限表
@@ -6,7 +6,7 @@ import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.io.Serializable;
import java.util.Date;
@@ -7,7 +7,7 @@ import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.io.Serializable;
import java.util.Date;
@@ -65,7 +65,7 @@ public class SysDictItemCore implements Serializable {
/**
* 排序
*/
@Excel(name = "排序", width = 15,type=4)
@Excel(name = "排序", width = 15, type=4)
private Integer sortOrder;
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
@@ -10,7 +10,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.jero.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -8,7 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
/**
* @Description: 第三方登录账号表
@@ -10,7 +10,7 @@ import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -78,7 +78,7 @@ public class SysUser implements Serializable {
/**
* 性别(1:男 2:女)
*/
@Excel(name = "性别", width = 15,dicCode="sex")
@Excel(name = "性别", width = 15, dict="sex")
@Dict(dicCode = "sex")
private Integer sex;
@@ -108,14 +108,14 @@ public class SysUser implements Serializable {
/**
* 状态(1:正常 2:冻结 )
*/
@Excel(name = "状态", width = 15,dicCode="user_status")
@Excel(name = "状态", width = 15, dict="user_status")
@Dict(dicCode = "user_status")
private Integer status;
/**
* 删除状态(0,正常,1已删除)
*/
@Excel(name = "删除状态", width = 15,dicCode="del_flag")
@Excel(name = "删除状态", width = 15, dict="del_flag")
@TableLogic
private Integer delFlag;
@@ -164,7 +164,7 @@ public class SysUser implements Serializable {
/**
* 负责部门
*/
@Excel(name="负责部门",width = 15,dictTable ="sys_depart",dicText = "depart_name",dicCode = "id")
@Excel(name="负责部门",width = 15, dict ="sys_depart,depart_name,id")
@Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id")
private String departIds;
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -5,7 +5,7 @@ import com.jero.common.api.vo.Results;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.system.entity.SysRole;
import org.apache.poi.ss.formula.functions.T;
import org.jeecgframework.poi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import org.springframework.web.multipart.MultipartFile;
/**
@@ -1,26 +1,26 @@
package com.jero.modules.system.service.impl;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.util.CommonUtils;
import org.jeecgframework.poi.excel.imports.base.ImportFileServiceI;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
/**
* excel导入 实现类
*/
@Slf4j
@Service
public class ImportFileServiceImpl implements ImportFileServiceI {
@Value("${jero.path.upload}")
private String upLoadPath;
@Value(value="${jero.uploadType}")
private String uploadType;
@Override
public String doUpload(byte[] data) {
return CommonUtils.uploadOnlineImage(data, upLoadPath, "import", uploadType);
}
}
//package com.jero.modules.system.service.impl;
//
//import lombok.extern.slf4j.Slf4j;
//import com.jero.common.util.CommonUtils;
//import cn.afterturn.easypoi.excel.imports.base.ImportFileServiceI;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//
///**
// * excel导入 实现类
// */
//@Slf4j
//@Service
//public class ImportFileServiceImpl implements ImportFileServiceI {
//
// @Value("${jero.path.upload}")
// private String upLoadPath;
//
// @Value(value="${jero.uploadType}")
// private String uploadType;
//
// @Override
// public String doUpload(byte[] data) {
// return CommonUtils.uploadOnlineImage(data, upLoadPath, "import", uploadType);
// }
//}
@@ -9,8 +9,8 @@ import com.jero.modules.system.entity.SysRole;
import com.jero.modules.system.mapper.SysRoleMapper;
import com.jero.modules.system.mapper.SysUserMapper;
import com.jero.modules.system.service.ISysRoleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -2,8 +2,8 @@ package com.jero.modules.system.vo;
import lombok.Data;
import com.jero.modules.system.entity.SysDictItem;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import java.util.List;
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -12,11 +12,11 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import com.jero.common.api.vo.Results;
@@ -230,7 +230,7 @@ public class ${entityName}Controller {
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${tableVo.ftlDescription}列表");
mv.addObject(NormalExcelConstants.CLASS, ${entityName}Page.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${tableVo.ftlDescription}数据", "导出人:"+sysUser.getRealname(), "${tableVo.ftlDescription}"));
@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.UnsupportedEncodingException;
@@ -6,9 +6,9 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
import ${bussiPackage}.${entityPackage}.entity.${sub.entityName};
</#list>
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -20,11 +20,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -27,11 +27,11 @@ import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
import org.apache.shiro.SecurityUtils;
import com.jero.common.system.vo.LoginUser;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.io.IOException;
@@ -250,7 +250,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
}
// Step.3 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${sub.ftlDescription}"); //此处设置的filename无效 ,前端会重更新设置一下
mv.addObject(NormalExcelConstants.CLASS, ${sub.entityName}.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${sub.ftlDescription}报表", "导出人:" + sysUser.getRealname(), "${sub.ftlDescription}"));
@@ -6,7 +6,7 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@@ -10,7 +10,7 @@ import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -12,11 +12,11 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import com.jero.common.api.vo.Results;
@@ -225,7 +225,7 @@ public class ${entityName}Controller {
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${tableVo.ftlDescription}列表");
mv.addObject(NormalExcelConstants.CLASS, ${entityName}Page.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${tableVo.ftlDescription}数据", "导出人:"+sysUser.getRealname(), "${tableVo.ftlDescription}"));
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
@@ -6,9 +6,9 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
import ${bussiPackage}.${entityPackage}.entity.${sub.entityName};
</#list>
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -12,11 +12,11 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import com.jero.common.api.vo.Results;
@@ -230,7 +230,7 @@ public class ${entityName}Controller {
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${tableVo.ftlDescription}列表");
mv.addObject(NormalExcelConstants.CLASS, ${entityName}Page.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${tableVo.ftlDescription}数据", "导出人:"+sysUser.getRealname(), "${tableVo.ftlDescription}"));
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -6,9 +6,9 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
import ${bussiPackage}.${entityPackage}.entity.${sub.entityName};
</#list>
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -12,11 +12,11 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import com.jero.common.api.vo.Results;
@@ -221,7 +221,7 @@ public class ${entityName}Controller {
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${tableVo.ftlDescription}列表");
mv.addObject(NormalExcelConstants.CLASS, ${entityName}Page.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${tableVo.ftlDescription}数据", "导出人:"+sysUser.getRealname(), "${tableVo.ftlDescription}"));
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -6,9 +6,9 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
import ${bussiPackage}.${entityPackage}.entity.${sub.entityName};
</#list>
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -18,11 +18,11 @@ import java.util.Date;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
/**
* @Description: ${tableVo.ftlDescription}
@@ -22,11 +22,11 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -8,7 +8,7 @@ import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -12,11 +12,11 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.api.vo.Results;
import com.jero.common.system.query.QueryGenerator;
@@ -200,7 +200,7 @@ public class ${entityName}Controller {
pageList.add(vo);
}
//Step.3 调用AutoPoi导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${tableVo.ftlDescription}");
mv.addObject(NormalExcelConstants.CLASS, ${entityName}Page.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${tableVo.ftlDescription}数据", "导出人:"+sysUser.getRealname(), "${tableVo.ftlDescription}"));
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -6,8 +6,8 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
import ${bussiPackage}.${entityPackage}.entity.${sub.entityName};
</#list>
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -11,11 +11,11 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.view.EasypoiSingleExcelView;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.api.vo.Results;
import com.jero.common.system.query.QueryGenerator;
@@ -288,7 +288,7 @@ ${sub.entityName?uncap_first}.get${key}()!=null<#rt/>
pageList.add(vo);
}
//Step.3 调用AutoPoi导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
ModelAndView mv = new ModelAndView(new EasypoiSingleExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "${tableVo.ftlDescription}");
mv.addObject(NormalExcelConstants.CLASS, ${entityName}Page.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("${tableVo.ftlDescription}数据", "导出人:"+sysUser.getRealname(), "${tableVo.ftlDescription}"));
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -6,8 +6,8 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
import ${bussiPackage}.${entityPackage}.entity.${sub.entityName};
</#list>
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModel;