提交 b70fdcf7 authored 作者: 孙洁清's avatar 孙洁清

Merge branch 'lj-project' of git.yfzx.zjtys.com.cn:912-system/monitor/inspect into lj-project

# Conflicts: # src/main/java/com/zjty/inspect/utils/DocumentWordUtil.java
上级 afc45174
......@@ -465,48 +465,19 @@ public class DocumentWordUtil {
" </w:sectPr>";
}
public static String tableTile(String technologyName,String strategy){
return "<w:p>\n" +
" <w:pPr>\n" +
" <w:pStyle w:val=\"4\"/>\n" +
" <w:listPr>\n" +
" <w:ilvl w:val=\"2\"/>\n" +
" <w:ilfo w:val=\"1\"/>\n" +
" </w:listPr>\n" +
" </w:pPr>\n" +
" <aml:annotation aml:id=\"18\" w:type=\"Word.Bookmark.Start\" w:name=\"_Toc37973773\"/>\n" +
" <w:r>\n" +
" <w:rPr>\n" +
" <w:rFonts w:hint=\"fareast\"/>\n" +
" </w:rPr>\n" +
" <w:t>可优化的项</w:t>\n" +
" </w:r>\n" +
" <aml:annotation aml:id=\"18\" w:type=\"Word.Bookmark.End\"/>\n" +
" </w:p>\n" +
" <w:p>\n" +
return " <w:p>\n" +
" <w:pPr>\n" +
" <w:tabs>\n" +
" <w:tab w:val=\"left\" w:pos=\"5422\"/>\n" +
" </w:tabs>\n" +
" </w:pPr>\n" +
" <w:r>\n" +
" <w:rPr>\n" +
" <w:rFonts w:hint=\"fareast\"/>\n" +
" </w:rPr>\n" +
" <w:t>关键技术:"+technologyName+"</w:t>\n" +
" </w:r>\n" +
" <w:r>\n" +
" <w:r><w:rPr><w:rFonts w:hint=\"fareast\"/></w:rPr><w:t>关键技术:"+technologyName+"</w:t></w:r><w:r>\n" +
" <w:rPr>\n" +
" <w:rFonts w:hint=\"fareast\"/>\n" +
" </w:rPr>\n" +
" <w:tab/>\n" +
" </w:r>\n" +
" <w:r>\n" +
" <w:rPr>\n" +
" <w:rFonts w:hint=\"fareast\"/>\n" +
" </w:rPr>\n" +
" <w:t>替换策略:"+strategy+"</w:t>\n" +
" </w:r>\n" +
" </w:p>"+"<w:tbl>\n" +
" <w:r><w:rPr><w:rFonts w:hint=\"fareast\"/></w:rPr><w:t>替换策略:"+strategy+"</w:t></w:r></w:p>"+"<w:tbl>\n" +
" <w:tblPr>\n" +
" <w:tblStyle w:val=\"a13\"/>\n" +
" <w:tblW w:w=\"0\" w:type=\"auto\"/>\n" +
......
......@@ -3,6 +3,8 @@ package com.zjty.inspect.utils;
import com.alibaba.fastjson.JSON;
import com.zjty.inspect.entity.*;
import com.zjty.inspect.enums.*;
import io.netty.util.internal.StringUtil;
import org.springframework.util.StringUtils;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
......@@ -71,7 +73,7 @@ public class WpsUtil {
Browser browser = reform.getBrowser();
repairMap("compatibleBrowsers",13,browser.getCompatibleBrowsers(),keyValue);
repairMap("compatibleBrowsers", 13, browser.getCompatibleBrowsers(), keyValue);
repairMap("browserPlugs",13,browser.getBrowserPlugs(),keyValue);
repairMap("middleware",13,reform.getMiddleware().getMiddlewareEnums(),keyValue);
Middleware middleware = reform.getMiddleware();
......@@ -428,13 +430,26 @@ public class WpsUtil {
}
private static void repairMap(String name,int size, List<BaseDes> list, Map<String, String> keyValue){
for (int i = 0; i < size; i++) {
int i1 = i + 1;
if(i>=list.size()){
keyValue.put("compatibleBrowsers"+i1, "无");
continue;
if(list!=null&&list.size()>0){
int len=list.size();
for (int i = 0; i < size; i++) {
int i1 = i + 1;
if(len>i){
if(!StringUtils.isEmpty(list.get(i).getName())) {
keyValue.put(name+ i1,list.get(i).getName());
}else{
keyValue.put(name + i1,"无" );
}
}else {
keyValue.put(name+i1, "无");
}
}
}else{
for (int i = 0; i < size; i++) {
int i1 = i + 1;
keyValue.put(name+i1, "无");
}
keyValue.put(name+i1, list.get(i).getName());
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论