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
9ceb00ed
Commit
9ceb00ed
authored
Mar 03, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同续签待办-fxj
parent
0d194f70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
19 deletions
+31
-19
TEmployeeContractPreNewServiceImpl.java
...ives/service/impl/TEmployeeContractPreNewServiceImpl.java
+31
-19
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreNewServiceImpl.java
View file @
9ceb00ed
...
...
@@ -385,9 +385,12 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
}
//初始化岗位名称
TAutoContractScheme
scheme
=
contractSchemeMapper
.
selectById
(
pre
.
getConfigId
());
if
(
Common
.
isNotNull
(
pre
.
getConfigId
())
&&
"固定岗位"
.
equals
(
preVo
.
getPost
())
&&
null
!=
scheme
){
pre
.
setPost
(
scheme
.
getPost
());
TAutoContractScheme
scheme
=
contractSchemeMapper
.
selectById
(
preVo
.
getConfigId
());
if
(
Common
.
isNotNull
(
preVo
.
getConfigId
())
&&
"固定岗位"
.
equals
(
preVo
.
getPost
())
&&
null
!=
scheme
){
preVo
.
setPost
(
scheme
.
getPost
());
}
else
{
//等于上一份合同的岗位明细
preVo
.
setPost
(
contract
.
getPost
());
}
//处理预计发起时间
TAutoContractRuleInfo
rule
=
null
;
...
...
@@ -417,6 +420,10 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
continue
;
}
// 调整提醒日期为最近工作日 (0 上一份合同到期前第5个工作日的场景才调整)
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
rule
.
getRenewalDateType
())){
reminderDate
=
adjustToNearestWorkday
(
reminderDate
);
}
// 检查电子签是否超期(和续签的合同开始日期进行比较)
if
(
null
!=
preVo
.
getContractStart
()
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
())){
LocalDate
contractStartDateNew
=
parseContractEndDate
(
preVo
.
getContractStart
());
...
...
@@ -425,19 +432,15 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
errorList
.
add
(
checkVo
);
continue
;
}
if
(
reminderDate
.
isAfter
(
contractStartDateNew
.
min
usMonths
(
1
)))
{
if
(
reminderDate
.
isAfter
(
contractStartDateNew
.
pl
usMonths
(
1
)))
{
checkVo
=
buildErrorCheckVo
(
contract
,
preVo
,
EmployeeConstants
.
DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR
);
errorList
.
add
(
checkVo
);
continue
;
}
}
// 调整提醒日期为最近工作日 (0 上一份合同到期前第5个工作日的场景才调整)
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
rule
.
getRenewalDateType
())){
reminderDate
=
adjustToNearestWorkday
(
reminderDate
);
}
// 设置预计发起时间
pre
.
setExpectedCollectionTime
(
DateUtil
.
getDateByLocalDate
(
reminderDate
));
pre
Vo
.
setExpectedCollectionTime
(
DateUtil
.
getDateByLocalDate
(
reminderDate
));
}
...
...
@@ -467,6 +470,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
boolean
res
=
false
;
if
(
preList
!=
null
&&
preList
.
size
()
>
0
){
res
=
this
.
saveBatch
(
preList
);
}
else
{
res
=
true
;
}
if
(
res
){
if
(!
errorList
.
isEmpty
())
{
...
...
@@ -529,7 +534,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
* 调整日期为最近工作日
*/
private
LocalDate
adjustToNearestWorkday
(
LocalDate
date
)
{
return
date
.
isBefore
(
LocalDate
.
now
())
?
calculateReminderWorkDaysBefore
(
date
,
1
,
0
)
:
date
;
return
date
.
isBefore
(
LocalDate
.
now
())
?
calculateReminderWorkDaysBefore
(
LocalDate
.
now
()
,
1
,
0
)
:
date
;
}
private
String
initDateInfo
(
TEmployeeContractPreNewVo
preVo
,
TEmployeeContractInfo
contract
)
{
...
...
@@ -586,7 +591,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
preVo
.
setContractEnd
(
preVo
.
getInternshipPeriodEnd
());
}
}
if
(
CommonConstants
.
T
HREE
_STRING
.
equals
(
preVo
.
getContractType
())){
if
(
CommonConstants
.
T
WENTY
_STRING
.
equals
(
preVo
.
getContractType
())){
//处理劳务协议
preVo
.
setDispatchPeriodStart
(
DateUtil
.
addDayByDate
(
contract
.
getContractEnd
(),
1
));
if
(
Common
.
isNotNull
(
preVo
.
getDispatchPeriodYear
())
&&
Common
.
isNotNull
(
preVo
.
getDispatchPeriodMonth
())){
...
...
@@ -857,14 +862,21 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
contractPreTemp
.
setRequestId
(
result
.
getData
());
baseMapper
.
updateById
(
contractPreTemp
);
}
if
(
Common
.
isNotNull
(
contractPreTemp
.
getContractId
()))
{
TEmployeeContractAudit
audit
=
new
TEmployeeContractAudit
();
audit
.
setRootName
(
"签署中"
);
audit
.
setLinkId
(
contractPreTemp
.
getContractId
());
audit
.
setLinkType
(
CommonConstants
.
ONE_INT
);
audit
.
setCreateName
(
"法大大电子签"
);
audit
.
setCreateBy
(
"1"
);
tEmployeeContractAuditService
.
save
(
audit
);
if
(
Common
.
isNotNull
(
contractPreTemp
.
getId
()))
{
TEmployeeContractInfo
empContract
=
contractInfoService
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getPreNewId
,
contractPreTemp
.
getId
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
orderByDesc
(
BaseEntity:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
null
!=
empContract
&&
empContract
.
getId
()
!=
null
){
TEmployeeContractAudit
audit
=
new
TEmployeeContractAudit
();
audit
.
setRootName
(
"签署中"
);
audit
.
setLinkId
(
empContract
.
getId
());
audit
.
setLinkType
(
CommonConstants
.
ONE_INT
);
audit
.
setCreateName
(
"法大大电子签"
);
audit
.
setCreateBy
(
"1"
);
tEmployeeContractAuditService
.
save
(
audit
);
}
//更新合同的办理状态
updateEmpContractAlertHandleStatus
(
contractPre
.
getContractId
(),
CommonConstants
.
ONE_STRING
);
// 更新processStatus为电子签发起失败
...
...
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