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
e3e4bf64
Commit
e3e4bf64
authored
Dec 13, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'feature/insurance-1.3.0'
Feature licancan See merge request
!289
parents
30a27ced
b8ce564b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+14
-6
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+14
-7
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
e3e4bf64
...
...
@@ -112,6 +112,10 @@ public class InsurancesConstants {
* 未找到符合条件的参保记录
*/
public
static
final
String
NOT_FOUND_INSURANCE_RECORD
=
"未找到符合条件的参保记录"
;
/**
* 当前投保状态无法变更投保记录
*/
public
static
final
String
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
=
"当前投保状态无法变更投保记录"
;
/**
* 当前投保状态无法登记发票号
*/
...
...
@@ -150,9 +154,9 @@ public class InsurancesConstants {
*/
public
static
final
String
REPLACE_IS_EXIST
=
"替换员工投保记录已存在"
;
/**
* 替换
类型不能修改
* 替换
投保不允许变更投保类型
*/
public
static
final
String
REPLACE_NOT_ALLOW
=
"替换
类型不能修改
"
;
public
static
final
String
REPLACE_NOT_ALLOW
=
"替换
投保不允许变更投保类型
"
;
/**
* 当前记录是待投保,无法替换
*/
...
...
@@ -298,9 +302,9 @@ public class InsurancesConstants {
*/
public
static
final
String
POLICY_START_SHOULD_LESS_THAN_POLICY_END
=
"保单结束时间需要大于保单开始时间"
;
/**
* 保单开始时间需早于保单结束时间
*
变更后的
保单开始时间需早于保单结束时间
*/
public
static
final
String
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
=
"保单开始时间需早于保单结束时间"
;
public
static
final
String
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
=
"
变更后的
保单开始时间需早于保单结束时间"
;
/**
* 保单起止时间不能超过365天
*/
...
...
@@ -401,6 +405,10 @@ public class InsurancesConstants {
* 变更原因不能为空
*/
public
static
final
String
REASON_EMPTY
=
"变更原因不能为空"
;
/**
* 变更原因超过50字符限制
*/
public
static
final
String
REASON_MORE_THAN_50
=
"变更原因超过50字符限制"
;
/**
* 发票号长度超过50字符限制
*/
...
...
@@ -418,9 +426,9 @@ public class InsurancesConstants {
*/
public
static
final
String
BUY_TYPE_FOUR_NOT_REGISTERED
=
"替换类型无法登记保单保费"
;
/**
* 变更后投保类型
错误
* 变更后投保类型
只能填写新增、批增
*/
public
static
final
String
BUY_TYPE_ERROR_NEW
=
"变更后投保类型
错误
"
;
public
static
final
String
BUY_TYPE_ERROR_NEW
=
"变更后投保类型
只能填写新增、批增
"
;
/**
* 商险待投保,无法登记保单保费
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
e3e4bf64
...
...
@@ -2231,15 +2231,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
StringUtils
.
isBlank
(
param
.
getReason
())){
R
.
failed
(
InsurancesConstants
.
REASON_EMPTY
);
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())
&&
!
ValidityUtil
.
validate50
(
param
.
getReason
())){
R
.
failed
(
InsurancesConstants
.
REASON_MORE_THAN_50
);
}
TInsuranceDetail
byId
=
this
.
getById
(
param
.
getId
());
if
(!
Optional
.
ofNullable
(
byId
).
isPresent
()){
R
.
failed
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
R
.
failed
(
InsurancesConstants
.
NOT_FOUND_INSURANCE_RECORD
);
}
if
(
byId
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
R
.
failed
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
}
if
(
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
){
R
.
failed
(
InsurancesConstants
.
BUY_HANDLE_STATUS_NOT_THREE
);
if
(
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
&&
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
FIVE_INT
){
R
.
failed
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
}
TInsuranceDetail
old
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
byId
,
old
);
...
...
@@ -3729,6 +3732,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setErrorMessage
(
InsurancesConstants
.
REASON_EMPTY
);
continue
;
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())
&&
!
ValidityUtil
.
validate50
(
param
.
getReason
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REASON_MORE_THAN_50
);
continue
;
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
...
...
@@ -3745,12 +3752,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
NOT_FOUND_INSURANCE_RECORD
);
continue
;
}
else
{
//判断是否是已投保状态
if
(
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_NOT_THREE
);
//判断是否是已投保状态
或已减员
if
(
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
&&
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
FIVE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
continue
;
}
}
...
...
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