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
428d760c
Commit
428d760c
authored
Feb 24, 2017
by
Data-王博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
湖北消金 - 对一分钱处理
parent
b8ad581f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
ApiCommonController.java
.../quantgroup/financial/controller/ApiCommonController.java
+20
-5
HuBeiReturnDiscScheduler.java
...ntgroup/financial/scheduler/HuBeiReturnDiscScheduler.java
+1
-0
HuBeiServiceImpl.java
...n/quantgroup/financial/service/impl/HuBeiServiceImpl.java
+14
-2
No files found.
src/main/java/cn/quantgroup/financial/controller/ApiCommonController.java
View file @
428d760c
...
...
@@ -8,6 +8,7 @@ import cn.quantgroup.financial.json.JsonResult;
import
cn.quantgroup.financial.mapper.PaymentDetailMapper
;
import
cn.quantgroup.financial.model.PaymentDetail
;
import
cn.quantgroup.financial.model.RepaymentPlanStatus
;
import
cn.quantgroup.financial.scheduler.HuBeiReturnDiscScheduler
;
import
cn.quantgroup.financial.scheduler.HuBeiSendDiscScheduler
;
import
cn.quantgroup.financial.service.IApiCommonService
;
import
cn.quantgroup.financial.service.IHuBeiService
;
...
...
@@ -46,6 +47,9 @@ public class ApiCommonController {
@Autowired
HuBeiSendDiscScheduler
huBeiDayScheduler
;
@Autowired
HuBeiReturnDiscScheduler
huBeiReturnDiscScheduler
;
/**
* 放款 通知包含还款计划
* @return
...
...
@@ -143,15 +147,26 @@ public class ApiCommonController {
return
JsonResult
.
SUCCESS
();
}
@RequestMapping
(
value
=
"/hubei/returnDisc"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
@ResponseBody
JsonResult
getReturnDisc
(
@RequestParam
(
"applyDt"
)
String
applyDt
,
@RequestParam
(
"type"
)
Integer
type
,
@RequestParam
(
"docId"
)
Long
docId
){
@RequestMapping
(
value
=
"/hubei/returnDiscScheduler"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
@ResponseBody
JsonResult
getReturnDisc
(){
try
{
huBeiReturnDiscScheduler
.
dayScheduler
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
}
return
JsonResult
.
SUCCESS
();
}
@RequestMapping
(
value
=
"/hubei/handleReturnDisc"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
@ResponseBody
JsonResult
handleReturnDisc
(
@RequestParam
(
"applyDt"
)
String
applyDt
,
@RequestParam
(
"type"
)
Integer
type
,
@RequestParam
(
"docId"
)
Long
docId
){
try
{
if
(
type
.
intValue
()==
HubeiCFCDataType
.
RETURN_ADVANCE_REPAYMENT
.
get
().
intValue
()){
huBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_ADVANCE_REPAYMENT
,
null
,
null
,
new
Integer
(
1
).
byteValue
(),
applyDt
);
// huBeiService.handleDiscData(HubeiCFCDataType.RETURN_ADVANCE_REPAYMENT,null,docId
,new Integer(1).byteValue(),applyDt);
}
else
if
(
type
.
intValue
()==
HubeiCFCDataType
.
RETURN_BATCH_COMPENSATION
.
get
().
intValue
()){
huBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_BATCH_COMPENSATION
,
null
,
null
,
new
Integer
(
1
).
byteValue
(),
applyDt
);
huBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_BATCH_COMPENSATION
,
null
,
docId
,
new
Integer
(
1
).
byteValue
(),
applyDt
);
}
else
if
(
type
.
intValue
()==
HubeiCFCDataType
.
RETURN_BATCH_DEBIT
.
get
().
intValue
()){
huBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_BATCH_DEBIT
,
null
,
null
,
new
Integer
(
1
).
byteValue
(),
applyDt
);
huBeiService
.
handleDiscData
(
HubeiCFCDataType
.
RETURN_BATCH_DEBIT
,
null
,
docId
,
new
Integer
(
1
).
byteValue
(),
applyDt
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
...
...
src/main/java/cn/quantgroup/financial/scheduler/HuBeiReturnDiscScheduler.java
View file @
428d760c
...
...
@@ -127,6 +127,7 @@ public class HuBeiReturnDiscScheduler {
iHuBeiService
.
sendErrorMailNotice
(
"回盘文件发送失败,请悉知 联系相关人员"
);
}
}
}
class
ScheduleAdvanceRepay
implements
Runnable
{
...
...
src/main/java/cn/quantgroup/financial/service/impl/HuBeiServiceImpl.java
View file @
428d760c
...
...
@@ -298,7 +298,12 @@ public class HuBeiServiceImpl implements IHuBeiService {
if
(
jsonBean
!=
null
&&
jsonBean
.
getRepayAmount
()!=
null
&&
jsonBean
.
getReallyRepayAmount
()!=
null
){
if
(
jsonBean
.
getReallyRepayAmount
().
compareTo
(
BigDecimal
.
ZERO
)!=
0
&&
jsonBean
.
getRepayAmount
().
compareTo
(
jsonBean
.
getReallyRepayAmount
())!=
0
){
errorHuBeiHistoryList
.
add
(
history
);
continue
;
if
(
jsonBean
.
getRepayAmount
().
subtract
(
jsonBean
.
getReallyRepayAmount
()).
compareTo
(
new
BigDecimal
(
"0.01"
))>
0
){
continue
;
}
else
{
//差值在一分钱以内 则发错误邮件同时校准跟湖北保持一致 方便后续对账。
jsonBean
.
setReallyRepayAmount
(
jsonBean
.
getRepayAmount
());
}
}
}
else
{
logger
.
info
(
"jsonBean is null, history={}"
,
JSON
.
toJSONString
(
history
));
...
...
@@ -573,10 +578,17 @@ public class HuBeiServiceImpl implements IHuBeiService {
if
(
paymentDetail
==
null
){
logger
.
warn
(
"loanId={} cant`t get paymentdetail"
,
repayXyqbDetailList
.
get
(
0
).
getLoanApplicationHistoryId
());
iApiCommonService
.
queryData
(
repayXyqbDetailList
.
get
(
0
).
getLoanApplicationHistoryId
(),
null
);
paymentDetail
=
paymentDao
.
getByLoanId
(
repayXyqbDetailList
.
get
(
0
).
getLoanApplicationHistoryId
());
}
List
<
HuBeiHistory
>
flowHuBeiHistoryList
=
huBeiCFCDao
.
getFlowByContractNoList
(
Arrays
.
asList
(
paymentDetail
.
getMerchantContractNo
()));
List
<
HuBeiHistory
>
flowHuBeiHistoryList
=
null
;
if
(
paymentDetail
!=
null
){
try
{
flowHuBeiHistoryList
=
huBeiCFCDao
.
getFlowByContractNoList
(
Arrays
.
asList
(
paymentDetail
.
getMerchantContractNo
()));
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
for
(
RepayXyqbDetail
repayXyqbDetail:
repayXyqbDetailList
){
seqNo
++;
HuBeiHistory
advanceHuiBeiHistory
=
new
HuBeiHistory
();
...
...
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