[测评系统]--测评系统核心代码库
linzhijie
2022-09-20 f8b82c489a661ec6ec2cbbc7ff1c74a17cc035c6
src/main/java/com/ots/common/utils/poi/WordUtil.java
@@ -407,6 +407,9 @@
            if(tableEnum == TableEnum.table4){
                if(tableNum != null && tableNum != 8){
                    for (int i = tableNum; i <= tableNum + 4; i++) {
                        if(i+2 > table.getRows().size()){
                            continue;
                        }
                        XWPFTableRow row = table.getRows().get(i+2);
                        List<XWPFTableCell> cells = row.getTableCells();
                        changeText(cells.get(0).getParagraphs().get(0),"#"+(i+1)+".");
@@ -1119,7 +1122,7 @@
            if(StringUtils.contains(keyValue, "%table-line-feed%")){
                String[] keyValues = keyValue.split("%table-line-feed%");
                runValue = delDynList(keyTemp, Arrays.asList(keyValues), paragraph, document,1);
            }else{
            }else if(StringUtils.contains(keyValue, "%line-feed%")){
                String[] keyValues = keyValue.split("%line-feed%");
                runValue = delDynList(keyTemp, Arrays.asList(keyValues), paragraph, document,0);
            }
@@ -1325,7 +1328,7 @@
            String key = "%" + textSet.getKey() + "%";
            if (text.indexOf(key) != -1) {
                text = text.replaceAll(key, (String) textMap.get(textSet.getKey()));
                text = text.replaceAll(key, String.valueOf(textMap.get(textSet.getKey())));
                repText = text;
                if (checkText(text)) {
                    continue;
@@ -1773,7 +1776,15 @@
            //更改表格的值
            textMap.put("sendEmailFileName", "JAQ");
            textMap.put("SelectUsers",8);
            //changeTable(document, textMap);
            changeText(document, textMap);
            changeTextBox(document, textMap);
            addTableValue(document, null);
            changeTable(document, textMap);
            //changChart(textMap, document, reportType, dataPath);
            //建立文件对象
            File file = new File("C:\\Users\\Administrator\\Desktop\\JAQ中文版1.docx");