| | |
| | | @GetMapping("/downloadImportExcel") |
| | | @VciBusinessLog(operateName = "下载批量申请编码的导入模板") |
| | | public void downloadImportExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ |
| | | // String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); |
| | | // try { |
| | | // ControllerUtil.writeFileToResponse(response,excelName); |
| | | // } catch (Throwable e) { |
| | | // //如果出错,把错误信息写到text |
| | | // String msg = LangBaseUtil.getErrorMsg(e); |
| | | // if(StringUtils.isBlank(msg)){ |
| | | // msg = "未知错误"; |
| | | // } |
| | | // ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | // } |
| | | String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | | } catch (Throwable e) { |
| | | //如果出错,把错误信息写到text |
| | | String msg = LangBaseUtil.getErrorMsg(e); |
| | | if(StringUtils.isBlank(msg)){ |
| | | msg = "未知错误"; |
| | | } |
| | | ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | } |
| | | } |
| | | |
| | | |