Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
42b26b78
Commit
42b26b78
authored
Nov 21, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改机场人员导入
parent
e56677db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+28
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
42b26b78
...
@@ -791,6 +791,7 @@ public class ExcelServiceImpl {
...
@@ -791,6 +791,7 @@ public class ExcelServiceImpl {
List
<
OrgUsrExcelDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
OrgUsrExcelDto
.
class
,
1
);
List
<
OrgUsrExcelDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
OrgUsrExcelDto
.
class
,
1
);
if
(!
ObjectUtils
.
isEmpty
(
excelDtoList
))
{
if
(!
ObjectUtils
.
isEmpty
(
excelDtoList
))
{
Set
<
String
>
set
=
new
HashSet
<>();
Set
<
String
>
set
=
new
HashSet
<>();
Set
<
String
>
set1
=
new
HashSet
<>();
excelDtoList
.
forEach
(
orgUsrExcelDto
->
{
excelDtoList
.
forEach
(
orgUsrExcelDto
->
{
if
(
orgUsrExcelDto
.
getParentId
()
!=
null
)
{
if
(
orgUsrExcelDto
.
getParentId
()
!=
null
)
{
String
[]
certificates
=
orgUsrExcelDto
.
getParentId
().
split
(
"@"
);
String
[]
certificates
=
orgUsrExcelDto
.
getParentId
().
split
(
"@"
);
...
@@ -869,10 +870,17 @@ public class ExcelServiceImpl {
...
@@ -869,10 +870,17 @@ public class ExcelServiceImpl {
dynamicFormInstance
.
setFieldValueLabel
(
dataDictionaryService
.
getById
(
dynamicFormInstance
.
getFieldValue
()).
getName
());
dynamicFormInstance
.
setFieldValueLabel
(
dataDictionaryService
.
getById
(
dynamicFormInstance
.
getFieldValue
()).
getName
());
}
}
String
fieldCode
=
dynamicFormInstance
.
getFieldCode
();
String
fieldCode
=
dynamicFormInstance
.
getFieldCode
();
if
(
map1
.
containsKey
(
fieldCode
)
&&
fieldCode
.
contains
(
"Code"
)
){
if
(
map1
.
containsKey
(
fieldCode
)
&&
fieldCode
.
contains
(
"Code"
)
){
String
[]
split
=
map1
.
get
(
fieldCode
).
toString
().
split
(
"@"
);
String
[]
split
=
map1
.
get
(
fieldCode
).
toString
().
split
(
"@"
);
dynamicFormInstance
.
setFieldValue
(
split
[
0
]);
dynamicFormInstance
.
setFieldValue
(
split
[
0
]);
}
}
if
(
"certificatesTypeCode"
.
equals
(
fieldCode
)){
String
[]
split
=
map1
.
get
(
fieldCode
).
toString
().
split
(
"@"
);
dynamicFormInstance
.
setFieldValue
(
split
[
1
]);
dynamicFormInstance
.
setFieldValueLabel
(
split
[
0
]);}
if
(
map1
.
containsKey
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))){
if
(
map1
.
containsKey
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))){
dynamicFormInstance
.
setFieldValueLabel
(
map1
.
get
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
)).
toString
());
dynamicFormInstance
.
setFieldValueLabel
(
map1
.
get
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
)).
toString
());
...
@@ -884,7 +892,9 @@ public class ExcelServiceImpl {
...
@@ -884,7 +892,9 @@ public class ExcelServiceImpl {
orgUsrExcelDto
.
setDynamicFormValue
(
dynamicFormInstancelist
);
orgUsrExcelDto
.
setDynamicFormValue
(
dynamicFormInstancelist
);
Bean
.
toPo
(
getCurrentInfo
(),
orgUsrExcelDto
);
Bean
.
toPo
(
getCurrentInfo
(),
orgUsrExcelDto
);
// 保存动态表单和人员单位表
// 保存动态表单和人员单位表
if
(!
ObjectUtils
.
isEmpty
(
orgUsrExcelDto
.
getCertificatesNumber
()))
{
String
[]
split55
=
orgUsrExcelDto
.
getCertificatesTypeCode
().
toString
().
split
(
"@"
);
if
(!
ObjectUtils
.
isEmpty
(
orgUsrExcelDto
.
getCertificatesNumber
())&&
split55
[
1
].
equals
(
"120"
))
{
if
(!
set
.
add
(
orgUsrExcelDto
.
getCertificatesNumber
()))
{
if
(!
set
.
add
(
orgUsrExcelDto
.
getCertificatesNumber
()))
{
throw
new
RuntimeException
(
"身份证号码重复!"
);
throw
new
RuntimeException
(
"身份证号码重复!"
);
}
else
{
}
else
{
...
@@ -894,6 +904,23 @@ public class ExcelServiceImpl {
...
@@ -894,6 +904,23 @@ public class ExcelServiceImpl {
}
}
}
}
}
}
//平台用户唯一效验
if
(!
ObjectUtils
.
isEmpty
(
orgUsrExcelDto
.
getAmosOrgId
()))
{
if
(!
set1
.
add
(
orgUsrExcelDto
.
getAmosOrgId
()))
{
throw
new
RuntimeException
(
"关联用户"
+
orgUsrExcelDto
.
getAmosOrgCode
()+
"重复!"
);
}
else
{
int
num
=
orgUsrMapper
.
amosIdExist
(
orgUsrExcelDto
.
getAmosOrgId
(),
null
);
if
(
num
>
0
)
{
throw
new
RuntimeException
(
"关联用户"
+
orgUsrExcelDto
.
getAmosOrgCode
()+
"重复!"
);
}
}
}
try
{
try
{
OrgUsrDto
orgUsrDto
=
orgUsrService
.
saveOrgPersonExcel
(
orgUsrExcelDto
);
OrgUsrDto
orgUsrDto
=
orgUsrService
.
saveOrgPersonExcel
(
orgUsrExcelDto
);
if
(!
ObjectUtils
.
isEmpty
(
orgUsrDto
))
{
if
(!
ObjectUtils
.
isEmpty
(
orgUsrDto
))
{
...
...
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