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
1f69b220
Commit
1f69b220
authored
Aug 01, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-licancan
parents
9b50fa33
629ca359
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
170 deletions
+52
-170
TInsuranceSettleCancel.java
...lus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
+5
-125
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+2
-2
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 @
1f69b220
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.util.Date
;
...
...
@@ -7,6 +10,8 @@ import java.util.Date;
* 结算信息作废记录表(用于记录项目变更导致推信息送至EKP)
* @TableName t_insurance_settle_cancel
*/
@Data
@Tag
(
name
=
"结算信息作废记录"
)
public
class
TInsuranceSettleCancel
implements
Serializable
{
/**
*
...
...
@@ -55,129 +60,4 @@ public class TInsuranceSettleCancel implements Serializable {
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/controller/TInsuranceTypeController.java
View file @
1f69b220
...
...
@@ -41,8 +41,8 @@ public class TInsuranceTypeController {
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@
Pos
tMapping
(
"/page"
)
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
<
TInsuranceType
>
page
,
@RequestBody
TInsuranceType
insuranceType
)
{
@
Ge
tMapping
(
"/page"
)
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
<
TInsuranceType
>
page
,
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
1f69b220
...
...
@@ -2581,6 +2581,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettle
.
setEstimatePremium
(
new
BigDecimal
(
"0"
));
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
//生成一条作废数据并推送至EKP
TInsuranceSettleCancel
tInsuranceSettleCancel
=
new
TInsuranceSettleCancel
();
tInsuranceSettleCancel
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettleCancel
.
setSettleId
(
success
.
getDefaultSettleId
());
}
else
{
//更新预估保费
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0"
));
...
...
@@ -2898,7 +2903,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param
.
setId
(
one
.
getId
());
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
);
}
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"errorList"
,
errorList
);
...
...
@@ -3211,7 +3230,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//保单开始日期
String
policyStart
=
param
.
getPolicyStart
();
if
(
StringUtils
.
isBlank
(
policyStart
)){
...
...
@@ -3339,40 +3357,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//预估
if
(
param
.
getNewSettleType
()
==
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
{
//按月
if
(
CommonConstants
.
ONE_INT
==
insuranceDetail
.
getBillingType
()){
// 预估保费 = 费率 * 购买标准
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
);
}
}
else
{
//按天
//计算起止时间的天数
...
...
@@ -3382,11 +3371,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setEstimatePremium
(
estimatePremium
);
}
}
}
}
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
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
);
}
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