| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导入批量编辑数据 |
| | | * @param codeClassifyOid 分类的主键 |
| | |
| | | @VciBusinessLog(operateName = "导出主题库的数据") |
| | | @PostMapping("/exportCode") |
| | | public void exportCode(CodeExportAttrDTO exportAttrDTO, HttpServletResponse response) throws IOException { |
| | | String excelName = mdmIOService.exportCode(exportAttrDTO); |
| | | try { |
| | | String excelName = mdmIOService.exportCode(exportAttrDTO); |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | | } catch (Throwable e) { |
| | | //如果出错,把错误信息写到text |
| | |
| | | */ |
| | | @GetMapping("/exportGroupCodeExcel") |
| | | @VciBusinessLog(operateName = "导出集团码") |
| | | public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response){ |
| | | public void exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException { |
| | | try { |
| | | String excelName = mdmIOService.exportGroupCodeExcel(codeClassifyOid); |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | |
| | | msg = "未知错误"; |
| | | } |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt"; |
| | | LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile); |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,errorFile); |
| | | } catch (IOException ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | String uuid=ControllerUtil.putErrorFile(errorFile); |
| | | return R.fail(msg); |
| | | // ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | LocalFileUtil.writeContentToFile(msg,errorFile); |
| | | ControllerUtil.writeFileToResponse(response,errorFile); |
| | | // return R.fail(msg); |
| | | } |
| | | return R.status(true); |
| | | // return R.status(true); |
| | | } |
| | | |
| | | /*** |