Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baihang-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
baihang-report
Commits
c10127f9
Commit
c10127f9
authored
Jun 18, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还款&逾期方法优化
parent
dae12259
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
QuantGroupZhuDaiReportToBaiHang.java
...uantgroup/report/job/QuantGroupZhuDaiReportToBaiHang.java
+2
-1
BaiHangZhuDaiService.java
...antgroup/report/service/baihang/BaiHangZhuDaiService.java
+6
-5
DingTalk.java
...in/java/cn/quantgroup/report/utils/dingtalk/DingTalk.java
+1
-1
No files found.
src/main/java/cn/quantgroup/report/job/QuantGroupZhuDaiReportToBaiHang.java
View file @
c10127f9
...
@@ -46,7 +46,8 @@ public class QuantGroupZhuDaiReportToBaiHang {
...
@@ -46,7 +46,8 @@ public class QuantGroupZhuDaiReportToBaiHang {
private
DingTalk
dingTalk
;
private
DingTalk
dingTalk
;
@Async
@Async
@Scheduled
(
cron
=
"0 0 05 * * ?"
)
//@Scheduled(cron = "0 0 05 * * ?")
@Scheduled
(
cron
=
"0 0 04 * * ?"
)
public
void
startZhuDaiReport
(){
public
void
startZhuDaiReport
(){
if
(
increment
()){
if
(
increment
()){
redisTemplate
.
expire
(
Constant
.
QG_ZHU_DAI_REPORT_LOCK_KEY
,
10
,
TimeUnit
.
SECONDS
);
redisTemplate
.
expire
(
Constant
.
QG_ZHU_DAI_REPORT_LOCK_KEY
,
10
,
TimeUnit
.
SECONDS
);
...
...
src/main/java/cn/quantgroup/report/service/baihang/BaiHangZhuDaiService.java
View file @
c10127f9
...
@@ -407,19 +407,17 @@ public class BaiHangZhuDaiService {
...
@@ -407,19 +407,17 @@ public class BaiHangZhuDaiService {
log
.
info
(
"量化派助贷TO百行报送-联合贷实时还款, startnyr: {} , endnyr: {} , 大小: {} , 耗时: {} "
,
startnyr
,
endnyr
,
repaymentLoanInfosLh
.
size
(),
(
realTimeStopWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
log
.
info
(
"量化派助贷TO百行报送-联合贷实时还款, startnyr: {} , endnyr: {} , 大小: {} , 耗时: {} "
,
startnyr
,
endnyr
,
repaymentLoanInfosLh
.
size
(),
(
realTimeStopWatch2
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
}
else
{
}
else
{
/* 2020.06.18 暂时先注掉,补报 2020-06-11到2020-06-18的还款
Stopwatch
realTimeOverdueStopWatch3
=
Stopwatch
.
createStarted
();
Stopwatch
realTimeOverdueStopWatch3
=
Stopwatch
.
createStarted
();
//
repaymentLoanInfos = repaymentLoanInfoMapper.findRealTimeRepayMentOverdue(timeRecord);
repaymentLoanInfos
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdue
(
timeRecord
);
//2020.06.18 方法findRealTimeRepayMentOverdue用in查询已经慢的查不出,用等于吧
//2020.06.18 方法findRealTimeRepayMentOverdue用in查询已经慢的查不出,用等于吧
repaymentLoanInfos = this.findRealTimeRepayMentOverdueByFCId(startnyr, endnyr);
//
repaymentLoanInfos = this.findRealTimeRepayMentOverdueByFCId(startnyr, endnyr);
log
.
info
(
"量化派助贷TO百行报送-非联合贷实时还款逾期, startnyr: {} , endnyr: {} , 大小: {} , 耗时: {} "
,
startnyr
,
endnyr
,
repaymentLoanInfos
.
size
(),
(
realTimeOverdueStopWatch3
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
log
.
info
(
"量化派助贷TO百行报送-非联合贷实时还款逾期, startnyr: {} , endnyr: {} , 大小: {} , 耗时: {} "
,
startnyr
,
endnyr
,
repaymentLoanInfos
.
size
(),
(
realTimeOverdueStopWatch3
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
Stopwatch
realTimeOverdueStopWatch4
=
Stopwatch
.
createStarted
();
Stopwatch
realTimeOverdueStopWatch4
=
Stopwatch
.
createStarted
();
repaymentLoanInfosLh
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdueLh
(
timeRecord
);
repaymentLoanInfosLh
=
repaymentLoanInfoMapper
.
findRealTimeRepayMentOverdueLh
(
timeRecord
);
log
.
info
(
"量化派助贷TO百行报送-联合贷实时还款逾期, startnyr: {} , endnyr: {} , 大小: {} , 耗时: {} "
,
startnyr
,
endnyr
,
repaymentLoanInfosLh
.
size
(),
(
realTimeOverdueStopWatch4
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
log
.
info
(
"量化派助贷TO百行报送-联合贷实时还款逾期, startnyr: {} , endnyr: {} , 大小: {} , 耗时: {} "
,
startnyr
,
endnyr
,
repaymentLoanInfosLh
.
size
(),
(
realTimeOverdueStopWatch4
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
)
/
1000
)
+
".s"
);
*/
continue
;
}
}
if
(
repaymentLoanInfos
==
null
)
{
if
(
repaymentLoanInfos
==
null
)
{
...
@@ -517,6 +515,7 @@ public class BaiHangZhuDaiService {
...
@@ -517,6 +515,7 @@ public class BaiHangZhuDaiService {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"量化派助贷TO百行报送-异常 J: {} , 开始时间: {} , 结束时间: {} "
,
j
,
startnyr
,
endnyr
,
e
);
log
.
error
(
"量化派助贷TO百行报送-异常 J: {} , 开始时间: {} , 结束时间: {} "
,
j
,
startnyr
,
endnyr
,
e
);
dingTalk
.
talk
(
"Error"
,
"量化派助贷TO百行报送-"
+(
j
==
0
?
"还款"
:
"逾期"
)+
"信息异常"
,
e
);
dingTalk
.
talk
(
"Error"
,
"量化派助贷TO百行报送-"
+(
j
==
0
?
"还款"
:
"逾期"
)+
"信息异常"
,
e
);
dingTalk
.
talk_ToUser
(
"D3报送失败"
,
"量化派助贷TO百行报送-"
+(
j
==
0
?
"还款"
:
"逾期"
)+
"信息异常,请尽快手动处理!"
);
}
}
}
}
log
.
info
(
"量化派助贷TO百行报送-实时还款&逾期结束, resMsg: {} "
,
resMsg
);
log
.
info
(
"量化派助贷TO百行报送-实时还款&逾期结束, resMsg: {} "
,
resMsg
);
...
@@ -2354,6 +2353,7 @@ public class BaiHangZhuDaiService {
...
@@ -2354,6 +2353,7 @@ public class BaiHangZhuDaiService {
if
(
tmpList
!=
null
&&
tmpList
.
size
()>
0
){
if
(
tmpList
!=
null
&&
tmpList
.
size
()>
0
){
allRepaymentLoanInfo
.
addAll
(
tmpList
);
allRepaymentLoanInfo
.
addAll
(
tmpList
);
}
}
Thread
.
sleep
(
10
*
60
*
1000
);
//sleep 10分钟,分钟tidb实例内存满了
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"非联合贷还款-按资方id查询异常, fundingCorpId: {} "
,
fundingCorpId
,
e
);
log
.
error
(
"非联合贷还款-按资方id查询异常, fundingCorpId: {} "
,
fundingCorpId
,
e
);
allRepaymentLoanInfo
=
null
;
allRepaymentLoanInfo
=
null
;
...
@@ -2378,6 +2378,7 @@ public class BaiHangZhuDaiService {
...
@@ -2378,6 +2378,7 @@ public class BaiHangZhuDaiService {
if
(
tmpList
!=
null
&&
tmpList
.
size
()>
0
){
if
(
tmpList
!=
null
&&
tmpList
.
size
()>
0
){
allRepaymentLoanInfo
.
addAll
(
tmpList
);
allRepaymentLoanInfo
.
addAll
(
tmpList
);
}
}
Thread
.
sleep
(
10
*
60
*
1000
);
//sleep 10分钟,分钟tidb实例内存满了
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"非联合贷逾期按资方id查询异常, fundingCorpId: {} "
,
fundingCorpId
,
e
);
log
.
error
(
"非联合贷逾期按资方id查询异常, fundingCorpId: {} "
,
fundingCorpId
,
e
);
allRepaymentLoanInfo
=
null
;
allRepaymentLoanInfo
=
null
;
...
...
src/main/java/cn/quantgroup/report/utils/dingtalk/DingTalk.java
View file @
c10127f9
...
@@ -77,7 +77,7 @@ public class DingTalk {
...
@@ -77,7 +77,7 @@ public class DingTalk {
param
.
put
(
"alarmLevel"
,
"ERROE"
);
//
param
.
put
(
"alarmLevel"
,
"ERROE"
);
//
param
.
put
(
"msgTitle"
,
"量化派2百行:"
+
msgTitle
);
param
.
put
(
"msgTitle"
,
"量化派2百行:"
+
msgTitle
);
param
.
put
(
"msgContent"
,
msgContent
);
param
.
put
(
"msgContent"
,
msgContent
);
param
.
put
(
"toUsers"
,
"18
010105506
"
);
param
.
put
(
"toUsers"
,
"18
631397041
"
);
String
resp
=
iHttpService
.
post
(
talkUri
,
param
);
String
resp
=
iHttpService
.
post
(
talkUri
,
param
);
log
.
info
(
"钉钉报警接口调用结束, resp: {} "
,
resp
);
log
.
info
(
"钉钉报警接口调用结束, resp: {} "
,
resp
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
...
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