Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhj-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
data-spider
zhj-report
Commits
34b5a9f5
Commit
34b5a9f5
authored
May 29, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善日志输出,及文件目录//处理
parent
40e2aeca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
IReportServiceImpl.java
...main/java/com/service/report/impl/IReportServiceImpl.java
+10
-3
No files found.
src/main/java/com/service/report/impl/IReportServiceImpl.java
View file @
34b5a9f5
...
...
@@ -143,6 +143,12 @@ public class IReportServiceImpl implements ReportService {
String
str
=
formatData
(
dataList
,
reportConfig
.
isDesensitization
());
String
savepath
=
reportConfig
.
getFilePathPre
()
+
File
.
separator
+
DateUtil
.
getCurrentServerDate
(
DateUtil
.
YYYYMMDD
)
+
File
.
separator
+
PathType
.
REPORT
.
getPath
();
//modify 2020.05.29
if
(
savepath
!=
null
&&
savepath
.
indexOf
(
"//"
)!=-
1
){
String
tmp_savepath
=
savepath
;
savepath
=
savepath
.
replaceAll
(
"//"
,
"/"
);
log
.
info
(
"发现文件路径中有//替换, 原: {} , 新: {} "
,
tmp_savepath
,
savepath
);
}
File
file
=
new
File
(
savepath
);
if
(!
file
.
exists
())
{
...
...
@@ -364,9 +370,9 @@ public class IReportServiceImpl implements ReportService {
log
.
info
(
"[header]: \n"
+
utils
.
map2Json
(
headerMap
));
try
{
resp
=
reportJerseyClient
.
post
(
headerMap
,
bodyMap
,
reportConfig
.
getDataUri
());
log
.
info
(
"上报返回结果
resp: {} "
,
resp
);
log
.
info
(
"上报返回结果
, fileName: {} , resp: {} "
,
fileEntry
.
getFileName
()
,
resp
);
String
entitystr
=
resp
.
getEntity
(
String
.
class
);
log
.
info
(
"上报返回结果
entitystr: {} "
,
entitystr
);
log
.
info
(
"上报返回结果
, fileName: {} , entitystr: {} "
,
fileEntry
.
getFileName
()
,
entitystr
);
ReportRecord
record
=
new
ReportRecord
();
record
.
setFilename
(
fileEntry
.
getFileName
());
record
.
setFilepath
(
fileEntry
.
getFilePath
());
...
...
@@ -396,9 +402,10 @@ public class IReportServiceImpl implements ReportService {
throw
new
QgException
(
"上报接口返回失败"
,
entitystr
);
}
}
catch
(
QgException
e
)
{
log
.
error
(
"上报接口请求异常QgException, fileName: {} "
,
fileEntry
.
getFileName
(),
e
);
throw
e
;
}
catch
(
Exception
e
)
{
log
.
error
(
"上报接口请求异常
"
,
e
);
log
.
error
(
"上报接口请求异常
Exception, fileName: {} "
,
fileEntry
.
getFileName
()
,
e
);
ReportRecord
record
=
new
ReportRecord
();
record
.
setFilename
(
fileEntry
.
getFileName
());
record
.
setFilepath
(
fileEntry
.
getFilePath
());
...
...
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