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
bc1aab6f
Commit
bc1aab6f
authored
Jul 27, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批增接口调试
parent
76ed41fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
21 deletions
+89
-21
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+18
-6
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+71
-15
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
bc1aab6f
...
...
@@ -108,6 +108,10 @@ public class InsurancesConstants {
* 替换员工姓名不能为空
*/
public
static
final
String
REPLACE_EMP_NAME_NOT_EMPTY
=
"替换员工姓名不能为空"
;
/**
* 替换员工姓名超过20字符长度限制
*/
public
static
final
String
REPLACE_EMP_NAME_MORE_THAN_20
=
"替换员工姓名超过20字符长度限制"
;
/**
* 员工身份证号不能为空
*/
...
...
@@ -125,9 +129,9 @@ public class InsurancesConstants {
*/
public
static
final
String
EMP_ID_CARD_NO_NOT_FIT
=
"员工未通过实名认证"
;
/**
* 替换员工
姓名、身份证号不一致
* 替换员工
未通过实名认证
*/
public
static
final
String
REPLACE_EMP_ID_CARD_NO_NOT_FIT
=
"替换员工
姓名、身份证号不一致
"
;
public
static
final
String
REPLACE_EMP_ID_CARD_NO_NOT_FIT
=
"替换员工
未通过实名认证
"
;
/**
* 替换员工身份证号格式有误
*/
...
...
@@ -137,9 +141,9 @@ public class InsurancesConstants {
*/
public
static
final
String
DEPT_NO_NOT_EMPTY
=
"项目编码不能为空"
;
/**
* 替换项目编码不能为空
* 替换
员工
项目编码不能为空
*/
public
static
final
String
REPLACE_DEPT_NO_NOT_EMPTY
=
"替换项目编码不能为空"
;
public
static
final
String
REPLACE_DEPT_NO_NOT_EMPTY
=
"替换
员工
项目编码不能为空"
;
/**
* 保险公司名称不能为空
*/
...
...
@@ -253,9 +257,17 @@ public class InsurancesConstants {
*/
public
static
final
String
ACTUAL_PREMIUM_NO_EMPTY
=
"保费不能为空"
;
/**
* 保单号不存在
* 保单号不存在或已过期
*/
public
static
final
String
POLICY_NO_EXIST
=
"保单号不存在或已过期"
;
/**
* 保险公司错误
*/
public
static
final
String
POLICY_NO_COMPANY_NAME_NOT_SAME
=
"保险公司错误"
;
/**
* 险种名称错误
*/
public
static
final
String
POLICY_NO_
EXIST
=
"保单号不存在
"
;
public
static
final
String
POLICY_NO_
TYPE_NAME_NOT_SAME
=
"险种名称错误
"
;
/***********************减员办理错误码********************************/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
bc1aab6f
...
...
@@ -971,6 +971,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate20
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_MORE_THAN_20
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -981,6 +986,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate32
(
param
.
getPost
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POST_NOT_MORE_THAN_32
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -1026,6 +1036,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isNotBlank
(
param
.
getRemark
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getRemark
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REMARK_NOT_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
}
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
...
...
@@ -1147,14 +1164,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if
(!
LocalDateUtil
.
isDate
(
param
.
getSettleMonth
(),
LocalDateUtil
.
NORM_MONTH_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isCurrentOrFutureMonth
(
param
.
getSettleMonth
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FIVE_INT
);
TInsuranceDetail
insuranceDetail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
//是否需要加状态过滤?
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_EXIST
);
...
...
@@ -1165,6 +1202,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
limitOne
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ONE_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -1173,20 +1212,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setPolicyStart
(
limitOne
.
getPolicyStart
());
param
.
setPolicyEnd
(
limitOne
.
getPolicyEnd
());
}
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if
(!
LocalDateUtil
.
isDate
(
param
.
getSettleMonth
(),
LocalDateUtil
.
NORM_MONTH_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isCurrentOrFutureMonth
(
param
.
getSettleMonth
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
if
(!
limitOne
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
else
if
(!
limitOne
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setPolicyStart
(
limitOne
.
getPolicyStart
());
param
.
setPolicyEnd
(
limitOne
.
getPolicyEnd
());
}
}
listSuccess
.
add
(
param
);
}
...
...
@@ -1213,6 +1250,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate20
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_MORE_THAN_20
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -1248,6 +1290,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate20
(
param
.
getReplaceEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_NAME_MORE_THAN_20
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getReplaceEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_IDCARD_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -1263,6 +1310,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate32
(
param
.
getPost
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POST_NOT_MORE_THAN_32
);
listResult
.
add
(
param
);
continue
;
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
...
...
@@ -1337,6 +1391,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
listSuccess
.
add
(
param
);
}
map
.
put
(
"listResult"
,
listResult
);
...
...
@@ -1387,6 +1442,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
...
...
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