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
b181cbef
Commit
b181cbef
authored
Dec 15, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:新增退保费用登记的办理地权限"
parent
8357c994
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
9 deletions
+73
-9
InsuranceRefundVo.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundVo.java
+47
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+1
-1
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+20
-5
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+4
-2
TInsuranceEnclosureMapper.xml
...resources/mapper/insurances/TInsuranceEnclosureMapper.xml
+1
-1
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundVo.java
0 → 100644
View file @
b181cbef
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @ClassName: InsuranceRefundVo
* @Description: 减员退费校验类
* @Author: Administrator
* @Date: 2022/12/15 9:38
*/
@Data
public
class
InsuranceRefundVo
implements
Serializable
{
/**
* 主键id
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 保单信息主键
*/
@Schema
(
description
=
"保单信息主键"
)
private
String
insDetailId
;
/**
* 退费金额
*/
@Schema
(
description
=
"退费金额"
)
private
BigDecimal
refundMoney
;
/**
* 商险办理城市code
*/
@Schema
(
description
=
"商险办理城市code"
)
private
Integer
insuranceHandleCity
;
/**
* 商险办理省code
*/
@Schema
(
description
=
"商险办理省code"
)
private
Integer
insuranceHandleProvince
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
b181cbef
...
...
@@ -199,7 +199,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param param 查询参数
* @return {@link String}
*/
TInsuranceRefund
selectRefundDetailId
(
@Param
(
"param"
)
RefundMoneyUpdateParam
param
);
InsuranceRefundVo
selectRefundDetailId
(
@Param
(
"param"
)
RefundMoneyUpdateParam
param
);
/**
* 根据ID导出减员办理列表
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
b181cbef
...
...
@@ -5492,7 +5492,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
R
updateRefundMoney
(
List
<
RefundMoneyUpdateParam
>
paramList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
refundMoneyCheck
(
paramList
);
//获取当前登录人的商险办理地权限
LambdaQueryWrapper
<
TInsuranceAreaRes
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
eq
(
TInsuranceAreaRes:
:
getUserId
,
user
.
getId
()).
eq
(
TInsuranceAreaRes:
:
getStatus
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceAreaRes
>
insuranceAreaResList
=
tInsuranceAreaResService
.
list
(
areaQuery
);
if
(
CollectionUtils
.
isEmpty
(
insuranceAreaResList
))
{
return
R
.
failed
(
InsurancesConstants
.
NO_PERMISSION
);
}
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
refundMoneyCheck
(
paramList
,
insuranceAreaResList
);
List
<
RefundMoneyUpdateParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
List
<
TInsuranceOperate
>
insuranceOperateList
=
new
ArrayList
<>();
...
...
@@ -5718,7 +5725,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList 变更列表
* @return {@link R}
*/
public
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
refundMoneyCheck
(
List
<
RefundMoneyUpdateParam
>
paramList
){
public
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
refundMoneyCheck
(
List
<
RefundMoneyUpdateParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
new
HashMap
<>(
16
);
List
<
RefundMoneyUpdateParam
>
errorList
=
new
ArrayList
<>();
...
...
@@ -5797,16 +5804,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//必填格式校通过后查询对应的保单信息
TInsuranceRefund
insuranceRefund
=
this
.
baseMapper
.
selectRefundDetailId
(
param
);
InsuranceRefundVo
insuranceRefund
=
this
.
baseMapper
.
selectRefundDetailId
(
param
);
if
(
Common
.
isEmpty
(
insuranceRefund
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_IS_NULL
);
errorList
.
add
(
param
);
continue
;
}
else
{
String
refundMoney
=
param
.
getRefundMoney
();
if
(!
BigDecimalUtils
.
isNullOrZero
(
insuranceRefund
.
getRefundMoney
())
&&
insuranceRefund
.
getRefundMoney
().
compareTo
(
new
BigDecimal
(
refundMoney
))
==
CommonConstants
.
ZERO_INT
){
//商险办理地权限校验
boolean
b
=
insuranceAreaResList
.
stream
().
anyMatch
(
s
->
insuranceRefund
.
getInsuranceHandleCity
().
equals
(
s
.
getCity
())
&&
insuranceRefund
.
getInsuranceHandleProvince
().
equals
(
s
.
getProvince
()));
if
(!
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
continue
;
}
else
{
String
refundMoney
=
param
.
getRefundMoney
();
if
(!
BigDecimalUtils
.
isNullOrZero
(
insuranceRefund
.
getRefundMoney
())
&&
insuranceRefund
.
getRefundMoney
().
compareTo
(
new
BigDecimal
(
refundMoney
))
==
CommonConstants
.
ZERO_INT
){
continue
;
}
}
}
param
.
setId
(
insuranceRefund
.
getId
());
param
.
setInsDetailId
(
insuranceRefund
.
getInsDetailId
());
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
b181cbef
...
...
@@ -933,11 +933,13 @@
</select>
<!-- 查询保单减员退费信息-->
<select
id=
"selectRefundDetailId"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.
entity.TInsuranceRefund
"
>
<select
id=
"selectRefundDetailId"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.
vo.InsuranceRefundVo
"
>
select
refund.ID as id,
refund.INS_DETAIL_ID as insDetailId,
refund.REFUND_MONEY as refundMoney
refund.REFUND_MONEY as refundMoney,
a.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince,
a.INSURANCE_HANDLE_CITY as insuranceHandleCity
from
t_insurance_detail a,
t_insurance_refund refund
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceEnclosureMapper.xml
View file @
b181cbef
...
...
@@ -5,7 +5,7 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"
INTEGE
R"
/>
<id
property=
"id"
column=
"ID"
jdbcType=
"
VARCHA
R"
/>
<result
property=
"enclosureName"
column=
"ENCLOSURE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"VARCHAR"
/>
...
...
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