解决-法规月报-导出中英文内容勾选不一致bug
This commit is contained in:
+15
-3
@@ -575,7 +575,9 @@ public class WordUtil {
|
||||
String applyScopeName = dictItem(sysDictItems, applyScope,cut, DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE_REPORT.getValue());
|
||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||
|
||||
if(useMethodName.equals("安装即符合")){
|
||||
useMethodName = "安装需符合";
|
||||
}
|
||||
XWPFTable table = document.createTable(10, 2);
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
@@ -1222,9 +1224,20 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
private static void setBlank(String text, XWPFRun run, StringBuilder sb, String itemText) {
|
||||
//用法的三个复选框 在后端get到的英文和导出的word对应不上,也就是和itemText中的内容对应不上
|
||||
if(text.equals("constraint")){
|
||||
text = "Mandatory";
|
||||
}
|
||||
if(text.equals("recommend")){
|
||||
text = "Voluntary";
|
||||
}
|
||||
if(text.equals("installation is compliant")){
|
||||
text = "Mandatory if fitted";
|
||||
}
|
||||
|
||||
for (String value : itemText.split(",")) {
|
||||
String blank = getBlank(value);
|
||||
if(text.contains(value)){
|
||||
if(text.equals(value)){
|
||||
sb.append("■"+value+blank);
|
||||
}else{
|
||||
sb.append("□"+value+blank);
|
||||
@@ -1361,7 +1374,6 @@ public class WordUtil {
|
||||
// 设置链接字体大小
|
||||
CTHpsMeasure sz = rpr.isSetSz() ? rpr.getSz() : rpr.addNewSz();
|
||||
sz.setVal(new BigInteger("22"));
|
||||
|
||||
// CTHpsMeasure szCs = rpr.isSetSzCs() ? rpr.getSzCs() : rpr
|
||||
// .addNewSzCs();
|
||||
// szCs.setVal(new BigInteger("11"));
|
||||
|
||||
Reference in New Issue
Block a user