Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
7f3589aa
Commit
7f3589aa
authored
Jun 17, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实习协议截止日期优化
parent
54918760
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
15 deletions
+47
-15
TEmployeeContractPreNewServiceImpl.java
...ives/service/impl/TEmployeeContractPreNewServiceImpl.java
+47
-15
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreNewServiceImpl.java
View file @
7f3589aa
...
...
@@ -582,6 +582,10 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return
date
.
isBefore
(
LocalDate
.
now
())
?
calculateReminderWorkDaysBefore
(
LocalDate
.
now
(),
1
,
0
)
:
date
;
}
private
boolean
isInternshipContract
(
String
contractType
)
{
return
CommonConstants
.
FIVE_STRING
.
equals
(
contractType
)
||
"实习协议"
.
equals
(
contractType
);
}
private
String
initDateInfo
(
TEmployeeContractPreNewVo
preVo
,
TEmployeeContractInfo
contract
)
{
TEmployeeContractDateVo
vo
;
//标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同
...
...
@@ -629,18 +633,29 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return
"合同截止日期需大于合同开始日期"
;
}
}
if
(
CommonConstants
.
FIVE_STRING
.
equals
(
preVo
.
getContractType
())){
//处理实习协议
preVo
.
setInternshipPeriodStart
(
DateUtil
.
addDayByDate
(
contract
.
getContractEnd
(),
1
));
if
(
isInternshipContract
(
preVo
.
getContractType
())){
//处理实习协议
:实习/合同开始日期=上一份合同截止日期+1日
preVo
.
setInternshipPeriodStart
(
DateUtil
.
addDayByDate
(
contract
.
getContractEnd
(),
1
));
preVo
.
setContractStart
(
DateUtil
.
addDayByDate
(
contract
.
getContractEnd
(),
1
));
if
(
Common
.
isNotNull
(
preVo
.
getInternshipPeriod
())){
vo
=
new
TEmployeeContractDateVo
();
vo
.
setMonthAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getInternshipPeriod
())
?
"0"
:
preVo
.
getInternshipPeriod
()));
vo
.
setYearAfter
(
0
);
vo
.
setRegistDate
(
preVo
.
getInternshipPeriodStart
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
()))
{
// 电子签:按实习期限计算合同截止日期、实习截止日期
if
(
Common
.
isNotNull
(
preVo
.
getInternshipPeriod
()))
{
vo
.
setMonthAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getInternshipPeriod
())
?
"0"
:
preVo
.
getInternshipPeriod
()));
vo
.
setYearAfter
(
0
);
preVo
.
setInternshipPeriodEnd
(
this
.
addYearsMonths
(
vo
));
preVo
.
setContractEnd
(
preVo
.
getInternshipPeriodEnd
());
}
}
else
{
// 线下签:按合同年限-年、合同年限-月计算合同截止日期、实习截止日期
if
(
Common
.
isNotNull
(
preVo
.
getContractDurationYear
())
&&
Common
.
isNotNull
(
preVo
.
getContractDurationMonth
()))
{
vo
.
setMonthAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getContractDurationMonth
())
?
"0"
:
preVo
.
getContractDurationMonth
()));
vo
.
setYearAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getContractDurationYear
())
?
"0"
:
preVo
.
getContractDurationYear
()));
preVo
.
setInternshipPeriodEnd
(
this
.
addYearsMonths
(
vo
));
preVo
.
setContractEnd
(
preVo
.
getInternshipPeriodEnd
());
}
}
if
(
Common
.
isNotNull
(
preVo
.
getInternshipPeriodStart
())
&&
Common
.
isNotNull
(
preVo
.
getInternshipPeriodEnd
())){
if
(
preVo
.
getInternshipPeriodEnd
().
before
(
preVo
.
getInternshipPeriodStart
())){
return
"实习结束日期需大于等于实习开始日期"
;
...
...
@@ -767,15 +782,32 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return
null
;
}
private
String
initDateInfo
(
TEmployeeContractPreNew
preVo
,
TEmployeeContractInfo
contract
)
{
TEmployeeContractDateVo
vo
;
//标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同
//1:"标准合同,3:“劳务协议”,5:“实习协议,8:“非全日制’,9:"补贴合同,13:’见习协议,18:“兼职协议”,19:”临时聘用合同,20:"劳务派遣合同’,21:’其他
if
(
CommonConstants
.
FIVE_STRING
.
equals
(
preVo
.
getContractType
())){
//处理实习协议
if
(
isInternshipContract
(
preVo
.
getContractType
())){
//处理实习协议:实习/合同开始日期=上一份合同截止日期+1日
preVo
.
setInternshipPeriodStart
(
DateUtil
.
addDayByDate
(
contract
.
getContractEnd
(),
1
));
preVo
.
setContractStart
(
preVo
.
getInternshipPeriodStart
());
TEmployeeContractDateVo
vo
=
new
TEmployeeContractDateVo
();
vo
.
setRegistDate
(
preVo
.
getInternshipPeriodStart
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
()))
{
// 电子签:按实习期限计算合同截止日期、实习截止日期
if
(
Common
.
isNotNull
(
preVo
.
getInternshipPeriod
()))
{
vo
.
setMonthAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getInternshipPeriod
())
?
"0"
:
preVo
.
getInternshipPeriod
()));
vo
.
setYearAfter
(
0
);
preVo
.
setInternshipPeriodEnd
(
this
.
addYearsMonths
(
vo
));
preVo
.
setContractEnd
(
preVo
.
getInternshipPeriodEnd
());
}
}
else
{
// 线下签:按合同年限-年、合同年限-月计算合同截止日期、实习截止日期
if
(
Common
.
isNotNull
(
preVo
.
getContractDurationYear
())
&&
Common
.
isNotNull
(
preVo
.
getContractDurationMonth
()))
{
vo
.
setMonthAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getContractDurationMonth
())
?
"0"
:
preVo
.
getContractDurationMonth
()));
vo
.
setYearAfter
(
Integer
.
parseInt
(
Common
.
isEmpty
(
preVo
.
getContractDurationYear
())
?
"0"
:
preVo
.
getContractDurationYear
()));
preVo
.
setInternshipPeriodEnd
(
this
.
addYearsMonths
(
vo
));
preVo
.
setContractEnd
(
preVo
.
getInternshipPeriodEnd
());
}
}
}
if
(
Common
.
isNotNull
(
preVo
.
getInternshipPeriodStart
())
&&
Common
.
isNotNull
(
preVo
.
getInternshipPeriodEnd
())){
if
(
preVo
.
getInternshipPeriodEnd
().
before
(
preVo
.
getInternshipPeriodStart
())){
...
...
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