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
da62cb7b
Commit
da62cb7b
authored
May 26, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2437 【web-人员管理】人员导入,基本平台信息导入增加校验与提示
parent
9226949f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
115 additions
and
92 deletions
+115
-92
ExcelServiceImpl.java
.../boot/module/jxiop/biz/service/impl/ExcelServiceImpl.java
+115
-92
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/ExcelServiceImpl.java
View file @
da62cb7b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -45,7 +46,6 @@ public class ExcelServiceImpl {
PersonBasicServiceImpl
personBasicServiceImpl
;
@Autowired
PersonBasicMapper
personBasicMapper
;
@Autowired
...
...
@@ -73,7 +73,7 @@ public class ExcelServiceImpl {
case
"RYXX"
:
//List<EXPersonUser> data=this.getEXPersonUser( par);
List
<
EXPersonUser
>
data
=
this
.
getEXPersonUserAll
(
par
);
List
<
EXPersonUser
>
data
=
this
.
getEXPersonUserAll
(
par
);
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
data
,
clz
,
dataSourcesImpl
,
true
);
break
;
...
...
@@ -89,12 +89,12 @@ public class ExcelServiceImpl {
switch
(
excelDto
.
getType
())
{
case
"CZXX"
:
List
<
ExStationBasicDto
>
data
=
this
.
getExStationBasicDto
(
par
);
List
<
ExStationBasicDto
>
data
=
this
.
getExStationBasicDto
(
par
);
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
data
,
ExStationBasicDto
.
class
,
dataSourcesImpl
,
false
);
break
;
case
"RYXX"
:
List
<
EXPersonUser
>
datad
=
this
.
getEXPersonUserAll
(
par
);
List
<
EXPersonUser
>
datad
=
this
.
getEXPersonUserAll
(
par
);
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
datad
,
EXPersonUser
.
class
,
dataSourcesImpl
,
false
);
break
;
...
...
@@ -117,28 +117,28 @@ public class ExcelServiceImpl {
}
//场站信息导出
public
List
<
ExStationBasicDto
>
getExStationBasicDto
(
Map
<
String
,
Object
>
map
)
{
List
<
ExStationBasicDto
>
data
=
null
;
if
(!
map
.
isEmpty
())
{
String
[]
ids
=
null
;
if
(
map
.
containsKey
(
"ids"
)&&
map
.
get
(
"ids"
)!=
null
&&!
""
.
equals
(
map
.
get
(
"ids"
).
toString
()))
{
ids
=
map
.
get
(
"ids"
).
toString
().
split
(
","
);
public
List
<
ExStationBasicDto
>
getExStationBasicDto
(
Map
<
String
,
Object
>
map
)
{
List
<
ExStationBasicDto
>
data
=
null
;
if
(!
map
.
isEmpty
())
{
String
[]
ids
=
null
;
if
(
map
.
containsKey
(
"ids"
)
&&
map
.
get
(
"ids"
)
!=
null
&&
!
""
.
equals
(
map
.
get
(
"ids"
).
toString
()))
{
ids
=
map
.
get
(
"ids"
).
toString
().
split
(
","
);
}
data
=
stationBasicMapper
.
getExStationBasicDto
(
map
.
containsKey
(
"stationMasterName"
)
?
map
.
get
(
"stationMasterName"
).
toString
():
null
,
map
.
containsKey
(
"stationName"
)
?
map
.
get
(
"stationName"
).
toString
():
null
,
map
.
containsKey
(
"stationType"
)
?
map
.
get
(
"stationType"
).
toString
():
null
,
map
.
containsKey
(
"orgCode"
)
?
map
.
get
(
"orgCode"
).
toString
():
null
,
data
=
stationBasicMapper
.
getExStationBasicDto
(
map
.
containsKey
(
"stationMasterName"
)
?
map
.
get
(
"stationMasterName"
).
toString
()
:
null
,
map
.
containsKey
(
"stationName"
)
?
map
.
get
(
"stationName"
).
toString
()
:
null
,
map
.
containsKey
(
"stationType"
)
?
map
.
get
(
"stationType"
).
toString
()
:
null
,
map
.
containsKey
(
"orgCode"
)
?
map
.
get
(
"orgCode"
).
toString
()
:
null
,
ids
);
}
return
data
;
}
//场站导入
private
void
addExStationBasicDto
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
ExStationBasicDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
ExStationBasicDto
.
class
,
1
);
...
...
@@ -146,19 +146,19 @@ public class ExcelServiceImpl {
//数据验证
for
(
int
i
=
0
;
i
<
excelDtoList
.
size
();
i
++)
{
ExStationBasicDto
exStationBasicDto
=
excelDtoList
.
get
(
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationName
(),
"场站名称"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationCode
(),
"场站编号"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationFlag
(),
"项目状态"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationType
(),
"场站类型"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationMasterName
(),
"站长"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getMobilePhone
(),
"手机号码"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getEmail
(),
"邮箱"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getDevopsTime
(),
"运维时间"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getOwnerUnit
(),
"运维单位"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getAddress
(),
"场站地址"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getArea
(),
"所属片区"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getBriefIntroduction
(),
"场站简介"
,
i
);
ExStationBasicDto
exStationBasicDto
=
excelDtoList
.
get
(
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationName
(),
"场站名称"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationCode
(),
"场站编号"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationFlag
(),
"项目状态"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationType
(),
"场站类型"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationMasterName
(),
"站长"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getMobilePhone
(),
"手机号码"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getEmail
(),
"邮箱"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getDevopsTime
(),
"运维时间"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getOwnerUnit
(),
"运维单位"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getAddress
(),
"场站地址"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getArea
(),
"所属片区"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getBriefIntroduction
(),
"场站简介"
,
i
);
}
excelDtoList
.
forEach
(
item
->
{
StationBasic
fireChemical
=
new
StationBasic
();
...
...
@@ -167,7 +167,7 @@ public class ExcelServiceImpl {
String
[]
type
=
fireChemical
.
getArea
().
split
(
"@"
);
fireChemical
.
setAreaName
(
type
[
0
]);
fireChemical
.
setArea
(
type
[
1
]);
CompanyModel
companyModel
=
personBasicServiceImpl
.
getCompanyModel
(
Long
.
parseLong
(
type
[
1
]));
CompanyModel
companyModel
=
personBasicServiceImpl
.
getCompanyModel
(
Long
.
parseLong
(
type
[
1
]));
fireChemical
.
setAreaCode
(
companyModel
.
getCompanyCode
());
}
if
(
fireChemical
.
getStationType
()
!=
null
)
{
...
...
@@ -177,15 +177,14 @@ public class ExcelServiceImpl {
}
//平台增加场站
CompanyModel
companyModeldata
=
new
CompanyModel
();
CompanyModel
companyModeldata
=
new
CompanyModel
();
companyModeldata
.
setCompanyName
(
fireChemical
.
getStationName
());
companyModeldata
.
setCompanyType
(
"company"
);
companyModeldata
.
setLevel
(
"station"
);
companyModeldata
.
setParentId
(
Long
.
valueOf
(
fireChemical
.
getArea
()));
companyModeldata
.
setCompanyCode
(
fireChemical
.
getStationCode
());
companyModeldata
=
this
.
addCompanyModel
(
companyModeldata
);
companyModeldata
=
this
.
addCompanyModel
(
companyModeldata
);
fireChemical
.
setProjectOrgCode
(
companyModeldata
.
getOrgCode
());
fireChemical
.
setPlatformStationId
(
companyModeldata
.
getSequenceNbr
().
toString
());
...
...
@@ -197,74 +196,72 @@ public class ExcelServiceImpl {
//获取人员数据
public
List
<
EXPersonUser
>
getEXPersonUser
(
Map
map
)
{
List
<
EXPersonUser
>
listdata
=
personBasicMapper
.
getEXPersonUser
(
map
.
containsKey
(
"name"
)?
map
.
get
(
"name"
).
toString
():
null
,
map
.
containsKey
(
"accountName"
)?
map
.
get
(
"accountName"
).
toString
():
null
,
map
.
containsKey
(
"projectName"
)?
map
.
get
(
"projectName"
).
toString
():
null
,
map
.
containsKey
(
"orgCode"
)?
map
.
get
(
"orgCode"
).
toString
():
null
);
public
List
<
EXPersonUser
>
getEXPersonUser
(
Map
map
)
{
List
<
EXPersonUser
>
listdata
=
personBasicMapper
.
getEXPersonUser
(
map
.
containsKey
(
"name"
)
?
map
.
get
(
"name"
).
toString
()
:
null
,
map
.
containsKey
(
"accountName"
)
?
map
.
get
(
"accountName"
).
toString
()
:
null
,
map
.
containsKey
(
"projectName"
)
?
map
.
get
(
"projectName"
).
toString
()
:
null
,
map
.
containsKey
(
"orgCode"
)
?
map
.
get
(
"orgCode"
).
toString
()
:
null
);
return
listdata
;
}
public
void
yanzheng
(
Object
obj
,
String
name
,
int
i
)
{
public
void
yanzheng
(
Object
obj
,
String
name
,
int
i
)
{
//验证数据库重复
if
(
obj
==
null
)
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"数据不能空"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"数据不能空"
,
403
);
if
(
obj
==
null
)
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"数据不能空"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"数据不能空"
,
403
);
}
if
(
obj
!=
null
&&
name
.
equals
(
"手机号码"
)&&
String
.
valueOf
(
obj
).
matches
(
PHONE
))
{
if
(
obj
!=
null
&&
name
.
equals
(
"手机号码"
)
&&
String
.
valueOf
(
obj
).
matches
(
PHONE
))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"手机号码填写错误"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"手机号码填写错误"
,
403
);
}
if
(
obj
!=
null
&&
name
.
equals
(
"邮箱"
)&&
String
.
valueOf
(
obj
).
matches
(
EMAIL
))
{
if
(
obj
!=
null
&&
name
.
equals
(
"邮箱"
)
&&
String
.
valueOf
(
obj
).
matches
(
EMAIL
))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"邮箱填写错误"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"邮箱填写错误"
,
403
);
}
}
//人员导出
public
List
<
EXPersonUser
>
getEXPersonUserAll
(
Map
map
)
{
String
[]
ids
=
null
;
if
(
map
.
containsKey
(
"ids"
)&&
map
.
get
(
"ids"
)!=
null
&&!
""
.
equals
(
map
.
get
(
"ids"
).
toString
()))
{
ids
=
map
.
get
(
"ids"
).
toString
().
split
(
","
);
public
List
<
EXPersonUser
>
getEXPersonUserAll
(
Map
map
)
{
String
[]
ids
=
null
;
if
(
map
.
containsKey
(
"ids"
)
&&
map
.
get
(
"ids"
)
!=
null
&&
!
""
.
equals
(
map
.
get
(
"ids"
).
toString
()))
{
ids
=
map
.
get
(
"ids"
).
toString
().
split
(
","
);
}
List
<
EXPersonUser
>
listdata
=
personBasicMapper
.
getEXPersonUserAll
(
map
.
containsKey
(
"name"
)
?
map
.
get
(
"name"
).
toString
():
null
,
map
.
containsKey
(
"accountName"
)
?
map
.
get
(
"accountName"
).
toString
():
null
,
map
.
containsKey
(
"projectName"
)
?
map
.
get
(
"projectName"
).
toString
():
null
,
map
.
containsKey
(
"orgCode"
)
?
map
.
get
(
"orgCode"
).
toString
():
null
,
List
<
EXPersonUser
>
listdata
=
personBasicMapper
.
getEXPersonUserAll
(
map
.
containsKey
(
"name"
)
?
map
.
get
(
"name"
).
toString
()
:
null
,
map
.
containsKey
(
"accountName"
)
?
map
.
get
(
"accountName"
).
toString
()
:
null
,
map
.
containsKey
(
"projectName"
)
?
map
.
get
(
"projectName"
).
toString
()
:
null
,
map
.
containsKey
(
"orgCode"
)
?
map
.
get
(
"orgCode"
).
toString
()
:
null
,
ids
);
return
listdata
;
}
private
CompanyModel
addCompanyModel
(
CompanyModel
companyModel
)
{
private
CompanyModel
addCompanyModel
(
CompanyModel
companyModel
)
{
FeignClientResult
<
CompanyModel
>
Model
=
Privilege
.
companyClient
.
create
(
companyModel
);
CompanyModel
user
=
new
CompanyModel
();
CompanyModel
user
=
new
CompanyModel
();
if
(!
ObjectUtils
.
isEmpty
(
Model
))
{
if
(
Model
.
getStatus
()==
200
)
{
if
(
Model
.
getStatus
()
==
200
)
{
user
=
Model
.
getResult
();
}
else
{
}
else
{
throw
new
RuntimeException
(
Model
.
getMessage
());
}
}
return
user
;
}
//人员导入更新
private
void
updateEXPersonUser
(
MultipartFile
multipartFile
)
throws
Exception
{
//人员导入更新
private
void
updateEXPersonUser
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
EXPersonUser
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
EXPersonUser
.
class
,
1
);
this
.
updateEXPersonUserda
(
excelDtoList
);
}
}
private
List
<
String
>
getDataDictionary
(
String
type
)
{
List
<
String
>
collect
=
new
ArrayList
<>();
FeignClientResult
<
List
<
DictionarieValueModel
>>
de
=
Systemctl
.
dictionarieClient
.
dictValues
(
type
);
List
<
DictionarieValueModel
>
listco
=
new
ArrayList
<>();
List
<
String
>
collect
=
new
ArrayList
<>();
FeignClientResult
<
List
<
DictionarieValueModel
>>
de
=
Systemctl
.
dictionarieClient
.
dictValues
(
type
);
List
<
DictionarieValueModel
>
listco
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
de
))
{
if
(
de
.
getStatus
()
==
200
)
{
listco
=
de
.
getResult
();
...
...
@@ -278,52 +275,85 @@ private void updateEXPersonUser(MultipartFile multipartFile) throws Exception {
return
collect
;
}
public
void
getdata
(
List
<
String
>
list
,
String
name
,
int
i
)
{
public
void
getdata
(
List
<
String
>
list
,
String
name
,
int
i
)
{
if
(
name
!=
null
&&!
list
.
contains
(
name
))
{
if
(
name
!=
null
&&
!
list
.
contains
(
name
))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,证件类型和证件名称不匹配"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,证件类型和证件名称不匹配"
,
403
);
}
}
@Transactional
public
void
updateEXPersonUserda
(
List
<
EXPersonUser
>
excelDtoList
)
{
List
<
PersonBasic
>
listPersonBasic
=
new
ArrayList
<>();
List
<
PersonSkillEducation
>
listPersonSkillEducation
=
new
ArrayList
<>();
List
<
PersonCertificate
>
listPersonCertificate
=
new
ArrayList
<>();
QueryWrapper
<
PersonAccount
>
wrapper
=
new
QueryWrapper
();
//效验证件类型获取四种字典
List
<
String
>
list1
=
getDataDictionary
(
"职业技能鉴定证书"
);
List
<
String
>
list2
=
getDataDictionary
(
"专业技术资格证书"
);
List
<
String
>
list3
=
getDataDictionary
(
"岗位资质鉴定证书"
);
List
<
String
>
list4
=
getDataDictionary
(
"技能鉴定工种"
);
List
<
String
>
list1
=
getDataDictionary
(
"职业技能鉴定证书"
);
List
<
String
>
list2
=
getDataDictionary
(
"专业技术资格证书"
);
List
<
String
>
list3
=
getDataDictionary
(
"岗位资质鉴定证书"
);
List
<
String
>
list4
=
getDataDictionary
(
"技能鉴定工种"
);
//数据验证
for
(
int
i
=
0
;
i
<
excelDtoList
.
size
();
i
++)
{
if
(
excelDtoList
.
get
(
i
).
getAccountName
()
!=
null
)
{
wrapper
.
eq
(
"account_name"
,
excelDtoList
.
get
(
i
).
getAccountName
());
PersonAccount
personAccount
=
personAccountServiceImpl
.
getOne
(
wrapper
);
if
(
personAccount
==
null
)
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,平台账号名名称错误请检查"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,平台账号名名称错误请检查"
,
403
);
}
//姓名
if
(
excelDtoList
.
get
(
i
).
getName
()
!=
null
&&
(!
excelDtoList
.
get
(
i
).
getName
().
equals
(
personAccount
.
getName
())))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,姓名不允许导入时修改"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,姓名不允许导入时修改"
,
403
);
}
//工号
if
(
excelDtoList
.
get
(
i
).
getJobNumber
()
!=
null
&&
(!
excelDtoList
.
get
(
i
).
getJobNumber
().
equals
(
personAccount
.
getJobNumber
())))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,工号不允许导入时修改"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,工号不允许导入时修改"
,
403
);
}
//所属场站
if
(
excelDtoList
.
get
(
i
).
getProjectName
()
!=
null
&&
(!
excelDtoList
.
get
(
i
).
getProjectName
().
equals
(
personAccount
.
getProjectName
())))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,所属场站不允许导入时修改"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,行所属场站不允许导入时修改"
,
403
);
}
//证件类型
if
(
excelDtoList
.
get
(
i
).
getIdType
()
!=
null
&&
(!
excelDtoList
.
get
(
i
).
getIdType
().
equals
(
personAccount
.
getIdType
())))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,证件类型不允许导入时修改"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,证件类型不允许导入时修改"
,
403
);
}
//证件编号
if
(
excelDtoList
.
get
(
i
).
getIdNumber
()
!=
null
&&
(!
excelDtoList
.
get
(
i
).
getIdNumber
().
equals
(
personAccount
.
getIdNumber
())))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,证件编号不允许导入时修改"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,证件编号不允许导入时修改"
,
403
);
}
PersonBasic
personBasic
=
personBasicMapper
.
selectById
(
personAccount
.
getPersonId
());
//电话
if
(
excelDtoList
.
get
(
i
).
getPhoneNum
()
!=
null
&&
(!
excelDtoList
.
get
(
i
).
getPhoneNum
().
equals
(
personBasic
.
getPhone
())))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,电话不允许导入时修改"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,电话不允许导入时修改"
,
403
);
}
}
//身高和体重 ,字段验证
if
(
excelDtoList
.
get
(
i
).
getWeight
()!=
null
&&(
0
>=
excelDtoList
.
get
(
i
).
getWeight
()||
excelDtoList
.
get
(
i
).
getWeight
()>
200
))
{
if
(
excelDtoList
.
get
(
i
).
getWeight
()
!=
null
&&
(
0
>=
excelDtoList
.
get
(
i
).
getWeight
()
||
excelDtoList
.
get
(
i
).
getWeight
()
>
200
))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,体重必须大于0小于等于200"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,体重必须大于0小于等于200"
,
403
);
}
if
(
excelDtoList
.
get
(
i
).
getHeight
()!=
null
&&(
0
>=
excelDtoList
.
get
(
i
).
getHeight
()||
excelDtoList
.
get
(
i
).
getHeight
()>
200
))
{
if
(
excelDtoList
.
get
(
i
).
getHeight
()
!=
null
&&
(
0
>=
excelDtoList
.
get
(
i
).
getHeight
()
||
excelDtoList
.
get
(
i
).
getHeight
()
>
200
))
{
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,身高必须大于0小于等于200"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,身高必须大于0小于等于200"
,
403
);
}
//效验类型
if
(
excelDtoList
.
get
(
i
).
getDocumentType
()!=
null
)
{
if
(
excelDtoList
.
get
(
i
).
getDocumentType
()
!=
null
)
{
switch
(
excelDtoList
.
get
(
i
).
getDocumentType
())
{
case
"职业技能鉴定证书"
:
getdata
(
list1
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
getdata
(
list1
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
break
;
case
"专业技术资格证书"
:
getdata
(
list2
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
getdata
(
list2
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
break
;
case
"岗位资质鉴定证书"
:
getdata
(
list3
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
getdata
(
list3
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
break
;
case
"技能鉴定工种"
:
getdata
(
list4
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
getdata
(
list4
,
excelDtoList
.
get
(
i
).
getCertificateName
(),
i
);
break
;
default
:
break
;
...
...
@@ -331,33 +361,27 @@ private void updateEXPersonUser(MultipartFile multipartFile) throws Exception {
}
}
for
(
EXPersonUser
exPersonUser
:
excelDtoList
)
{
//根据平台账号获取用户id
QueryWrapper
<
PersonAccount
>
wrapper
=
new
QueryWrapper
();
wrapper
.
eq
(
"account_name"
,
exPersonUser
.
getAccountName
());
PersonAccount
personAccount
=
personAccountServiceImpl
.
getOne
(
wrapper
);
wrapper
.
eq
(
"account_name"
,
exPersonUser
.
getAccountName
());
PersonAccount
personAccount
=
personAccountServiceImpl
.
getOne
(
wrapper
);
//获取基本信息
PersonBasic
personBasic
=
personBasicMapper
.
selectById
(
personAccount
.
getPersonId
());
BeanUtils
.
copyProperties
(
exPersonUser
,
personBasic
);
listPersonBasic
.
add
(
personBasic
);
//人员技能
QueryWrapper
<
PersonSkillEducation
>
wrapper1
=
new
QueryWrapper
();
wrapper1
.
eq
(
"person_id"
,
personAccount
.
getPersonId
());
PersonSkillEducation
personSkillEducation
=
personSkillEducationService
.
getOne
(
wrapper1
);
wrapper1
.
eq
(
"person_id"
,
personAccount
.
getPersonId
());
PersonSkillEducation
personSkillEducation
=
personSkillEducationService
.
getOne
(
wrapper1
);
BeanUtils
.
copyProperties
(
exPersonUser
,
personSkillEducation
);
listPersonSkillEducation
.
add
(
personSkillEducation
);
//人员资质
QueryWrapper
<
PersonCertificate
>
wrapper2
=
new
QueryWrapper
();
wrapper2
.
eq
(
"person_id"
,
personAccount
.
getPersonId
());
PersonCertificate
personCertificate
=
personCertificateService
.
getOne
(
wrapper2
);
wrapper2
.
eq
(
"person_id"
,
personAccount
.
getPersonId
());
PersonCertificate
personCertificate
=
personCertificateService
.
getOne
(
wrapper2
);
BeanUtils
.
copyProperties
(
exPersonUser
,
personCertificate
);
listPersonCertificate
.
add
(
personCertificate
);
}
...
...
@@ -366,5 +390,4 @@ private void updateEXPersonUser(MultipartFile multipartFile) throws Exception {
personCertificateService
.
saveOrUpdateBatch
(
listPersonCertificate
);
}
}
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