yangys
2025-08-14 db80a7d0d44912a61c42eb99bd5b09eca79b15a1
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcProgramExportDNCService.java
@@ -78,7 +78,7 @@
    */
   public void exportDnc(Long[] approvedIdArray, OutputStream os) throws IOException {
      //FileOutputStream fos = new FileOutputStream("d:/exportDnc.zip");
      try (ZipOutputStream zipOut = new ZipOutputStream(os);) {//os
      try (ZipOutputStream zipOut = new ZipOutputStream(os);os) {//os
         for (Long approvedId : approvedIdArray) {
            NcProgramApproved approved = approvedService.getById(approvedId);
@@ -89,10 +89,9 @@
         approvedService.lambdaUpdate().in(NcProgramApproved::getId, Arrays.asList(approvedIdArray))
            .set(NcProgramApproved::getStatus,NcProgramApproved.STATUS_EXPORTED).update();
      }catch(Exception e){
         Throwable [] err = e.getSuppressed();
         throw new ServiceException("导出工控网错误"+e.getMessage());
      }
      os.close();
   }