Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
b53cc336
Commit
b53cc336
authored
Oct 15, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改还款
parent
3fec433b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
RepaymentServiceImpl.java
...ot/module/hygf/biz/service/impl/RepaymentServiceImpl.java
+18
-8
RepaymentExcelVO.java
...eejoin/amos/boot/module/hygf/biz/vo/RepaymentExcelVO.java
+4
-4
application.properties
...module-hygf-biz/src/main/resources/application.properties
+2
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/RepaymentServiceImpl.java
View file @
b53cc336
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.RepaymentMapper;
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.RepaymentMapper;
import
com.yeejoin.amos.boot.module.hygf.api.service.IRepaymentService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IRepaymentService
;
import
com.yeejoin.amos.boot.module.hygf.biz.vo.RepaymentExcelVO
;
import
com.yeejoin.amos.boot.module.hygf.biz.vo.RepaymentExcelVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -135,8 +136,13 @@ public class RepaymentServiceImpl extends BaseService<RepaymentDto, Repayment, R
...
@@ -135,8 +136,13 @@ public class RepaymentServiceImpl extends BaseService<RepaymentDto, Repayment, R
/**
/**
* 定时发送还款信息 15天发送、5天发送、当天发送
* 定时发送还款信息 15天发送、5天发送、当天发送
*/
*/
@Scheduled
(
cron
=
"
0 0 1 * * ?
"
)
@Scheduled
(
cron
=
"
${repaymentCron}
"
)
public
void
cronSendRepayMessage
()
{
public
void
cronSendRepayMessage
()
{
execute
();
}
@Async
private
void
execute
()
{
List
<
Repayment
>
repaymentList
=
list
();
List
<
Repayment
>
repaymentList
=
list
();
if
(
CollectionUtil
.
isNotEmpty
(
repaymentList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
repaymentList
))
{
for
(
Repayment
repayment
:
repaymentList
)
{
for
(
Repayment
repayment
:
repaymentList
)
{
...
@@ -193,17 +199,21 @@ public class RepaymentServiceImpl extends BaseService<RepaymentDto, Repayment, R
...
@@ -193,17 +199,21 @@ public class RepaymentServiceImpl extends BaseService<RepaymentDto, Repayment, R
throw
new
BadRequest
(
companyName
+
",该用户没有权限"
);
throw
new
BadRequest
(
companyName
+
",该用户没有权限"
);
}
}
String
period
=
(
String
)
objects
.
get
(
1
);
String
period
=
String
.
valueOf
(
objects
.
get
(
1
)
);
String
repayDate
=
(
String
)
objects
.
get
(
2
);
String
repayDate
=
String
.
valueOf
(
objects
.
get
(
2
)
);
String
rent
=
(
String
)
objects
.
get
(
3
);
String
rent
=
String
.
valueOf
(
objects
.
get
(
3
)
);
String
interest
=
(
String
)
objects
.
get
(
4
);
String
interest
=
String
.
valueOf
(
objects
.
get
(
4
)
);
String
principal
=
(
String
)
objects
.
get
(
5
);
String
principal
=
String
.
valueOf
(
objects
.
get
(
5
)
);
String
loanPeriod
=
(
String
)
objects
.
get
(
6
);
String
loanPeriod
=
String
.
valueOf
(
objects
.
get
(
6
)
);
repayment
.
setMessageState
(
RepaymentMessageStateEnum
.
UN_CONFIRM
.
getCode
());
repayment
.
setMessageState
(
RepaymentMessageStateEnum
.
UN_CONFIRM
.
getCode
());
repayment
.
setCronSendState
(
RepaymentCronSendStateEnum
.
SEND
.
getCode
());
repayment
.
setCronSendState
(
RepaymentCronSendStateEnum
.
SEND
.
getCode
());
repayment
.
setRepayState
(
RepaymentRepayStateEnum
.
UN_REPAY
.
getCode
());
repayment
.
setRepayState
(
RepaymentRepayStateEnum
.
UN_REPAY
.
getCode
());
repayment
.
setPeriod
(
period
);
repayment
.
setPeriod
(
period
);
repayment
.
setRepayDate
(
DateUtils
.
dateParse
(
repayDate
).
toInstant
()
Date
date
=
DateUtils
.
dateParse
(
repayDate
);
if
(
Objects
.
isNull
(
date
)){
throw
new
BadRequest
(
"还款日期格式不对"
);
}
repayment
.
setRepayDate
(
date
.
toInstant
()
.
atZone
(
ZoneId
.
systemDefault
())
.
atZone
(
ZoneId
.
systemDefault
())
.
toLocalDate
());
.
toLocalDate
());
repayment
.
setRent
(
Double
.
valueOf
(
rent
));
repayment
.
setRent
(
Double
.
valueOf
(
rent
));
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/vo/RepaymentExcelVO.java
View file @
b53cc336
...
@@ -20,16 +20,16 @@ import java.time.LocalDate;
...
@@ -20,16 +20,16 @@ import java.time.LocalDate;
public
class
RepaymentExcelVO
implements
Serializable
{
public
class
RepaymentExcelVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"
公司名称
"
)
@ApiModelProperty
(
value
=
"
区域公司
"
)
@Excel
(
name
=
"
公司名称
"
,
width
=
50
,
orderNum
=
"1"
)
@Excel
(
name
=
"
区域公司
"
,
width
=
50
,
orderNum
=
"1"
)
private
String
companyName
;
private
String
companyName
;
@ApiModelProperty
(
value
=
"期次"
)
@ApiModelProperty
(
value
=
"期次"
)
@Excel
(
name
=
"期次"
,
width
=
30
,
orderNum
=
"2"
)
@Excel
(
name
=
"期次"
,
width
=
30
,
orderNum
=
"2"
)
private
String
period
;
private
String
period
;
@ApiModelProperty
(
value
=
"还款
时间
"
)
@ApiModelProperty
(
value
=
"还款
日期
"
)
@Excel
(
name
=
"还款
时间
"
,
width
=
30
,
orderNum
=
"3"
)
@Excel
(
name
=
"还款
日期
"
,
width
=
30
,
orderNum
=
"3"
)
private
LocalDate
repayDate
;
private
LocalDate
repayDate
;
@ApiModelProperty
(
value
=
"租金"
)
@ApiModelProperty
(
value
=
"租金"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application.properties
View file @
b53cc336
...
@@ -87,3 +87,4 @@ exception.debug=true
...
@@ -87,3 +87,4 @@ exception.debug=true
feign.okhttp.enabled
=
true
feign.okhttp.enabled
=
true
workflow.feign.name
=
AMOS-API-WORKFLOW-CZ
workflow.feign.name
=
AMOS-API-WORKFLOW-CZ
repaymentCron
=
0 0 1 * * ?
\ No newline at end of file
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