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
c1d6ca0e
Commit
c1d6ca0e
authored
Jul 21, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量新增导入
parent
0d71114b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+34
-34
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
c1d6ca0e
...
...
@@ -1399,13 +1399,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
.
getRecords
())){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
MapUtils
.
isNotEmpty
(
setInfoByCodes
.
getData
()))
{
Map
data
=
setInfoByCodes
.
getData
();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuranceList
.
getRecords
())
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
String
(
"departName"
)).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
DepartName
(
)).
orElse
(
""
));
}
}
}
...
...
@@ -1426,13 +1426,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuredList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
MapUtils
.
isNotEmpty
(
setInfoByCodes
.
getData
()))
{
Map
data
=
setInfoByCodes
.
getData
();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuredList
)
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
String
(
"departName"
)).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
DepartName
(
)).
orElse
(
""
));
}
}
}
...
...
@@ -1454,13 +1454,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundPageList
.
getRecords
())){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundPageList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
MapUtils
.
isNotEmpty
(
setInfoByCodes
.
getData
()))
{
Map
data
=
setInfoByCodes
.
getData
();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceRefundListVo
record
:
insuranceRefundPageList
.
getRecords
())
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
String
(
"departName"
)).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
DepartName
(
)).
orElse
(
""
));
}
}
}
...
...
@@ -1481,13 +1481,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
MapUtils
.
isNotEmpty
(
setInfoByCodes
.
getData
()))
{
Map
data
=
setInfoByCodes
.
getData
();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceRefundListVo
record
:
insuranceRefundList
)
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
String
(
"departName"
)).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
DepartName
(
)).
orElse
(
""
));
}
}
}
...
...
@@ -1510,13 +1510,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingPageList
.
getRecords
())){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundHandlingPageList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
MapUtils
.
isNotEmpty
(
setInfoByCodes
.
getData
()))
{
Map
data
=
setInfoByCodes
.
getData
();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceRefundHandlingListVo
record
:
insuranceRefundHandlingPageList
.
getRecords
())
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
String
(
"departName"
)).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
DepartName
(
)).
orElse
(
""
));
}
}
}
...
...
@@ -1540,13 +1540,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundHandlingList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
MapUtils
.
isNotEmpty
(
setInfoByCodes
.
getData
()))
{
Map
data
=
setInfoByCodes
.
getData
();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceRefundHandlingListVo
record
:
insuranceRefundHandlingList
)
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
String
(
"departName"
)).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
get
DepartName
(
)).
orElse
(
""
));
}
}
}
...
...
@@ -1928,22 +1928,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//根据项目编码查询项目是否存在
R
<
Map
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
newDeptNo
));
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
newDeptNo
));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
Map
data
=
setInfoByCodes
.
getData
();
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
JSONObject
jsonObject
=
(
JSONObject
)
data
.
get
(
newDeptNo
);
ProjectSetInfoVo
jsonObject
=
data
.
get
(
newDeptNo
);
if
(
null
==
jsonObject
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
jsonObject
.
get
String
(
"insuranceSettleType"
);
String
settleType
=
jsonObject
.
get
InsuranceSettleType
(
);
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
errorList
.
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