非空判断
This commit is contained in:
+13
-10
@@ -20,6 +20,7 @@ import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.xwpf.usermodel.*;
|
||||
import org.apache.xmlbeans.XmlCursor;
|
||||
import org.apache.xmlbeans.XmlObject;
|
||||
@@ -522,16 +523,18 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
||||
for (XWPFRun xwrun : p.getRuns()) {
|
||||
VerticalAlign subscript = xwrun.getSubscript();
|
||||
String smalltext = xwrun.getText(0);
|
||||
switch (subscript) {
|
||||
case BASELINE:
|
||||
buffer.append(smalltext);
|
||||
break;
|
||||
case SUBSCRIPT:
|
||||
buffer.append("<span class=sub>" + smalltext + "</span>");
|
||||
break;
|
||||
case SUPERSCRIPT:
|
||||
buffer.append("<span class=sup>" + smalltext + "</span>");
|
||||
break;
|
||||
if (ObjectUtils.isNotEmpty(smalltext)) {
|
||||
switch (subscript) {
|
||||
case BASELINE:
|
||||
buffer.append(smalltext);
|
||||
break;
|
||||
case SUBSCRIPT:
|
||||
buffer.append("<span class=sub>" + smalltext + "</span>");
|
||||
break;
|
||||
case SUPERSCRIPT:
|
||||
buffer.append("<span class=sup>" + smalltext + "</span>");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
String text = buffer.toString();
|
||||
|
||||
Reference in New Issue
Block a user