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
17c743ca
Commit
17c743ca
authored
Jun 30, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
减档
parent
b9f2fa04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
10 deletions
+24
-10
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+20
-10
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+2
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
17c743ca
...
...
@@ -255,7 +255,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMessageList
.
add
(
errorMessageVO
);
}
}
if
(!
isTrue
&&
CollUtil
.
isNotEmpty
(
errorMessageList
)
)
{
if
(!
isTrue
)
{
return
R
.
failed
(
errorMessageList
);
}
else
{
List
<
TEmployeeProject
>
projectList
;
...
...
@@ -357,6 +357,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_LEAVEREASON_MUST
,
excel
.
getEmpIdcard
()));
errorMsgMap
.
put
(
i
+
2
,
CommonConstants
.
ZERO_INT
);
}
if
(
Common
.
isNotNull
(
excel
.
getLeaveRemark
())
&&
excel
.
getLeaveRemark
().
length
()
>
200
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_LEAVEREMARK_LENGTH
,
excel
.
getEmpIdcard
()));
errorMsgMap
.
put
(
i
+
2
,
CommonConstants
.
ZERO_INT
);
}
// 数据不合法
if
(!
CollUtil
.
isEmpty
(
errorMsg
))
{
isTrue
=
false
;
...
...
@@ -373,6 +377,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
existEmpMap
.
put
(
employeeInfo
.
getEmpIdcard
(),
employeeInfo
);
}
}
List
<
TEmployeeProject
>
projectList
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
...
...
@@ -386,13 +391,18 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
employee
!=
null
)
{
// 档案在职
if
(
employee
.
getFileStatus
()
==
CommonConstants
.
ZERO_INT
)
{
// 开始减档
employee
.
setFileStatus
(
CommonConstants
.
ONE_INT
);
employee
.
setLeaveUser
(
user
.
getId
());
employee
.
setLeaveUserName
(
user
.
getNickname
());
employee
.
setLeaveReason
(
excel
.
getLeaveReason
());
employee
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
canDeleteList
.
add
(
employee
);
projectList
=
tEmployeeProjectService
.
getListByEmpId
(
employee
.
getId
(),
CommonConstants
.
ZERO_INT
);
if
(
projectList
!=
null
&&
!
projectList
.
isEmpty
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_HAVE_PROJECT
,
employee
.
getEmpIdcard
()));
}
else
{
// 开始减档
employee
.
setFileStatus
(
CommonConstants
.
ONE_INT
);
employee
.
setLeaveUser
(
user
.
getId
());
employee
.
setLeaveUserName
(
user
.
getNickname
());
employee
.
setLeaveReason
(
excel
.
getLeaveReason
());
employee
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
canDeleteList
.
add
(
employee
);
}
}
else
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_IDCARD_LEAVE_EXISTING
,
excel
.
getEmpIdcard
()));
}
...
...
@@ -410,7 +420,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
errorMessageList
.
add
(
errorMessageVO
);
}
if
(!
isTrue
&&
CollUtil
.
isNotEmpty
(
errorMessageList
)
)
{
if
(!
isTrue
)
{
return
R
.
failed
(
errorMessageList
);
}
else
{
// 仅更新自己
...
...
@@ -426,7 +436,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 获取项目档案,传参0,过滤项目状态
List
<
TEmployeeProject
>
projectList
=
tEmployeeProjectService
.
getListByEmpId
(
id
,
CommonConstants
.
ZERO_INT
);
if
(
projectList
!=
null
&&
!
projectList
.
isEmpty
())
{
return
R
.
failed
(
"还有【"
+
projectList
.
size
()
+
"】条项目未减项,请先去减项!"
);
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_HAVE_PROJECT
,
employee
.
getEmpIdcard
())
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
17c743ca
...
...
@@ -257,6 +257,8 @@ public interface ErrorCodes {
String
ARCHIVES_IMPORT_EMP_IDCARD_MUST
=
"archives.import.emp.idCard.must"
;
// 减档原因必填
String
ARCHIVES_IMPORT_EMP_LEAVEREASON_MUST
=
"archives.import.emp.leaveReason.must"
;
String
ARCHIVES_IMPORT_EMP_LEAVEREMARK_LENGTH
=
"archives.import.emp.leaveRemark.length"
;
String
ARCHIVES_IMPORT_EMP_HAVE_PROJECT
=
"archives.import.emp.have.project"
;
/**
* 项目档案状态为已审核,禁止删除
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
17c743ca
...
...
@@ -82,6 +82,8 @@ archives.import.emp.high.education.error=\u5927\u4E13\u53CA\u4EE5\u4E0A\uFF0C\u6
archives.import.emp.not.exists
=
\u6839\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.idCard.must
=
\u
8EAB
\u
4EFD
\u
8BC1
\u
5FC5
\u
586B
archives.import.emp.leaveReason.must
=
\u
51CF
\u6863\u
539F
\u
56E0
\u
5FC5
\u
586B
archives.import.emp.leaveRemark.length
=
\u
51CF
\u6863\u5907\u
6CE8
\u
8D85
\u
8FC7200
archives.import.emp.have.project
=
\u7981\u
6B62
\u
201C
\u
51CF
\u6863\u
201D
\u
8BE5
\u
4EBA
\u5458\u
5B58
\u5728\u
201C
\u
6B63
\u
5E38
\u
201D
\u
5B58
\u
7EED
\u7684\u
201C
\u9879\u
76EE
\u6863\u6848\u
201D
import.file.type.error
=
\u
5BFC
\u5165\u7684\u6587\u
4EF6
\u
683C
\u
5F0F
\u
4E0D
\u
6B63
\u
786E
...
...
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