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
801dfa42
Commit
801dfa42
authored
Jul 27, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登记保单保费接口调试
parent
f42e63a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
9 deletions
+59
-9
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+25
-1
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+1
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+33
-7
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
801dfa42
...
@@ -284,10 +284,34 @@ public class InsurancesConstants {
...
@@ -284,10 +284,34 @@ public class InsurancesConstants {
* 保单号不能为空
* 保单号不能为空
*/
*/
public
static
final
String
POLICY_NO_EMPTY
=
"保单号不能为空"
;
public
static
final
String
POLICY_NO_EMPTY
=
"保单号不能为空"
;
/**
* 保单号长度超过50字符限制
*/
public
static
final
String
POLICY_NO_MORE_THAN_50
=
"保单号长度超过50字符限制"
;
/**
* 发票号长度超过50字符限制
*/
public
static
final
String
INVOICE_NO_MORE_THAN_50
=
"发票号长度超过50字符限制"
;
/**
/**
* 保费不能为空
* 保费不能为空
*/
*/
public
static
final
String
ACTUAL_PREMIUM_NO_EMPTY
=
"保费不能为空"
;
public
static
final
String
ACTUAL_PREMIUM_EMPTY
=
"保费不能为空"
;
/**
* 保费金额格式错误
*/
public
static
final
String
ACTUAL_PREMIUM_PARSE_ERROR
=
"保费金额格式错误"
;
/**
* 替换类型无法登记保单保费
*/
public
static
final
String
BUY_TYPE_FOUR_NOT_REGISTERED
=
"替换类型无法登记保单保费"
;
/**
* 商险待投保,无法登记保单保费
*/
public
static
final
String
BUY_HANDLE_ONE_NOT_REGISTERED
=
"商险待投保,无法登记保单保费"
;
/**
* 商险投保中,无法登记保单保费
*/
public
static
final
String
BUY_HANDLE_TWO_NOT_REGISTERED
=
"商险投保中,无法登记保单保费"
;
/**
/**
* 保单号不存在或已过期
* 保单号不存在或已过期
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
801dfa42
...
@@ -259,7 +259,7 @@ public class ValidityUtil {
...
@@ -259,7 +259,7 @@ public class ValidityUtil {
}
}
/**
/**
* 验证字符串 最多
5
0位
* 验证字符串 最多
6
0位
*
*
* @author licancan
* @author licancan
* @param str
* @param str
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
801dfa42
...
@@ -1669,12 +1669,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1669,12 +1669,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -1685,6 +1679,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1685,6 +1679,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getInvoiceNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getInvoiceNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INVOICE_NO_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
}
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
...
@@ -1707,11 +1708,36 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1707,11 +1708,36 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getActualPremium
())){
if
(
StringUtils
.
isBlank
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_
NO_
EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_EMPTY
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
BigDecimalUtils
.
isBigDecimal
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
}
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_TYPE_FOUR_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_ONE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
TWO_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
}
}
}
listSuccess
.
add
(
param
);
listSuccess
.
add
(
param
);
...
...
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