Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-api
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Data-王博
finance-api
Commits
462c830d
Commit
462c830d
authored
Feb 23, 2017
by
Data-王博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
湖北消金 - 定时任务屏蔽提前还款推送
parent
8d7fe186
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
25 deletions
+29
-25
HuBeiReturnDiscScheduler.java
...ntgroup/financial/scheduler/HuBeiReturnDiscScheduler.java
+9
-10
ApiCommonServiceImpl.java
...antgroup/financial/service/impl/ApiCommonServiceImpl.java
+19
-15
HuBeiServiceImpl.java
...n/quantgroup/financial/service/impl/HuBeiServiceImpl.java
+1
-0
No files found.
src/main/java/cn/quantgroup/financial/scheduler/HuBeiReturnDiscScheduler.java
View file @
462c830d
...
...
@@ -113,16 +113,15 @@ public class HuBeiReturnDiscScheduler {
Byte
currentReqNo
=
new
Integer
(
1
).
byteValue
();
//推送回盘文件
HuBeiCFCResponse
debitResponse
=
iHuBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_BATCH_DEBIT
,
null
,
docDebitId
,
currentReqNo
);
HuBeiCFCResponse
advanceResponse
=
iHuBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_ADVANCE_REPAYMENT
,
null
,
advanceIdMap
.
get
(
currentReqNo
),
currentReqNo
);
//
HuBeiCFCResponse advanceResponse = iHuBeiService.handleDiscData(HubeiCFCDataType.RETURN_ADVANCE_REPAYMENT,null,advanceIdMap.get(currentReqNo),currentReqNo);
HuBeiCFCResponse
compensationResponse
=
iHuBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_BATCH_COMPENSATION
,
null
,
docCompensationId
,
currentReqNo
);
if
(
maxReqNo
!=
null
&&
maxReqNo
.
compareTo
(
currentReqNo
)>
0
){
logger
.
info
(
"start scheduleAdvanceRepay currentReqNo={},maxReqNo={},docAdvanceRepayId={}"
,
currentReqNo
,
maxReqNo
,
advanceDocId
);
ScheduleAdvanceRepay
scheduleAdvanceRepay
=
new
ScheduleAdvanceRepay
(
currentReqNo
,
maxReqNo
,
advanceIdMap
);
scheduleAdvanceRepay
.
registerService
(
scheduledExecutorService
,
iHuBeiService
,
iHuBeiCFCDao
,
huBeiHandlerDispatcher
);
scheduledExecutorService
.
schedule
(
scheduleAdvanceRepay
,
HubeiCFCField
.
thirtyMintes
,
TimeUnit
.
MINUTES
);
}
if
(
debitResponse
==
null
||
advanceResponse
==
null
||
compensationResponse
==
null
||!
HubeiCFCField
.
EC_SUCCESS_CODE
.
equals
(
advanceResponse
.
getEc
())
// if(maxReqNo!=null&&maxReqNo.compareTo(currentReqNo)>0){
// logger.info("start scheduleAdvanceRepay currentReqNo={},maxReqNo={},docAdvanceRepayId={}",currentReqNo,maxReqNo,advanceDocId);
// ScheduleAdvanceRepay scheduleAdvanceRepay = new ScheduleAdvanceRepay(currentReqNo,maxReqNo,advanceIdMap);
// scheduleAdvanceRepay.registerService(scheduledExecutorService,iHuBeiService,iHuBeiCFCDao,huBeiHandlerDispatcher);
// scheduledExecutorService.schedule(scheduleAdvanceRepay, HubeiCFCField.thirtyMintes, TimeUnit.MINUTES);
// }
if
(
debitResponse
==
null
||
compensationResponse
==
null
||!
HubeiCFCField
.
EC_SUCCESS_CODE
.
equals
(
compensationResponse
.
getEc
())
||!
HubeiCFCField
.
EC_SUCCESS_CODE
.
equals
(
debitResponse
.
getEc
())){
iHuBeiService
.
sendErrorMailNotice
(
"回盘文件发送失败,请悉知 联系相关人员"
);
...
...
@@ -160,7 +159,7 @@ class ScheduleAdvanceRepay implements Runnable{
public
boolean
isOutTime
(){
Long
spendtime
=
System
.
currentTimeMillis
()-
startTime
;
if
(
spendtime
>
1000
*
60
*
60
*
6
){
if
(
spendtime
/
1000
>
60
*
60
*
6
){
//运行超时 自动停止
return
true
;
}
else
{
...
...
src/main/java/cn/quantgroup/financial/service/impl/ApiCommonServiceImpl.java
View file @
462c830d
...
...
@@ -81,25 +81,29 @@ public class ApiCommonServiceImpl implements IApiCommonService {
@Override
public
PaymentDetail
queryData
(
Long
loanHistoryId
,
Long
repaymentPlanId
){
logger
.
info
(
"queryDate loanHistoryId={},repaymentPlanId={}"
,
loanHistoryId
,
repaymentPlanId
);
if
(
loanHistoryId
!=
null
){
String
response
=
httpService
.
get
(
queryPlansUrl
+
"?loanId="
+
loanHistoryId
);
if
(!
StringUtils
.
isEmpty
(
response
)){
logger
.
info
(
"response={}"
,
response
);
XyqbResult
jsonResult
=
JSON
.
parseObject
(
response
,
XyqbResult
.
class
);
if
(
jsonResult
!=
null
&&
jsonResult
.
getSuccess
()!=
null
&&
jsonResult
.
getSuccess
()){
PaymentDetail
paymentDetail
=
(
PaymentDetail
)
jsonResult
.
getData
();
try
{
savePaymentDetailAndRepaymentPlan
(
paymentDetail
);
}
catch
(
FieldInsufficientException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
try
{
if
(
loanHistoryId
!=
null
){
String
response
=
httpService
.
get
(
queryPlansUrl
+
"?loanId="
+
loanHistoryId
);
if
(!
StringUtils
.
isEmpty
(
response
)){
logger
.
info
(
"response={}"
,
response
);
XyqbResult
jsonResult
=
JSON
.
parseObject
(
response
,
XyqbResult
.
class
);
if
(
jsonResult
!=
null
&&
jsonResult
.
getSuccess
()!=
null
&&
jsonResult
.
getSuccess
()){
PaymentDetail
paymentDetail
=
(
PaymentDetail
)
jsonResult
.
getData
();
try
{
savePaymentDetailAndRepaymentPlan
(
paymentDetail
);
}
catch
(
FieldInsufficientException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
return
paymentDetail
;
}
else
{
logger
.
info
(
"result is not success"
);
}
return
paymentDetail
;
}
else
{
logger
.
info
(
"res
ult is not success
"
);
logger
.
info
(
"res
ponse is empty
"
);
}
}
else
{
logger
.
info
(
"response is empty"
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
return
null
;
}
...
...
src/main/java/cn/quantgroup/financial/service/impl/HuBeiServiceImpl.java
View file @
462c830d
...
...
@@ -572,6 +572,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
PaymentDetail
paymentDetail
=
paymentDao
.
getByLoanId
(
repayXyqbDetailList
.
get
(
0
).
getLoanApplicationHistoryId
());
if
(
paymentDetail
==
null
){
logger
.
warn
(
"loanId={} cant`t get paymentdetail"
,
repayXyqbDetailList
.
get
(
0
).
getLoanApplicationHistoryId
());
iApiCommonService
.
queryData
(
repayXyqbDetailList
.
get
(
0
).
getLoanApplicationHistoryId
(),
null
);
}
if
(
paymentDetail
!=
null
){
...
...
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