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
d7bede1a
Commit
d7bede1a
authored
Mar 28, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-入职登记提交
parent
15e3fb82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
39 deletions
+48
-39
TEmployeeLogService.java
...ud/plus/v1/yifu/archives/service/TEmployeeLogService.java
+13
-0
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+8
-39
TEmployeeLogServiceImpl.java
...1/yifu/archives/service/impl/TEmployeeLogServiceImpl.java
+27
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeLogService.java
View file @
d7bede1a
...
...
@@ -44,6 +44,19 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> {
**/
<
T
>
TEmployeeLog
saveModificationRecord
(
Integer
type
,
String
empId
,
String
projectId
,
T
oldInfo
,
T
newInfo
);
/**
* 生成修改记录
* @Author pwang
* @Date 2022-06-22 11:32
* @param type 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新
* @param empId 档案id
* @param projectId 项目id
* @param oldInfo
* @param newInfo
* @return
**/
<
T
>
TEmployeeLog
saveModificationRecord
(
Integer
type
,
String
empId
,
String
projectId
,
T
oldInfo
,
T
newInfo
,
String
userId
,
String
userName
);
/**
* 生成修改记录
* @Author pwang
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
d7bede1a
...
...
@@ -231,8 +231,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
pre
.
setExpectedCollectionTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedCollectionTime
()));
}
if
(
Common
.
isNotNull
(
preExit
))
{
pre
.
setId
(
preExit
.
getId
());
baseMapper
.
deleteById
(
preExit
);
baseMapper
.
insert
(
pre
);
String
natureItemBefore
=
null
;
String
natureItemAfter
=
null
;
String
contractItemBefore
=
null
;
...
...
@@ -306,6 +309,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
}
if
(!
preExit
.
getProcessStatus
().
equals
(
pre
.
getProcessStatus
()))
{
preExit
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
.
equals
(
preExit
.
getProcessStatus
())
?
"拒绝入职"
:
"已完成"
);
pre
.
setProcessStatus
(
"短信待发放"
);
}
if
(
null
!=
natureItemBefore
)
{
preExit
.
setEmpNature
(
natureItemBefore
);
}
...
...
@@ -325,46 +332,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
pre
.
setContractSubName
(
contractXfAfter
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
4
],
pre
.
getId
().
toString
(),
""
,
preExit
,
pre
);
baseMapper
.
deleteById
(
preExit
);
// if (Common.isNotNull(preVo.getServerItem())) {
// pre.setServerItem(preVo.getServerItem());
// }
// if (Common.isNotNull(preVo.getFileProvince())) {
// pre.setFileProvince(preVo.getFileProvince());
// }
// if (Common.isNotNull(preVo.getFileCity())) {
// pre.setFileCity(preVo.getFileCity());
// }
// if (Common.isNotNull(preVo.getFileTown())) {
// pre.setFileTown(preVo.getFileTown());
// } else {
// pre.setFileTown(null);
// }
// if (Common.isNotNull(preVo.getProvinceCode())) {
// pre.setProvinceCode(preVo.getProvinceCode());
// }
// if (Common.isNotNull(preVo.getCityCode())) {
// pre.setCityCode(preVo.getCityCode());
// }
// if (Common.isNotNull(preVo.getTownCode())) {
// pre.setTownCode(preVo.getTownCode());
// } else {
// pre.setTownCode(null);
// }
// if (Common.isNotNull(preVo.getContractType())) {
// pre.setContractType(preVo.getContractType());
// }
// if (Common.isNotNull(preVo.getEmpNature())) {
// pre.setEmpNature(preVo.getEmpNature());
// }
// if (Common.isNotNull(preVo.getContractSubName())) {
// pre.setContractSubName(preVo.getContractSubName());
// }else {
// pre.setContractSubName(null);
// }
pre
.
getId
(),
""
,
preExit
,
pre
,
pre
.
getCreateBy
(),
pre
.
getCreateName
());
}
baseMapper
.
insert
(
pre
);
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
// 事务提交后触发调度
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeLogServiceImpl.java
View file @
d7bede1a
...
...
@@ -67,6 +67,33 @@ public class TEmployeeLogServiceImpl extends ServiceImpl<TEmployeeLogMapper, TEm
return
null
;
}
@Override
public
<
T
>
TEmployeeLog
saveModificationRecord
(
Integer
type
,
String
empId
,
String
projectId
,
T
oldInfo
,
T
newInfo
,
String
userId
,
String
userName
)
{
try
{
//比较记录不影响业务逻辑,用try套住
//比较差异
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldInfo
,
newInfo
);
//如果有差异保存差异
if
(!
Common
.
isEmpty
(
differenceKey
)){
TEmployeeLog
employeeLog
=
new
TEmployeeLog
();
employeeLog
.
setProjectId
(
projectId
);
employeeLog
.
setType
(
type
);
employeeLog
.
setEmpId
(
empId
);
employeeLog
.
setCreateTime
(
LocalDateTime
.
now
());
employeeLog
.
setOldInfo
(
JSON
.
toJSONString
(
oldInfo
,
features
));
employeeLog
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
,
features
));
employeeLog
.
setDifferenceInfo
(
differenceKey
);
employeeLog
.
setCreateBy
(
userId
);
employeeLog
.
setCreateName
(
userName
);
baseMapper
.
insert
(
employeeLog
);
return
employeeLog
;
}
}
catch
(
Exception
e
){
log
.
error
(
JSON
.
toJSON
(
oldInfo
)+
"插入修改记录报错>>>"
,
e
);
}
return
null
;
}
@Override
public
<
T
>
TEmployeeLog
saveModificationRecord
(
Integer
type
,
String
empId
,
String
projectId
,
T
oldInfo
,
T
newInfo
,
YifuUser
user
)
{
try
{
...
...
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