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
19aa1c00
Commit
19aa1c00
authored
Jul 28, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:新增批量导入的异常返回提示语句,修改费率校验规则,新增退费金额校验规则"
parent
9e815072
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
427 additions
and
223 deletions
+427
-223
ValidityConstants.java
....plus.v1/yifu/common/core/constant/ValidityConstants.java
+6
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+142
-28
TInsuranceType.java
.../cloud/plus/v1/yifu/insurances/entity/TInsuranceType.java
+1
-1
TInsuranceTypeStandard.java
...lus/v1/yifu/insurances/entity/TInsuranceTypeStandard.java
+1
-1
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+23
-0
DeptChangeCheckParam.java
...loud/plus/v1/yifu/insurances/vo/DeptChangeCheckParam.java
+5
-1
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+8
-0
RefundExportListVo.java
.../cloud/plus/v1/yifu/insurances/vo/RefundExportListVo.java
+10
-0
SettleMonthChangeCheckParam.java
...us/v1/yifu/insurances/vo/SettleMonthChangeCheckParam.java
+6
-1
TInsuranceCompanyController.java
...fu/insurances/controller/TInsuranceCompanyController.java
+1
-3
TInsuranceRefundMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceRefundMapper.java
+2
-0
TInsuranceRefundService.java
...s/v1/yifu/insurances/service/TInsuranceRefundService.java
+2
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+176
-167
TInsuranceRefundServiceImpl.java
.../insurances/service/impl/TInsuranceRefundServiceImpl.java
+7
-0
TInsuranceTypeRateServiceImpl.java
...nsurances/service/impl/TInsuranceTypeRateServiceImpl.java
+4
-3
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+18
-9
TInsuranceCompanyMapper.xml
...biz/src/main/resources/mapper/TInsuranceCompanyMapper.xml
+1
-1
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+0
-5
TInsuranceRefundMapper.xml
...-biz/src/main/resources/mapper/TInsuranceRefundMapper.xml
+11
-0
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+2
-2
TInsuranceTypeStandardMapper.xml
...rc/main/resources/mapper/TInsuranceTypeStandardMapper.xml
+1
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ValidityConstants.java
View file @
19aa1c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
constant
;
import
java.util.regex.Pattern
;
/**
* @author fang
* 常用的一些验证,如手机、移动号码、联通号码、电信号码、密码、座机、 邮政编码、邮箱、年龄、身份证、URL、QQ、汉字、字母、数字等校验表达式
...
...
@@ -63,4 +66,7 @@ public class ValidityConstants {
public
static
final
String
PATTERN_50
=
"^.{1,50}$"
;
/** 最多60位 规则 */
public
static
final
String
PATTERN_60
=
"^.{1,60}$"
;
/** 不超过两位小数的正数 */
public
static
final
String
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
=
"^[+]?([0-9]+(.[0-9]{1,2})?)$"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
19aa1c00
...
...
@@ -328,24 +328,49 @@ public class InsurancesConstants {
/***********************减员办理错误码********************************/
/**
*
已被替换,不允许
减员
*
商险已出险,无法
减员
*/
public
static
final
String
I
S_EFFECT_ERROR
=
"已被替换,不允许
减员"
;
public
static
final
String
I
NSURANCE_IS_USE_ERROR
=
"商险已出险,无法
减员"
;
/**
*
已超出保单截止日期,不允许
减员
*
非已投保状态,无法
减员
*/
public
static
final
String
IS_OVERDUE_ERROR
=
"已超出保单截止日期,不允许
减员"
;
public
static
final
String
REFUND_ERROR
=
"非已投保状态,无法
减员"
;
/**
*
已出险的,不允许
减员
*
商险待投保,无法
减员
*/
public
static
final
String
I
S_USE_ERROR
=
"已出险的,不允许
减员"
;
public
static
final
String
I
NSURANCE_BUY_STATUS_ONE_ERROR
=
"商险待投保,无法
减员"
;
/**
*
非已投保状态
,无法减员
*
商险投保中
,无法减员
*/
public
static
final
String
REFUND_ERROR
=
"非已投保状态,无法减员"
;
public
static
final
String
INSURANCE_BUY_STATUS_TWO_ERROR
=
"商险投保中,无法减员"
;
/**
* 商险无效,无法减员
*/
public
static
final
String
INSURANCE_IS_EFFECT_ERROR
=
"商险无效,无法减员"
;
/**
* 商险已过期,无法减员
*/
public
static
final
String
INSURANCE_IS_OVERDUE_ERROR
=
"商险已过期,无法减员"
;
/**
* 商险待减员,无法减员
*/
public
static
final
String
INSURANCE_REFUND_STATUS_ONE_ERROR
=
"商险待减员,无法减员"
;
/**
* 商险减员中,无法减员
*/
public
static
final
String
INSURANCE_REFUND_STATUS_TWO_ERROR
=
"商险减员中,无法减员"
;
/**
* 商险已减员,无法减员
*/
public
static
final
String
INSURANCE_REFUND_STATUS_FOUR_ERROR
=
"商险已减员,无法减员"
;
/**
* 替换结算月份和原有结算月份相同
...
...
@@ -353,14 +378,41 @@ public class InsurancesConstants {
public
static
final
String
SETTLE_MONTH_IDENTICAL
=
"替换结算月份和原有结算月份相同"
;
/**
*
当前保单已处于减员流程,无法变更结算月
*
商险待投保,无法减员
*/
public
static
final
String
SETTLE_MONTH_CHANGE_REDUCE_HANDLE_STATUS_ERROR
=
"
当前保单已处于减员流程,无法变更结算月
"
;
public
static
final
String
SETTLE_MONTH_CHANGE_REDUCE_HANDLE_STATUS_ERROR
=
"
商险待投保,无法减员
"
;
/**
*
当前保单已结算
,无法变更结算月
*
商险待投保
,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR
=
"当前保单已结算,无法变更结算月"
;
public
static
final
String
SETTLE_MONTH_CHANGE_BUY_STATUS_ONE_ERROR
=
"商险待投保,无法变更结算月"
;
/**
* 商险投保中,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR
=
"商险投保中,无法变更结算月"
;
/**
* 商险已减员,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR
=
"商险已减员,无法变更结算月"
;
/**
* 商险结算中,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR
=
"商险结算中,无法变更结算月"
;
/**
* 商险已结算,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR
=
"商险已结算,无法变更结算月"
;
/**
* 替换类型无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR
=
"替换类型无法变更结算月"
;
/**
* 替换项目ID和原有项目ID相同
...
...
@@ -378,44 +430,55 @@ public class InsurancesConstants {
public
static
final
String
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
=
"当前变更结算月列表为空"
;
/**
* 替换
人员不允许变更结算月
* 替换
类型无法变更项目
*/
public
static
final
String
SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR
=
"替换人员不允许变更结算月
"
;
public
static
final
String
DEPT_NO_CHANGE_IS_EFFECT_ERROR
=
"替换类型无法变更项目
"
;
/**
*
替换人员不允许变更所属
项目
*
商险待投保,无法变更
项目
*/
public
static
final
String
DEPT_NO_CHANGE_
IS_EFFECT_ERROR
=
"替换人员不允许变更所属
项目"
;
public
static
final
String
DEPT_NO_CHANGE_
BUY_STATUS_ONE_ERROR
=
"商险待投保,无法变更
项目"
;
/**
*
当前保单已结算,无法变更所属
项目
*
商险投保中,无法变更
项目
*/
public
static
final
String
DEPT_NO_CHANGE_
SETTLE_HANDLE_STATUS_ERROR
=
"当前保单已结算,无法变更所属
项目"
;
public
static
final
String
DEPT_NO_CHANGE_
BUY_STATUS_TWO_ERROR
=
"商险投保中,无法变更
项目"
;
/**
*
退费金额不能为空
*
商险已减员,无法变更项目
*/
public
static
final
String
REFUND_MONEY_NOT_EMPTY
=
"退费金额不能为空
"
;
public
static
final
String
DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR
=
"商险已减员,无法变更项目
"
;
/**
*
退费金额格式不正确
*
商险结算中,无法变更项目
*/
public
static
final
String
REFUND_MONEY_PARSE_ERROR
=
"退费金额格式不正确
"
;
public
static
final
String
DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR
=
"商险结算中,无法变更项目
"
;
/**
*
退费金额不能小于零
*
商险已结算,无法变更项目
*/
public
static
final
String
REFUND_MONEY_MIN_ERROR
=
"退费金额不能小于零
"
;
public
static
final
String
DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR
=
"商险已结算,无法变更项目
"
;
/**
*
退费金额不能大于999999.99
*
替换项目编码不能为空
*/
public
static
final
String
REFUND_MONEY_MAX_ERROR
=
"退费金额不能大于999999.99
"
;
public
static
final
String
DEPT_NO_CHANGE_NOT_EMPTY
=
"替换项目编码不能为空
"
;
/**
*
姓名不能超过20个字符
*
替换项目不存在
*/
public
static
final
String
EMP_NAME_MAX_LENGTH_ERROR
=
"姓名不能超过20个字符"
;
public
static
final
String
DEPT_NO_CHANGE_IS_NOT_EXIST
=
"替换项目不存在"
;
/**
* 退费金额不能为空
*/
public
static
final
String
REFUND_MONEY_NOT_EMPTY
=
"保费不能为空"
;
/**
* 保费金额格式不正确
*/
public
static
final
String
REFUND_MONEY_PARSE_ERROR
=
"保费金额格式不正确"
;
/**
* 员工减员记录不存在
...
...
@@ -432,5 +495,56 @@ public class InsurancesConstants {
*/
public
static
final
String
REFUND_EXPORT
=
"减员导出办理"
;
/**
* 减员办理成功
*/
public
static
final
String
REFUND_EXPORT_SUCCESS
=
"减员办理成功"
;
/**
* 减员办理成功
*/
public
static
final
String
REFUND_EXPORT_FAILED
=
"减员办理失败"
;
/**
* 员工投保信息不存在
*/
public
static
final
String
USER_DATA_IS_NOT_EXIST
=
"员工投保信息不存在"
;
/***********************商险产品错误码********************************/
/**
* 新增保险公司
*/
public
static
final
String
NEW_INSURANCE_COMPANY
=
"新增保险公司"
;
/**
* 修改保险公司
*/
public
static
final
String
UPDATE_INSURANCE_COMPANY
=
"修改保险公司"
;
/**
* 新增险种
*/
public
static
final
String
NEW_INSURANCE_TYPE
=
"新增险种"
;
/**
* 修改险种
*/
public
static
final
String
UPDATE_INSURANCE_TYPE
=
"修改险种"
;
/**
* 新增费率
*/
public
static
final
String
NEW_INSURANCE_TYPE_RATE
=
"新增费率"
;
/**
* 删除费率
*/
public
static
final
String
DELETE_INSURANCE_TYPE_RATE
=
"删除费率"
;
/**
* 新增购买标准
*/
public
static
final
String
NEW_INSURANCE_TYPE_STANDARD
=
"新增购买标准"
;
/**
* 删除购买标准
*/
public
static
final
String
DELETE_INSURANCE_TYPE_STANDARD
=
"删除购买标准"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceType.java
View file @
19aa1c00
...
...
@@ -27,7 +27,7 @@ public class TInsuranceType extends BaseEntity {
*/
@Schema
(
description
=
"险种id"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Lo
ng
id
;
private
Stri
ng
id
;
/**
* 险种名称
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceTypeStandard.java
View file @
19aa1c00
...
...
@@ -25,7 +25,7 @@ public class TInsuranceTypeStandard extends BaseEntity {
/**
* 购买标准id
*/
@Schema
(
description
=
"
保险公司
id"
)
@Schema
(
description
=
"
购买标准
id"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
19aa1c00
...
...
@@ -152,6 +152,29 @@ public class ValidityUtil {
return
idCard
.
matches
(
ValidityConstants
.
IDCARD_PATTERN
)
;
}
/**
* 判断是否是整数或者是携带一位或者两位的小数
* @param refundMoney 金额
* @return boolean
*/
public
static
boolean
validateMoney
(
final
String
refundMoney
)
{
if
(
Common
.
isEmpty
(
refundMoney
)){
return
Boolean
.
FALSE
;
}
if
(!
BigDecimalUtils
.
isBigDecimal
(
refundMoney
)){
return
Boolean
.
FALSE
;
}
if
(!
refundMoney
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
)){
return
Boolean
.
FALSE
;
}
boolean
max
=
refundMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
<
0
;
boolean
min
=
refundMoney
.
compareTo
(
CommonConstants
.
MONEY_MIN
)
>
0
;
if
(!
max
||
!
min
){
return
Boolean
.
FALSE
;
}
return
Boolean
.
TRUE
;
}
/**
* 姓名验证
*
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/DeptChangeCheckParam.java
View file @
19aa1c00
...
...
@@ -15,7 +15,11 @@ import java.io.Serializable;
@Tag
(
name
=
"变更所属项目"
)
public
class
DeptChangeCheckParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
//姓名+身份证号+原项目编码+保险公司+险种+保单开始时间+保单结束时间+保单结束时间+标准+有效+未减员 是否存在校验
/**
* 商险id
*/
@Schema
(
description
=
"商险id"
)
private
String
id
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
19aa1c00
...
...
@@ -226,6 +226,14 @@ public class InsuredListVo implements Serializable {
@Schema
(
description
=
"创建人(派单人)"
)
private
String
createName
;
/**
* 购买月数
*/
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListVo.java
View file @
19aa1c00
...
...
@@ -183,5 +183,15 @@ public class RefundExportListVo implements Serializable {
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 购买月数
*/
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
/**
* 购买天数
*/
@Schema
(
description
=
"购买天数"
)
private
long
buyDay
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/SettleMonthChangeCheckParam.java
View file @
19aa1c00
...
...
@@ -15,7 +15,12 @@ import java.io.Serializable;
@Tag
(
name
=
"结算月变更"
)
public
class
SettleMonthChangeCheckParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
//姓名+身份证号+原项目编码+保险公司+险种+保单开始时间+保单结束时间+保单结束时间+标准+有效+未减员 是否存在校验
/**
* 商险id
*/
@Schema
(
description
=
"商险id"
)
private
String
id
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceCompanyController.java
View file @
19aa1c00
...
...
@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
...
...
@@ -12,7 +11,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -88,7 +86,7 @@ public class TInsuranceCompanyController {
* @return
*/
@Operation
(
summary
=
"查询保险公司列表(不分页)"
,
description
=
"查询保险公司列表(不分页)"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
R
<
List
<
TInsuranceCompany
>>
getInsuranceCompanyList
()
{
return
R
.
ok
(
insuranceCompanyService
.
getInsuranceCompanyList
());
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceRefundMapper.java
View file @
19aa1c00
...
...
@@ -23,4 +23,6 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
TInsuranceRefund
getByInsDetailId
(
String
id
);
void
updateByInsDetailId
(
TInsuranceRefund
insuranceRefund
);
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceRefundService.java
View file @
19aa1c00
...
...
@@ -15,4 +15,6 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
void
updateByInsDetailId
(
TInsuranceRefund
insuranceRefund
);
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
19aa1c00
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/TInsuranceRefundServiceImpl.java
View file @
19aa1c00
...
...
@@ -24,4 +24,11 @@ implements TInsuranceRefundService {
public
void
updateByInsDetailId
(
TInsuranceRefund
insuranceRefund
)
{
this
.
baseMapper
.
updateByInsDetailId
(
insuranceRefund
);
}
@Override
public
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
)
{
return
this
.
baseMapper
.
updateRefundMoney
(
insuranceRefund
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeRateServiceImpl.java
View file @
19aa1c00
...
...
@@ -101,22 +101,23 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
String
month
=
insuranceTypeRate
.
getMonth
();
if
(!
ValidityUtil
.
isMonth
(
month
)){
if
(!
ValidityUtil
.
validatePositiveInt
(
month
)){
return
R
.
failed
(
"当前月份格式不正确"
);
}
String
rate
=
insuranceTypeRate
.
getRate
();
if
(!
Common
.
isNumber
(
rate
)){
if
(!
ValidityUtil
.
validateMoney
(
rate
)){
return
R
.
failed
(
"当前费率格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceTypeRate
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceTypeId
)
.
eq
(
TInsuranceTypeRate
::
getRate
,
insuranceTypeRate
.
getRate
()).
eq
(
TInsuranceTypeRate
:
:
getMonth
,
insuranceTypeRate
.
getMonth
());
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
insuranceTypeRate
.
getMonth
());
List
<
TInsuranceTypeRate
>
list
=
this
.
list
(
queryWrapper
);
if
(
list
.
isEmpty
()){
insuranceTypeRate
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceTypeRate
.
setCreateBy
(
user
.
getId
());
insuranceTypeRate
.
setCreateName
(
user
.
getNickname
());
insuranceTypeRate
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeRate
));
}
else
{
return
R
.
failed
(
"当前险种已存在相同的费率"
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
19aa1c00
...
...
@@ -9,13 +9,15 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -31,10 +33,14 @@ import java.util.List;
@Service
public
class
TInsuranceTypeStandardServiceImpl
extends
ServiceImpl
<
TInsuranceTypeStandardMapper
,
TInsuranceTypeStandard
>
implements
TInsuranceTypeStandardService
{
@Resource
private
TInsuranceTypeService
i
nsuranceTypeService
;
private
TInsuranceTypeService
tI
nsuranceTypeService
;
@Resource
private
TInsuranceDetailService
insuranceDetailService
;
private
TInsuranceDetailService
tInsuranceDetailService
;
@Resource
private
TInsuranceOperateService
tInsuranceOperateService
;
/**
* 查询购买标准列表
...
...
@@ -48,7 +54,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"险种id为空"
);
}
TInsuranceType
byId
=
i
nsuranceTypeService
.
getById
(
id
);
TInsuranceType
byId
=
tI
nsuranceTypeService
.
getById
(
id
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
...
...
@@ -79,7 +85,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
queryWrapper
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeId
,
byId
.
getInsuranceTypeId
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
byId
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceDetail
>
list
=
i
nsuranceDetailService
.
list
(
queryWrapper
);
List
<
TInsuranceDetail
>
list
=
tI
nsuranceDetailService
.
list
(
queryWrapper
);
if
(
Common
.
isNotEmpty
(
list
)){
return
R
.
failed
(
"当前险种的购买标准已存在对应的商险信息,不能删除"
);
}
...
...
@@ -105,20 +111,20 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
return
R
.
failed
(
"新增的购买标准信息为空"
);
}
Long
insuranceTypeId
=
insuranceTypeStandard
.
getInsuranceTypeId
();
TInsuranceType
byId
=
i
nsuranceTypeService
.
getById
(
insuranceTypeId
);
TInsuranceType
byId
=
tI
nsuranceTypeService
.
getById
(
insuranceTypeId
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
String
buyStandard
=
insuranceTypeStandard
.
getBuyStandard
();
String
medicalQuota
=
insuranceTypeStandard
.
getMedicalQuota
();
String
dieDisableQuota
=
insuranceTypeStandard
.
getDieDisableQuota
();
if
(!
Common
.
isNumber
(
buyStandard
)){
if
(!
ValidityUtil
.
validateMoney
(
buyStandard
)){
return
R
.
failed
(
"当前购买标准格式不正确"
);
}
if
(!
Common
.
isNumber
(
medicalQuota
)){
if
(!
ValidityUtil
.
validateMoney
(
medicalQuota
)){
return
R
.
failed
(
"当前医疗额度格式不正确"
);
}
if
(!
Common
.
isNumber
(
dieDisableQuota
)){
if
(!
ValidityUtil
.
validateMoney
(
dieDisableQuota
)){
return
R
.
failed
(
"当前身故或残疾额度格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceTypeStandard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -131,10 +137,13 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
insuranceTypeStandard
.
setCreateBy
(
user
.
getId
());
insuranceTypeStandard
.
setCreateName
(
user
.
getNickname
());
insuranceTypeStandard
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
),
"新增购买标准成功"
);
}
else
{
return
R
.
failed
(
"当前险种下的购买标准已存在"
);
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceCompanyMapper.xml
View file @
19aa1c00
...
...
@@ -5,7 +5,7 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"
BIGINT
"
/>
<id
property=
"id"
column=
"ID"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"companyName"
column=
"COMPANY_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"companyAddress"
column=
"COMPANY_ADDRESS"
jdbcType=
"VARCHAR"
/>
<result
property=
"companyDocking"
column=
"COMPANY_DOCKING"
jdbcType=
"VARCHAR"
/>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
19aa1c00
...
...
@@ -541,8 +541,6 @@
t_insurance_refund refund
where
detail.ID = refund.INS_DETAIL_ID
and
(detail.REDUCE_HANDLE_STATUS is not null and detail.REDUCE_HANDLE_STATUS != 3)
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
...
...
@@ -607,9 +605,6 @@
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.reduceHandleStatus != null "
>
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if
test=
"param.isOverdue != null "
>
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
</if>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceRefundMapper.xml
View file @
19aa1c00
...
...
@@ -25,11 +25,22 @@
t_insurance_refund
set
REDUCE_HANDLE_STATUS = #{reduceHandleStatus},
REMARK = #{remark},
UPDATE_BY = #{createBy},
UPDATE_TIME = #{createTime}
where
INS_DETAIL_ID = #{insDetailId}
</update>
<update
id=
"updateRefundMoney"
>
update
t_insurance_refund
set
REFUND_MONEY = #{refundMoney},
UPDATE_BY = #{updateBy},
UPDATE_TIME = #{updateTime}
where
INS_DETAIL_ID = #{insDetailId}
</update>
<select
id=
"getByInsDetailId"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund"
>
</select>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
19aa1c00
...
...
@@ -5,9 +5,9 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"
BIGINT
"
/>
<id
property=
"id"
column=
"ID"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"name"
column=
"NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceCompanyId"
column=
"INSURANCE_COMPANY_ID"
jdbcType=
"
BIGINT
"
/>
<result
property=
"insuranceCompanyId"
column=
"INSURANCE_COMPANY_ID"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"receiptUnitName"
column=
"RECEIPT_UNIT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"bankName"
column=
"BANK_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"bankNo"
column=
"BANK_NO"
jdbcType=
"VARCHAR"
/>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeStandardMapper.xml
View file @
19aa1c00
...
...
@@ -6,7 +6,7 @@
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeId"
column=
"INSURANCE_TYPE_ID"
jdbcType=
"
BIGINT
"
/>
<result
property=
"insuranceTypeId"
column=
"INSURANCE_TYPE_ID"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"buyStandard"
column=
"BUY_STANDARD"
jdbcType=
"VARCHAR"
/>
<result
property=
"medicalQuota"
column=
"MEDICAL_QUOTA"
jdbcType=
"VARCHAR"
/>
<result
property=
"dieDisableQuota"
column=
"DIE_DISABLE_QUOTA"
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