|
@@ -254,7 +254,8 @@ public class ApiController extends BaseController {
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/exportUserReportExcel")
|
|
|
- public void exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto) {
|
|
|
+ @ResponseBody
|
|
|
+ public Object exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto) {
|
|
|
try {
|
|
|
Object object = sapCheckService.findUserReports(dto.getStartDate(), dto.getEndDate(), dto.getDepartId(),
|
|
|
dto.getName(), dto.getState(), null, null);
|
|
@@ -262,8 +263,10 @@ public class ApiController extends BaseController {
|
|
|
String haveFilePath = "/public/excel/userReport.xlsx";
|
|
|
String filePath = "/public/excel/userReport" + DateUtil.getTimeStamp() + ".xlsx";
|
|
|
ExcelExportUtil.exportExcelFile(getRootPath() + haveFilePath, dataList, getRootPath() + filePath, 1);
|
|
|
+ return ResultUtil.success(filePath, "操作成功");
|
|
|
} catch (Exception e) {
|
|
|
LoggerUtil.error(e);
|
|
|
+ return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
}
|
|
|
}
|
|
|
}
|