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
27b05f6e
Commit
27b05f6e
authored
Jun 25, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
3cc0796a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
163 additions
and
43 deletions
+163
-43
UpProjectSocialFundVo.java
...cloud/plus/v1/yifu/archives/vo/UpProjectSocialFundVo.java
+2
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+4
-4
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+155
-39
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+2
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/UpProjectSocialFundVo.java
View file @
27b05f6e
...
...
@@ -46,4 +46,6 @@ public class UpProjectSocialFundVo implements Serializable {
String
mobile
;
//是否同步终止合同、减项、减档 0 是 1 否
String
changeContractAndEmployee
;
String
userName
;
String
userId
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
27b05f6e
...
...
@@ -771,10 +771,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeProject
.
setContractStatus
(
CommonConstants
.
TWO_INT
);
//如果该项目仍有社保、公积金的数据不同步减项,如正常减项,记录项目档案操作记录
if
(
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
ZERO_INT
||
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
FOUR_INT
||
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
ZERO_INT
||
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
FOUR_INT
)
{
if
(
(
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
ZERO_INT
||
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
FOUR_INT
)
&&
(
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
ZERO_INT
||
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
FOUR_INT
)
)
{
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
ONE_INT
);
tEmployeeProject
.
setLeaveRemark
(
"终止合同联动减项"
);
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
27b05f6e
...
...
@@ -37,10 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TBusinessEmployeeExtendInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.DoJointTask
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
...
...
@@ -108,6 +105,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Lazy
private
DoJointTask
doJointTask
;
@Autowired
private
TWorkHandlerInfoService
workHandlerInfoService
;
@Autowired
private
TEmployeeContractAuditService
tEmployeeContractAuditService
;
@Override
public
R
addCheck
(
TEmployeeProject
tEmployeeProject
)
{
...
...
@@ -1382,47 +1385,143 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
Common
.
isEmpty
(
vo
)
||
Common
.
isEmpty
(
vo
.
getEmpIdCard
())
||
Common
.
isEmpty
(
vo
.
getDepartNo
())){
return
false
;
}
TEmployeeInfo
employee
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if
(
Common
.
isNotNull
(
employee
)){
if
(
Common
.
isNotNull
(
vo
.
getSocialStatus
())){
employee
.
setSocialStatus
(
Integer
.
parseInt
(
vo
.
getSocialStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFundStatus
())){
employee
.
setFundStatus
(
Integer
.
parseInt
(
vo
.
getFundStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFileProvince
())){
employee
.
setFileProvince
(
Integer
.
parseInt
(
vo
.
getFileProvince
()));
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if
(
Common
.
isNotNull
(
vo
.
getChangeContractAndEmployee
()))
{
List
<
TEmployeeContractInfo
>
contractInfoList
;
List
<
TEmployeeContractInfo
>
contractInfoListZt
;
//同步任务处理清单执行详情
StringBuilder
workInfo
=
new
StringBuilder
();
StringBuilder
failueInfo
=
new
StringBuilder
();
workInfo
.
append
(
"合同终止成功,"
);
//该项目下其他在用的合同统一更新成不在用
contractInfoList
=
contractInfoMapper
.
selectList
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getDeptNo
,
vo
.
getDepartNo
())
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
contractInfoList
))
{
for
(
TEmployeeContractInfo
contractInfo1
:
contractInfoList
)
{
contractInfo1
.
setInUse
(
CommonConstants
.
ONE_STRING
);
contractInfoMapper
.
updateById
(
contractInfo1
);
//增加审核记录
this
.
setAuditInfoNew
(
contractInfo1
,
CommonConstants
.
ZERO_STRING
);
}
}
if
(
Common
.
isNotNull
(
vo
.
getFileCity
())){
employee
.
setFileCity
(
Integer
.
parseInt
(
vo
.
getFileCity
()));
if
(
Common
.
isNotNull
(
vo
.
getFileTown
())){
employee
.
setFileTown
(
Integer
.
parseInt
(
vo
.
getFileTown
()));
}
else
{
employee
.
setFileTown
(
null
);
//在途的合同更新为审核不通过
contractInfoListZt
=
contractInfoMapper
.
selectList
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeContractInfo:
:
getDeptNo
,
vo
.
getDepartNo
())
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
contractInfoListZt
))
{
for
(
TEmployeeContractInfo
contractInfo1
:
contractInfoListZt
)
{
contractInfo1
.
setAuditStatus
(
CommonConstants
.
THREE_INT
);
contractInfoMapper
.
updateById
(
contractInfo1
);
//增加审核记录
this
.
setAuditInfoNew
(
contractInfo1
,
CommonConstants
.
ONE_STRING
);
}
}
if
(
Common
.
isNotNull
(
vo
.
getMobile
())){
employee
.
setEmpPhone
(
vo
.
getMobile
());
//项目档案处理
TEmployeeProject
tEmployeeProject
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeProject
>
query
()
.
lambda
().
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getDepartNo
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
null
!=
tEmployeeProject
)
{
TEmployeeProject
tEmployeeProjectOld
=
baseMapper
.
selectById
(
tEmployeeProject
.
getId
());
tEmployeeProject
.
setContractStatus
(
CommonConstants
.
TWO_INT
);
//如果该项目仍有社保、公积金的数据不同步减项,如正常减项,记录项目档案操作记录
if
((
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
ZERO_INT
||
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
FOUR_INT
)
&&
(
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
ZERO_INT
||
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
FOUR_INT
))
{
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
ONE_INT
);
tEmployeeProject
.
setLeaveRemark
(
"终止合同联动减项"
);
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
workInfo
.
append
(
"减项成功,"
);
}
else
{
failueInfo
.
append
(
"存在社保/公积金,无法减项"
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
tEmployeeProject
);
baseMapper
.
updateById
(
tEmployeeProject
);
//如果项目档案已减项,如果人员存在多个项目不处理,反之则减档
if
(
tEmployeeProject
.
getProjectStatus
()
==
CommonConstants
.
ONE_INT
)
{
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
tEmployeeInfo
.
getProjectNum
()
==
CommonConstants
.
ONE_INT
)
{
//减档
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeInfo
.
getId
());
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
tEmployeeInfo
.
setLeaveUser
(
vo
.
getUserId
());
tEmployeeInfo
.
setLeaveUserName
(
vo
.
getUserName
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
workInfo
.
append
(
"减档成功,"
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
else
{
failueInfo
.
append
(
"存在其他项目,无法减档"
);
}
}
}
tEmployeeInfoMapper
.
updateSocialInfoById
(
employee
);
}
TEmployeeProject
project
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getDepartNo
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if
(
Common
.
isNotNull
(
project
)){
if
(
Common
.
isNotNull
(
vo
.
getSocialStatus
())){
project
.
setSocialStatus
(
Integer
.
parseInt
(
vo
.
getSocialStatus
()));
//增加任务处理情况查询表数据
TWorkHandlerInfo
handlerInfo
=
new
TWorkHandlerInfo
();
handlerInfo
.
setEmpIdcard
(
vo
.
getEmpIdCard
());
handlerInfo
.
setEmpName
(
null
==
tEmployeeProject
.
getEmpName
()
?
""
:
tEmployeeProject
.
getEmpName
());
handlerInfo
.
setDepartName
(
null
==
tEmployeeProject
.
getDeptName
()
?
""
:
tEmployeeProject
.
getDeptName
());
handlerInfo
.
setDepartNo
(
vo
.
getDepartNo
());
handlerInfo
.
setInfoFrom
(
"合同终止"
);
handlerInfo
.
setOperInfo
(
workInfo
.
substring
(
0
,
workInfo
.
length
()
-
1
));
handlerInfo
.
setReason
(
failueInfo
.
length
()
>
1
?
failueInfo
.
toString
()
:
""
);
handlerInfo
.
setOperResult
(
failueInfo
.
length
()
>
1
?
"1"
:
"2"
);
handlerInfo
.
setOperUser
(
vo
.
getUserName
());
handlerInfo
.
setOperTime
(
LocalDateTime
.
now
());
workHandlerInfoService
.
save
(
handlerInfo
);
}
else
{
TEmployeeInfo
employee
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if
(
Common
.
isNotNull
(
employee
))
{
if
(
Common
.
isNotNull
(
vo
.
getSocialStatus
()))
{
employee
.
setSocialStatus
(
Integer
.
parseInt
(
vo
.
getSocialStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFundStatus
()))
{
employee
.
setFundStatus
(
Integer
.
parseInt
(
vo
.
getFundStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFileProvince
()))
{
employee
.
setFileProvince
(
Integer
.
parseInt
(
vo
.
getFileProvince
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFileCity
()))
{
employee
.
setFileCity
(
Integer
.
parseInt
(
vo
.
getFileCity
()));
if
(
Common
.
isNotNull
(
vo
.
getFileTown
()))
{
employee
.
setFileTown
(
Integer
.
parseInt
(
vo
.
getFileTown
()));
}
else
{
employee
.
setFileTown
(
null
);
}
}
if
(
Common
.
isNotNull
(
vo
.
getMobile
()))
{
employee
.
setEmpPhone
(
vo
.
getMobile
());
}
tEmployeeInfoMapper
.
updateSocialInfoById
(
employee
);
}
if
(
Common
.
isNotNull
(
vo
.
getFundStatus
())){
project
.
setFundStatus
(
Integer
.
parseInt
(
vo
.
getFundStatus
()));
TEmployeeProject
project
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getDepartNo
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if
(
Common
.
isNotNull
(
project
))
{
if
(
Common
.
isNotNull
(
vo
.
getSocialStatus
()))
{
project
.
setSocialStatus
(
Integer
.
parseInt
(
vo
.
getSocialStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFundStatus
()))
{
project
.
setFundStatus
(
Integer
.
parseInt
(
vo
.
getFundStatus
()));
}
baseMapper
.
updateSocialAndFundStatusById
(
project
);
}
baseMapper
.
updateSocialAndFundStatusById
(
project
);
}
return
true
;
}
...
...
@@ -1725,4 +1824,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
public
void
updateContractStatus
(
String
empId
,
int
status
)
{
baseMapper
.
updateContractStatus
(
empId
,
status
);
}
/**
* @param tEmployeeContractInfo
* @Description: 保存审核操作记录
* @Author: huyc
* @Date: 2023/6/16 10:16
* @return: void
**/
private
void
setAuditInfoNew
(
TEmployeeContractInfo
tEmployeeContractInfo
,
String
flag
)
{
TEmployeeContractAudit
audit
=
new
TEmployeeContractAudit
();
audit
.
setRootName
(
"合同审核"
);
audit
.
setAuditStatus
(
CommonConstants
.
ZERO_STRING
.
equals
(
flag
)
?
"审核通过"
:
"审核不通过"
);
audit
.
setRemark
(
"终止合同联动"
);
audit
.
setLinkId
(
tEmployeeContractInfo
.
getId
());
audit
.
setLinkType
(
CommonConstants
.
ONE_INT
);
tEmployeeContractAuditService
.
save
(
audit
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
27b05f6e
...
...
@@ -3929,6 +3929,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//派减审核通过才会处理合同档案状态
if
(
CommonConstants
.
ONE_INT
==
flag
)
{
vo
.
setChangeContractAndEmployee
(
dis
.
getChangeContractAndEmployee
());
vo
.
setUserId
(
user
.
getId
());
vo
.
setUserName
(
user
.
getNickname
());
}
R
<
Boolean
>
resUp
=
archivesDaprUtil
.
updateProjectSocialFund
(
vo
);
if
(
Common
.
isEmpty
(
resUp
)
||
!(
CommonConstants
.
SUCCESS
.
intValue
()
==
resUp
.
getCode
())
||
!
resUp
.
getData
().
booleanValue
()){
...
...
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