Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
f125f614
提交
f125f614
authored
4月 22, 2020
作者:
孙洁清
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决内存溢出
上级
b21ea02e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
23 行增加
和
22 行删除
+23
-22
DocumentWordUtil.java
src/main/java/com/zjty/inspect/utils/DocumentWordUtil.java
+19
-19
WpsUtil.java
src/main/java/com/zjty/inspect/utils/WpsUtil.java
+4
-3
pg.ftl
src/main/resources/templates/pg.ftl
+0
-0
没有找到文件。
src/main/java/com/zjty/inspect/utils/DocumentWordUtil.java
浏览文件 @
f125f614
...
...
@@ -33,7 +33,7 @@ import java.util.regex.Matcher;
* FreeMakerUtils.writeFile("E:/doc/text.doc",document);
*/
public
class
DocumentWordUtil
{
public
static
String
Maintitle
(){
public
String
Maintitle
(){
return
"<w:p>\n"
+
" <w:pPr>\n"
+
" <w:pStyle w:val=\"2\"/>\n"
+
...
...
@@ -53,7 +53,7 @@ public class DocumentWordUtil {
" </w:p>"
;
}
public
static
String
subheading
(
DocumentTitleEnum
documentTitleEnum
){
public
String
subheading
(
DocumentTitleEnum
documentTitleEnum
){
return
"<w:p>\n"
+
" <w:pPr>\n"
+
...
...
@@ -97,7 +97,7 @@ public class DocumentWordUtil {
}
public
static
String
getTableString
(
List
<
TechnologyContent
>
tables
,
String
technologyName
,
String
stra
){
public
String
getTableString
(
List
<
TechnologyContent
>
tables
,
String
technologyName
,
String
stra
){
//key 表格标题,value 内容
String
s3
=
tableTile
(
technologyName
,
stra
);
String
s4
=
Matcher
.
quoteReplacement
(
s3
);
...
...
@@ -112,14 +112,14 @@ public class DocumentWordUtil {
return
sb
.
toString
();
}
public
static
String
gettb
(
TechnologyContent
technologyContent
){
public
String
gettb
(
TechnologyContent
technologyContent
){
StringBuilder
sb
=
new
StringBuilder
();
String
biaoge
=
biaoge
(
technologyContent
);
sb
.
append
(
biaoge
);
return
sb
.
toString
();
}
public
static
String
tabtb
(){
public
String
tabtb
(){
return
"<w:tc>\n"
+
" <w:tcPr>\n"
+
" <w:tcW w:w=\"#colW#\" w:type=\"dxa\"/>\n"
+
...
...
@@ -146,7 +146,7 @@ public class DocumentWordUtil {
" </w:p>\n"
+
" </w:tc>"
;
}
public
static
String
tabtr
(){
public
String
tabtr
(){
return
"<w:tc>\n"
+
" <w:tcPr>\n"
+
" <w:tcW w:w=\"#colW#\" w:type=\"dxa\"/>\n"
+
...
...
@@ -175,7 +175,7 @@ public class DocumentWordUtil {
}
public
static
String
tr
(){
public
String
tr
(){
return
"<w:tr>\n"
+
" <w:tblPrEx>\n"
+
" <w:tblBorders>\n"
+
...
...
@@ -204,7 +204,7 @@ public class DocumentWordUtil {
" <w:trHeight w:val=\"400\" w:h-rule=\"atLeast\"/>\n"
+
" </w:trPr>"
;
}
public
static
String
standtab
(){
public
String
standtab
(){
return
"<w:tbl>\n"
+
" <w:tblPr>\n"
+
" <w:tblStyle w:val=\"a9\"/>\n"
+
...
...
@@ -257,7 +257,7 @@ public class DocumentWordUtil {
" </w:tbl>"
;
}
public
static
void
yem
(){
public
void
yem
(){
String
str
=
"<w:sectPr>\n"
+
" <w:hdr w:type=\"odd\">\n"
+
" <w:p>\n"
+
...
...
@@ -464,7 +464,7 @@ public class DocumentWordUtil {
" <w:docGrid w:type=\"lines\" w:line-pitch=\"312\"/>\n"
+
" </w:sectPr>"
;
}
public
static
String
tableTile
(
String
technologyName
,
String
strategy
){
public
String
tableTile
(
String
technologyName
,
String
strategy
){
return
"<w:p><w:pPr><w:tabs><w:tab w:val=\"left\" w:pos=\"5422\"/></w:tabs></w:pPr><w:r><w:rPr><w:rFonts w:hint=\"fareast\"/></w:rPr><w:t>关键技术:"
+
technologyName
+
"</w:t></w:r><w:r><w:rPr><w:rFonts w:hint=\"fareast\"/></w:rPr><w:tab/></w:r><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"
+
...
...
@@ -582,7 +582,7 @@ public class DocumentWordUtil {
" </w:tc>\n"
+
" </w:tr>\n"
;
}
public
static
String
enddard
(){
public
String
enddard
(){
return
"<w:sectPr>\n"
+
" <w:hdr w:type=\"odd\">\n"
+
" <w:p>\n"
+
...
...
@@ -792,7 +792,7 @@ public class DocumentWordUtil {
" </w:body>\n"
+
"</w:wordDocument>"
;
}
public
static
String
standard
(){
public
String
standard
(){
String
str
=
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
+
"<?mso-application progid=\"Word.Document\"?>\n"
+
"<w:wordDocument xmlns:w=\"http://schemas.microsoft.com/office/word/2003/wordml\" xmlns:v=\"urn:schemas-microsoft-com:vml\"\n"
+
...
...
@@ -1374,7 +1374,7 @@ public class DocumentWordUtil {
" <wx:sect>\n"
;
return
str
;
}
public
static
String
biaoge
(
TechnologyContent
content
){
public
String
biaoge
(
TechnologyContent
content
){
return
"<w:tr>\n"
+
" <w:tblPrEx>\n"
+
" <w:tblBorders>\n"
+
...
...
@@ -1470,16 +1470,16 @@ public class DocumentWordUtil {
" </w:tr>"
;
}
public
static
String
createDocument
(
DocumentPage
documentPage
)
{
public
String
createDocument
(
DocumentPage
documentPage
)
{
StringBuilder
sb
=
new
StringBuilder
();
//前面部分内容
String
standard
=
DocumentWordUtil
.
standard
();
String
enddard
=
DocumentWordUtil
.
enddard
();
String
standard
=
standard
();
String
enddard
=
enddard
();
//标题内容
String
maintitle
=
DocumentWordUtil
.
Maintitle
();
String
maintitle
=
Maintitle
();
// String subheading = DocumentWordUtil.subheading();
//标题下的内容
String
standContent
=
DocumentWordUtil
.
content
();
String
standContent
=
content
();
//表格内容
...
...
@@ -1493,7 +1493,7 @@ public class DocumentWordUtil {
for
(
TitleHead
titleHead
:
titleHeads
)
{
DocumentTitleEnum
byCode
=
DocumentTitleEnum
.
getByCode
(
titleHead
.
getParentId
());
if
(
byCode
!=
null
)
{
String
titleContent
=
DocumentWordUtil
.
subheading
(
byCode
);
String
titleContent
=
subheading
(
byCode
);
//标题名称
String
name
=
titleHead
.
getName
();
...
...
src/main/java/com/zjty/inspect/utils/WpsUtil.java
浏览文件 @
f125f614
...
...
@@ -201,18 +201,19 @@ public class WpsUtil {
StringBuilder
youhua
=
new
StringBuilder
();
StringBuilder
xiugai
=
new
StringBuilder
();
StringBuilder
weizhi
=
new
StringBuilder
();
DocumentWordUtil
documentWordUtil
=
new
DocumentWordUtil
();
for
(
String
string
:
strings
)
{
if
(
string
.
contains
(
"优化"
))
{
List
<
TechnologyContent
>
technologyContents
=
teMap
.
get
(
string
);
String
str
=
D
ocumentWordUtil
.
getTableString
(
technologyContents
,
string
,
"优化"
);
String
str
=
d
ocumentWordUtil
.
getTableString
(
technologyContents
,
string
,
"优化"
);
youhua
.
append
(
str
);
}
else
if
(
string
.
contains
(
"不支持"
))
{
List
<
TechnologyContent
>
technologyContents
=
teMap
.
get
(
string
);
String
str
=
D
ocumentWordUtil
.
getTableString
(
technologyContents
,
string
,
"重新开发"
);
String
str
=
d
ocumentWordUtil
.
getTableString
(
technologyContents
,
string
,
"重新开发"
);
xiugai
.
append
(
str
);
}
else
if
(
string
.
contains
(
"未知"
))
{
List
<
TechnologyContent
>
technologyContents
=
teMap
.
get
(
string
);
String
str
=
D
ocumentWordUtil
.
getTableString
(
technologyContents
,
string
,
"验证修改或重新开发"
);
String
str
=
d
ocumentWordUtil
.
getTableString
(
technologyContents
,
string
,
"验证修改或重新开发"
);
weizhi
.
append
(
str
);
}
}
...
...
src/main/resources/templates/pg.ftl
浏览文件 @
f125f614
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论