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
40e2aeca
Commit
40e2aeca
authored
May 06, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善日志输出
parent
4a31a5be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
IReportServiceImpl.java
...main/java/com/service/report/impl/IReportServiceImpl.java
+5
-9
No files found.
src/main/java/com/service/report/impl/IReportServiceImpl.java
View file @
40e2aeca
...
...
@@ -446,11 +446,12 @@ public class IReportServiceImpl implements ReportService {
log
.
info
(
"[preparedMap]: \n"
+
utils
.
map2Json
(
preparedMap
));
// 构造header
Map
<
String
,
String
>
headerMap
=
getHeaderMap
(
preparedMap
);
log
.
info
(
"[header]: \n"
+
utils
.
map2Json
(
headerMap
));
log
.
info
(
"
查看报送状态入参,
[header]: \n"
+
utils
.
map2Json
(
headerMap
));
try
{
resp
=
taskJerseyClient
.
post
(
headerMap
,
null
,
reportConfig
.
getTaskUri
());
}
catch
(
Exception
e
)
{
log
.
error
(
"查看 fileName: {} ,异常e: {} "
,
fileEntry
.
getFileName
(),
e
);
//log.error("查看 fileName: {} ,异常e: {} ", fileEntry.getFileName(), e);
log
.
error
(
"查看报送状态接口异常, fileName: {} "
,
fileEntry
.
getFileName
(),
e
);
throw
new
QgException
(
fileEntry
.
getFileName
()
+
"查看报送状态接口异常"
,
e
);
}
if
(
resp
.
getStatus
()
==
200
)
{
...
...
@@ -464,7 +465,7 @@ public class IReportServiceImpl implements ReportService {
* 存在入库失败的数据,见tmp/test.txt
*/
String
responseString
=
resp
.
getEntity
(
String
.
class
);
log
.
info
(
"查
询报送任务是否入库结束: {} "
,
responseString
);
log
.
info
(
"查
看报送状态结束200, fileName: {} , entity: {} "
,
fileEntry
.
getFileName
()
,
responseString
);
JSONObject
json
=
JSON
.
parseObject
(
responseString
);
// 如果有反馈文件 说明有数据未成功入库
// 反馈报文保存为txt文件
...
...
@@ -504,12 +505,7 @@ public class IReportServiceImpl implements ReportService {
}
}
}
else
{
log
.
error
(
"报送状态查询接口失败, Status: {} , fileName: {} "
,
resp
.
getStatus
(),
fileEntry
.
getFileName
());
try
{
log
.
info
(
"报送状态查询接口失败, entity="
+
resp
.
getEntity
(
String
.
class
));
}
catch
(
Exception
e
){
log
.
error
(
"报送状态查询接口失败, 读取getEntity异常"
,
e
);
}
log
.
error
(
"报送状态查询接口失败, fileName: {} , Status: {} , entity: {} "
,
fileEntry
.
getFileName
(),
resp
.
getStatus
(),
resp
.
getEntity
(
String
.
class
));
//log.info("[ERROR] Status: " + resp.getStatus());
// log.info(resp.getEntity(String.class));
throw
new
QgException
(
"报送状态查询接口失败"
,
"http 状态="
+
resp
.
getStatus
()+
", fileName="
+
fileEntry
.
getFileName
());
...
...
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