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
a86851e9
Commit
a86851e9
authored
Dec 19, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.2:项目档案-减档逻辑调整
parent
1b5248b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+23
-12
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
a86851e9
...
...
@@ -386,9 +386,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
String
code
=
""
;
if
(
CommonConstants
.
ONE_INT
==
tEmployeeProject
.
getSocialStatus
()
||
CommonConstants
.
ONE_INT
==
tEmployeeProject
.
getFundStatus
())
{
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
StringBuilder
errorTemp
=
new
StringBuilder
();
if
(
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorTemp
.
append
(
"社保未派减、"
);
}
if
(
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorTemp
.
append
(
"公积金未派减、"
);
}
// 未作废,在用 或 审核中
long
contractCount
=
contractInfoMapper
.
selectCount
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
...
...
@@ -403,7 +406,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_STRING
))
);
if
(
contractCount
>
CommonConstants
.
ZERO_INT
){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_CONTRACT_EXIST
));
errorTemp
.
append
(
"合同可用或在途、"
);
}
if
(
Common
.
isNotNull
(
errorTemp
)){
return
R
.
failed
(
errorTemp
.
substring
(
0
,
errorTemp
.
length
()-
1
)
+
",禁止减项"
);
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
...
...
@@ -544,6 +550,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeProject
tEmployeeProjectOld
;
// 在途和在用合同数目
long
contractCount
;
StringBuilder
errorTemp
;
StringBuilder
errorMessage
;
// 执行数据插入操作 组装 PostDto
for
(
EmployeeXProjectVO
excel
:
excelVOList
)
{
//根据身份证和项目编码获取项目档案
...
...
@@ -555,7 +563,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
leaveReason
=
null
==
dicObj
?
""
:
dicObj
.
get
(
excel
.
getLeaveReason
());
StringBuilder
errorMessage
=
new
StringBuilder
();
errorMessage
=
new
StringBuilder
();
if
(
Common
.
isNotNull
(
excel
.
getEmpName
()))
{
errorMessage
.
append
(
excel
.
getEmpName
());
errorMessage
.
append
(
";"
);
...
...
@@ -571,11 +579,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessage
.
append
(
";"
);
}
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
break
;
errorTemp
=
new
StringBuilder
();
if
(
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorTemp
.
append
(
"社保未派减、"
);
}
if
(
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorTemp
.
append
(
"公积金未派减、"
);
}
// 未作废,在用 或 审核中
contractCount
=
contractInfoMapper
.
selectCount
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
...
...
@@ -590,8 +599,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_STRING
))
);
if
(
contractCount
>
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_CONTRACT_EXIST
)));
errorTemp
.
append
(
"合同可用或在途、"
);
}
if
(
Common
.
isNotNull
(
errorTemp
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
errorTemp
.
substring
(
0
,
errorTemp
.
length
()-
1
)
+
",禁止减项"
));
break
;
}
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
...
...
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