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
95fb295b
Commit
95fb295b
authored
Jun 30, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
062bf3e6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+16
-7
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+0
-3
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-2
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
95fb295b
...
...
@@ -237,7 +237,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg
.
add
(
"工资状态非初始!"
);
}
// 数据合法情况
if
(
!
CollUtil
.
is
Empty
(
errorMsg
))
{
if
(
CollUtil
.
isNot
Empty
(
errorMsg
))
{
isTrue
=
false
;
errorMessageVO
=
this
.
getErrorMessageVO
(
i
,
CommonConstants
.
ZERO_INT
,
employee
.
getEmpName
()
,
employee
.
getEmpIdcard
(),
errorMsg
);
...
...
@@ -408,7 +408,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
canDeleteList
.
add
(
employee
);
}
}
else
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_
IDCARD_LEAVE_EXISTING
,
excel
.
getEmpIdcard
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_
NOT_EXISTS
,
excel
.
getEmpIdcard
()));
}
}
else
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_NOT_EXISTS
,
excel
.
getEmpIdcard
()));
...
...
@@ -511,9 +511,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
check
=
new
TEmployeeInfo
();
check
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
check
.
setEmpPhone
(
employeeInfo
.
getEmpPhone
());
List
<
TEmployeeInfo
>
list
=
baseMapper
.
getList
(
employeeInfo
);
List
<
TEmployeeInfo
>
list
=
baseMapper
.
getList
(
check
);
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
return
R
.
failed
(
"该手机号已被使用!"
);
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR
,
employeeInfo
.
getEmpIdcard
())
);
}
// 调用校验服务-校验手机号
...
...
@@ -644,7 +644,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
List
<
String
>
phoneList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
idCardMap
=
new
HashMap
<>();
String
idCard
;
ErrorMessage
errorMessage
;
// 个性化校验逻辑
Set
<
String
>
errorMsg
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
...
...
@@ -738,6 +737,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
areaMap
=
areaR
.
getData
();
}
TEmployeeInfo
checkPhone
;
List
<
TEmployeeInfo
>
phoneEmpList
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
...
...
@@ -754,7 +755,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
existEmp
.
getFileStatus
()
==
CommonConstants
.
ZERO_INT
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_IDCARD_EXISTING
,
excel
.
getEmpIdcard
()));
}
else
if
(
isCanAdd
==
0
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_
IDCARD_LEAVE_EXISTING
,
excel
.
getEmpIdcard
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_
NOT_EXISTS
,
excel
.
getEmpIdcard
()));
}
else
{
saveEmp
=
existEmpMap
.
get
(
excel
.
getEmpIdcard
());
}
...
...
@@ -778,6 +779,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
// 校验手机号
checkPhone
=
new
TEmployeeInfo
();
checkPhone
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
checkPhone
.
setEmpPhone
(
excel
.
getEmpPhone
());
phoneEmpList
=
baseMapper
.
getList
(
checkPhone
);
if
(
phoneEmpList
!=
null
&&
!
phoneEmpList
.
isEmpty
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR
,
existEmp
.
getEmpIdcard
()));
}
existEmp
=
existPhoneMap
.
get
(
excel
.
getEmpPhone
());
// 手机号已存在
if
(
existEmp
!=
null
)
{
...
...
@@ -1311,7 +1320,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp
.
setUpdateTime
(
LocalDateTime
.
now
());
saveList
.
add
(
saveEmp
);
}
else
if
(
saveEmp
.
getFileStatus
()
==
CommonConstants
.
ONE_INT
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_
IDCARD_LEAVE_EXISTING
,
excel
.
getEmpIdcard
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_
NOT_EXISTS
,
excel
.
getEmpIdcard
()));
}
}
else
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_NOT_EXISTS
,
excel
.
getEmpIdcard
()));
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
95fb295b
...
...
@@ -225,9 +225,6 @@ public interface ErrorCodes {
// 该人员已存在,禁止重复添加
String
ARCHIVES_IMPORT_EMP_IDCARD_EXISTING
=
"archives.import.emp.idCard.existing"
;
// 该人员已减档,禁止导入
String
ARCHIVES_IMPORT_EMP_IDCARD_LEAVE_EXISTING
=
"archives.import.emp.idCard.leave.existing"
;
// 手机号校验错误
String
ARCHIVES_IMPORT_EMP_PHONE_CHECK_ERROR
=
"archives.import.emp.phone.check.error"
;
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
95fb295b
...
...
@@ -67,7 +67,6 @@ archives.emp.certificate.declare.year.error=\u7533\u62A5\u5E74\u5EA6\u4E0D\u53EF
checks.change.emp.project
=
\u
5F85
\u5212\u
8F6C
\u5458\u
5DE5
\u
5DF2
\u5728\u
76EE
\u6807\u9879\u
76EE
\u
4E0B
\u
4E0D
\u
53EF
\u5212\u
8F6C
archives.import.emp.idCard.existing
=
\u
8BE5
\u
4EBA
\u5458\u
5DF2
\u
5B58
\u5728\u
FF0C
\u7981\u
6B62
\u
91CD
\u
590D
\u
6DFB
\u
52A0
archives.import.emp.idCard.leave.existing
=
\u
8BE5
\u
4EBA
\u5458\u
5DF2
\u
51CF
\u6863\u
FF0C
\u7981\u
6B62
\u
5BFC
\u5165
archives.import.emp.phone.check.error
=
\u
624B
\u
673A
\u
53F7
\u6821\u
9A8C
\u9519\u
8BEF
archives.import.emp.phone.exist.error
=
\u
624B
\u
673A
\u
53F7
\u
5DF2
\u
88AB
\u5176\u
4ED6
\u
8EAB
\u
4EFD
\u
8BC1
\u
4F7F
\u7528
archives.import.emp.married.error
=
\u
5A5A
\u
59FB
\u
72B6
\u
51B5
\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
...
...
@@ -79,7 +78,7 @@ archives.import.emp.natrue.error=\u5458\u5DE5\u7C7B\u578B\u5728\u5B57\u5178\u4E2
archives.import.emp.area.error
=
\u6237\u
7C4D
\u6240\u5728\u5730\u
672A
\u
627E
\u5230\u
533A
\u
57DF
archives.import.emp.file.area.error
=
\u6863\u6848\u6240\u5728\u5730\u
672A
\u
627E
\u5230\u
533A
\u
57DF
archives.import.emp.high.education.error
=
\u5927\u
4E13
\u
53CA
\u
4EE5
\u
4E0A
\u
FF0C
\u6700\u
9AD8
\u
5B66
\u5386\u
5FC5
\u
586B
archives.import.emp.not.exists
=
\u
6839\u
636E
\u
8EAB
\u
4EFD
\u
8BC1
\u
672A
\u
627E
\u5230\u
4EBA
\u5458\u6863\u6848\u
4FE1
\u
606F
archives.import.emp.not.exists
=
\u
8BE5
\u
4EBA
\u5458\u
672A
\u5728\u6863\u
FF0C
\u
8BF7
\u6838\u
5B9E
archives.import.emp.idCard.must
=
\u
8EAB
\u
4EFD
\u
8BC1
\u
5FC5
\u
586B
archives.import.emp.empName.must
=
\u5458\u
5DE5
\u
59D3
\u
540D
\u
5FC5
\u
586B
archives.import.emp.leaveReason.must
=
\u
51CF
\u6863\u
539F
\u
56E0
\u
5FC5
\u
586B
...
...
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