Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
25e96276
Commit
25e96276
authored
Jul 27, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文件转化位置
parent
6721c5ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
WordConverterUtils.java
...eejoin/amos/boot/biz/common/utils/WordConverterUtils.java
+0
-1
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+13
-11
application.properties
...boot-system-jcs/src/main/resources/application.properties
+0
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/WordConverterUtils.java
View file @
25e96276
...
...
@@ -80,7 +80,6 @@ public class WordConverterUtils {
* @param fileService 图片上传接口
*/
public
static
void
wordToHtml
(
String
srcFile
,
String
targetFile
,
String
imagePathStr
,
String
readUrl
,
FileService
fileService
,
String
product
,
String
appKey
,
String
token
)
{
//File doc = new File(srcFile);
File
html
=
new
File
(
targetFile
);
if
(
html
.
exists
())
{
return
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
25e96276
...
...
@@ -102,15 +102,6 @@ public class CommandController extends BaseController {
@Value
(
"${file.url}"
)
private
String
readUrl
;
/**
* 图片存储相对文档路径
*/
@Value
(
"${file.imagePathStr}"
)
private
String
imagePathStr
;
//本地临时文件夹
@Value
(
"${file.htmlPath}"
)
private
String
htmlPath
;
/**
* 警情列表
*
...
...
@@ -605,8 +596,19 @@ public class CommandController extends BaseController {
throws
Exception
{
String
fileName
=
readUrl
+
fileUrl
;
//目标文件
if
(
fileName
.
endsWith
(
".doc"
)
||
fileName
.
endsWith
(
".docx"
))
{
String
htmlFileName
=
htmlPath
+
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
)+
".html"
;
if
(
fileName
.
endsWith
(
".doc"
)
||
fileName
.
endsWith
(
".docx"
))
{
String
htmlPath
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"file"
+
File
.
separator
;
String
imagePathStr
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"image"
+
File
.
separator
;
String
name
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
'/'
)+
1
);
String
htmlFileName
=
htmlPath
+
name
.
substring
(
0
,
name
.
indexOf
(
"."
))
+
".html"
;
File
htmlP
=
new
File
(
htmlPath
);
if
(!
htmlP
.
exists
())
{
htmlP
.
mkdirs
();
}
File
htmlFile
=
new
File
(
htmlFileName
);
WordConverterUtils
.
wordToHtml
(
fileName
,
htmlFileName
,
imagePathStr
,
readUrl
,
remoteSecurityService
,
product
,
appKey
,
token
);
FileInputStream
fis
=
new
FileInputStream
(
htmlFile
);
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
25e96276
...
...
@@ -32,7 +32,5 @@ mqtt.topic.command.alert.notice=alertNotice
#跑马灯地震,天气预警信息
mqtt.topic.command.seismometeorology.notice
=
seismometeorology
file.htmlPath
=
D:/wwww/file/
file.imagePathStr
=
D:/wwww/image/
file.url
=
http://39.98.45.134:9000/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment