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
8a1329f0
Commit
8a1329f0
authored
Aug 02, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:优化项目变更代码,新增已投保列表派单日期范围查询(应许晓要求)"
parent
85c92013
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
238 additions
and
88 deletions
+238
-88
TInsuranceSettleCancel.java
...lus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
+4
-1
BigDecimalUtils.java
...u/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
+17
-0
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+9
-3
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+198
-80
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+10
-4
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
View file @
8a1329f0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -15,8 +17,9 @@ import java.util.Date;
...
@@ -15,8 +17,9 @@ import java.util.Date;
@Tag
(
name
=
"结算信息作废记录"
)
@Tag
(
name
=
"结算信息作废记录"
)
public
class
TInsuranceSettleCancel
implements
Serializable
{
public
class
TInsuranceSettleCancel
implements
Serializable
{
/**
/**
*
*
id
*/
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
private
String
id
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
View file @
8a1329f0
...
@@ -237,6 +237,23 @@ public class BigDecimalUtils {
...
@@ -237,6 +237,23 @@ public class BigDecimalUtils {
}
}
return
bigDecimal
;
return
bigDecimal
;
}
}
/**
* null 默认 为 0
* @Author zhaji
* @Date 2022-08-02
* @param bigDecimal
* @return
**/
public
static
Boolean
isNullOrZero
(
BigDecimal
bigDecimal
){
if
(
null
==
bigDecimal
){
return
true
;
}
if
(
bigDecimal
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
return
true
;
}
return
false
;
}
/**
/**
* 对象转为BigDecimal 数据 并四舍五入保留两位小数
* 对象转为BigDecimal 数据 并四舍五入保留两位小数
* @Author fxj
* @Author fxj
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
8a1329f0
...
@@ -100,9 +100,15 @@ public class InsuredParam implements Serializable {
...
@@ -100,9 +100,15 @@ public class InsuredParam implements Serializable {
private
Integer
isOverdue
;
private
Integer
isOverdue
;
/**
/**
* 派单日期
* 派单
开始
日期
*/
*/
@Schema
(
description
=
"派单日期"
)
@Schema
(
description
=
"派单开始日期"
)
private
String
createTime
;
private
String
createStartTime
;
/**
* 派单结束日期
*/
@Schema
(
description
=
"派单结束日期"
)
private
String
createEndTime
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
8a1329f0
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
...
@@ -25,6 +25,7 @@ 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.mapper.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.*
;
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.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.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
...
@@ -77,6 +78,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -77,6 +78,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
@Resource
private
TInsuranceRefundService
tInsuranceRefundService
;
private
TInsuranceRefundService
tInsuranceRefundService
;
@Resource
private
TInsuranceSettleCancelService
tInsuranceSettleCancelService
;
/***********************商险办理********************************/
/***********************商险办理********************************/
/**
/**
...
@@ -2634,90 +2639,202 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2634,90 +2639,202 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceDetail
::
getSettleType
,
success
.
getNewSettleType
())
.
set
(
TInsuranceDetail
::
getSettleType
,
success
.
getNewSettleType
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
String
insuranceDetailId
=
success
.
getId
();
//如果旧项目为合并结算,且新项目也是合并结算,则计算新的预估保费,作废旧的预估保费
//结算信息id
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
String
defaultSettleId
=
success
.
getDefaultSettleId
();
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//实际保费
//如果存在则更新,不存在则新建
BigDecimal
actualPremium
=
success
.
getActualPremium
();
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
//如果变更前为单独结算
TInsuranceSettle
tInsuranceSettle
=
tInsuranceSettleService
.
getById
(
success
.
getDefaultSettleId
());
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
){
//登记了保单保费
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
//变更后为单独结算
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
update
(
updateWrapper
);
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
//作废旧的数据,生成作废结算信息记录
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
}
else
{
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
cancel
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
cancel
.
setCreateUesr
(
user
.
getId
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettleCancelService
.
save
(
cancel
);
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
//推送EKP // TODO: 2022/8/2
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
//新增新的结算数据
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
//将结算id赋值给保单信息
newInsuranceSettle
.
setSettleType
(
newSettleType
);
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//赋值新的预估费用和新的结算信息
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//作废旧的数据,生成作废结算信息记录
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//推送EKP // TODO: 2022/8/2
//新增新的结算信息
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
newInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
//生成新的结算信息
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//赋值新的预估费用和新的结算信息
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送EKP // TODO: 2022/8/2
}
}
}
}
//未登记保单保费
//如果旧项目为预估,且新的项目为单独结算,则作废旧的预估保费,更新项目信息
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
&&
CommonConstants
.
ONE_INT
==
newSettleType
){
//变更后为单独结算
//更新旧的结算信息
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
//变更项目且不做处理
TInsuranceSettle
tInsuranceSettle
=
tInsuranceSettleService
.
getById
(
success
.
getDefaultSettleId
());
update
(
updateWrapper
);
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
}
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
//变更后为合并结算
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
tInsuranceSettle
.
setEstimatePremium
(
new
BigDecimal
(
"0"
));
//生成预估结算信息
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
//生成一条作废数据并推送至EKP
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
TInsuranceSettleCancel
tInsuranceSettleCancel
=
new
TInsuranceSettleCancel
();
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettleCancel
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettleCancel
.
setSettleId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancel
.
setDeptNo
(
success
.
getOldDeptNo
());
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancel
.
setIsCancelPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancel
.
setCreateUesr
(
user
.
getId
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
tInsuranceSettleCancel
.
setCreateTime
(
LocalDateTime
.
now
());
//将结算id赋值给保单信息,并新增预估费用
}
else
{
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//更新预估保费
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0"
));
update
(
updateWrapper
);
//推送结算信息至EKP // TODO: 2022/8/2
}
}
}
}
}
//如果旧项目为单独结算,且新项目为合并结算,则计算预估保费,作废旧的预估保费
//变更前为合并结算
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//如果已经登记保费
//更新旧的结算信息
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
//变更为单独结算
TInsuranceSettle
tInsuranceSettle
=
tInsuranceSettleService
.
getById
(
success
.
getDefaultSettleId
());
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
//作废旧的结算信息
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
cancel
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
cancel
.
setSettleId
(
defaultSettleId
);
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
cancel
.
setCreateUesr
(
user
.
getId
());
//推送EKP
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
}
else
{
tInsuranceSettleCancelService
.
save
(
cancel
);
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
//新增新的结算信息
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
//更新保单信息
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
updateWrapper
.
set
(
TInsuranceDetail:
:
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
//更新预估费用为0.00
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送新的结算信息
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//作废旧的结算信息
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//新增新的结算信息
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//更新预估费用为新的预估费用
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送新的结算信息 // TODO: 2022/8/2
}
}
//如果没有登记保费
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//作废旧的结算信息
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//推送至EKP // TODO: 2022/8/2
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
null
);
update
(
updateWrapper
);
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//作废旧的结算信息
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//推送至EKP // TODO: 2022/8/2
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//更新预估费用为新的预估费用
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送新的结算信息 // TODO: 2022/8/2
}
}
}
}
}
//如果旧项目为单独结算,且新项目也是单独结算,则更新项目编码,并发送至ekp
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
&&
CommonConstants
.
ONE_INT
==
newSettleType
){
//updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium());
}
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
...
@@ -3499,7 +3616,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3499,7 +3616,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
//查询结算状态
//查询结算状态
LambdaQueryWrapper
<
TInsuranceSettle
>
insuranceSettleQuery
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceSettle
>
insuranceSettleQuery
=
new
LambdaQueryWrapper
<>();
insuranceSettleQuery
.
eq
(
TInsuranceSettle
::
getI
nsDetailId
,
insuranceDetail
.
getId
()
);
insuranceSettleQuery
.
eq
(
TInsuranceSettle
::
getI
d
,
defaultSettleId
);
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
//当前结算状态为结算中时,不能变更结算项目
//当前结算状态为结算中时,不能变更结算项目
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
...
@@ -3550,6 +3667,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3550,6 +3667,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
param
.
setActualPremium
(
insuranceDetail
.
getActualPremium
());
param
.
setId
(
insuranceDetail
.
getId
());
param
.
setId
(
insuranceDetail
.
getId
());
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
8a1329f0
...
@@ -334,8 +334,11 @@
...
@@ -334,8 +334,11 @@
<if
test=
"param.isOverdue != null"
>
<if
test=
"param.isOverdue != null"
>
and detail.IS_OVERDUE = #{param.isOverdue}
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
</if>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
<if
test=
"param.createStartTime != null and param.createStartTime.trim() != ''"
>
AND detail.CREATE_TIME = concat(#{param.createTime}, ' 00:00:00')
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
</if>
ORDER BY detail.CREATE_TIME DESC
ORDER BY detail.CREATE_TIME DESC
</select>
</select>
...
@@ -412,8 +415,11 @@
...
@@ -412,8 +415,11 @@
<if
test=
"param.isOverdue != null "
>
<if
test=
"param.isOverdue != null "
>
and detail.IS_OVERDUE = #{param.isOverdue}
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
</if>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
<if
test=
"param.createStartTime != null and param.createStartTime.trim() != ''"
>
AND detail.CREATE_TIME = concat(#{param.createTime}, ' 00:00:00')
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
</if>
ORDER BY detail.CREATE_TIME DESC
ORDER BY detail.CREATE_TIME DESC
</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