Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
fangxinjiang
yifu-mvp
Commits
c8162772
Commit
c8162772
authored
Feb 01, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
d4075e80
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
1 deletion
+89
-1
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+13
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+2
-1
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+2
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+51
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+8
-0
UpdateOverdueTask.java
...com/yifu/cloud/plus/v1/job/compont/UpdateOverdueTask.java
+13
-0
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
c8162772
...
...
@@ -748,4 +748,17 @@ public class TInsuranceDetailController {
tInsuranceDetailService
.
updateSettleStatus
();
}
/**
* 每日定时刷新商险到期数据
*
* @author licancan
* @param
* @return void
*/
@SysLog
(
"每日定时刷新商险到期数据"
)
@Inner
@PostMapping
(
"/inner/pushActualPremium"
)
public
void
pushActualPremium
()
{
tInsuranceDetailService
.
pushActualPremium
();
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
c8162772
...
...
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -276,4 +275,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/
List
<
InsuranceUpdateVO
>
selectByIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
List
<
TInsuranceDetail
>
selectPushList
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
c8162772
...
...
@@ -509,4 +509,6 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return:
**/
void
updateSettleStatus
();
void
pushActualPremium
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c8162772
...
...
@@ -7344,4 +7344,55 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
mapSelectVo
;
}
/*
* 获取当前保单的结算状态
*
* @author zhaji
* @param
* @return {@link String}
*/
@Override
public
void
pushActualPremium
(){
List
<
TInsuranceDetail
>
list
=
baseMapper
.
selectPushList
();
for
(
TInsuranceDetail
detail:
list
){
//单独结算
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ONE_INT
)
{
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)
&&
Common
.
isNotNull
(
settle
))
{
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
}
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
)
{
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceDetail
t
=
new
TInsuranceDetail
();
BeanUtils
.
copyProperties
(
detail
,
t
);
if
(
Common
.
isEmpty
(
detail
.
getEstimatePremium
()))
{
detail
.
setEstimatePremium
(
detail
.
getActualPremium
());
}
String
s1
=
pushEstimate
(
detail
,
CommonConstants
.
ONE_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s1
)
&&
Common
.
isNotNull
(
settle
))
{
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
}
if
(
Common
.
isEmpty
(
t
.
getEstimatePremium
()))
{
t
.
setEstimatePremium
(
t
.
getActualPremium
());
}
String
s2
=
pushEstimate
(
t
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s2
)
&&
Common
.
isNotNull
(
settle
))
{
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
}
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
c8162772
...
...
@@ -1424,4 +1424,12 @@
</if>
ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select>
<select
id=
"selectPushList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
*
FROM
t_insurance_detail
WHERE ERROR_STATUS = '1'
</select>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/UpdateOverdueTask.java
View file @
c8162772
...
...
@@ -46,4 +46,17 @@ public class UpdateOverdueTask {
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/insuranceDetail/inner/updateSettleStatus"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------重新更新结算状态同步失败的数据-定时任务结束------------"
);
}
/**
* 更新商险到期定时任务
*
* @author licancan
* @param
* @return void
*/
public
void
pushInsEkp
()
throws
Exception
{
log
.
info
(
"-------------推送商险待结算数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/insuranceDetail/inner/pushActualPremium"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------推送商险待结算数据-定时任务结束------------"
);
}
}
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