风险矩阵功能,增加日志输出。先判断内容,再加表头
This commit is contained in:
parent
438f217a77
commit
597c5173a3
@ -790,6 +790,9 @@ public class OutputWordUtil {
|
||||
JSONObject jsonObject = JSONObject.parseObject(riskMatrixInfo.getPropertyValue());
|
||||
if(null != jsonObject){
|
||||
JSONArray tableInfo = jsonObject.getJSONArray("table");
|
||||
//看看tableInfo是什么内容,如果没有内容,也不用生成表格
|
||||
System.out.println(">>>>>>>>>tableInfo.toString() = " + tableInfo.toString());
|
||||
if(!tableInfo.isEmpty()){
|
||||
//添加段落,设置一级序列
|
||||
Paragraph paragraph_risk = section.addParagraph();
|
||||
ParagraphFormat paragraphFormat_risk = paragraph_risk.getFormat();
|
||||
@ -831,7 +834,6 @@ public class OutputWordUtil {
|
||||
}else if(i==3){
|
||||
row.getCells().get(3).setWidth(10);
|
||||
}
|
||||
|
||||
}
|
||||
//添加数据到表中
|
||||
for (int i = 1; i < tableInfo.size(); i++) {
|
||||
@ -840,8 +842,6 @@ public class OutputWordUtil {
|
||||
dataRow.setHeight(25);
|
||||
dataRow.setHeightType(TableRowHeightType.Auto);
|
||||
dataRow.getRowFormat().setBackColor(Color.white);
|
||||
|
||||
|
||||
int flagNum = 0;
|
||||
for (String cellKey : cellInfo.keySet()) {
|
||||
if(cellKey.equals("id")){
|
||||
@ -859,11 +859,7 @@ public class OutputWordUtil {
|
||||
dataRow.getRowFormat().setHorizontalAlignment(RowAlignment.Center);
|
||||
dataRow.getCells().get(flagNum).getCellFormat();
|
||||
flagNum++;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//设置固定列宽
|
||||
if(i==0){
|
||||
row.getCells().get(0).setWidth(10);
|
||||
@ -874,11 +870,11 @@ public class OutputWordUtil {
|
||||
}else if(i==3){
|
||||
row.getCells().get(3).setWidth(10);
|
||||
}
|
||||
|
||||
}
|
||||
Paragraph paragraph_blank = section.addParagraph();
|
||||
}
|
||||
}
|
||||
}
|
||||
//关键控制点风险矩阵 结束
|
||||
|
||||
//相关文件 R_relevant_flies
|
||||
|
||||
Loading…
Reference in New Issue
Block a user