yangys
2025-09-06 61763cc1a182effa7e5535ac72d54a6a56f029eb
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/FlowMgrController.java
@@ -31,9 +31,6 @@
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
@@ -52,8 +49,7 @@
   private FlowCommonService flowCommonService;
   @Autowired
   private HistoryService historyService;
   @Autowired
   private ApproveTableService approveTableService;
   @Autowired
   private ProgramConfirmTableService programConfirmTableService;
   @Autowired
@@ -169,24 +165,7 @@
      return R.success();
   }
   @PostMapping("/export-approve-table")
   @Operation(summary = "导出审批表", description = "导出审批表pdf")
   public void exportApproveTable(String processInstanceId, HttpServletResponse response) {
      try {
         FlowProgramProperties props = flowCommonService.getProgramPropertiesFromHis(processInstanceId);
         String progName = props.getDrawingNo()+"-"+props.getProcessNo()+"-"+props.getProcessEdition();
         //String filename = URLEncoder.encode("数控程序编制审批单", StandardCharsets.UTF_8)+ DateUtil.format(DateUtil.now(), "yyyyMMddHHmm")+".pdf";
         String filename = UrlUtil.encode("数控程序编制审批单"+progName)+".pdf";
         response.setHeader("Content-Disposition", "attachment; filename="+filename);
         response.setContentType("application/octet-stream");
         approveTableService.exportApproveTable(processInstanceId,response.getOutputStream());
      } catch (Exception e) {
         log.error("导出审批表异常", e);
         throw new RuntimeException(e);
      }
   }
   @PostMapping("/export-confirm-table")
   @Operation(summary = "导出确认表", description = "导出数控程序确认表pdf")