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
ad8986bd
Commit
ad8986bd
authored
2 years ago
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
4534f3ff
cc6dab0f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
274 additions
and
78 deletions
+274
-78
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+7
-2
TInsuranceRefund.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceRefund.java
+8
-0
LocalDateUtil.java
...ifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
+8
-3
DeptChangeCheckParam.java
...loud/plus/v1/yifu/insurances/vo/DeptChangeCheckParam.java
+19
-0
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+1
-1
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+5
-1
TInsuranceRefundDetail.java
...ud/plus/v1/yifu/insurances/vo/TInsuranceRefundDetail.java
+1
-1
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+1
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+223
-68
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.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 @
ad8986bd
...
...
@@ -405,9 +405,9 @@ public class InsurancesConstants {
public
static
final
String
INSURANCE_REFUND_STATUS_FOUR_ERROR
=
"商险已减员,无法减员"
;
/**
*
替换结算月份和原有结算月份相同
*
变更结算月和当前结算月一致
*/
public
static
final
String
SETTLE_MONTH_IDENTICAL
=
"
替换结算月份和原有结算月份相同
"
;
public
static
final
String
SETTLE_MONTH_IDENTICAL
=
"
变更结算月和当前结算月一致
"
;
/**
* 商险待投保,无法减员
...
...
@@ -429,6 +429,11 @@ public class InsurancesConstants {
*/
public
static
final
String
SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR
=
"商险已减员,无法变更结算月"
;
/**
* 减员流程中,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_REFUND_STATUS_ONE_ERROR
=
"减员流程中,无法变更结算月"
;
/**
* 商险结算中,无法变更结算月
*/
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceRefund.java
View file @
ad8986bd
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -20,26 +22,32 @@ public class TInsuranceRefund extends BaseEntity {
/**
* 主键id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 保单信息主键
*/
@Schema
(
description
=
"保单信息主键"
)
private
String
insDetailId
;
/**
* 减员状态
*/
@Schema
(
description
=
"减员状态"
)
private
Integer
reduceHandleStatus
;
/**
* 退费金额
*/
@Schema
(
description
=
"退费金额"
)
private
BigDecimal
refundMoney
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
View file @
ad8986bd
...
...
@@ -74,9 +74,14 @@ public class LocalDateUtil {
* @return {@link LocalDate}
*/
public
static
LocalDate
parseLocalDate
(
String
strDate
){
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
NORM_DATE_PATTERN
,
Locale
.
CHINA
);
LocalDate
localDate
=
LocalDate
.
parse
(
strDate
,
dateTimeFormatter
);
return
localDate
;
try
{
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
NORM_DATE_PATTERN
,
Locale
.
CHINA
);
LocalDate
localDate
=
LocalDate
.
parse
(
strDate
,
dateTimeFormatter
);
return
localDate
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
null
;
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/DeptChangeCheckParam.java
View file @
ad8986bd
...
...
@@ -91,4 +91,23 @@ public class DeptChangeCheckParam implements Serializable {
@Schema
(
description
=
"结算方式"
)
private
Integer
oldSettleType
;
/**
* 默认结算id
*/
@Schema
(
description
=
"默认结算id"
)
private
String
defaultSettleId
;
/**
* 预估保费
*/
@Schema
(
description
=
"预估保费"
)
private
String
estimatePremium
;
/**
* 实际保费
*/
@Schema
(
description
=
"实际保费"
)
private
String
actualPremium
;
}
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
ad8986bd
...
...
@@ -132,7 +132,7 @@ public class InsuranceAddParam implements Serializable {
* 险种主键
*/
@JsonIgnore
private
Stri
ng
insuranceTypeId
;
private
Lo
ng
insuranceTypeId
;
/**
* 商险购买地省code
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
ad8986bd
...
...
@@ -171,5 +171,9 @@ public class InsuranceRefundListVo implements Serializable {
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
Integer
reduceHandleStatus
;
/**
* 购买月数
*/
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
}
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/
entity
/TInsuranceRefundDetail.java
→
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/
vo
/TInsuranceRefundDetail.java
View file @
ad8986bd
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
ad8986bd
...
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.
entity
.TInsuranceRefundDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.
vo
.TInsuranceRefundDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
ad8986bd
...
...
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Sets
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
...
...
@@ -24,7 +23,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
...
...
@@ -415,8 +413,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()
&&
!
insuranceDetail
.
getId
().
equals
(
param
.
getId
())){
...
...
@@ -431,12 +437,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -696,6 +710,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
...
...
@@ -728,6 +743,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
...
...
@@ -758,6 +774,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
successList
.
add
(
detail
);
}
}
...
...
@@ -1105,7 +1122,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 这里计算好赋值,是为了方便入库
param
.
setMedicalQuota
(
typeStandard
.
getMedicalQuota
());
param
.
setDieDisableQuota
(
typeStandard
.
getDieDisableQuota
());
param
.
setInsuranceTypeId
(
typeStandard
.
getInsuranceTypeId
(
));
param
.
setInsuranceTypeId
(
Long
.
parseLong
(
typeStandard
.
getInsuranceTypeId
()
));
}
}
}
...
...
@@ -1135,9 +1152,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
...
@@ -1159,8 +1183,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -1418,8 +1450,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
...
@@ -1431,8 +1471,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
limitOne
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -1632,21 +1680,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 投保状态 已投保 已出险 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
detail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
){
&&
detail
.
getIsUse
()
!=
null
&&
detail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
USE_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
}
// 投保状态 已投保 已失效 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
&&
detail
.
getIsEffect
()
!=
null
&&
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
EFFECT_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
}
// 投保状态 已投保 已过期 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
){
&&
detail
.
getIsOverdue
()
!=
null
&&
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
OVERDUE_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1659,8 +1707,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 投保状态 已投保 减员状态 待减员/减员中 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
(
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
||
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
TWO_INT
)){
&&
(
detail
.
getReduceHandleStatus
()
!=
null
&&
(
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
||
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
TWO_INT
))
)
{
param
.
setErrorMessage
(
InsurancesConstants
.
REDUCE_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1680,8 +1728,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
replace
).
isPresent
()){
...
...
@@ -1698,12 +1754,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -1813,7 +1877,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
BigDecimalUtils
.
isBigDecimal
(
param
.
getActualPremium
())){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2057,6 +2121,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuredList
)
{
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
...
...
@@ -2085,6 +2151,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceRefundListVo
record
:
insuranceRefundPageList
.
getRecords
())
{
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
...
...
@@ -2112,6 +2180,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceRefundListVo
record
:
insuranceRefundList
)
{
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
...
...
@@ -2341,8 +2411,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
DeptChangeCheckParam
success
:
successList
)
{
Integer
newSettleType
=
success
.
getNewSettleType
();
Integer
oldSettleType
=
success
.
getOldSettleType
();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
success
.
getId
())
.
set
(
TInsuranceDetail
::
getDeptNo
,
success
.
getNewDeptNo
())
...
...
@@ -2351,11 +2419,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
}
updateDept2EKP
(
successList
);
}
List
<
DeptChangeCheckParam
>
errorList
=
stringListMap
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
/**
* 发送变更通知至EKP
*
* @author zhaji
* @param successList
* @return void
*/
private
void
updateDept2EKP
(
List
<
DeptChangeCheckParam
>
successList
)
{
for
(
DeptChangeCheckParam
param
:
successList
)
{
String
newDeptNo
=
param
.
getNewDeptNo
();
String
oldDeptNo
=
param
.
getOldDeptNo
();
Integer
newSettleType
=
param
.
getNewSettleType
();
Integer
oldSettleType
=
param
.
getOldSettleType
();
String
defaultSettleId
=
param
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
}
}
}
/**
* 根据保险公司名称查询保单明细
*
...
...
@@ -2401,8 +2489,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
Integer
reduceHandleStatus
=
insuranceDetail
.
getReduceHandleStatus
();
Integer
buyHandleStatus
=
insuranceDetail
.
getBuyHandleStatus
();
if
(!(
CommonConstants
.
THREE_INT
==
buyHandleStatus
&&
(
null
==
reduceHandleStatus
||
CommonConstants
.
THREE_INT
==
reduceHandleStatus
))){
return
R
.
failed
(
"当前保单信息非已投保且未减员状态,不能进行出险操作"
);
if
(
CommonConstants
.
ONE_INT
==
buyHandleStatus
||
CommonConstants
.
TWO_INT
==
buyHandleStatus
||
CommonConstants
.
FOUR_INT
==
buyHandleStatus
){
return
R
.
failed
(
"当前员工未投保成功,不能进行出险操作"
);
}
if
(
CommonConstants
.
FIVE_INT
==
buyHandleStatus
){
return
R
.
failed
(
"当前员工已减员,不能进行出险操作"
);
}
if
(
null
!=
reduceHandleStatus
){
return
R
.
failed
(
"当前员工在减员中,不能进行出险操作"
);
}
Integer
isEffect
=
insuranceDetail
.
getIsEffect
();
if
(
CommonConstants
.
ZERO_INT
!=
isEffect
){
...
...
@@ -2449,7 +2543,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
(
map
.
get
(
"errorList"
));
}
/**
* 减员导入校验
*
...
...
@@ -2553,38 +2646,39 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
Integer
reduceHandleStatus
=
one
.
getReduceHandleStatus
();
//当前保单信息的减员状态不为空且不为减员退回时时不能进行导入
if
(
CommonConstants
.
ONE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_REFUND_STATUS_ONE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
CommonConstants
.
TWO_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_REFUND_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_REFUND_STATUS_FOUR_ERROR
);
errorList
.
add
(
param
);
continue
;
if
(
null
!=
reduceHandleStatus
){
//当前保单信息的减员状态不为空且不为减员退回时时不能进行导入
if
(
CommonConstants
.
ONE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_REFUND_STATUS_ONE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
CommonConstants
.
TWO_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_REFUND_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_REFUND_STATUS_FOUR_ERROR
);
errorList
.
add
(
param
);
continue
;
}
}
//出险状态
if
(
CommonConstants
.
ZERO_INT
!=
one
.
getIsUse
()){
if
(
null
!=
one
.
getIsUse
()
&&
CommonConstants
.
ZERO_INT
!=
one
.
getIsUse
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_IS_USE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//有效状态
if
(
CommonConstants
.
ZERO_INT
!=
one
.
getIsEffect
()){
if
(
null
!=
one
.
getIsEffect
()
&&
CommonConstants
.
ZERO_INT
!=
one
.
getIsEffect
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_IS_EFFECT_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//过期状态
if
(
CommonConstants
.
ZERO_INT
!=
one
.
getIsOverdue
()){
if
(
null
!=
one
.
getIsOverdue
()
&&
CommonConstants
.
ZERO_INT
!=
one
.
getIsOverdue
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_IS_OVERDUE_ERROR
);
errorList
.
add
(
param
);
continue
;
...
...
@@ -2654,11 +2748,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
/* if ( null != tInsuranceRefundDetail.getRefundMoney()){
param.setErrorMessage(InsurancesConstants.REFUND_MONEY_IS_NOT_NULL);
errorList.add(param);
continue;
}*/
param
.
setId
(
tInsuranceRefundDetail
.
getInsDetailId
());
successList
.
add
(
param
);
}
...
...
@@ -2828,11 +2917,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//当前保单信息的为已减员时不能不能变更结算月
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetail
.
getBuyHandleStatus
()
){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR
);
errorList
.
add
(
param
);
continue
;
//当前保单信息的为已减员时不能变更结算月
if
(
null
!=
insuranceDetail
.
getBuyHandleStatus
()){
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetail
.
getBuyHandleStatus
()
){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
CommonConstants
.
ONE_INT
==
insuranceDetail
.
getBuyHandleStatus
()
||
CommonConstants
.
TWO_INT
==
insuranceDetail
.
getBuyHandleStatus
()){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_REFUND_STATUS_ONE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
}
param
.
setId
(
insuranceDetail
.
getId
());
successList
.
add
(
param
);
...
...
@@ -2994,7 +3090,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//当前保单信息的为已减员时,不能变更结算项目
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetail
.
getBuyHandleStatus
()
){
if
(
null
!=
insuranceDetail
.
getBuyHandleStatus
()
&&
CommonConstants
.
FIVE_INT
==
insuranceDetail
.
getBuyHandleStatus
()
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR
);
errorList
.
add
(
param
);
continue
;
...
...
@@ -3018,6 +3114,65 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
//预估
if
(
insuranceDetail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
){
//根据险种获取费率,没费率返回错误
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getById
(
insuranceDetail
.
getInsuranceTypeId
());
//险种存不存在
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getById
(
insuranceType
.
getInsuranceCompanyId
());
//保险公司存不存在
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insuranceCompany
.
getBillingType
())){
//按月查费率
//计算起止时间的月数
long
month
=
LocalDateUtil
.
betweenMonth
(
insuranceDetail
.
getPolicyStart
().
toString
(),
insuranceDetail
.
getPolicyEnd
().
toString
());
TInsuranceTypeRate
typeRate
=
tInsuranceTypeRateService
.
getOne
(
Wrappers
.<
TInsuranceTypeRate
>
query
().
lambda
()
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceDetail
.
getInsuranceTypeId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_RATE_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
// 预估保费 = 费率 * 购买标准
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
typeRate
.
getRate
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
insuranceDetail
.
setEstimatePremium
(
estimatePremium
);
if
(
insuranceDetail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
insuranceDetail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
}
}
}
else
{
//按天
//计算起止时间的天数
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetail
.
getPolicyStart
().
toString
(),
insuranceDetail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
)).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
insuranceDetail
.
setEstimatePremium
(
estimatePremium
);
if
(
insuranceDetail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
insuranceDetail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
}
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
settle
.
setInsDetailId
(
insuranceDetail
.
getId
());
settle
.
setSettleType
(
insuranceDetail
.
getSettleType
());
settle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
settle
.
setEstimatePremium
(
estimatePremium
);
}
}
}
}
//判断当前数据中是否存在重复数据
param
.
setId
(
insuranceDetail
.
getId
());
successList
.
add
(
param
);
...
...
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
ad8986bd
...
...
@@ -640,7 +640,7 @@
</foreach>
</select>
<!-- 查询保单减员退费信息-->
<select
id=
"selectRefundDetail"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.
entity
.TInsuranceRefundDetail"
>
<select
id=
"selectRefundDetail"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.
vo
.TInsuranceRefundDetail"
>
select
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
...
...
This diff is collapsed.
Click to expand it.
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