xiejun
2023-12-01 ab234e8b6a7cc2a52be8dbe04c7b731105f6a030
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
@@ -754,4 +754,26 @@
   public R addSaveBZ (@RequestBody CodeBZApplyDTO codeBZApplyDTO) throws Exception {
      return R.success(engineService.addSaveBZ(codeBZApplyDTO));
   }
   /**
    * 下载批量申请的导入模板
    * @param codeClassifyOid 分类的主键
    * @param response 响应对象
    * @throws IOException 抛出异常
    */
   @GetMapping("/exportGroupCodeExcel")
   @VciBusinessLog(operateName = "导出集团码")
   public void exportGroupCodeExcel(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);
      }
   }
}