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
8c6f9cc7
Commit
8c6f9cc7
authored
Aug 22, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.5.7-划转,减项的可划转
parent
c4441c0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+24
-5
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
8c6f9cc7
...
...
@@ -172,6 +172,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
errorMessageList
.
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
// 老项目已减项,划转后将删除 hgw 2023-8-22 10:47:41
List
<
TEmployeeProject
>
oldUpdateList
=
new
ArrayList
<>();
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
Set
<
String
>
errorMsg
;
//对象声明
...
...
@@ -216,10 +218,14 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转
employeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
employeeProject
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_CHANGE_EMP_PROJECT
,
excel
.
getNewSettleCode
()));
if
(
CommonConstants
.
ZERO_INT
==
employeeProject
.
getProjectStatus
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_CHANGE_EMP_PROJECT
,
excel
.
getNewSettleCode
()));
}
else
{
employeeProject
.
setDeleteFlag
(
CommonConstants
.
STATUS_DEL
);
oldUpdateList
.
add
(
employeeProject
);
}
}
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
...
...
@@ -265,9 +271,15 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if
(
CollUtil
.
isNotEmpty
(
errorMessageList
))
{
return
R
.
failed
(
errorMessageList
);
}
else
{
// 将已减项的目标项目删除,免得出现两条同项目在项
if
(!
oldUpdateList
.
isEmpty
())
{
tEmployeeProjectService
.
updateBatchById
(
oldUpdateList
);
}
tEmployeeProjectService
.
updateBatchById
(
updateList
);
// 循环里的申明
UpdateSocialFoundVo
updateSocialFoundVo
;
for
(
TEmployeeProject
tEmployeeProject:
updateList
)
{
UpdateSocialFoundVo
updateSocialFoundVo
=
new
UpdateSocialFoundVo
();
updateSocialFoundVo
=
new
UpdateSocialFoundVo
();
updateSocialFoundVo
.
setOldDeptId
(
tEmployeeProject
.
getOdlDeptId
());
updateSocialFoundVo
.
setEmpIdcard
(
tEmployeeProject
.
getEmpIdcard
());
updateSocialFoundVo
.
setSettleDomainCode
(
tEmployeeProject
.
getDeptNo
());
...
...
@@ -423,10 +435,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
TEmployeeProject
newEmpProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getNewDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
// hgw 2023-8-21 16:31:18 目标项目是否已减项false:否
boolean
isSubtraction
=
false
;
if
(
Common
.
isNotNull
(
newEmpProject
)
&&
Common
.
isNotNull
(
newEmpProject
.
getProjectStatus
())
&&
newEmpProject
.
getProjectStatus
().
intValue
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"目标项目档案已减项,请复项后重新划转!"
);
isSubtraction
=
true
;
//return R.failed("目标项目档案已减项,请复项后重新划转!")
}
//社保公积金派单处需要直接修改为最新的项目
//社保预估库、缴费库、对比库、代理差额库,需要同步修改未结算(并且满足这个条件:数据 生成月≥此处划转起始月)的数据,已结算数据不变更;
...
...
@@ -558,6 +573,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
}
}
if
(
isSubtraction
)
{
oldEmpProject
.
setProjectStatus
(
CommonConstants
.
ONE_INT
);
newEmpProject
.
setProjectStatus
(
CommonConstants
.
ZERO_INT
);
}
// 变更老的项目档案
tEmployeeProjectService
.
updateChangeById
(
oldEmpProject
);
//新增或变更新的项目档案
...
...
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