|
@ -16,12 +16,14 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp |
|
|
import org.apache.commons.beanutils.PropertyUtils; |
|
|
import org.apache.commons.beanutils.PropertyUtils; |
|
|
import org.apache.commons.io.IOUtils; |
|
|
import org.apache.commons.io.IOUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|
|
import org.apache.poi.ss.usermodel.Row; |
|
|
import org.apache.poi.ss.usermodel.Row; |
|
|
import org.apache.poi.ss.usermodel.Sheet; |
|
|
import org.apache.poi.ss.usermodel.Sheet; |
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
|
import org.apache.shiro.SecurityUtils; |
|
|
import org.apache.shiro.SecurityUtils; |
|
|
import org.jeecg.common.api.vo.Result; |
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
|
|
import org.jeecg.common.exception.JeecgBootException; |
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
import org.jeecg.common.util.DateUtils2; |
|
|
import org.jeecg.common.util.DateUtils2; |
|
@ -51,6 +53,7 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
|
|
import org.jeecgframework.poi.excel.entity.ExportParams; |
|
|
import org.jeecgframework.poi.excel.entity.ExportParams; |
|
|
import org.jeecgframework.poi.excel.entity.ImportParams; |
|
|
import org.jeecgframework.poi.excel.entity.ImportParams; |
|
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType; |
|
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType; |
|
|
|
|
|
import org.jeecgframework.poi.excel.entity.params.ExcelExportEntity; |
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
import org.jeecgframework.poi.excel.view.JeecgMapExcelView; |
|
|
import org.jeecgframework.poi.excel.view.JeecgMapExcelView; |
|
@ -207,6 +210,7 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo |
|
|
Map<String, String[]> parameterMap = request.getParameterMap(); |
|
|
Map<String, String[]> parameterMap = request.getParameterMap(); |
|
|
String[] clockStartTimes = parameterMap.get("clockStartTime"); |
|
|
String[] clockStartTimes = parameterMap.get("clockStartTime"); |
|
|
String[] userIds = parameterMap.get("userId"); |
|
|
String[] userIds = parameterMap.get("userId"); |
|
|
|
|
|
String[] projectIds = parameterMap.get("projectId"); |
|
|
|
|
|
|
|
|
// QueryWrapper<ClockinLog> queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap()); |
|
|
// QueryWrapper<ClockinLog> queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap()); |
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
@ -221,6 +225,27 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo |
|
|
queryChainWrapper.eq(ClockinTeamLog::getUserId,userIds[0]); |
|
|
queryChainWrapper.eq(ClockinTeamLog::getUserId,userIds[0]); |
|
|
} |
|
|
} |
|
|
List<ClockinTeamLog> clockinTeamLogs = queryChainWrapper.list(); |
|
|
List<ClockinTeamLog> clockinTeamLogs = queryChainWrapper.list(); |
|
|
|
|
|
if(projectIds!=null && projectIds.length!=0 && StringUtils.isNotBlank(projectIds[0])){ |
|
|
|
|
|
ClockInProject clockInProject = clockInProjectService.lambdaQuery() |
|
|
|
|
|
.eq(ClockInProject::getDelFlag, 0) |
|
|
|
|
|
.eq(ClockInProject::getId,projectIds[0]) |
|
|
|
|
|
.one(); |
|
|
|
|
|
if(clockInProject == null){ |
|
|
|
|
|
throw new JeecgBootException("项目错误"); |
|
|
|
|
|
} |
|
|
|
|
|
try { |
|
|
|
|
|
clockinTeamLogs = clockinTeamLogService.lambdaQuery() |
|
|
|
|
|
.eq(ClockinTeamLog::getDelFlag, 0) |
|
|
|
|
|
.eq(ClockinTeamLog::getTeamId, clockInProject.getTeamId()) |
|
|
|
|
|
.list(); |
|
|
|
|
|
// clockinTeamLogs.add(clockinTeamLog); |
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
throw new JeecgBootException("该项目可能存在两个团队绑定,请检查项目管理"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// int day = Integer.parseInt(DateUtils2.getNowMonthMaxDay()); |
|
|
// int day = Integer.parseInt(DateUtils2.getNowMonthMaxDay()); |
|
@ -235,7 +260,6 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo |
|
|
|
|
|
|
|
|
String yearMonthDay = ""; |
|
|
String yearMonthDay = ""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Step.2 获取导出数据 |
|
|
// Step.2 获取导出数据 |
|
|
// List<ClockinLog> pageList = service.list(queryWrapper); |
|
|
// List<ClockinLog> pageList = service.list(queryWrapper); |
|
|
// List<ClockinLog> exportList = null; |
|
|
// List<ClockinLog> exportList = null; |
|
@ -314,6 +338,7 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo |
|
|
mv.addObject(NormalExcelConstants.CLASS, clazz); |
|
|
mv.addObject(NormalExcelConstants.CLASS, clazz); |
|
|
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- |
|
|
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- |
|
|
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title); |
|
|
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title); |
|
|
|
|
|
|
|
|
// exportParams.setType(ExcelType.XSSF); |
|
|
// exportParams.setType(ExcelType.XSSF); |
|
|
exportParams.setImageBasePath(upLoadPath); |
|
|
exportParams.setImageBasePath(upLoadPath); |
|
|
|
|
|
|
|
@ -325,95 +350,170 @@ public class ClockinLogController extends JeecgController<ClockinLog, IClockinLo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected ModelAndView exportXls3(HttpServletRequest request, Class<ClockInLogExportResp2> clazz, String title) { |
|
|
|
|
|
|
|
|
protected ModelAndView exportXls3(HttpServletRequest request, Class<ClockInLogExportResp> clazz, String title) { |
|
|
// Step.1 组装查询条件 |
|
|
// Step.1 组装查询条件 |
|
|
Map<String, String[]> parameterMap = request.getParameterMap(); |
|
|
Map<String, String[]> parameterMap = request.getParameterMap(); |
|
|
String[] clockStartTimes = parameterMap.get("clockStartTime"); |
|
|
String[] clockStartTimes = parameterMap.get("clockStartTime"); |
|
|
String[] userIds = parameterMap.get("userId"); |
|
|
String[] userIds = parameterMap.get("userId"); |
|
|
|
|
|
String[] projectIds = parameterMap.get("projectId"); |
|
|
|
|
|
|
|
|
|
|
|
// QueryWrapper<ClockinLog> queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap()); |
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
LambdaQueryChainWrapper<ClockinTeamLog> queryChainWrapper = clockinTeamLogService.lambdaQuery() |
|
|
LambdaQueryChainWrapper<ClockinTeamLog> queryChainWrapper = clockinTeamLogService.lambdaQuery() |
|
|
.eq(ClockinTeamLog::getDelFlag, 0); |
|
|
.eq(ClockinTeamLog::getDelFlag, 0); |
|
|
|
|
|
|
|
|
if (userIds != null && userIds.length != 0 && StringUtils.isNotBlank(userIds[0])) { |
|
|
|
|
|
queryChainWrapper.eq(ClockinTeamLog::getUserId, userIds[0]); |
|
|
|
|
|
|
|
|
// List<ClockinTeamLog> clockinTeamLogs = clockinTeamLogService.lambdaQuery() |
|
|
|
|
|
// .eq(ClockinTeamLog::getDelFlag, 0) |
|
|
|
|
|
// .list(); |
|
|
|
|
|
|
|
|
|
|
|
if(userIds!=null && userIds.length!=0 && StringUtils.isNotBlank(userIds[0])){ |
|
|
|
|
|
queryChainWrapper.eq(ClockinTeamLog::getUserId,userIds[0]); |
|
|
} |
|
|
} |
|
|
List<ClockinTeamLog> clockinTeamLogs = queryChainWrapper.list(); |
|
|
List<ClockinTeamLog> clockinTeamLogs = queryChainWrapper.list(); |
|
|
|
|
|
if(projectIds!=null && projectIds.length!=0 && StringUtils.isNotBlank(projectIds[0])){ |
|
|
|
|
|
ClockInProject clockInProject = clockInProjectService.lambdaQuery() |
|
|
|
|
|
.eq(ClockInProject::getDelFlag, 0) |
|
|
|
|
|
.eq(ClockInProject::getId,projectIds[0]) |
|
|
|
|
|
.one(); |
|
|
|
|
|
if(clockInProject == null){ |
|
|
|
|
|
throw new JeecgBootException("项目错误"); |
|
|
|
|
|
} |
|
|
|
|
|
try { |
|
|
|
|
|
clockinTeamLogs = clockinTeamLogService.lambdaQuery() |
|
|
|
|
|
.eq(ClockinTeamLog::getDelFlag, 0) |
|
|
|
|
|
.eq(ClockinTeamLog::getTeamId, clockInProject.getTeamId()) |
|
|
|
|
|
.list(); |
|
|
|
|
|
// clockinTeamLogs.add(clockinTeamLog); |
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
throw new JeecgBootException("该项目可能存在两个团队绑定,请检查项目管理"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> maps = new ArrayList<>(); |
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
List<ExcelExportEntity> entity = new ArrayList<ExcelExportEntity>(); |
|
|
|
|
|
ExcelExportEntity excelExportEntity = new ExcelExportEntity("姓名", "name"); |
|
|
|
|
|
excelExportEntity.setNeedMerge(true); |
|
|
|
|
|
|
|
|
|
|
|
ExcelExportEntity excelExportEntity1 = new ExcelExportEntity("性别", "sex"); |
|
|
|
|
|
excelExportEntity1.setNeedMerge(true); |
|
|
|
|
|
|
|
|
|
|
|
ExcelExportEntity excelExportEntity2 = new ExcelExportEntity("数据", "list"); |
|
|
|
|
|
excelExportEntity2.setNeedMerge(true); |
|
|
|
|
|
|
|
|
// 确定导出月份 |
|
|
|
|
|
|
|
|
entity.add(excelExportEntity); |
|
|
|
|
|
entity.add(excelExportEntity1); |
|
|
|
|
|
entity.add(excelExportEntity2); |
|
|
|
|
|
|
|
|
|
|
|
// int day = Integer.parseInt(DateUtils2.getNowMonthMaxDay()); |
|
|
String nowYearMonth = DateUtils2.getNowYearMonth(); |
|
|
String nowYearMonth = DateUtils2.getNowYearMonth(); |
|
|
if (clockStartTimes != null && clockStartTimes.length != 0 && StringUtils.isNotBlank(clockStartTimes[0])) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(clockStartTimes!=null && clockStartTimes.length!=0 && StringUtils.isNotBlank(clockStartTimes[0])){ |
|
|
nowYearMonth = clockStartTimes[0]; |
|
|
nowYearMonth = clockStartTimes[0]; |
|
|
} |
|
|
} |
|
|
YearMonth yearMonth = YearMonth.parse(nowYearMonth); |
|
|
YearMonth yearMonth = YearMonth.parse(nowYearMonth); |
|
|
int daysInMonth = yearMonth.lengthOfMonth(); // 当前月份的天数 |
|
|
|
|
|
|
|
|
int day = yearMonth.lengthOfMonth(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String yearMonthDay = ""; |
|
|
|
|
|
|
|
|
// Step.2 获取导出数据 |
|
|
// Step.2 获取导出数据 |
|
|
List<Map<String, Object>> exportList = new ArrayList<>(); |
|
|
|
|
|
for (ClockinTeamLog clockinTeamLog : clockinTeamLogs) { |
|
|
|
|
|
|
|
|
// List<ClockinLog> pageList = service.list(queryWrapper); |
|
|
|
|
|
// List<ClockinLog> exportList = null; |
|
|
|
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
|
|
|
List<String> strings = null; |
|
|
|
|
|
List<ClockInLogExportResp> exportList = new ArrayList<>(); |
|
|
|
|
|
for (ClockinTeamLog clockinTeamLog:clockinTeamLogs){ |
|
|
ClockInProject clockInProject = clockInProjectService.lambdaQuery() |
|
|
ClockInProject clockInProject = clockInProjectService.lambdaQuery() |
|
|
.eq(ClockInProject::getDelFlag, 0) |
|
|
.eq(ClockInProject::getDelFlag, 0) |
|
|
.eq(ClockInProject::getTeamId, clockinTeamLog.getTeamId()) |
|
|
.eq(ClockInProject::getTeamId, clockinTeamLog.getTeamId()) |
|
|
.one(); |
|
|
.one(); |
|
|
|
|
|
|
|
|
|
|
|
if(clockInProject == null){ |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
ClockinAuth clockinAuth = clockinAuthService.lambdaQuery() |
|
|
ClockinAuth clockinAuth = clockinAuthService.lambdaQuery() |
|
|
.eq(ClockinAuth::getDelFlag, 0) |
|
|
.eq(ClockinAuth::getDelFlag, 0) |
|
|
.eq(ClockinAuth::getUserId, clockinTeamLog.getUserId()) |
|
|
.eq(ClockinAuth::getUserId, clockinTeamLog.getUserId()) |
|
|
.one(); |
|
|
.one(); |
|
|
if (clockinAuth == null) { |
|
|
|
|
|
|
|
|
if(clockinAuth == null){ |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
List<ClockInLogExportResp2> clockInLogExportResp2s = new ArrayList<>(); |
|
|
|
|
|
ClockInLogExportResp clockInLogExportResp = new ClockInLogExportResp(); |
|
|
|
|
|
clockInLogExportResp.setName(clockinAuth.getName()); |
|
|
|
|
|
clockInLogExportResp.setDate(nowYearMonth); |
|
|
|
|
|
map.put("name",clockinAuth.getName()); |
|
|
|
|
|
map.put("sex",nowYearMonth); |
|
|
|
|
|
List<Map<String, Object>> maps1 = new ArrayList<>(); |
|
|
|
|
|
for (int n= 1;n<=day;n++){ |
|
|
|
|
|
ClockInLogExportResp2 clockInLogExportResp2 = new ClockInLogExportResp2(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clockInLogExportResp2.setDay(n+""); |
|
|
|
|
|
yearMonthDay = nowYearMonth+"-"+n; |
|
|
|
|
|
if(n < 10){ |
|
|
|
|
|
yearMonthDay = nowYearMonth+"-0"+n; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 初始化记录,包含“姓名”和每日打卡记录 |
|
|
|
|
|
Map<String, Object> record = new LinkedHashMap<>(); |
|
|
|
|
|
record.put("name", clockinAuth.getName()); |
|
|
|
|
|
record.put("date", nowYearMonth); |
|
|
|
|
|
|
|
|
|
|
|
for (int day = 1; day <= daysInMonth; day++) { |
|
|
|
|
|
String yearMonthDay = nowYearMonth + "-" + (day < 10 ? "0" + day : day); |
|
|
|
|
|
Date date = DateUtils2.getDate(yearMonthDay + " 23:59:59"); |
|
|
Date date = DateUtils2.getDate(yearMonthDay + " 23:59:59"); |
|
|
LocalDateTime localDateTime = DateUtils2.dateToDateTime(date); |
|
|
LocalDateTime localDateTime = DateUtils2.dateToDateTime(date); |
|
|
Integer type = 0; |
|
|
Integer type = 0; |
|
|
if(DayOfWeek.SATURDAY.equals(localDateTime.getDayOfWeek()) || DayOfWeek.SUNDAY.equals(localDateTime.getDayOfWeek())){ |
|
|
if(DayOfWeek.SATURDAY.equals(localDateTime.getDayOfWeek()) || DayOfWeek.SUNDAY.equals(localDateTime.getDayOfWeek())){ |
|
|
type = 1; |
|
|
type = 1; |
|
|
} |
|
|
} |
|
|
List<ClockInLogResp> clockInLogs = clockinLogMapper.getClockInLogExpeort( |
|
|
|
|
|
yearMonthDay, clockInProject.getId(), clockinTeamLog.getUserId(),type |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// 拼接打卡时间或标记“缺卡” |
|
|
|
|
|
StringBuilder clockInTime = new StringBuilder(); |
|
|
|
|
|
for (ClockInLogResp log : clockInLogs) { |
|
|
|
|
|
if (StringUtils.isBlank(log.getTime())) { |
|
|
|
|
|
log.setClockStartTime("缺卡"); |
|
|
|
|
|
} |
|
|
|
|
|
if (clockInTime.length() > 0) { |
|
|
|
|
|
clockInTime.append("\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ClockInLogResp> clockInLogExpeort = clockinLogMapper.getClockInLogExpeort(yearMonthDay, clockInProject.getId(), clockinTeamLog.getUserId(),type); |
|
|
|
|
|
String clockInTime = ""; |
|
|
|
|
|
for (ClockInLogResp clockInLogResp:clockInLogExpeort) { |
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isBlank(clockInLogResp.getTime())){ |
|
|
|
|
|
clockInLogResp.setClockStartTime("缺卡"); |
|
|
} |
|
|
} |
|
|
clockInTime.append(log.getClockStartTime()); |
|
|
|
|
|
|
|
|
clockInTime = clockInTime+"\n"+clockInLogResp.getClockStartTime(); |
|
|
|
|
|
// strings.add(clockInLogResp.getClockStartTime()); |
|
|
} |
|
|
} |
|
|
record.put(day + "号", clockInTime.length() > 0 ? clockInTime.toString() : "缺卡"); |
|
|
|
|
|
|
|
|
Map<String, Object> map1 = new HashMap<>(); |
|
|
|
|
|
map1.put(n+"",clockInTime); |
|
|
|
|
|
maps1.add(map1); |
|
|
|
|
|
clockInLogExportResp2.setClockInTime(clockInTime); |
|
|
|
|
|
clockInLogExportResp2s.add(clockInLogExportResp2); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
exportList.add(record); |
|
|
|
|
|
|
|
|
map.put("list",maps1); |
|
|
|
|
|
maps.add(map); |
|
|
|
|
|
clockInLogExportResp.setClockInLogExportResp2s(clockInLogExportResp2s); |
|
|
|
|
|
exportList.add(clockInLogExportResp); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Step.3 动态表头生成 |
|
|
|
|
|
List<String> headers = new ArrayList<>(); |
|
|
|
|
|
headers.add("姓名"); |
|
|
|
|
|
headers.add("日期"); |
|
|
|
|
|
for (int i = 1; i <= daysInMonth; i++) { |
|
|
|
|
|
headers.add(i + "号"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Step.4 AutoPoi 导出Excel |
|
|
|
|
|
ModelAndView mv = new ModelAndView(new JeecgMapExcelView()); |
|
|
|
|
|
|
|
|
// 过滤选中数据 |
|
|
|
|
|
// String selections = request.getParameter("selections"); |
|
|
|
|
|
// if (oConvertUtils.isNotEmpty(selections)) { |
|
|
|
|
|
// List<String> selectionList = Arrays.asList(selections.split(",")); |
|
|
|
|
|
// exportList = pageList.stream().filter(item -> selectionList.contains(getId(item))).collect(Collectors.toList()); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// exportList = pageList; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// Step.3 AutoPoi 导出Excel |
|
|
|
|
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
|
|
|
|
|
//此处设置的filename无效 ,前端会重更新设置一下 |
|
|
|
|
|
|
|
|
mv.addObject(NormalExcelConstants.FILE_NAME, title); |
|
|
mv.addObject(NormalExcelConstants.FILE_NAME, title); |
|
|
// mv.addObject(NormalExcelConstants.CLASS, clazz); |
|
|
|
|
|
ExportParams exportParams = new ExportParams( |
|
|
|
|
|
title + "报表", "导出人:" + sysUser.getRealname(), title); |
|
|
|
|
|
// exportParams.setExclusions(headers.toArray(new String[0])); // 设置表头排除无用列 |
|
|
|
|
|
mv.addObject(NormalExcelConstants.PARAMS, exportParams); |
|
|
|
|
|
mv.addObject(NormalExcelConstants.MAP_LIST, exportList); |
|
|
|
|
|
|
|
|
mv.addObject(NormalExcelConstants.CLASS, entity.getClass()); |
|
|
|
|
|
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- |
|
|
|
|
|
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title); |
|
|
|
|
|
|
|
|
|
|
|
// exportParams.setType(ExcelType.XSSF); |
|
|
|
|
|
exportParams.setImageBasePath(upLoadPath); |
|
|
|
|
|
|
|
|
|
|
|
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- |
|
|
|
|
|
mv.addObject(NormalExcelConstants.PARAMS,exportParams); |
|
|
|
|
|
mv.addObject(NormalExcelConstants.DATA_LIST, maps); |
|
|
return mv; |
|
|
return mv; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|