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
3b468ce0
Commit
3b468ce0
authored
Aug 01, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
Feature zhaji See merge request fangxinjiang/yifu!80
parents
5cf7bde6
17c7e1a9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
168 deletions
+50
-168
TInsuranceSettleCancel.java
...lus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
+5
-125
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+45
-43
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
View file @
3b468ce0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -7,6 +10,8 @@ import java.util.Date;
...
@@ -7,6 +10,8 @@ import java.util.Date;
* 结算信息作废记录表(用于记录项目变更导致推信息送至EKP)
* 结算信息作废记录表(用于记录项目变更导致推信息送至EKP)
* @TableName t_insurance_settle_cancel
* @TableName t_insurance_settle_cancel
*/
*/
@Data
@Tag
(
name
=
"结算信息作废记录"
)
public
class
TInsuranceSettleCancel
implements
Serializable
{
public
class
TInsuranceSettleCancel
implements
Serializable
{
/**
/**
*
*
...
@@ -55,129 +60,4 @@ public class TInsuranceSettleCancel implements Serializable {
...
@@ -55,129 +60,4 @@ public class TInsuranceSettleCancel implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
public
String
getId
()
{
return
id
;
}
/**
*
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 结算明细id
*/
public
String
getInsDetailId
()
{
return
insDetailId
;
}
/**
* 结算明细id
*/
public
void
setInsDetailId
(
String
insDetailId
)
{
this
.
insDetailId
=
insDetailId
;
}
/**
* 结算信息表id
*/
public
String
getSettleId
()
{
return
settleId
;
}
/**
* 结算信息表id
*/
public
void
setSettleId
(
String
settleId
)
{
this
.
settleId
=
settleId
;
}
/**
* 项目编码
*/
public
String
getDeptNo
()
{
return
deptNo
;
}
/**
* 项目编码
*/
public
void
setDeptNo
(
String
deptNo
)
{
this
.
deptNo
=
deptNo
;
}
/**
* 项目名称
*/
public
String
getDeptName
()
{
return
deptName
;
}
/**
* 项目名称
*/
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
/**
* 订单编号
*/
public
String
getOrderNo
()
{
return
orderNo
;
}
/**
* 订单编号
*/
public
void
setOrderNo
(
String
orderNo
)
{
this
.
orderNo
=
orderNo
;
}
/**
* 推送标识 1成功 0失败
*/
public
Integer
getIsCancelPush
()
{
return
isCancelPush
;
}
/**
* 推送标识 1成功 0失败
*/
public
void
setIsCancelPush
(
Integer
isCancelPush
)
{
this
.
isCancelPush
=
isCancelPush
;
}
/**
* 创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 操作人
*/
public
String
getCreateUesr
()
{
return
createUesr
;
}
/**
* 操作人
*/
public
void
setCreateUesr
(
String
createUesr
)
{
this
.
createUesr
=
createUesr
;
}
}
}
\ No newline at end of file
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
3b468ce0
...
@@ -2570,6 +2570,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2570,6 +2570,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettle
.
setEstimatePremium
(
new
BigDecimal
(
"0"
));
tInsuranceSettle
.
setEstimatePremium
(
new
BigDecimal
(
"0"
));
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
//生成一条作废数据并推送至EKP
TInsuranceSettleCancel
tInsuranceSettleCancel
=
new
TInsuranceSettleCancel
();
tInsuranceSettleCancel
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettleCancel
.
setSettleId
(
success
.
getDefaultSettleId
());
}
else
{
}
else
{
//更新预估保费
//更新预估保费
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0"
));
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0"
));
...
@@ -2887,7 +2892,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2887,7 +2892,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param
.
setId
(
one
.
getId
());
param
.
setId
(
one
.
getId
());
param
.
setReduceHandleStatus
(
one
.
getReduceHandleStatus
());
param
.
setReduceHandleStatus
(
one
.
getReduceHandleStatus
());
boolean
b
=
successList
.
stream
().
anyMatch
(
u
->
u
.
getEmpName
().
equals
(
param
.
getEmpName
())
&&
u
.
getEmpIdcardNo
().
equals
(
param
.
getEmpIdcardNo
())
&&
u
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())
&&
u
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())
&&
u
.
getPolicyStart
().
equals
(
param
.
getPolicyStart
())
&&
u
.
getPolicyEnd
().
equals
(
param
.
getPolicyEnd
())
);
if
(
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
errorList
.
add
(
param
);
continue
;
}
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"errorList"
,
errorList
);
map
.
put
(
"errorList"
,
errorList
);
...
@@ -3200,7 +3219,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3200,7 +3219,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//保单开始日期
//保单开始日期
String
policyStart
=
param
.
getPolicyStart
();
String
policyStart
=
param
.
getPolicyStart
();
if
(
StringUtils
.
isBlank
(
policyStart
)){
if
(
StringUtils
.
isBlank
(
policyStart
)){
...
@@ -3328,40 +3346,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3328,40 +3346,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//预估
//预估
if
(
param
.
getNewSettleType
()
==
CommonConstants
.
ZERO_INT
){
if
(
param
.
getNewSettleType
()
==
CommonConstants
.
ZERO_INT
){
//根据险种获取费率,没费率返回错误
//按月
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getById
(
insuranceDetail
.
getInsuranceTypeId
());
if
(
CommonConstants
.
ONE_INT
==
insuranceDetail
.
getBillingType
()){
//险种存不存在
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
);
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
multiply
(
insuranceDetail
.
getRate
(
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
param
.
setEstimatePremium
(
estimatePremium
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
else
{
}
else
{
//按天
//按天
//计算起止时间的天数
//计算起止时间的天数
...
@@ -3371,11 +3360,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3371,11 +3360,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setEstimatePremium
(
estimatePremium
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
}
}
}
}
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
param
.
setId
(
insuranceDetail
.
getId
());
param
.
setId
(
insuranceDetail
.
getId
());
boolean
b
=
successList
.
stream
().
anyMatch
(
u
->
u
.
getEmpName
().
equals
(
param
.
getEmpName
())
&&
u
.
getEmpIdCardNo
().
equals
(
param
.
getEmpIdCardNo
())
&&
u
.
getOldDeptNo
().
equals
(
param
.
getOldDeptNo
())
&&
u
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())
&&
u
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())
&&
u
.
getPolicyStart
().
equals
(
param
.
getPolicyStart
())
&&
u
.
getPolicyEnd
().
equals
(
param
.
getPolicyEnd
())
&&
u
.
getBuyStandard
().
equals
(
param
.
getBuyStandard
())
);
if
(
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
errorList
.
add
(
param
);
continue
;
}
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
map
.
put
(
"errorList"
,
errorList
);
map
.
put
(
"errorList"
,
errorList
);
...
...
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