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
51ed63eb
Commit
51ed63eb
authored
Jul 29, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:修改变更项目逻辑,增加险种排序"
parent
b2c9b192
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
24 deletions
+166
-24
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+30
-0
Dept.java
...a/com/yifu/cloud/plus/v1/yifu/insurances/entity/Dept.java
+5
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+2
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+125
-21
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+1
-0
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+2
-1
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+1
-1
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
51ed63eb
...
@@ -591,6 +591,36 @@ public class InsurancesConstants {
...
@@ -591,6 +591,36 @@ public class InsurancesConstants {
public
static
final
String
DELETE_INSURANCE_TYPE_STANDARD
=
"删除购买标准"
;
public
static
final
String
DELETE_INSURANCE_TYPE_STANDARD
=
"删除购买标准"
;
/**
* 导入减员数据
*/
public
static
final
String
INSURANCE_REFUND_IMPORT
=
"导入减员数据"
;
/**
* 导出待减员数据
*/
public
static
final
String
INSURANCE_REFUND_EXPORT
=
"导出待减员数据"
;
/**
* 减员成功
*/
public
static
final
String
INSURANCE_REFUND_SUCCESS
=
"减员成功"
;
/**
* 减员退回
*/
public
static
final
String
INSURANCE_REFUND_FAILED
=
"减员退回"
;
/**
* 变更所属项目
*/
public
static
final
String
DEPT_CHANGE
=
"变更所属项目"
;
/**
* 变更结算月
*/
public
static
final
String
MONTH_CHANGE
=
"变更结算月"
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/Dept.java
View file @
51ed63eb
...
@@ -26,4 +26,9 @@ public class Dept implements Serializable {
...
@@ -26,4 +26,9 @@ public class Dept implements Serializable {
*/
*/
@Schema
(
description
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
private
String
projectName
;
private
String
projectName
;
public
Dept
(
String
departNo
,
String
departName
)
{
this
.
deptNo
=
departNo
;
this
.
projectName
=
departName
;
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
51ed63eb
...
@@ -41,7 +41,8 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
...
@@ -41,7 +41,8 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
IPage
<
TInsuranceCompany
>
list
=
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
return
list
;
}
}
@Override
@Override
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
51ed63eb
...
@@ -2055,9 +2055,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2055,9 +2055,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
Map
<
String
,
List
<
InsuranceRefundCheck
>>
refundMap
=
checkInsuranceRefundList
(
insuranceRefundCheckList
);
Map
<
String
,
List
<
InsuranceRefundCheck
>>
refundMap
=
checkInsuranceRefundList
(
insuranceRefundCheckList
);
List
<
InsuranceRefundCheck
>
successList
=
refundMap
.
get
(
"successList"
);
List
<
InsuranceRefundCheck
>
successList
=
refundMap
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
InsuranceRefundCheck
refund
:
successList
){
for
(
InsuranceRefundCheck
refund
:
successList
){
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceRefund
.
setInsDetailId
(
refund
.
getId
());
insuranceRefund
.
setInsDetailId
(
refund
.
getId
());
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
ONE_INT
);
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
ONE_INT
);
insuranceRefund
.
setCreateBy
(
user
.
getId
());
insuranceRefund
.
setCreateBy
(
user
.
getId
());
...
@@ -2077,8 +2079,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2077,8 +2079,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
ONE_INT
);
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
ONE_INT
);
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
refund
.
getId
());
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
refund
.
getId
());
update
(
updateWrapper
);
update
(
updateWrapper
);
insuranceOperate
.
setInsuranceDetailId
(
refund
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
INSURANCE_REFUND_IMPORT
);
operateList
.
add
(
insuranceOperate
);
}
}
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
InsuranceRefundCheck
>
errorList
=
refundMap
.
get
(
"errorList"
);
List
<
InsuranceRefundCheck
>
errorList
=
refundMap
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"校验完成"
);
return
R
.
ok
(
errorList
,
"校验完成"
);
}
}
...
@@ -2298,7 +2307,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2298,7 +2307,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REFUND_EXPORT
);
addOperate
(
detailList
,
user
,
InsurancesConstants
.
INSURANCE_
REFUND_EXPORT
);
}
}
return
refundExportList
;
return
refundExportList
;
}
}
...
@@ -2323,6 +2332,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2323,6 +2332,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
tInsuranceDetails
=
this
.
listByIds
(
insuranceDetailList
);
List
<
TInsuranceDetail
>
tInsuranceDetails
=
this
.
listByIds
(
insuranceDetailList
);
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
tInsuranceDetail
:
tInsuranceDetails
)
{
for
(
TInsuranceDetail
tInsuranceDetail
:
tInsuranceDetails
)
{
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
RefundErrorVo
refundErrorVo
=
new
RefundErrorVo
();
RefundErrorVo
refundErrorVo
=
new
RefundErrorVo
();
...
@@ -2347,6 +2357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2347,6 +2357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
}
}
successList
.
add
(
tInsuranceDetail
);
successList
.
add
(
tInsuranceDetail
);
//新增减员记录
refund
.
setInsDetailId
(
tInsuranceDetail
.
getId
());
refund
.
setInsDetailId
(
tInsuranceDetail
.
getId
());
refund
.
setCreateBy
(
user
.
getId
());
refund
.
setCreateBy
(
user
.
getId
());
refund
.
setCreateTime
(
LocalDateTime
.
now
());
refund
.
setCreateTime
(
LocalDateTime
.
now
());
...
@@ -2364,9 +2375,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2364,9 +2375,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateBatchById
(
successList
);
updateBatchById
(
successList
);
//操作记录
//操作记录
if
(
CommonConstants
.
FOUR_INT
==
refundType
){
if
(
CommonConstants
.
FOUR_INT
==
refundType
){
addOperate
(
successList
,
user
,
InsurancesConstants
.
REFUND_EXPORT
_SUCCESS
);
addOperate
(
successList
,
user
,
InsurancesConstants
.
INSURANCE_REFUND
_SUCCESS
);
}
else
{
}
else
{
addOperate
(
successList
,
user
,
InsurancesConstants
.
REFUND_EXPORT
_FAILED
);
addOperate
(
successList
,
user
,
InsurancesConstants
.
INSURANCE_REFUND
_FAILED
);
}
}
return
R
.
ok
(
errorList
,
"操作成功"
);
return
R
.
ok
(
errorList
,
"操作成功"
);
}
}
...
@@ -2388,6 +2399,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2388,6 +2399,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
);
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
);
//todo 生成EKP通知,通知ekp变更结算月份
//todo 生成EKP通知,通知ekp变更结算月份
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
...
@@ -2396,8 +2408,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2396,8 +2408,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
}
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
}
...
@@ -2419,19 +2439,97 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2419,19 +2439,97 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
DeptChangeCheckParam
>>
stringListMap
=
deptChangeCheck
(
deptChangeCheckList
);
Map
<
String
,
List
<
DeptChangeCheckParam
>>
stringListMap
=
deptChangeCheck
(
deptChangeCheckList
);
//todo 生成EKP通知,通知ekp变更结算所属项目
//todo 生成EKP通知,通知ekp变更结算所属项目
List
<
DeptChangeCheckParam
>
successList
=
stringListMap
.
get
(
"successList"
);
List
<
DeptChangeCheckParam
>
successList
=
stringListMap
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
DeptChangeCheckParam
success
:
successList
)
{
for
(
DeptChangeCheckParam
success
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
Integer
oldSettleType
=
success
.
getOldSettleType
();
Integer
newSettleType
=
success
.
getNewSettleType
();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
success
.
getId
())
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
success
.
getId
())
.
set
(
TInsuranceDetail
::
getDeptNo
,
success
.
getNewDeptNo
())
.
set
(
TInsuranceDetail
::
getDeptNo
,
success
.
getNewDeptNo
())
.
set
(
TInsuranceDetail
::
getSettleType
,
success
.
getNewSettleType
())
.
set
(
TInsuranceDetail
::
getSettleType
,
success
.
getNewSettleType
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
//如果旧项目为合并结算,且新项目也是合并结算,则计算新的预估保费,作废旧的预估保费
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//如果存在则更新,不存在则新建
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
//将结算id赋值给保单信息
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
}
}
//如果旧项目为预估,且新的项目为单独结算,则作废旧的预估保费,更新项目信息
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
&&
CommonConstants
.
ONE_INT
==
newSettleType
){
//更新旧的结算信息
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
new
BigDecimal
(
"0"
));
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
//更新预估保费
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0"
));
}
}
//如果旧项目为单独结算,且新项目为合并结算,则计算预估保费,作废旧的预估保费
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//更新旧的结算信息
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
//推送EKP
}
else
{
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
//更新保单信息
updateWrapper
.
set
(
TInsuranceDetail:
:
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
}
}
//如果旧项目为单独结算,且新项目也是单独结算,则更新单独结算信息
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
&&
CommonConstants
.
ONE_INT
==
newSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
}
update
(
updateWrapper
);
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
DEPT_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
}
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
DeptChangeCheckParam
>
errorList
=
stringListMap
.
get
(
"errorList"
);
List
<
DeptChangeCheckParam
>
errorList
=
stringListMap
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
}
...
@@ -3144,7 +3242,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3144,7 +3242,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
//预估
//预估
if
(
insuranceDetail
.
get
SettleType
()
==
CommonConstants
.
ZERO_INT
){
if
(
param
.
getNew
SettleType
()
==
CommonConstants
.
ZERO_INT
){
//根据险种获取费率,没费率返回错误
//根据险种获取费率,没费率返回错误
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getById
(
insuranceDetail
.
getInsuranceTypeId
());
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getById
(
insuranceDetail
.
getInsuranceTypeId
());
//险种存不存在
//险种存不存在
...
@@ -3177,7 +3275,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3177,7 +3275,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
// 预估保费 = 费率 * 购买标准
// 预估保费 = 费率 * 购买标准
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
typeRate
.
getRate
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
typeRate
.
getRate
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
insuranceDetail
.
setEstimatePremium
(
estimatePremium
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
}
else
{
}
else
{
//按天
//按天
...
@@ -3185,15 +3283,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3185,15 +3283,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetail
.
getPolicyStart
().
toString
(),
insuranceDetail
.
getPolicyEnd
().
toString
());
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetail
.
getPolicyStart
().
toString
(),
insuranceDetail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
insuranceDetail
.
setEstimatePremium
(
estimatePremium
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
}
}
}
}
}
}
//判断当前数据中是否存在重复数据
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setEstimatePremium
(
insuranceDetail
.
getEstimatePremium
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
param
.
setActualPremium
(
insuranceDetail
.
getActualPremium
());
param
.
setId
(
insuranceDetail
.
getId
());
param
.
setId
(
insuranceDetail
.
getId
());
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
...
@@ -3202,20 +3298,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3202,20 +3298,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
map
;
return
map
;
}
}
/**
* 查询项目列表
*
* @author zhaji
* @param
* @return {@link R}
*/
@Override
@Override
public
R
getDeptList
(){
public
R
getDeptList
(){
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
();
List
<
TSettleDomainSelectVo
>
listSelectVO
=
data
.
getListSelectVO
();
List
<
Dept
>
deptList
=
new
ArrayList
<>();
List
<
Dept
>
deptList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSelectVO
)){
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
for
(
TSettleDomainSelectVo
tSettleDomainSelectVo
:
listSelectVO
)
{
if
(
null
!=
tSettleDomainListVoR
&&
tSettleDomainListVoR
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
tSettleDomainListVoR
.
getData
()))
{
Dept
dept
=
new
Dept
();
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
();
dept
.
setDeptNo
(
tSettleDomainSelectVo
.
getDepartNo
());
List
<
TSettleDomainSelectVo
>
listSelectVO
=
data
.
getListSelectVO
();
dept
.
setProjectName
(
tSettleDomainSelectVo
.
getDepartName
());
if
(
CollectionUtils
.
isNotEmpty
(
listSelectVO
)){
deptList
.
add
(
dept
);
//listSelectVO.stream().filter(item->deptList.add(new Dept(item.getDepartNo(),item.getDepartName())));
for
(
TSettleDomainSelectVo
tSettleDomainSelectVo
:
listSelectVO
)
{
deptList
.
add
(
new
Dept
(
tSettleDomainSelectVo
.
getDepartNo
(),
tSettleDomainSelectVo
.
getDepartName
()));
}
}
}
}
}
return
R
.
ok
(
deptList
);
return
R
.
ok
(
deptList
);
};
};
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
51ed63eb
...
@@ -51,6 +51,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
...
@@ -51,6 +51,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
*/
*/
@Override
@Override
public
IPage
<
InsuranceTypeVo
>
pageDiy
(
Page
<
TInsuranceType
>
page
,
TInsuranceType
insuranceType
)
{
public
IPage
<
InsuranceTypeVo
>
pageDiy
(
Page
<
TInsuranceType
>
page
,
TInsuranceType
insuranceType
)
{
return
this
.
baseMapper
.
selectInsuranceTypePage
(
page
,
insuranceType
);
return
this
.
baseMapper
.
selectInsuranceTypePage
(
page
,
insuranceType
);
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
51ed63eb
...
@@ -284,7 +284,8 @@
...
@@ -284,7 +284,8 @@
detail.POLICY_END as policyEnd,
detail.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect,
detail.POLICY_EFFECT as policyEffect,
detail.IS_USE as isUse,
detail.IS_USE as isUse,
detail.INVOICE_NO as isOverdue,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard
detail.BUY_STANDARD as buyStandard
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
51ed63eb
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
a.INSURANCE_COMPANY_ID = b.ID
a.INSURANCE_COMPANY_ID = b.ID
and
and
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
ORDER BY a.create_time DESC
</select>
</select>
<select
id=
"getInsuranceTypeDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"
>
<select
id=
"getInsuranceTypeDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"
>
select
select
...
...
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