EmployeeController.java 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. package jnpf.controller;
  2. import cn.afterturn.easypoi.excel.ExcelExportUtil;
  3. import cn.afterturn.easypoi.excel.entity.ExportParams;
  4. import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
  5. import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
  6. import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
  7. import com.alibaba.fastjson.JSON;
  8. import com.alibaba.fastjson.JSONObject;
  9. import io.swagger.v3.oas.annotations.tags.Tag;
  10. import io.swagger.v3.oas.annotations.Parameter;
  11. import io.swagger.v3.oas.annotations.Parameters;
  12. import io.swagger.v3.oas.annotations.Operation;
  13. import jnpf.base.ActionResult;
  14. import jnpf.base.controller.SuperController;
  15. import jnpf.base.vo.DownloadVO;
  16. import jnpf.base.vo.PageListVO;
  17. import jnpf.base.vo.PaginationVO;
  18. import jnpf.config.ConfigValueUtil;
  19. import jnpf.constant.FileTypeConstant;
  20. import jnpf.constant.MsgCode;
  21. import jnpf.entity.EmployeeEntity;
  22. import jnpf.entity.FileParameter;
  23. import jnpf.exception.DataException;
  24. import jnpf.exception.ImportException;
  25. import jnpf.model.EmployeeModel;
  26. import jnpf.model.employee.*;
  27. import jnpf.service.EmployeeService;
  28. import jnpf.util.*;
  29. import lombok.Cleanup;
  30. import lombok.extern.slf4j.Slf4j;
  31. import jnpf.util.JsonUtil;
  32. import jnpf.util.JsonUtilEx;
  33. import org.apache.poi.hssf.usermodel.HSSFWorkbook;
  34. import org.apache.poi.ss.usermodel.Workbook;
  35. import org.dromara.x.file.storage.core.FileInfo;
  36. import org.springframework.beans.factory.annotation.Autowired;
  37. import org.springframework.web.bind.annotation.*;
  38. import org.springframework.web.multipart.MultipartFile;
  39. import jakarta.validation.Valid;
  40. import java.io.ByteArrayInputStream;
  41. import java.io.FileOutputStream;
  42. import java.io.InputStream;
  43. import java.text.SimpleDateFormat;
  44. import java.util.ArrayList;
  45. import java.util.HashMap;
  46. import java.util.List;
  47. import java.util.Map;
  48. import java.util.concurrent.atomic.AtomicReference;
  49. /**
  50. * 职员信息
  51. *
  52. * @author JNPF开发平台组
  53. * @version V3.1.0
  54. * @copyright 引迈信息技术有限公司
  55. */
  56. @Slf4j
  57. @Tag(name = "职员信息", description = "Employee")
  58. @RestController
  59. @RequestMapping("/api/extend/Employee")
  60. public class EmployeeController extends SuperController<EmployeeService, EmployeeEntity> {
  61. @Autowired
  62. private EmployeeService employeeService;
  63. @Autowired
  64. private ConfigValueUtil configValueUtil;
  65. /**
  66. * 列表(忽略验证Token)
  67. *
  68. * @param paginationEmployee 分页模型
  69. * @return
  70. */
  71. @Operation(summary = "获取职员列表")
  72. @GetMapping
  73. public ActionResult<PageListVO<EmployeeListVO>> getList(PaginationEmployee paginationEmployee) {
  74. List<EmployeeEntity> data = employeeService.getList(paginationEmployee);
  75. List<EmployeeListVO> list = JsonUtil.getJsonToList(data, EmployeeListVO.class);
  76. PaginationVO paginationVO = JsonUtil.getJsonToBean(paginationEmployee, PaginationVO.class);
  77. return ActionResult.page(list, paginationVO);
  78. }
  79. /**
  80. * 信息
  81. *
  82. * @param id 主键
  83. * @return
  84. */
  85. @Operation(summary = "获取职员信息")
  86. @GetMapping("/{id}")
  87. @Parameters({
  88. @Parameter(name = "id", description = "主键", required = true),
  89. })
  90. public ActionResult<EmployeeInfoVO> info(@PathVariable("id") String id) throws DataException {
  91. EmployeeEntity entity = employeeService.getInfo(id);
  92. EmployeeInfoVO vo = JsonUtilEx.getJsonToBeanEx(entity, EmployeeInfoVO.class);
  93. return ActionResult.success(vo);
  94. }
  95. /**
  96. * 新建
  97. *
  98. * @param employeeCrForm 职工模型
  99. * @return
  100. */
  101. @Operation(summary = "app添加职员信息")
  102. @PostMapping
  103. @Parameters({
  104. @Parameter(name = "employeeCrForm", description = "职工模型", required = true),
  105. })
  106. public ActionResult create(@RequestBody @Valid EmployeeCrForm employeeCrForm) {
  107. EmployeeEntity entity = JsonUtil.getJsonToBean(employeeCrForm, EmployeeEntity.class);
  108. employeeService.create(entity);
  109. return ActionResult.success(MsgCode.SU001.get());
  110. }
  111. /**
  112. * 更新
  113. *
  114. * @param id 主键
  115. * @param employeeUpForm 职工模型
  116. * @return
  117. */
  118. @Operation(summary = "app修改职员信息")
  119. @PutMapping("/{id}")
  120. @Parameters({
  121. @Parameter(name = "id", description = "主键", required = true),
  122. @Parameter(name = "employeeUpForm", description = "职工模型", required = true),
  123. })
  124. public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid EmployeeUpForm employeeUpForm) {
  125. EmployeeEntity entity = JsonUtil.getJsonToBean(employeeUpForm, EmployeeEntity.class);
  126. employeeService.update(id, entity);
  127. return ActionResult.success(MsgCode.SU004.get());
  128. }
  129. /**
  130. * 删除
  131. *
  132. * @param id 主键
  133. * @return
  134. */
  135. @Operation(summary = "删除职员信息")
  136. @DeleteMapping("/{id}")
  137. @Parameters({
  138. @Parameter(name = "id", description = "主键", required = true),
  139. })
  140. public ActionResult delete(@PathVariable("id") String id) {
  141. EmployeeEntity entity = employeeService.getInfo(id);
  142. if (entity != null) {
  143. employeeService.delete(entity);
  144. return ActionResult.success(MsgCode.SU003.get());
  145. }
  146. return ActionResult.fail(MsgCode.FA003.get());
  147. }
  148. /**
  149. * 模板下载
  150. *
  151. * @return
  152. */
  153. @Operation(summary = "模板下载")
  154. @GetMapping("/TemplateDownload")
  155. public ActionResult<DownloadVO> templateDownload() {
  156. String fileName = "职员信息.xlsx";
  157. DownloadVO vo = DownloadVO.builder().build();
  158. try {
  159. vo.setName(fileName);
  160. vo.setUrl(UploaderUtil.uploaderFile(fileName + "#" + FileTypeConstant.TEMPLATEFILE) + "&name=" + fileName);
  161. } catch (Exception e) {
  162. log.error("信息导出Excel错误:{}", e.getMessage());
  163. }
  164. return ActionResult.success(vo);
  165. }
  166. /**
  167. * 导出Excel
  168. *
  169. * @return
  170. */
  171. @Operation(summary = "导出Excel")
  172. @GetMapping("/ExportExcel")
  173. public ActionResult<DownloadVO> exportExcel() {
  174. List<EmployeeEntity> entityList = employeeService.getList();
  175. List<EmployeeExportVO> list = JsonUtil.listToJsonField(JsonUtil.getJsonToList(JsonUtilEx.getObjectToStringDateFormat(entityList, "yyyy-MM-dd"), EmployeeExportVO.class));
  176. List<ExcelExportEntity> entitys = new ArrayList<>();
  177. entitys.add(new ExcelExportEntity("工号", "enCode"));
  178. entitys.add(new ExcelExportEntity("姓名", "fullName"));
  179. entitys.add(new ExcelExportEntity("性别", "gender"));
  180. entitys.add(new ExcelExportEntity("部门", "departmentName"));
  181. entitys.add(new ExcelExportEntity("职务", "positionName", 25));
  182. entitys.add(new ExcelExportEntity("用工性质", "workingNature"));
  183. entitys.add(new ExcelExportEntity("身份证号", "idNumber", 25));
  184. entitys.add(new ExcelExportEntity("联系电话", "telephone", 20));
  185. entitys.add(new ExcelExportEntity("出生年月", "birthday", 20));
  186. entitys.add(new ExcelExportEntity("参加工作", "attendWorkTime", 20));
  187. entitys.add(new ExcelExportEntity("最高学历", "education"));
  188. entitys.add(new ExcelExportEntity("所学专业", "major"));
  189. entitys.add(new ExcelExportEntity("毕业院校", "graduationAcademy"));
  190. entitys.add(new ExcelExportEntity("毕业时间", "graduationTime", 20));
  191. ExportParams exportParams = new ExportParams(null, "职员信息");
  192. exportParams.setType(ExcelType.XSSF);
  193. DownloadVO vo = DownloadVO.builder().build();
  194. try {
  195. @Cleanup Workbook workbook = new HSSFWorkbook();
  196. if (entitys.size()>0){
  197. workbook = ExcelExportUtil.exportExcel(exportParams, entitys, list);
  198. }
  199. String name = "职员信息" + DateUtil.dateNow("yyyyMMdd") + "_" + RandomUtil.uuId() + ".xlsx";
  200. String fileName = configValueUtil.getTemporaryFilePath() + name;
  201. @Cleanup FileOutputStream output = new FileOutputStream(XSSEscape.escapePath(fileName));
  202. workbook.write(output);
  203. vo.setName(name);
  204. vo.setUrl(UploaderUtil.uploaderFile(name + "#" + "Temporary"));
  205. } catch (Exception e) {
  206. log.error("信息导出Excel错误:{}", e.getMessage());
  207. }
  208. return ActionResult.success(vo);
  209. }
  210. /**
  211. * 导出Word
  212. *
  213. * @return
  214. */
  215. @Operation(summary = "导出Word")
  216. @GetMapping("/ExportWord")
  217. public ActionResult<DownloadVO> exportWord() {
  218. List<EmployeeEntity> list = employeeService.getList();
  219. //模板文件地址
  220. String inputUrl = configValueUtil.getTemplateFilePath() + "employee_export_template.docx";
  221. //新生产的模板文件
  222. String name = "职员信息" + DateUtil.dateNow("yyyyMMdd") + "_" + RandomUtil.uuId() + ".docx";
  223. String outputUrl = configValueUtil.getTemporaryFilePath() + name;
  224. List<String[]> testList = new ArrayList<>();
  225. Map<String, String> testMap = new HashMap<>();
  226. for (int i = 0; i < list.size(); i++) {
  227. String[] employee = new String[13];
  228. EmployeeEntity entity = list.get(i);
  229. employee[0] = entity.getFullName();
  230. employee[1] = entity.getGender();
  231. employee[2] = entity.getDepartmentName();
  232. employee[3] = entity.getPositionName();
  233. employee[4] = entity.getWorkingNature();
  234. employee[5] = entity.getIdNumber();
  235. employee[6] = entity.getTelephone();
  236. employee[7] = entity.getBirthday() != null ? DateUtil.daFormat(entity.getBirthday()) : "";
  237. employee[8] = entity.getAttendWorkTime() != null ? DateUtil.daFormat(entity.getAttendWorkTime()) : "";
  238. employee[9] = entity.getEducation();
  239. employee[10] = entity.getMajor();
  240. employee[11] = entity.getGraduationAcademy();
  241. employee[12] = entity.getGraduationTime() != null ? DateUtil.daFormat(entity.getGraduationTime()) : "";
  242. testList.add(employee);
  243. }
  244. WordUtil.changWord(inputUrl, outputUrl, testMap, testList);
  245. if (FileUtil.fileIsFile(outputUrl)) {
  246. DownloadVO vo = DownloadVO.builder().name(name).url(UploaderUtil.uploaderFile(name + "#" + "Temporary")).build();
  247. return ActionResult.success(vo);
  248. }
  249. return ActionResult.success(MsgCode.ETD109.get());
  250. }
  251. /**
  252. * 导出pdf
  253. *
  254. * @return
  255. */
  256. @Operation(summary = "导出pdf")
  257. @GetMapping("/ExportPdf")
  258. public ActionResult<DownloadVO> exportPdf() {
  259. String name = "职员信息" + DateUtil.dateNow("yyyyMMdd") + "_" + RandomUtil.uuId() + ".pdf";
  260. String outputUrl = FileUploadUtils.getLocalBasePath() + configValueUtil.getTemporaryFilePath() + name;
  261. employeeService.exportPdf(employeeService.getList(), outputUrl);
  262. if (FileUtil.fileIsFile(outputUrl)) {
  263. DownloadVO vo = DownloadVO.builder().name(name).url(UploaderUtil.uploaderFile(name + "#" + "Temporary")).build();
  264. return ActionResult.success(vo);
  265. }
  266. return ActionResult.success(MsgCode.ETD109.get());
  267. }
  268. /**
  269. * 导出Excel
  270. *
  271. * @return
  272. */
  273. @Operation(summary = "导出Excel(备用)")
  274. @GetMapping("/Excel")
  275. public void excel() {
  276. Map<String, Object> map = new HashMap<>();
  277. List<EmployeeEntity> list = employeeService.getList();
  278. TemplateExportParams param = new TemplateExportParams(configValueUtil.getTemplateFilePath() + "employee_import_template.xlsx", true);
  279. map.put("Employee", JSON.parse(JSONObject.toJSONStringWithDateFormat(list, "yyyy-MM-dd")));
  280. Workbook workbook = ExcelExportUtil.exportExcel(param, map);
  281. ExcelUtil.dowloadExcel(workbook, "职员信息.xlsx");
  282. }
  283. /**
  284. * 上传文件(excel)
  285. *
  286. * @return
  287. */
  288. @Operation(summary = "上传文件")
  289. @PostMapping("/Uploader")
  290. public ActionResult<DownloadVO> uploader() {
  291. List<MultipartFile> list = UpUtil.getFileAll();
  292. MultipartFile file = list.get(0);
  293. if (file.getOriginalFilename().endsWith(".xlsx") || file.getOriginalFilename().endsWith(".xls")) {
  294. String fileName = RandomUtil.uuId() + "." + UpUtil.getFileType(file);
  295. fileName = XSSEscape.escape(fileName);
  296. //上传文件
  297. FileInfo fileInfo = FileUploadUtils.uploadFile(new FileParameter(FileTypeConstant.TEMPORARY, fileName), file);
  298. // FileUtil.upFile(file, filePath, fileName);
  299. DownloadVO vo = DownloadVO.builder().build();
  300. vo.setName(fileInfo.getFilename());
  301. return ActionResult.success(vo);
  302. } else {
  303. return ActionResult.fail(MsgCode.ETD110.get());
  304. }
  305. }
  306. /**
  307. * 导入预览
  308. *
  309. * @param fileName 文件名称
  310. * @return
  311. */
  312. @Operation(summary = "导入预览")
  313. @GetMapping("/ImportPreview")
  314. @Parameters({
  315. @Parameter(name = "fileName", description = "文件名称"),
  316. })
  317. public ActionResult importPreview(@RequestParam("fileName") String fileName) throws ImportException {
  318. AtomicReference<Map<String, Object>> map = new AtomicReference<>(new HashMap<>());
  319. try {
  320. FileUploadUtils.downloadFile(new FileParameter(FileTypeConstant.TEMPORARY, fileName), inputStream -> {
  321. // 得到数据
  322. List<EmployeeModel> personList = null;
  323. try {
  324. personList = ExcelUtil.importExcelByInputStream(inputStream, 0, 1, EmployeeModel.class);
  325. } catch (Exception e) {
  326. throw new RuntimeException(e);
  327. }
  328. //预览数据
  329. map.set(employeeService.importPreview(personList));
  330. });
  331. } catch (Exception e) {
  332. log.error(e.getMessage());
  333. throw new ImportException(e.getMessage());
  334. }
  335. return ActionResult.success(map.get());
  336. }
  337. /**
  338. * 导入数据
  339. *
  340. * @param data 职工模型
  341. * @return
  342. */
  343. @Operation(summary = "导入数据")
  344. @PostMapping("/ImportData")
  345. @Parameters({
  346. @Parameter(name = "data", description = "职工模型"),
  347. })
  348. public ActionResult<EmployeeImportVO> importData(@RequestBody EmployeeModel data) throws Exception {
  349. List<EmployeeModel> dataList = new ArrayList<>();
  350. if (data.isType()){
  351. ActionResult result = importPreview(data.getFileName());
  352. if (result == null){
  353. throw new Exception(MsgCode.FA018.get());
  354. }
  355. if (result.getCode() != 200){
  356. throw new Exception(result.getMsg());
  357. }
  358. if (result.getData() instanceof Map){
  359. Map<String,Object> dataMap = (Map<String, Object>) result.getData();
  360. dataList = JsonUtil.getJsonToList(dataMap.get("dataRow"),EmployeeModel.class);
  361. }
  362. }else {
  363. dataList = data.getList();
  364. }
  365. //导入数据
  366. EmployeeImportVO result = employeeService.importData(dataList);
  367. return ActionResult.success(result);
  368. }
  369. /**
  370. * 导出Excel(可选字段)
  371. *
  372. * @param paginationEmployee 分页模型
  373. * @return
  374. */
  375. @Operation(summary = "导出Excel(可选字段)")
  376. @GetMapping("/ExportData")
  377. public ActionResult<DownloadVO> exportExcelData(PaginationEmployee paginationEmployee) {
  378. String dataType = paginationEmployee.getDataType();
  379. String selectKey = paginationEmployee.getSelectKey();
  380. List<EmployeeEntity> entityList = new ArrayList<>();
  381. if ("0".equals(dataType)) {
  382. entityList = employeeService.getList(paginationEmployee);
  383. } else if ("1".equals(dataType)) {
  384. entityList = employeeService.getList();
  385. }
  386. List<EmployeeModel> modeList = new ArrayList<>();
  387. for(EmployeeEntity employeeEntity:entityList){
  388. EmployeeModel mode=new EmployeeModel();
  389. mode.setEnCode(employeeEntity.getEnCode());
  390. mode.setFullName(employeeEntity.getFullName());
  391. mode.setGender(employeeEntity.getGender());
  392. mode.setDepartmentName(employeeEntity.getDepartmentName());
  393. mode.setPositionName(employeeEntity.getPositionName());
  394. mode.setWorkingNature(employeeEntity.getWorkingNature());
  395. mode.setIdNumber(employeeEntity.getIdNumber());
  396. mode.setTelephone(employeeEntity.getTelephone());
  397. SimpleDateFormat sf=new SimpleDateFormat("yyyy-MM-dd");
  398. if(employeeEntity.getBirthday()!=null){
  399. String birthday=sf.format(employeeEntity.getBirthday());
  400. mode.setBirthday(birthday);
  401. }
  402. if(employeeEntity.getAttendWorkTime()!=null){
  403. String attendWorkTime=sf.format(employeeEntity.getAttendWorkTime());
  404. mode.setAttendWorkTime(attendWorkTime);
  405. }
  406. mode.setEducation(employeeEntity.getEducation());
  407. mode.setMajor(employeeEntity.getMajor());
  408. mode.setGraduationAcademy(employeeEntity.getGraduationAcademy());
  409. if(employeeEntity.getGraduationTime()!=null){
  410. String graduationTime=sf.format(employeeEntity.getGraduationTime());
  411. mode.setGraduationTime(graduationTime);
  412. }
  413. SimpleDateFormat sf1=new SimpleDateFormat("yyyy-MM-dd HH:mm");
  414. if(employeeEntity.getCreatorTime()!=null){
  415. String creatorTime=sf1.format(employeeEntity.getCreatorTime());
  416. mode.setCreatorTime(creatorTime);
  417. }
  418. modeList.add(mode);
  419. }
  420. List<EmployeeExportVO> list =JsonUtil.listToJsonField(JsonUtil.getJsonToList(modeList, EmployeeExportVO.class));
  421. List<ExcelExportEntity> entitys = new ArrayList<>();
  422. String[] splitData = selectKey.split(",");
  423. if (splitData != null && splitData.length > 0) {
  424. for (int i = 0; i < splitData.length; i++) {
  425. if ("enCode".equals(splitData[i])) {
  426. entitys.add(new ExcelExportEntity("工号", "enCode"));
  427. }
  428. if ("fullName".equals(splitData[i])) {
  429. entitys.add(new ExcelExportEntity("姓名", "fullName"));
  430. }
  431. if ("gender".equals(splitData[i])) {
  432. entitys.add(new ExcelExportEntity("性别", "gender"));
  433. }
  434. if ("departmentName".equals(splitData[i])) {
  435. entitys.add(new ExcelExportEntity("部门", "departmentName"));
  436. }
  437. if ("positionName".equals(splitData[i])) {
  438. entitys.add(new ExcelExportEntity("职务", "positionName", 25));
  439. }
  440. if ("workingNature".equals(splitData[i])) {
  441. entitys.add(new ExcelExportEntity("用工性质", "workingNature"));
  442. }
  443. if ("idNumber".equals(splitData[i])) {
  444. entitys.add(new ExcelExportEntity("身份证号", "idNumber", 25));
  445. }
  446. if ("telephone".equals(splitData[i])) {
  447. entitys.add(new ExcelExportEntity("联系电话", "telephone", 20));
  448. }
  449. if ("birthday".equals(splitData[i])) {
  450. entitys.add(new ExcelExportEntity("出生年月", "birthday", 20));
  451. }
  452. if ("attendWorkTime".equals(splitData[i])) {
  453. entitys.add(new ExcelExportEntity("参加工作", "attendWorkTime", 20));
  454. }
  455. if ("education".equals(splitData[i])) {
  456. entitys.add(new ExcelExportEntity("最高学历", "education"));
  457. }
  458. if ("major".equals(splitData[i])) {
  459. entitys.add(new ExcelExportEntity("所学专业", "major"));
  460. }
  461. if ("graduationAcademy".equals(splitData[i])) {
  462. entitys.add(new ExcelExportEntity("毕业院校", "graduationAcademy"));
  463. }
  464. if ("graduationTime".equals(splitData[i])) {
  465. entitys.add(new ExcelExportEntity("毕业时间", "graduationTime", 20));
  466. }
  467. if ("creatorTime".equals(splitData[i])) {
  468. entitys.add(new ExcelExportEntity("创建时间", "creatorTime"));
  469. }
  470. }
  471. }
  472. ExportParams exportParams = new ExportParams(null, "职员信息");
  473. exportParams.setType(ExcelType.XSSF);
  474. DownloadVO vo = DownloadVO.builder().build();
  475. try {
  476. @Cleanup Workbook workbook = new HSSFWorkbook();
  477. if (entitys.size() > 0) {
  478. workbook = ExcelExportUtil.exportExcel(exportParams, entitys, list);
  479. }
  480. String name = "职员信息" + DateUtil.dateNow("yyyyMMdd") + "_" + RandomUtil.uuId() + ".xlsx";
  481. //上传文件
  482. MultipartFile multipartFile = ExcelUtil.workbookToCommonsMultipartFile(workbook, name);
  483. FileInfo fileInfo = FileUploadUtils.uploadFile(new FileParameter(FileTypeConstant.TEMPORARY, name), multipartFile);
  484. vo.setName(fileInfo.getFilename());
  485. vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + FileTypeConstant.TEMPORARY) + "&name=" + name);
  486. } catch (Exception e) {
  487. log.error("信息导出Excel错误:{}", e.getMessage());
  488. }
  489. return ActionResult.success(vo);
  490. }
  491. }