田源
2023-12-06 448a89b421a80bc01cd232cd2a0ed8b8e658766b
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
@@ -179,8 +179,8 @@
   @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
@@ -844,7 +844,7 @@
    */
   @GetMapping("/exportGroupCodeExcel")
   @VciBusinessLog(operateName = "导出集团码")
   public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{
   public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response){
      try {
         String excelName = mdmIOService.exportGroupCodeExcel(codeClassifyOid);
         ControllerUtil.writeFileToResponse(response,excelName);
@@ -854,6 +854,14 @@
         if(StringUtils.isBlank(msg)){
            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);
      }