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
49bc5ae1
Commit
49bc5ae1
authored
Jun 19, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
14489e65
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
80 deletions
+79
-80
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+79
-80
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
49bc5ae1
...
...
@@ -725,30 +725,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
}
else
{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
//baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING)
if
(
Common
.
isNotNull
(
contractInfo
.
getOldContractId
()))
{
TEmployeeContractInfo
old
=
this
.
getById
(
contractInfo
.
getOldContractId
());
if
(
old
!=
null
&&
Common
.
isNotNull
(
old
.
getId
()))
{
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getInUse
()))
{
return
R
.
failed
(
"关联的原合同已不在用"
);
}
else
{
old
.
setInUse
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
old
);
}
}
else
{
return
R
.
failed
(
"未找到关联的原合同"
);
}
}
else
{
return
R
.
failed
(
"未找到关联的原合同"
);
}
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if
(
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
contractInfo
.
getSituation
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
contractInfo
.
getChangeContractAndEmployee
()))
{
//同步任务处理清单执行详情
StringBuilder
workInfo
=
new
StringBuilder
();
StringBuilder
failueInfo
=
new
StringBuilder
();
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if
(
EmployeeConstants
.
SITUATION_SIX
.
equals
(
contractInfo
.
getSituation
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
contractInfo
.
getChangeContractAndEmployee
()))
{
workInfo
.
append
(
"合同终止成功,"
);
//该项目下其他在用的合同统一更新成不在用
List
<
TEmployeeContractInfo
>
contractInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
...
...
@@ -837,6 +819,24 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
handlerInfo
.
setOperTime
(
LocalDateTime
.
now
());
workHandlerInfoService
.
save
(
handlerInfo
);
}
else
{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
//baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING)
if
(
Common
.
isNotNull
(
contractInfo
.
getOldContractId
()))
{
TEmployeeContractInfo
old
=
this
.
getById
(
contractInfo
.
getOldContractId
());
if
(
old
!=
null
&&
Common
.
isNotNull
(
old
.
getId
()))
{
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getInUse
()))
{
return
R
.
failed
(
"关联的原合同已不在用"
);
}
else
{
old
.
setInUse
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
old
);
}
}
else
{
return
R
.
failed
(
"未找到关联的原合同"
);
}
}
else
{
return
R
.
failed
(
"未找到关联的原合同"
);
}
// 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
...
...
@@ -1632,36 +1632,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
}
else
{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
if
(
Common
.
isNotNull
(
contract
.
getOldContractId
()))
{
TEmployeeContractInfo
old
=
this
.
getById
(
contract
.
getOldContractId
());
if
(
old
!=
null
&&
Common
.
isNotNull
(
old
.
getId
()))
{
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getInUse
()))
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"关联的原合同已不在用!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
else
{
old
.
setInUse
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
old
);
}
}
else
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
}
else
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if
(
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
contract
.
getSituation
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
contract
.
getChangeContractAndEmployee
()))
{
//同步任务处理清单执行详情
StringBuilder
workInfo
=
new
StringBuilder
();
StringBuilder
failueInfo
=
new
StringBuilder
();
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if
(
EmployeeConstants
.
SITUATION_SIX
.
equals
(
contract
.
getSituation
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
contract
.
getChangeContractAndEmployee
()))
{
workInfo
.
append
(
"合同终止成功,"
);
//该项目下其他在用的合同统一更新成不在用
contractInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
...
...
@@ -1750,6 +1726,29 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
handlerInfo
.
setOperTime
(
LocalDateTime
.
now
());
workHandlerInfoService
.
save
(
handlerInfo
);
}
else
{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
if
(
Common
.
isNotNull
(
contract
.
getOldContractId
()))
{
TEmployeeContractInfo
old
=
this
.
getById
(
contract
.
getOldContractId
());
if
(
old
!=
null
&&
Common
.
isNotNull
(
old
.
getId
()))
{
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getInUse
()))
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"关联的原合同已不在用!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
else
{
old
.
setInUse
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
old
);
}
}
else
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
}
else
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
// 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
...
...
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