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
52831663
Commit
52831663
authored
Jul 08, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
1898706a
ba17ef1c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+1
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+28
-8
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
52831663
...
@@ -29,6 +29,7 @@ public class EmployeeConstants {
...
@@ -29,6 +29,7 @@ public class EmployeeConstants {
public
static
final
String
FILE_ROVINCE_MUST
=
"更新档案市,档案省必填"
;
public
static
final
String
FILE_ROVINCE_MUST
=
"更新档案市,档案省必填"
;
public
static
final
String
FILE_CITY_MUST
=
"更新档案县,档案市必填"
;
public
static
final
String
FILE_CITY_MUST
=
"更新档案县,档案市必填"
;
public
static
final
String
DEPT_NO_ERROR
=
"项目编码错误"
;
public
static
final
String
DEPT_NO_ERROR
=
"项目编码错误"
;
public
static
final
String
DEPT_NO_EXIST
=
"根据项目编码未找到项目"
;
/**
/**
* 无数据可更新
* 无数据可更新
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
52831663
...
@@ -778,7 +778,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -778,7 +778,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
}
return
R
.
ok
(
errorMessageList
);
if
(
errorMessageList
.
isEmpty
())
{
return
R
.
ok
();
}
else
{
return
R
.
failed
(
errorMessageList
);
}
}
}
...
@@ -786,9 +790,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -786,9 +790,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
excelVOList
==
null
||
excelVOList
.
isEmpty
())
{
if
(
excelVOList
==
null
||
excelVOList
.
isEmpty
())
{
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
}
Set
<
String
>
errorMsg
;
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
"请登录!"
);
errorMsg
=
new
HashSet
<>();
errorMsg
.
add
(
CommonConstants
.
PLEASE_LOG_IN
);
errorMessageList
.
add
(
new
ErrorMessage
(
2L
,
errorMsg
));
return
R
.
failed
(
errorMessageList
);
}
}
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
errorMessageList
))
{
if
(
Common
.
isNotNull
(
errorMessageList
))
{
...
@@ -801,7 +809,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -801,7 +809,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map
<
String
,
Integer
>
idCardMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
idCardMap
=
new
HashMap
<>();
String
idCard
;
String
idCard
;
// 个性化校验逻辑
// 个性化校验逻辑
Set
<
String
>
errorMsg
;
List
<
String
>
deptNoList
=
new
ArrayList
<>();
List
<
String
>
deptNoList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
errorMsg
=
new
HashSet
<>();
errorMsg
=
new
HashSet
<>();
...
@@ -842,7 +849,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -842,7 +849,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map
<
String
,
Integer
>
deptMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
deptMap
=
new
HashMap
<>();
if
(
deptList
==
null
||
deptList
.
isEmpty
())
{
if
(
deptList
==
null
||
deptList
.
isEmpty
())
{
return
R
.
failed
(
"根据项目编码未找到项目!"
);
errorMsg
=
new
HashSet
<>();
errorMsg
.
add
(
EmployeeConstants
.
DEPT_NO_EXIST
);
errorMessageList
.
add
(
new
ErrorMessage
(
2L
,
errorMsg
));
return
R
.
failed
(
errorMessageList
);
}
else
{
}
else
{
for
(
TSettleDomain
dept
:
deptList
)
{
for
(
TSettleDomain
dept
:
deptList
)
{
deptMap
.
put
(
dept
.
getDepartNo
(),
CommonConstants
.
ONE_INT
);
deptMap
.
put
(
dept
.
getDepartNo
(),
CommonConstants
.
ONE_INT
);
...
@@ -1342,16 +1352,27 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -1342,16 +1352,27 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
}
return
R
.
ok
(
errorMessageList
);
if
(
errorMessageList
.
isEmpty
())
{
return
R
.
ok
();
}
else
{
return
R
.
failed
(
errorMessageList
);
}
}
}
private
R
<
List
<
ErrorMessage
>>
batchUpdateCore
(
List
<
EmployeeVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
private
R
<
List
<
ErrorMessage
>>
batchUpdateCore
(
List
<
EmployeeVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
Set
<
String
>
errorMsg
;
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
"请登录!"
);
errorMsg
=
new
HashSet
<>();
errorMsg
.
add
(
CommonConstants
.
PLEASE_LOG_IN
);
errorMessageList
.
add
(
new
ErrorMessage
(
2L
,
errorMsg
));
return
R
.
failed
(
errorMessageList
);
}
}
if
(
excelVOList
==
null
||
excelVOList
.
isEmpty
())
{
if
(
excelVOList
==
null
||
excelVOList
.
isEmpty
())
{
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
errorMsg
=
new
HashSet
<>();
errorMsg
.
add
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
errorMessageList
.
add
(
new
ErrorMessage
(
2L
,
errorMsg
));
return
R
.
failed
(
errorMessageList
);
}
}
// 通用校验获取失败的数据
// 通用校验获取失败的数据
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
...
@@ -1399,7 +1420,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -1399,7 +1420,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
// 个性化校验逻辑
// 个性化校验逻辑
Set
<
String
>
errorMsg
;
EmployeeVO
excel
;
EmployeeVO
excel
;
// 需要保存的档案信息
// 需要保存的档案信息
TEmployeeInfo
saveEmp
;
TEmployeeInfo
saveEmp
;
...
...
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