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
0a9d9298
Commit
0a9d9298
authored
Jul 04, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-合同自动化代码提交
parent
ac38a8af
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
58 deletions
+140
-58
EmployeeRegistrationPreController.java
...rchives/controller/EmployeeRegistrationPreController.java
+3
-3
EmployeeRegistrationPreService.java
...yifu/archives/service/EmployeeRegistrationPreService.java
+1
-1
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+41
-11
TEmployeeContractPreServiceImpl.java
...rchives/service/impl/TEmployeeContractPreServiceImpl.java
+14
-5
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+81
-38
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/EmployeeRegistrationPreController.java
View file @
0a9d9298
...
...
@@ -207,8 +207,8 @@ public class EmployeeRegistrationPreController {
**/
@Operation
(
summary
=
"查询瓜子身份信息"
)
@SysLog
(
"查询身份信息"
)
@
Ge
tMapping
(
"/getGzEmployeeInfo"
)
public
R
<
EmployeeInfoMsgVo
>
getGzEmployeeInfo
(
@Request
Param
String
id
)
{
return
employeeRegistrationPreService
.
getGzEmployeeInfo
(
id
);
@
Pos
tMapping
(
"/getGzEmployeeInfo"
)
public
R
<
EmployeeInfoMsgVo
>
getGzEmployeeInfo
(
@Request
Body
EmployeeInfoMsgVo
vo
)
{
return
employeeRegistrationPreService
.
getGzEmployeeInfo
(
vo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/EmployeeRegistrationPreService.java
View file @
0a9d9298
...
...
@@ -93,7 +93,7 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
R
<
EmployeeInfoMsgVo
>
getEmployeeInfo
(
String
cardOrId
);
R
<
EmployeeInfoMsgVo
>
getGzEmployeeInfo
(
String
cardOrId
);
R
<
EmployeeInfoMsgVo
>
getGzEmployeeInfo
(
EmployeeInfoMsgVo
vo
);
/**
* @param empIdCard 身份证
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
0a9d9298
...
...
@@ -310,6 +310,13 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
.
eq
(
TEmployeeContractPre:
:
getRegisterId
,
pre
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractOld
))
{
// 创建更新条件构造器
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapperContract
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapperContract
.
eq
(
TAttaInfo:
:
getDomainId
,
contractOld
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的关联ID
attaInfoService
.
update
(
updateWrapperContract
);
contractPreMapper
.
deleteById
(
contractOld
);
}
}
...
...
@@ -1228,9 +1235,14 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
@Override
public
R
<
EmployeeInfoMsgVo
>
getGzEmployeeInfo
(
String
id
)
{
public
R
<
EmployeeInfoMsgVo
>
getGzEmployeeInfo
(
EmployeeInfoMsgVo
vo
)
{
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
//短信入口
if
(
Common
.
isNotNull
(
vo
.
getDetailId
()))
{
//获取人员档案id
EmployeeInfoMsgVo
msgInfoVo
=
baseMapper
.
getEmployeeArchivesInfo
(
id
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()));
EmployeeInfoMsgVo
msgInfoVo
=
baseMapper
.
getEmployeeArchivesInfo
(
vo
.
getDetailId
()
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()));
if
(
Common
.
isEmpty
(
msgInfoVo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
...
...
@@ -1245,6 +1257,24 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
return
R
.
ok
(
msgInfoVo
);
}
}
//二维码入口
if
(
Common
.
isNotNull
(
vo
.
getCard
())
&&
Common
.
isNotNull
(
vo
.
getName
()))
{
//获取预入职信息,如果有的话提示
TGzOfferInfo
empMain
=
gzOfferInfoMapper
.
selectOne
(
Wrappers
.<
TGzOfferInfo
>
query
().
lambda
()
.
eq
(
TGzOfferInfo:
:
getNationalId
,
vo
.
getCard
())
.
eq
(
TGzOfferInfo:
:
getName
,
vo
.
getName
())
.
eq
(
TGzOfferInfo:
:
getOfferStatus
,
CommonConstants
.
NINE_STRING
)
.
orderByDesc
(
TGzOfferInfo:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
empMain
))
{
vo
.
setMessage
(
"当前Offer不符合档案采集状态,禁止操作"
);
}
else
{
vo
.
setPhone
(
empMain
.
getPhone
());
vo
.
setDetailId
(
empMain
.
getId
().
toString
());
}
return
R
.
ok
(
vo
);
}
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreServiceImpl.java
View file @
0a9d9298
...
...
@@ -10,14 +10,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.config.WxConfig
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAudit
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractAuditService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService
;
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.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -30,6 +28,7 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
...
...
@@ -65,6 +64,9 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
@Autowired
private
UpmsDaprUtils
upmsDaprUtils
;
@Lazy
private
final
TAttaInfoService
attaInfoService
;
/**
* 合同待签订任务记录表简单分页查询
* @param tEmployeeContractPre 合同待签订任务记录表
...
...
@@ -195,8 +197,15 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
}
// 如果已存在合同预信息,则删除旧的信息并插入新的信息
if
(
Common
.
isNotNull
(
preExit
))
{
pre
.
setId
(
preExit
.
getId
());
baseMapper
.
deleteById
(
preExit
);
//附件信息清空
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapperContract
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapperContract
.
eq
(
TAttaInfo:
:
getDomainId
,
preExit
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的关联ID
attaInfoService
.
update
(
updateWrapperContract
);
pre
.
setId
(
preExit
.
getId
());
baseMapper
.
insert
(
pre
);
}
else
{
// 如果不存在,则直接插入新的合同预信息
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
0a9d9298
...
...
@@ -20,15 +20,14 @@ import cn.hutool.core.util.ArrayUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogDetailService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogService
;
...
...
@@ -71,6 +70,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
private
final
TEmployeePreLogDetailService
tEmployeePreLogDetailService
;
@Lazy
private
final
TEmployeeContractPreService
contractPreService
;
@Lazy
private
final
TAttaInfoService
attaInfoService
;
/**
* 入职确认信息变更日志表简单分页查询
...
...
@@ -187,6 +188,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
IGNORE_FIELD
.
add
(
"customerUserLoginname"
);
IGNORE_FIELD
.
add
(
"dataSource"
);
IGNORE_FIELD
.
add
(
"position"
);
IGNORE_FIELD
.
add
(
"contractId"
);
IGNORE_FIELD
.
add
(
"registerId"
);
IGNORE_FIELD
.
add
(
"createBy"
);
IGNORE_FIELD
.
add
(
"createName"
);
IGNORE_FIELD
.
add
(
"updateBy"
);
...
...
@@ -303,19 +306,38 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
}
boolean
isModifyContract
=
false
;
String
differenceContractKey
=
""
;
String
differenceContractKey
=
null
;
TEmployeeContractPre
employeeContractPre
=
newInfo
.
getEmployeeContractPre
();
if
(
contractOld
!=
null
&&
employeeContractPre
!=
null
)
{
if
(!
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
contractOld
))
{
//记录操作记录
contractOld
.
setAttaList
(
null
);
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
THREE_STRING
);
detailEmpLog
.
setType
(
CommonConstants
.
THREE_STRING
);
this
.
setLogBaseInfo
(
empPreId
,
contractOld
,
null
,
user
,
differenceContractKey
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、合同信息"
;
}
else
{
diffTitle
=
"合同信息"
;
}
// 创建更新条件构造器
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapperContract
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapperContract
.
eq
(
TAttaInfo:
:
getDomainId
,
contractOld
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的关联ID
attaInfoService
.
update
(
updateWrapperContract
);
//删除历史的合同待签订数据
contractPreService
.
removeById
(
contractOld
.
getId
());
}
if
(
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
contractOld
!=
null
&&
employeeContractPre
!=
null
)
{
//1.9.11 huych 附件类型不比较差异
contractOld
.
setAttaList
(
null
);
employeeContractPre
.
setAttaList
(
null
);
differenceContractKey
=
HrEquator
.
comparisonValueIgnoreField
(
contractOld
,
employeeContractPre
,
CONTRACT_IGNORE_FIELD
);
if
(
differenceContractKey
.
length
()
>
0
)
{
isModifyContract
=
true
;
}
}
if
(
isModifyContract
)
{
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、合同信息"
;
}
else
{
...
...
@@ -327,6 +349,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this
.
setLogBaseInfo
(
empPreId
,
contractOld
,
employeeContractPre
,
user
,
differenceContractKey
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
}
}
// 有修改,则加日志
if
(
Common
.
isNotNull
(
diffTitle
))
{
TEmployeePreLog
empPreLog
=
new
TEmployeePreLog
();
...
...
@@ -344,7 +367,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
//保存合同待签订数据
if
(
employeeContractPre
!=
null
)
{
if
(
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
employeeContractPre
!=
null
)
{
TEmployeeContractPreVo
preVo
=
new
TEmployeeContractPreVo
();
BeanUtils
.
copyProperties
(
employeeContractPre
,
preVo
);
if
(
Common
.
isNotNull
(
employeeContractPre
.
getExpectedCollectionTime
())
)
{
...
...
@@ -435,19 +458,38 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
}
boolean
isModifyContract
=
false
;
String
differenceContractKey
=
""
;
String
differenceContractKey
=
null
;
TEmployeeContractPre
employeeContractPre
=
newInfo
.
getEmployeeContractPre
();
if
(
contractOld
!=
null
&&
employeeContractPre
!=
null
)
{
if
(!
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
contractOld
))
{
//记录操作记录
contractOld
.
setAttaList
(
null
);
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
THREE_STRING
);
detailEmpLog
.
setType
(
CommonConstants
.
THREE_STRING
);
this
.
setPreLogBaseInfo
(
empPreId
,
contractOld
,
null
,
userId
,
nickName
,
differenceContractKey
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、合同信息"
;
}
else
{
diffTitle
=
"合同信息"
;
}
// 创建更新条件构造器
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapperContract
=
new
LambdaUpdateWrapper
<>();
// 设置更新条件和新值
updateWrapperContract
.
eq
(
TAttaInfo:
:
getDomainId
,
contractOld
.
getId
())
.
set
(
TAttaInfo:
:
getDomainId
,
CommonConstants
.
EMPTY_STRING
);
// 执行更新操作,清空附件的关联ID
attaInfoService
.
update
(
updateWrapperContract
);
//删除历史的合同待签订数据
contractPreService
.
removeById
(
contractOld
.
getId
());
}
if
(
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
contractOld
!=
null
&&
employeeContractPre
!=
null
)
{
//1.9.11 huych 附件类型不比较差异
contractOld
.
setAttaList
(
null
);
employeeContractPre
.
setAttaList
(
null
);
differenceContractKey
=
HrEquator
.
comparisonValueIgnoreField
(
contractOld
,
employeeContractPre
,
CONTRACT_IGNORE_FIELD
);
if
(
differenceContractKey
.
length
()
>
0
)
{
isModifyContract
=
true
;
}
}
if
(
isModifyContract
)
{
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、合同信息"
;
}
else
{
...
...
@@ -460,6 +502,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceContractKey
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
}
}
// 有修改,则加日志
if
(
Common
.
isNotNull
(
diffTitle
))
{
TEmployeePreLog
empPreLog
=
new
TEmployeePreLog
();
...
...
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