【修改】 原始方法进行修改(之后可能不会使用)
This commit is contained in:
@@ -356,13 +356,7 @@ public class WpsExcelUtils {
|
||||
wpsPptxJudgementDto.setScoreRate("1");
|
||||
xlsxInfos.add(wpsPptxJudgementDto);
|
||||
}
|
||||
// TODO
|
||||
if (index == "1") {
|
||||
List<WpsPptxJudgementDto> randomItems = getRandomItems(xlsxInfos, 50);
|
||||
return randomItems;
|
||||
} else {
|
||||
return xlsxInfos;
|
||||
}
|
||||
return xlsxInfos;
|
||||
}
|
||||
|
||||
// 扁平化多维列表
|
||||
|
@@ -86,6 +86,9 @@ public class JudgementWpsPPT {
|
||||
String value = element == null ? "否" : "是" ;
|
||||
judgementList = setData(judgementList, chineseName + value, englishName + value);
|
||||
} else {
|
||||
if (element == null) {
|
||||
return null;
|
||||
}
|
||||
String[] valuesArr = values.split("#");
|
||||
String oneValue = "";
|
||||
for (String yivalue : valuesArr) {
|
||||
@@ -135,6 +138,9 @@ public class JudgementWpsPPT {
|
||||
String value = element == null ? "否" : "是" ;
|
||||
judgementList = setData(judgementList, chineseName + value, englishName + value);
|
||||
} else {
|
||||
if (element == null) {
|
||||
return null;
|
||||
}
|
||||
String[] valuesArr = values.split("#");
|
||||
String oneValue = "";
|
||||
for (String yivalue : valuesArr) {
|
||||
|
@@ -804,6 +804,7 @@ public class WpsWordUtils {
|
||||
if (wpTextXml.toNextSelection()) {
|
||||
String secondIdWp = getStringRandom();
|
||||
String text = wpTextXml.getTextValue();
|
||||
text = shorten(text);
|
||||
setWordInfo("段落" + wpIndex + ":" + text, "(//w:p)[" + wpIndex + "]", "w:pPr", filePath, secondIdWp, firstIdWp, wordInfoReqVos);
|
||||
// 使用 。 判断句子
|
||||
String[] texts = text.split("。");
|
||||
@@ -811,6 +812,7 @@ public class WpsWordUtils {
|
||||
for (String s : texts) {
|
||||
String thirdIdWp = getStringRandom();
|
||||
textsIndex ++;
|
||||
s = shorten(s);
|
||||
setWordInfo("句子" + textsIndex + ":" + s, "(//w:p)[" + wpIndex + "]", "w:r", filePath, thirdIdWp, secondIdWp, wordInfoReqVos);
|
||||
}
|
||||
}
|
||||
@@ -1265,4 +1267,13 @@ public class WpsWordUtils {
|
||||
}
|
||||
return fieldNames;
|
||||
}
|
||||
public static String shorten(String input) {
|
||||
if (input == null) return null;
|
||||
if (input.length() <= 14) {
|
||||
return input;
|
||||
}
|
||||
String prefix = input.substring(0, 2);
|
||||
String suffix = input.substring(input.length() - 2);
|
||||
return prefix + "..." + suffix;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user