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
a3bb6d3c
Commit
a3bb6d3c
authored
Jul 28, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:变更项目和变更月份时,剔除已减员数据,优化项目数据获取逻辑"
parent
4637c3e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
15 deletions
+40
-15
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+5
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+35
-15
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
a3bb6d3c
...
...
@@ -546,6 +546,11 @@ public class InsurancesConstants {
*/
public
static
final
String
USER_DATA_IS_NOT_EXIST
=
"员工投保信息不存在"
;
/**
* 存在多条在保记录
*/
public
static
final
String
MULTIPLE_RECORDS_UNDER_WARRANTY
=
"存在多条在保记录"
;
/***********************商险产品错误码********************************/
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
a3bb6d3c
...
...
@@ -2334,6 +2334,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail
.
setReduceHandleStatus
(
refundType
);
if
(
CommonConstants
.
FOUR_INT
==
refundType
){
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
FIVE_INT
);
}
else
{
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
}
successList
.
add
(
tInsuranceDetail
);
refund
.
setInsDetailId
(
tInsuranceDetail
.
getId
());
...
...
@@ -2625,9 +2627,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
errorList
.
add
(
param
);
continue
;
}
TInsuranceDetail
one
=
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
param
.
setErrorMessage
(
InsurancesConstants
.
USER_DATA_IS_NOT_EXIST
);
...
...
@@ -2860,6 +2870,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getDeptNo
,
deptNo
).
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
).
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
errorList
.
add
(
param
);
continue
;
}
TInsuranceDetail
insuranceDetail
=
getOne
(
queryWrapper
);
//如果保单信息为空
if
(
Common
.
isEmpty
(
insuranceDetail
)){
...
...
@@ -3032,28 +3050,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//根据项目编码查询项目是否存在
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
newDeptNo
));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_
CHANGE_
IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
ProjectSetInfoVo
jsonObject
=
data
.
get
(
newDeptNo
);
if
(
null
==
jsonObject
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_IS_NOT_EXIST
);
String
settleType
=
jsonObject
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
errorList
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
jsonObject
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
errorList
.
add
(
param
);
continue
;
}
else
{
param
.
setNewSettleType
(
Integer
.
parseInt
(
settleType
));
}
param
.
setNewSettleType
(
Integer
.
parseInt
(
settleType
));
}
}
}
...
...
@@ -3064,6 +3076,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
).
eq
(
TInsuranceDetail:
:
getDeptNo
,
oldDeptNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)).
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
errorList
.
add
(
param
);
continue
;
}
TInsuranceDetail
insuranceDetail
=
getOne
(
queryWrapper
);
//如果保单信息为空
if
(
Common
.
isEmpty
(
insuranceDetail
)){
...
...
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