浏览代码

修改单导出

DLC 3 周之前
父节点
当前提交
f62d4fda64

+ 8 - 0
qcs-common/src/main/java/com/rongwei/bscommon/sys/dao/QcsMdfFormDao.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.rongwei.bsentity.domain.QcsLossDetailDo;
 import com.rongwei.bsentity.domain.QcsMdfFormDo;
+import com.rongwei.bsentity.domain.QcsMdfRowDo;
 import com.rongwei.rwadmincommon.system.domain.SysUserDo;
 import org.apache.ibatis.annotations.Delete;
 import org.apache.ibatis.annotations.Param;
@@ -51,4 +52,11 @@ public interface QcsMdfFormDao extends BaseMapper<QcsMdfFormDo> {
 
     @Select("select ID,NAME from sys_user where DELETED='0'")
     List<SysUserDo> getAllUsers();
+
+    @Select("select r.TASKDESIGNDTDRAWINGNO,r.TASKDESIGNDTPARTNAME,r.MINORDESIGNDTDRAWINGNO,r.MINORDESIGNDTPARTNAME,r.CONTENT,\n" +
+            "\ts.MODIFYADMINNICKNAME,s.DTWHOCOLLATEADMINNICKNAME,s.DTWHOAPPROVEADMINNICKNAME,r.REMARK,\n" +
+            "\t(select GROUP_CONCAT(DEPTNAME) from qcs_mdf_detail where DELETED='0' and ROWID=r.ID group by ROWID) as DEPTIDS\n" +
+            "from qcs_mdf_row r left join qcs_mdf_section s on r.SECTIONID=s.ID\n" +
+            "where r.DELETED='0' and s.DELETED='0' and r.FORMID=#{formId} ${whr}")
+    List<QcsMdfRowDo> getReportRows(@Param(value = "formId") String formId, @Param(value = "whr") String whr);
 }

+ 3 - 0
qcs-common/src/main/java/com/rongwei/bscommon/sys/service/QcsMdfFormService.java

@@ -5,6 +5,7 @@ import com.rongwei.bsentity.domain.QcsMdfFormDo;
 import com.rongwei.rwcommon.base.R;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.util.Map;
 
@@ -14,4 +15,6 @@ public interface QcsMdfFormService extends IService<QcsMdfFormDo> {
     R centerSell(Map<String, String> params);
 
     R importMdfForm(MultipartFile file, String unitId) throws IOException;
+
+    void excelExport(Map<String, String> params, HttpServletResponse response) throws IOException;
 }

+ 283 - 0
qcs-common/src/main/java/com/rongwei/bscommon/sys/service/impl/QcsMdfFormServiceImpl.java

@@ -11,16 +11,26 @@ import com.rongwei.bsentity.domain.*;
 import com.rongwei.bsentity.vo.ImportMdfVo;
 import com.rongwei.rwadmincommon.system.domain.SysUserDo;
 import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.base.exception.CustomException;
 import com.rongwei.rwcommon.utils.SecurityUtil;
 import com.rongwei.rwcommon.utils.StringUtils;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFRow;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
@@ -31,6 +41,9 @@ import java.util.stream.Collectors;
 
 @Service
 public class QcsMdfFormServiceImpl extends ServiceImpl<QcsMdfFormDao, QcsMdfFormDo> implements QcsMdfFormService {
+
+    private static final Logger logger = LoggerFactory.getLogger(QcsMdfFormServiceImpl.class);
+
     @Autowired
     QcsMdfFormDao qcsMdfFormDao;
     @Autowired
@@ -611,6 +624,276 @@ public class QcsMdfFormServiceImpl extends ServiceImpl<QcsMdfFormDao, QcsMdfForm
         }
     }
 
+    @Override
+    public void excelExport(Map<String, String> params, HttpServletResponse response) throws IOException {
+        logger.info("Excel导出开始...");
+        String formId = params.get("formId");
+        String deptId = params.get("deptId");
+        QcsMdfFormDo qcsMdfFormDo = qcsMdfFormService.getById(formId);
+        String whr = "";
+        if (StringUtils.isNotBlank(deptId) && StringUtils.isNotBlank(qcsMdfFormDo.getCopydeptids()) && !Arrays.asList(qcsMdfFormDo.getCopydeptids().split(",")).contains(deptId)) {
+            whr = " and r.ID in(select distinct ROWID from qcs_mdf_detail where DELETED='0' and DEPTID='" + deptId + "')";
+        }
+        List<QcsMdfRowDo> qcsMdfRowDos = qcsMdfFormDao.getReportRows(formId, whr);
+        List<Map<String, String>> unitMap = qcsMdfFormDao.getUnitMap();//基地信息
+
+        //获取模板
+        ClassPathResource classPathResource = new ClassPathResource("template/修改单导出模板.xlsx");
+        XSSFWorkbook workbook = new XSSFWorkbook(classPathResource.getInputStream());
+        XSSFSheet tempSheet = workbook.getSheetAt(0);
+        //文件名称
+        String filename = params.get("fileName");
+        XSSFSheet sheet = workbook.createSheet();
+        XSSFRow row;
+        XSSFCell cell;
+        int indexstart = 2;//起始行
+        int rowno = 1;
+        try {
+            CellRangeAddress cellRangeAddress;   // 合并单元格
+            for (int i = indexstart; i < 12 + qcsMdfRowDos.size() * 2 + indexstart; i++) {
+                row = sheet.createRow(i);
+                for (int j = 0; j < 58; j++) {
+                    cell = row.createCell(j);
+                    if (i == 11 + qcsMdfRowDos.size() * 2 + indexstart) {
+                        if (tempSheet.getRow(15) != null && tempSheet.getRow(15).getCell(j) != null) {
+                            cell.setCellStyle(tempSheet.getRow(15).getCell(j).getCellStyle());
+                            row.setHeight(tempSheet.getRow(15).getHeight());
+                        }
+                    } else if (i - indexstart <= 8) {
+                        if (tempSheet.getRow(i) != null && tempSheet.getRow(i).getCell(j) != null) {
+                            cell.setCellStyle(tempSheet.getRow(i).getCell(j).getCellStyle());
+                        }
+                    } else if (i >= 11 && i < 11 + qcsMdfRowDos.size() * 2) {
+                        if (tempSheet.getRow(12) != null && tempSheet.getRow(12).getCell(j) != null) {
+                            cell.setCellStyle(tempSheet.getRow(12).getCell(j).getCellStyle());
+                        }
+                    } else {
+                        if (tempSheet.getRow(14) != null && tempSheet.getRow(14).getCell(j) != null) {
+                            cell.setCellStyle(tempSheet.getRow(14).getCell(j).getCellStyle());
+                        }
+                    }
+                    sheet.setColumnWidth(j, 900);//3个字节
+                }
+            }
+
+            //单元格合并
+            cellRangeAddress = new CellRangeAddress(indexstart, indexstart, 1, 57);//第3行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart).getCell(1).setCellValue("振 华 设 计 研 究 总 院 图 样 变 更 通 知 单");
+            cellRangeAddress = new CellRangeAddress(indexstart + 1, indexstart + 1, 13, 48);//第4行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 1).getCell(13).setCellValue("上海振华重工(集团)股份有限公司");
+            cellRangeAddress = new CellRangeAddress(indexstart + 1, indexstart + 1, 50, 57);//第4行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 1).getCell(50).setCellValue("ZPMC/QHSEP-08-R06");
+
+            //填充主表数据
+            cellRangeAddress = new CellRangeAddress(indexstart + 3, indexstart + 4, 1, 4);//第6行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 3).getCell(1).setCellValue("项目工号"); //项目工号
+            cellRangeAddress = new CellRangeAddress(indexstart + 3, indexstart + 4, 5, 15);//第6行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 3).getCell(5).setCellValue(qcsMdfFormDo.getProjectdlprojid()); //项目工号
+            String newno = "";
+            if (StringUtils.isNotBlank(qcsMdfFormDo.getNumbername())) {
+                newno = qcsMdfFormDo.getNumbername() + qcsMdfFormDo.getSourcenumbercode();
+            } else {
+                newno = qcsMdfFormDo.getSourcenumbercode();
+            }
+            cellRangeAddress = new CellRangeAddress(indexstart + 3, indexstart + 4, 25, 28);//第6行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 3).getCell(25).setCellValue("总编号"); //总编号
+            cellRangeAddress = new CellRangeAddress(indexstart + 3, indexstart + 4, 29, 39);//第6行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 3).getCell(29).setCellValue(newno); //总编号
+            cellRangeAddress = new CellRangeAddress(indexstart + 3, indexstart + 4, 52, 57);//第6行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 3).getCell(52).setCellValue("第 1 页 共 1 页"); //总编号
+
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 1, 4);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(1).setCellValue("项目名称");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 5, 15);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(5).setCellValue(qcsMdfFormDo.getProjectdlprojname()); //项目名称
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 16, 18);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(16).setCellValue("项目生\n" +
+                    "产阶段");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 19, 20);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(19).setCellValue(qcsMdfFormDo.getProducename()); //项目生产阶段
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 21, 23);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(21).setCellValue("装船通知\n" +
+                    "主审批人");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 24, 24);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 25, 27);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(25).setCellValue("修改原因");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 28, 30);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(28).setCellValue(qcsMdfFormDo.getSourcename()); //修改原因
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 31, 33);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(31).setCellValue("引起关联\n" +
+                    "部门修改");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 34, 42);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 43, 46);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(43).setCellValue("是否已通知修改");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 47, 47);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            String unitName = "";
+            for (String uid : qcsMdfFormDo.getCopydeptids().split(",")) {
+                List<Map<String, String>> mapList = unitMap.stream()
+                        .filter(umap -> {
+                            String oid = umap.get("ID");
+                            return uid.equals(oid);
+                        }).collect(Collectors.toList());
+                if (mapList.size() > 0) {
+                    unitName += mapList.get(0).get("FULLNAME") + ",";
+                }
+            }
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 48, 49);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(48).setCellValue("抄送单位");
+            cellRangeAddress = new CellRangeAddress(indexstart + 5, indexstart + 6, 50, 57);//第8行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 5).getCell(50).setCellValue(unitName.substring(0, unitName.length() - 1)); //抄送单位
+
+            //明细数据
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 1, 1);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(1).setCellValue("序号");
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 2, 6);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(2).setCellValue("修改图号、图名\n" +
+                    "(任务单部件)");
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 7, 11);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(7).setCellValue("修改图号、图名\n" +
+                    "(次级部件)");
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 12, 33);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(12).setCellValue("变更内容");
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 34, 42);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(34).setCellValue("本条修改人员");
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 43, 49);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(43).setCellValue("情况说明");
+            cellRangeAddress = new CellRangeAddress(indexstart + 7, indexstart + 8, 50, 57);//第10行
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(indexstart + 7).getCell(50).setCellValue("收件单位");
+            //子表数据
+            int detailRowIndex = 11;
+            for (QcsMdfRowDo qcsMdfRowDo : qcsMdfRowDos) {
+                for (int j = 0; j < 2; j++) {
+                    row = sheet.getRow(detailRowIndex);
+                    if (j == 0) {
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex + 1, 1, 1);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(1).setCellValue(rowno);
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 2, 6);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(2).setCellValue(qcsMdfRowDo.getTaskdesigndtdrawingno());//修改图号(任务单部件)
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 7, 11);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(7).setCellValue(qcsMdfRowDo.getMinordesigndtdrawingno());//修改次级部件图号
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex + 1, 12, 33);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(12).setCellValue(qcsMdfRowDo.getContent());//变更内容
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 34, 36);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(34).setCellValue("修改人");
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 37, 39);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(37).setCellValue("校对人");
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 40, 42);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(40).setCellValue("审核人");
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex + 1, 43, 49);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(43).setCellValue(qcsMdfRowDo.getRemark());//情况说明
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex + 1, 50, 57);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(50).setCellValue(qcsMdfRowDo.getDeptids());//收件单位
+                    } else {
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 2, 6);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(2).setCellValue(qcsMdfRowDo.getTaskdesigndtpartname());//修改图名(任务单部件)
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 7, 11);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(7).setCellValue(qcsMdfRowDo.getMinordesigndtpartname());//修改次级部件图名
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 34, 36);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(34).setCellValue(qcsMdfRowDo.getModifyadminnickname());//修改人名称
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 37, 39);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(37).setCellValue(qcsMdfRowDo.getDtwhocollateadminnickname());//修改单校对人名称
+                        cellRangeAddress = new CellRangeAddress(detailRowIndex, detailRowIndex, 40, 42);
+                        sheet.addMergedRegion(cellRangeAddress);
+                        row.getCell(40).setCellValue(qcsMdfRowDo.getDtwhoapproveadminnickname());//审批人名字
+                    }
+                    detailRowIndex++;
+                }
+                rowno++;
+            }
+            //最后一行
+            int lastRowIndex = detailRowIndex + 2;
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 1, 2);
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(lastRowIndex).getCell(1).setCellValue("分发");
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 3, 7);
+            sheet.addMergedRegion(cellRangeAddress);
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 8, 12);
+            sheet.addMergedRegion(cellRangeAddress);
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 13, 15);
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(lastRowIndex).getCell(13).setCellValue("基地接\n" +
+                    "收邮箱");
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 16, 34);
+            sheet.addMergedRegion(cellRangeAddress);
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 35, 36);
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(lastRowIndex).getCell(35).setCellValue("共计\n" +
+                    "附图");
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 37, 38);
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(lastRowIndex).getCell(39).setCellValue("页");
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 40, 43);
+            sheet.addMergedRegion(cellRangeAddress);
+            sheet.getRow(lastRowIndex).getCell(40).setCellValue("竣工图修改\n" +
+                    "完成日期");
+            cellRangeAddress = new CellRangeAddress(lastRowIndex, lastRowIndex, 44, 57);
+            sheet.addMergedRegion(cellRangeAddress);
+
+            workbook.removeSheetAt(0);
+
+            // 4. 导出文件
+            response.setContentType("application/octet-stream;charset=ISO8859-1");
+            response.setHeader("Content-Disposition", "attachment;filename=" + filename);
+            response.addHeader("Pargam", "no-cache");
+            response.addHeader("Cache-Control", "no-cache");
+
+            // 获取ServletOutputStream对象,用于将Workbook内容写入响应
+            ServletOutputStream outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            // 刷新输出流,确保所有数据都被发送
+            outputStream.flush();
+            // 关闭Workbook对象(注意:在某些情况下,你可能需要在finally块中关闭它,以确保即使发生异常也能关闭)
+            workbook.close();
+
+        } catch (Exception ex) {
+            log.error("导出失败", ex);
+            throw new CustomException("导出失败");
+        }
+        logger.info("Excel导出结束...");
+    }
+
     public String convertToTwoDecimalPlaces(String input) {
         try {
             // 尝试转换为BigDecimal

+ 5 - 0
qcs-entity/src/main/java/com/rongwei/bsentity/domain/QcsMdfFormDo.java

@@ -288,5 +288,10 @@ public class QcsMdfFormDo extends BaseDo {
      */
     private String copydeptids;
 
+    /**
+     * 修改单跟进人
+     */
+    private String followuser;
+
 
 }

+ 7 - 0
qcs-server/src/main/java/com/rongwei/controller/QcsMdfFormController.java

@@ -7,6 +7,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.Map;
 
 @RestController
@@ -57,4 +59,9 @@ public class QcsMdfFormController {
             return R.error();
         }
     }
+
+    @PostMapping("/excelExport")
+    public void excelExport(@RequestBody Map<String, String> params, HttpServletResponse response) throws IOException {
+        qcsMdfFormService.excelExport(params, response);
+    }
 }

二进制
qcs-server/src/main/resources/template/修改单导出模板.xlsx