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
4a31a5be
Commit
4a31a5be
authored
May 06, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加注释,及日志输出
parent
02711475
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
27 deletions
+37
-27
ReportController.java
src/main/java/com/controller/ReportController.java
+3
-0
IReportServiceImpl.java
...main/java/com/service/report/impl/IReportServiceImpl.java
+10
-3
DataMapper.xml
src/main/resources/mybatis/data/DataMapper.xml
+24
-24
No files found.
src/main/java/com/controller/ReportController.java
View file @
4a31a5be
...
...
@@ -100,6 +100,7 @@ public class ReportController {
return
result
;
}
//下载报送的文件
@RequestMapping
(
"/dowloadFile"
)
public
void
dowloadFile
(
String
filePath
,
HttpServletResponse
response
)
throws
Exception
{
...
...
@@ -160,6 +161,7 @@ public class ReportController {
return
result
;
}
//txt文件上报
@RequestMapping
(
"/upDataByFile"
)
public
Map
<
String
,
Object
>
upDataByFile
(
@RequestParam
(
"file"
)
MultipartFile
file
,
String
type
,
String
fileType
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
...
...
@@ -193,6 +195,7 @@ public class ReportController {
return
result
;
}
//zip文件上报
@RequestMapping
(
"/upDataByZipFile"
)
public
Map
<
String
,
Object
>
upDataByZipFile
(
FileEntry
fileEntry
)
{
fileEntry
.
setFilePath
(
getPath
(
fileEntry
.
getFilePath
()));
...
...
src/main/java/com/service/report/impl/IReportServiceImpl.java
View file @
4a31a5be
...
...
@@ -435,6 +435,7 @@ public class IReportServiceImpl implements ReportService {
});
}
//查询报送状态
@Override
public
void
quaryReportedStatus
(
FileEntry
fileEntry
)
throws
QgException
{
...
...
@@ -450,7 +451,7 @@ public class IReportServiceImpl implements ReportService {
resp
=
taskJerseyClient
.
post
(
headerMap
,
null
,
reportConfig
.
getTaskUri
());
}
catch
(
Exception
e
)
{
log
.
error
(
"查看 fileName: {} ,异常e: {} "
,
fileEntry
.
getFileName
(),
e
);
throw
new
QgException
(
fileEntry
.
getFileName
()
+
"报送状态接口异常"
,
e
);
throw
new
QgException
(
fileEntry
.
getFileName
()
+
"
查看
报送状态接口异常"
,
e
);
}
if
(
resp
.
getStatus
()
==
200
)
{
/*
...
...
@@ -503,9 +504,15 @@ public class IReportServiceImpl implements ReportService {
}
}
}
else
{
log
.
info
(
"[ERROR] Status: "
+
resp
.
getStatus
());
log
.
error
(
"报送状态查询接口失败, Status: {} , fileName: {} "
,
resp
.
getStatus
(),
fileEntry
.
getFileName
());
try
{
log
.
info
(
"报送状态查询接口失败, entity="
+
resp
.
getEntity
(
String
.
class
));
}
catch
(
Exception
e
){
log
.
error
(
"报送状态查询接口失败, 读取getEntity异常"
,
e
);
}
//log.info("[ERROR] Status: " + resp.getStatus());
// log.info(resp.getEntity(String.class));
throw
new
QgException
(
"报送状态查询接口失败"
,
"http 状态
"
+
resp
.
getStatus
());
throw
new
QgException
(
"报送状态查询接口失败"
,
"http 状态
="
+
resp
.
getStatus
()+
", fileName="
+
fileEntry
.
getFileName
());
}
}
...
...
src/main/resources/mybatis/data/DataMapper.xml
View file @
4a31a5be
...
...
@@ -3,32 +3,32 @@
<mapper
namespace=
"com.mapper.data.DataMapper"
>
<!-- 获取日放款数据 -->
<select
id=
"getLoanDayData"
parameterType=
"map"
resultType=
"map"
>
set @t1=#{param.startDate};
set @t2=#{param.endDate};
set @t1=#{param.startDate};
set @t2=#{param.endDate};
select
b.name name
,'0' pidType
,b.id_no pid
,'913606000634663936' businessHappenOrgan
,a.loan_application_history_id loanId
,'2' businessType
,'21' businessKind
,DATE_FORMAT(@t1,'%Y%m%d') openDate
,DATE_FORMAT(DATE_SUB(x.deadline,INTERVAL 1 second),'%Y%m%d') dueDate
,a.contract_loan_amount creditMoney
,DATE_FORMAT(@t1,'%Y%m%d') businessHappenDate
,a.contract_loan_amount balance
,0 currentOverdueTotal
,'*' repaymentStatus
select
b.name name
,'0' pidType
,b.id_no pid
,'913606000634663936' businessHappenOrgan
,a.loan_application_history_id loanId
,'2' businessType
,'21' businessKind
,DATE_FORMAT(@t1,'%Y%m%d') openDate
,DATE_FORMAT(DATE_SUB(x.deadline,INTERVAL 1 second),'%Y%m%d') dueDate
,a.contract_loan_amount creditMoney
,DATE_FORMAT(@t1,'%Y%m%d') businessHappenDate
,a.contract_loan_amount balance
,0 currentOverdueTotal
,'*' repaymentStatus
from xyqb_i_loan_application_manifest_history a
left join xyqb_user_i_user_detail b on a.user_id=b.user_id
left join xyqb_i_repayment_plan x on a.loan_application_history_id=x.loan_application_history_id
AND a.contract_term=x.term_no
where a.funding_corp_id in (480,710,630,790,820) and a.transaction_status in (2,5)
and a.loan_paid_at
>
=@t1
and a.loan_paid_at
<
@t2;
from xyqb_i_loan_application_manifest_history a
left join xyqb_user_i_user_detail b on a.user_id=b.user_id
left join xyqb_i_repayment_plan x on a.loan_application_history_id=x.loan_application_history_id
AND a.contract_term=x.term_no
where a.funding_corp_id in (480,710,630,790,820) and a.transaction_status in (2,5)
and a.loan_paid_at
>
=@t1
and a.loan_paid_at
<
@t2;
</select>
<!-- 获取日还款数据 -->
<select
id=
"getRepayDayData"
resultType=
"map"
>
...
...
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