Ver Fonte

试车检查内容报告暂时先更新个版本

zhoudazhuang há 9 meses atrás
pai
commit
5b9ad09218

+ 28 - 4
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxCommissionCheckDetailDao.java

@@ -21,12 +21,14 @@ import java.util.Map;
 public interface ZhcxCommissionCheckDetailDao extends BaseMapper<ZhcxCommissionCheckDetailDo> {
 
     @Select("SELECT\n" +
-            "\t*\n" +
+            "*\n" +
             "FROM\n" +
-            "\tZHCX_COMMISSION_CHECK_DETAIL\n" +
+            "ZHCX_COMMISSION_CHECK_DETAIL\n" +
             "WHERE\n" +
-            "\tDELETED = 0\n" +
-            "\tAND PID = #{checkId}")
+            "DELETED = 0\n" +
+            "AND PID = #{checkId}\n" +
+            "AND ONELEVELCLASSIFICATION is not null\n" +
+            "ORDER BY SORT ASC")
     List<ZhcxCommissionCheckDetailDo> listData(Map<String, Object> map);
 
     @Select("SELECT\n" +
@@ -53,4 +55,26 @@ public interface ZhcxCommissionCheckDetailDao extends BaseMapper<ZhcxCommissionC
             " DICTTYPE = 'test_drive_inspection_standard_subtable_debug_result' " +
             " AND DELETED = '0'")
     List<JSONObject> getResultDictList();
+
+
+    /**
+     * 查询所有章节号为一级的所有数据
+     * @param map
+     * @return
+     */
+    /**
+     * 整改组织
+     *
+     * @return
+     */
+    @Select("SELECT\n" +
+            "*\n" +
+            "FROM\n" +
+            "ZHCX_COMMISSION_CHECK_DETAIL\n" +
+            "WHERE\n" +
+            "DELETED = 0\n" +
+            "AND PID = #{pid}\n" +
+            "AND CHAPTERNOPULS LIKE '${chapternopuls}.%'\n" +
+            "ORDER BY SORT ASC")
+    List<ZhcxCommissionCheckDetailDo> listAnyLevelUnderData(Map<String, Object> map);
 }

+ 292 - 10
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxCommissionCheckServiceImpl.java

@@ -15,6 +15,7 @@ import com.rongwei.bsentity.domain.ZhcxCommissionCheckParameterSetDetalDo;
 import com.rongwei.bsentity.domain.ZhcxCommissionCheckParameterSetDo;
 import com.rongwei.bsentity.dto.CheckDetailDTO;
 import com.rongwei.bsentity.dto.CommissionCheckDTO;
+import com.rongwei.bsentity.vo.FormDataCheckVO;
 import com.rongwei.bsentity.vo.FormDataVO;
 import com.rongwei.bsentity.vo.ZhcxCommissionCheckDetailWordVO;
 import com.rongwei.bsentity.vo.ZhcxPersistentWordVO;
@@ -321,8 +322,214 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
         }
     }
 
+    /**
+     * 查找章节号子目录
+     * @param detailMap
+     * @param parentTitle
+     * @param list
+     * @param detailWordVOList
+     * @param resultType
+     * @param doc
+     * @param fileTemp
+     */
+    private void findChildTitle(Map<String, List<ZhcxCommissionCheckDetailDo>> detailMap, ZhcxCommissionCheckDetailDo parentTitle, List<JSONObject> list,List<ZhcxCommissionCheckDetailWordVO> detailWordVOList,List<JSONObject> resultType,Document[] doc,SysFileItemDo fileTemp) {
+        List<ZhcxCommissionCheckDetailDo> childTitle = detailMap.get(parentTitle.getChapternopuls());
+        if (childTitle!= null){
+            for (ZhcxCommissionCheckDetailDo checkDetailDo:childTitle){
+                if ("y".equals(checkDetailDo.getIstitle())){
+                    findChildTitle(detailMap,parentTitle,null,detailWordVOList,resultType,doc,fileTemp);
+                }else {
+                    setWordClassData(detailWordVOList,checkDetailDo,resultType,doc,fileTemp);
+                }
+            }
+        }
+    }
+
     @Override
     public int wordExport(Map<String, Object> map, HttpServletResponse response) {
+//        Object projectObj = map.get("projectId");
+//        Object machineNoObj = map.get("machineNo");
+//        String day = DateUtils.format(new Date());
+//        String projectId = (String) projectObj;
+//        String machineNo = (String) machineNoObj;
+//        ZhcxProjectManageDo projectManageDo = zhcxProjectManageService.getById(projectId);
+//        List<ZhcxCommissionCheckDetailDo> list = zhcxCommissionCheckDetailDao.listData(map);
+//        SysFileItemDo fileItemDo = sysFileItemService.getById("d1b3271ce2ec45c2915f2dbcd819f45a");
+//        SysFileItemDo fileTemp = sysFileItemService.getById("b199958d6ce64d4a9d36e9e9ac20ab59");
+//        final Document[] doc = {WordHelpUtils.getDoc(fileItemDo.getFullpath())};
+//        AtomicInteger i = new AtomicInteger();
+//        FormData formData = new FormData();
+//        List<Map<String,Object>> mainDataList = new ArrayList<>();
+//        Map<String,Object> mainMap = new HashMap<>(16);
+//        String projectEnName = "";
+//        if (StringUtils.isNotBlank(projectManageDo.getProjectEnName())){
+//            projectEnName = projectManageDo.getProjectEnName();
+//        }
+//        mainMap.put("projectNames",projectManageDo.getProjectName()+projectEnName);
+//        mainMap.put("projectCode",projectManageDo.getProjectCode());
+//        mainMap.put("currentDate",day);
+//        mainMap.put("machineNo",machineNo);
+//        mainDataList.add(mainMap);
+//        formData.setMainDataList(mainDataList);
+//        doc[0] = ExcelExportUtil.fillWordDataByMap(fileItemDo.getFullpath(), formData);
+//        List<JSONObject> resultType = zhcxCommissionCheckDetailDao.getResultDictList();
+//        if(list.size() == 0){
+//            return 1;
+//        }else {
+//            // 找出一级标题
+//            Map<String, List<ZhcxCommissionCheckDetailDo>> detailMap = new LinkedHashMap<>();
+//            List<ZhcxCommissionCheckDetailDo> topTitleList = new ArrayList<>();
+//            for(ZhcxCommissionCheckDetailDo row : list) {
+//                int indexOf = row.getChapternopuls().lastIndexOf(".");
+//                if(indexOf == 1) {
+//                    topTitleList.add(row);
+//                } else {
+//                    String parentTiTle = row.getChapternopuls().substring(0, indexOf);
+//                    List<ZhcxCommissionCheckDetailDo> tableList = detailMap.get(parentTiTle);
+//                    if(ObjectUtil.isEmpty(tableList)) {
+//                        tableList = new ArrayList<>();
+//                    }
+//                    tableList.add(row);
+//                }
+//            }
+//
+//            for(ZhcxCommissionCheckDetailDo row : topTitleList) {
+//                List<ZhcxCommissionCheckDetailWordVO> detailWordVOList = new ArrayList<>();
+//                detailMap.get(row.getChapternopuls());
+//                findChildTitle(detailMap,row,null,detailWordVOList,resultType,doc,fileTemp);
+//            }
+
+            //开始循环分类所有章节号数据
+//            list.forEach(info -> {
+//                List<ZhcxCommissionCheckDetailWordVO> detailWordVOList = new ArrayList<>();
+//                if (StringUtils.isNotBlank(info.getChapternopuls())){
+//                    String[] chapternos = info.getChapternopuls().split("\\.");
+//                    if (chapternos.length== 1){
+//                        List<ZhcxCommissionCheckDetailDo> oneLevelUnderList = list.stream().filter(e ->e.getChapternopuls().split("\\.").length==2&& e.getChapternopuls().substring(0,(info.getChapternopuls()+".").length()).equals(info.getChapternopuls()+".")).collect(Collectors.toList());
+//                        oneLevelUnderList.forEach(infoOneUnder -> {
+//                            String[] oneUnders = infoOneUnder.getChapternopuls().split("\\.");
+//                            if (oneUnders.length == 2 && "y".equals(infoOneUnder.getIstitle())) {
+//                                List<ZhcxCommissionCheckDetailDo> twoLevelUnderList = list.stream().filter(e ->e.getChapternopuls().split("\\.").length==3&& e.getChapternopuls().substring(0,(info.getChapternopuls()+".").length()).equals(info.getChapternopuls()+".")).collect(Collectors.toList());
+//                                twoLevelUnderList.forEach(infoTwoUnder -> {
+//                                    String[] twoUnders = infoTwoUnder.getChapternopuls().split("\\.");
+//                                    if (twoUnders.length == 3 && "y".equals(infoTwoUnder.getIstitle())) {
+//                                        List<ZhcxCommissionCheckDetailDo> threeLevelUnderList = list.stream().filter(e ->e.getChapternopuls().split("\\.").length==4&& e.getChapternopuls().substring(0,(info.getChapternopuls()+".").length()).equals(info.getChapternopuls()+".")).collect(Collectors.toList());
+//                                        threeLevelUnderList.forEach(infoThreeUnder -> {
+//                                            String[] threeUnders = infoThreeUnder.getChapternopuls().split("\\.");
+//                                            if (threeUnders.length == 4 && "y".equals(infoThreeUnder.getIstitle())) {
+//                                                List<ZhcxCommissionCheckDetailDo> fourLevelUnderList = list.stream().filter(e ->e.getChapternopuls().split("\\.").length==5&& e.getChapternopuls().substring(0,(info.getChapternopuls()+".").length()).equals(info.getChapternopuls()+".")).collect(Collectors.toList());
+//                                                fourLevelUnderList.forEach(infoFourUnder -> {
+//                                                    setWordClassData(detailWordVOList, infoFourUnder, resultType, doc,fileTemp);
+//                                                    String[] fourUnders = infoFourUnder.getChapternopuls().split("\\.");
+//                                                    if (fourUnders.length == 5 && "y".equals(infoFourUnder.getIstitle())) {}
+//                                                });
+//                                            }else {
+//                                                setWordClassData(detailWordVOList, infoThreeUnder, resultType, doc,fileTemp);
+//                                            }
+//                                        });
+//                                    }else {
+//                                        //增加模板中表格数据
+//                                        setWordClassData(detailWordVOList, infoTwoUnder, resultType, doc,fileTemp);
+//                                    }
+//                                });
+//                            }else {
+//                                //增加模板中表格数据
+//                                setWordClassData(detailWordVOList, infoOneUnder, resultType, doc,fileTemp);
+//                            }
+//                        });
+//                    }
+//                }
+//            });
+//            try {
+//                doc[0].updateFields();
+//                response.setContentType("application/octet-stream;charset=ISO8859-1");
+//                response.setHeader("Content-Disposition", "attachment;filename=");
+//                doc[0].save(response.getOutputStream(), com.aspose.words.SaveOptions.createSaveOptions(com.aspose.words.SaveFormat.DOCX));
+//            } catch (Exception e) {
+//                log.info("导出word失败:"+e);
+//                return 1;
+//            }
+//        }
+
+
+//            //根据分类分组
+//            Map<String, List<ZhcxCommissionCheckDetailDo>> groupList = list.stream()
+//                    .collect(Collectors.groupingBy(ZhcxCommissionCheckDetailDo::getOnelevelclassification));
+//            SysFileItemDo fileItemDo = sysFileItemService.getById("d1b3271ce2ec45c2915f2dbcd819f45a");
+//            final Document[] doc = {WordHelpUtils.getDoc(fileItemDo.getFullpath())};
+//            AtomicInteger i = new AtomicInteger();
+//            FormData formData = new FormData();
+//            List<Map<String,Object>> mainDataList = new ArrayList<>();
+//            Map<String,Object> mainMap = new HashMap<>(16);
+//            String projectEnName = "";
+//            if (StringUtils.isNotBlank(projectManageDo.getProjectEnName())){
+//                projectEnName = projectManageDo.getProjectEnName();
+//            }
+//            mainMap.put("projectNames",projectManageDo.getProjectName()+projectEnName);
+//            mainMap.put("projectCode",projectManageDo.getProjectCode());
+//            mainMap.put("currentDate",day);
+//            mainMap.put("machineNo",machineNo);
+//            mainDataList.add(mainMap);
+//            formData.setMainDataList(mainDataList);
+//            doc[0] = ExcelExportUtil.fillWordDataByMap(fileItemDo.getFullpath(), formData);
+//            List<JSONObject> resultType = zhcxCommissionCheckDetailDao.getResultDictList();
+//            groupList.forEach((k, v) -> {
+//                List<ZhcxCommissionCheckDetailWordVO> detailWordVOList = new ArrayList<>();
+//                List<ZhcxCommissionCheckDetailDo> detailDos = v;
+//                for (ZhcxCommissionCheckDetailDo detailDo:detailDos){
+//                    ZhcxCommissionCheckDetailWordVO checkDetailWordVO = new ZhcxCommissionCheckDetailWordVO();
+//                    checkDetailWordVO.setChapterno(detailDo.getChapterno());
+//                    String chtestcontent = "";
+//                    String entestcontent = "";
+//                    if (StringUtils.isNotBlank(detailDo.getChtestcontent())){
+//                        chtestcontent = detailDo.getChtestcontent();
+//                    }
+//                    if (StringUtils.isNotBlank(detailDo.getEntestcontent())){
+//                        entestcontent = detailDo.getEntestcontent();
+//                    }
+//                    checkDetailWordVO.setContent(chtestcontent+entestcontent);
+//                    String testresult = "";
+//                    if (StringUtils.isNotBlank(detailDo.getTestresult())){
+//                        testresult = resultType.stream().filter(dictDo -> detailDo.getTestresult().contains(dictDo.getString("VALUE"))).findFirst().get().getString("NAME").toString();
+//                    }
+//                    checkDetailWordVO.setResult(testresult);
+//                    String testnotes = "";
+//                    if (StringUtils.isNotBlank(detailDo.getTestnotes())){
+//                        testnotes = detailDo.getTestnotes();
+//                    }
+//                    checkDetailWordVO.setTestnotes(testnotes);
+//                    detailWordVOList.add(checkDetailWordVO);
+//                }
+//                List<List<Map<String,Object>>> slaveTableDataList = new ArrayList<>();
+//                List<Map<String, Object>> maps = convertNewList(detailWordVOList, ZhcxCommissionCheckDetailWordVO.class);
+//                slaveTableDataList.add(maps);
+//                FormDataVO formDataVo = new FormDataVO();
+//                Map<String,Object> mainDetailMap = new HashMap<>(16);
+//                List<Map<String,Object>> mainDetailDataList = new ArrayList<>();
+//                mainDetailMap.put("chtitle",k);
+//                mainDetailMap.put("entitle",v.get(0).getEntitle());
+//                mainDetailDataList.add(mainDetailMap);
+//                formDataVo.setMainDataList(mainDetailDataList);
+//                formDataVo.setSlaveTableDataList(slaveTableDataList);
+//                try {
+//                    SysFileItemDo fileTemp = sysFileItemService.getById("b199958d6ce64d4a9d36e9e9ac20ab59");
+//                    Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
+//                    doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
+//                } catch (Exception e) {
+//                    log.info("导出word失败:"+e);
+//                }
+//            });
+//            try {
+//                doc[0].updateFields();
+//                response.setContentType("application/octet-stream;charset=ISO8859-1");
+//                response.setHeader("Content-Disposition", "attachment;filename=");
+//                doc[0].save(response.getOutputStream(), com.aspose.words.SaveOptions.createSaveOptions(com.aspose.words.SaveFormat.DOCX));
+//            } catch (Exception e) {
+//                log.info("导出word失败:"+e);
+//                return 1;
+//            }
+//        }
+//        return 1;
         Object projectObj = map.get("projectId");
         Object machineNoObj = map.get("machineNo");
         String day = DateUtils.format(new Date());
@@ -335,7 +542,7 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
         }else {
             //根据分类分组
             Map<String, List<ZhcxCommissionCheckDetailDo>> groupList = list.stream()
-                    .collect(Collectors.groupingBy(ZhcxCommissionCheckDetailDo::getChtitle));
+                    .collect(Collectors.groupingBy(ZhcxCommissionCheckDetailDo::getOnelevelclassification));
             SysFileItemDo fileItemDo = sysFileItemService.getById("d1b3271ce2ec45c2915f2dbcd819f45a");
             final Document[] doc = {WordHelpUtils.getDoc(fileItemDo.getFullpath())};
             AtomicInteger i = new AtomicInteger();
@@ -354,6 +561,7 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
             formData.setMainDataList(mainDataList);
             doc[0] = ExcelExportUtil.fillWordDataByMap(fileItemDo.getFullpath(), formData);
             List<JSONObject> resultType = zhcxCommissionCheckDetailDao.getResultDictList();
+            List<FormDataCheckVO> res = new LinkedList<>();
             groupList.forEach((k, v) -> {
                 List<ZhcxCommissionCheckDetailWordVO> detailWordVOList = new ArrayList<>();
                 List<ZhcxCommissionCheckDetailDo> detailDos = v;
@@ -379,27 +587,42 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                         testnotes = detailDo.getTestnotes();
                     }
                     checkDetailWordVO.setTestnotes(testnotes);
-                    detailWordVOList.add(checkDetailWordVO);
+                    if (!"y".equals(detailDo.getIstitle())){
+                        detailWordVOList.add(checkDetailWordVO);
+                    }
                 }
                 List<List<Map<String,Object>>> slaveTableDataList = new ArrayList<>();
                 List<Map<String, Object>> maps = convertNewList(detailWordVOList, ZhcxCommissionCheckDetailWordVO.class);
                 slaveTableDataList.add(maps);
-                FormDataVO formDataVo = new FormDataVO();
+                slaveTableDataList.sort(Comparator.comparing(o->String.valueOf(o.get(0).get("sort"))));
+                FormDataCheckVO formDataCheckVO = new FormDataCheckVO();
                 Map<String,Object> mainDetailMap = new HashMap<>(16);
                 List<Map<String,Object>> mainDetailDataList = new ArrayList<>();
+                mainDetailMap.put("chapterno",v.get(0).getChapternopuls());
                 mainDetailMap.put("chtitle",k);
                 mainDetailMap.put("entitle",v.get(0).getEntitle());
                 mainDetailDataList.add(mainDetailMap);
-                formDataVo.setMainDataList(mainDetailDataList);
-                formDataVo.setSlaveTableDataList(slaveTableDataList);
+                formDataCheckVO.setMainDataList(mainDetailDataList);
+                formDataCheckVO.setSlaveTableDataList(slaveTableDataList);
+                formDataCheckVO.setChapterno(v.get(0).getChapternopuls());
+                res.add(formDataCheckVO);
+            });
+            // 按章节号排序
+            res.sort((a,b)->{
+                LinkedList<String> a1 = new LinkedList<>(Arrays.asList(a.getChapterno().split("\\.")));
+                LinkedList<String> b1 = new LinkedList<>(Arrays.asList(b.getChapterno().split("\\.")));
+                return sort1(a1,b1);
+                }
+            );
+            SysFileItemDo fileTemp = sysFileItemService.getById("b199958d6ce64d4a9d36e9e9ac20ab59");
+            for (FormDataCheckVO re : res) {
                 try {
-                    SysFileItemDo fileTemp = sysFileItemService.getById("b199958d6ce64d4a9d36e9e9ac20ab59");
-                    Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
+                    Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), re);
                     doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                 } catch (Exception e) {
                     log.info("导出word失败:"+e);
                 }
-            });
+            }
             try {
                 doc[0].updateFields();
                 response.setContentType("application/octet-stream;charset=ISO8859-1");
@@ -413,6 +636,23 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
         return 1;
     }
 
+    private int sort1(List<String> parts1,List<String> parts2){
+        int length1 = parts1.size();
+        int length2 = parts2.size();
+        if(length1 == 0){
+            return -1;
+        }
+        if(length2 == 0){
+            return 1;
+        }
+        if (Integer.parseInt(parts1.get(0)) != Integer.parseInt(parts2.get(0))) {
+            return Integer.parseInt(parts1.get(0)) - Integer.parseInt(parts2.get(0));
+        }else {
+            parts1.remove(0);
+            parts2.remove(0);
+            return sort1(parts1, parts2);
+        }
+    }
 
     private <T> List<Map<String, Object>> convertNewList(List<T> objectList, Class<T> clazz) {
         List<Map<String, Object>> mapList = new ArrayList<>();
@@ -467,7 +707,7 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
      * @param file word二进制
      * @param formData 填充表单数据
      */
-    private Document fillWordDataByMap(String file, FormDataVO formData){
+    private Document fillWordDataByMap(String file, FormDataCheckVO formData){
         //获取word文档
         Document doc = WordHelpUtils.getDoc(file);
         //初始化设置
@@ -479,7 +719,7 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
         return doc;
     }
 
-    private Document fillFormData(Document doc, FormDataVO formData) {
+    private Document fillFormData(Document doc, FormDataCheckVO formData) {
 
         if(ObjectUtil.isNotEmpty(formData.getMainDataList())) {
             for(Map<String,Object> map : formData.getMainDataList()) {
@@ -498,4 +738,46 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
         }
         return doc;
     }
+
+    private void setWordClassData(List<ZhcxCommissionCheckDetailWordVO> detailWordVOList,ZhcxCommissionCheckDetailDo info,List<JSONObject> resultType,Document[] doc,SysFileItemDo fileTemp) {
+        if (StringUtils.isNotBlank(info.getChtestcontent())||StringUtils.isNotBlank(info.getEntestcontent())){
+            ZhcxCommissionCheckDetailWordVO checkDetailWordVO = new ZhcxCommissionCheckDetailWordVO();
+            checkDetailWordVO.setChapterno(info.getChapternopuls());
+            String chtestcontent = "";
+            String entestcontent = "";
+            if (StringUtils.isNotBlank(info.getChtestcontent())){
+                chtestcontent = info.getChtestcontent();
+            }
+            if (StringUtils.isNotBlank(info.getEntestcontent())){
+                entestcontent = info.getEntestcontent();
+            }
+            checkDetailWordVO.setContent(chtestcontent+entestcontent);
+            String testresult = "";
+            if (StringUtils.isNotBlank(info.getTestresult())){
+                testresult = resultType.stream().filter(dictDo -> info.getTestresult().contains(dictDo.getString("VALUE"))).findFirst().get().getString("NAME").toString();
+            }
+            checkDetailWordVO.setResult(testresult);
+            String testnotes = "";
+            if (StringUtils.isNotBlank(info.getTestnotes())){
+                testnotes = info.getTestnotes();
+            }
+            checkDetailWordVO.setTestnotes(testnotes);
+            detailWordVOList.add(checkDetailWordVO);
+            List<List<Map<String,Object>>> slaveTableDataList = new ArrayList<>();
+            List<Map<String, Object>> maps = convertNewList(detailWordVOList, ZhcxCommissionCheckDetailWordVO.class);
+            slaveTableDataList.add(maps);
+            FormDataCheckVO formDataCheckVO = new FormDataCheckVO();
+            Map<String,Object> mainDetailMap = new HashMap<>(16);
+            List<Map<String,Object>> mainDetailDataList = new ArrayList<>();
+            mainDetailDataList.add(mainDetailMap);
+            formDataCheckVO.setMainDataList(mainDetailDataList);
+            formDataCheckVO.setSlaveTableDataList(slaveTableDataList);
+            try {
+                Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), formDataCheckVO);
+                doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
+            } catch (Exception e) {
+                log.info("导出word失败:"+e);
+            }
+        }
+    }
 }

+ 2 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/commission/CustHandleMergeField4Heading.java

@@ -18,8 +18,9 @@ public class CustHandleMergeField4Heading extends HandleMergeField4Heading {
         try {
             DocumentBuilder builder = new DocumentBuilder(args.getDocument());
             builder.insertHtml("<h1 style='text-align:left;font-family:Simsun;'>一级标题</h1>");
-//            builder.insertHtml("<p></p>");
             builder.insertHtml("<h2 style='text-align:left;font-family:Simsun;'>二级标题</h2>");
+            builder.insertHtml("<h3 style='text-align:left;font-family:Simsun;'>三级标题</h3>");
+            builder.insertHtml("<h4 style='text-align:left;font-family:Simsun;'>四级标题</h4>");
         } catch (Exception e) {
         }
     }

+ 31 - 0
business-entity/src/main/java/com/rongwei/bsentity/vo/FormDataCheckVO.java

@@ -0,0 +1,31 @@
+package com.rongwei.bsentity.vo;
+
+import lombok.*;
+
+import java.util.List;
+import java.util.Map;
+
+@Getter
+@Setter
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class FormDataCheckVO {
+
+    /**
+     * 主表单数据
+     */
+    private List<Map<String,Object>> mainDataList;
+
+    /**
+     * 多个从表格数据
+     *
+     */
+    private List<List<Map<String,Object>>> slaveTableDataList;
+
+    /**
+     * 章节号
+     */
+    private String chapterno;
+
+}