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
4f0e0713
Commit
4f0e0713
authored
Jun 02, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.23' into MVP1.7.23
parents
4e220519
e9f1951e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
1 deletion
+101
-1
TEmployeeContractPreServiceImpl.java
...rchives/service/impl/TEmployeeContractPreServiceImpl.java
+101
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreServiceImpl.java
View file @
4f0e0713
...
...
@@ -361,6 +361,49 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
return
stats
;
});
customerStats
.
setInitiatedCount
(
customerStats
.
getInitiatedCount
()
+
1
);
//电子签必填项校验
// 1、"合同类型"为"标准合或劳务派遣合同","工资形式"为"计时工资、计件工资",对应的"计时工资标准(元/月)、计件工资单价(元)"必填
//2、"合同类型"为"劳务协议","劳务费(元/月)"必填;
//3、"合同类型"为"非全日制","工资形式"只有"计时工资",对应的"计时工资标准(元/月)"设置为 必填;
//4、"合同类型"为"实习协议"的"工资形式"只有"其他"因此无需调整,项目配置处保持"必填"
String
validationError
=
validateElectronicSignRequiredFields
(
contractPre
);
if
(
validationError
!=
null
)
{
// 校验失败,统计错误并更新状态
customerStats
.
setFailedCount
(
customerStats
.
getFailedCount
()
+
1
);
customerStats
.
setElectronicSignFailedCount
(
customerStats
.
getElectronicSignFailedCount
()
+
1
);
// 更新processStatus为电子签发起失败
LambdaUpdateWrapper
<
TEmployeeContractPre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TEmployeeContractPre:
:
getId
,
contractPre
.
getId
())
.
set
(
TEmployeeContractPre:
:
getProcessStatus
,
CommonConstants
.
FIVE_STRING
)
.
set
(
TEmployeeContractPre:
:
getErrorInfo
,
validationError
)
.
set
(
TEmployeeContractPre:
:
getChangeTypeUser
,
type
.
equals
(
"1"
)
?
"自动化手动—"
+
contractPre
.
getCustomerUsername
()
:
"自动化自动—"
+
contractPre
.
getCustomerUsername
())
.
set
(
TEmployeeContractPre:
:
getChangeTypeReason
,
validationError
)
.
set
(
TEmployeeContractPre:
:
getChangeTypeTime
,
LocalDateTimeUtils
.
convertLDToDate
(
LocalDate
.
now
()))
.
set
(
TEmployeeContractPre:
:
getSignType
,
CommonConstants
.
ZERO_STRING
)
.
set
(
TEmployeeContractPre:
:
getErrorTime
,
LocalDateTime
.
now
());
this
.
update
(
updateWrapper
);
if
(
"2"
.
equals
(
type
))
{
//生成快照数据
TContractAutoLog
contractAutoLog
=
new
TContractAutoLog
();
contractAutoLog
.
setContractId
(
loginNameMap
.
get
(
contractPre
.
getCustomerUserLoginname
()));
contractAutoLog
.
setEmpName
(
contractPre
.
getEmployeeName
());
contractAutoLog
.
setEmpIdcard
(
contractPre
.
getEmpIdcard
());
contractAutoLog
.
setMainId
(
contractPre
.
getId
());
contractAutoLog
.
setErrorInfo
(
validationError
);
contractAutoLogService
.
save
(
contractAutoLog
);
}
// 添加错误信息
ErrorMessage
<
EmployeeContractVO
>
errorMessage
=
new
ErrorMessage
<>(
contractVO
.
getRowIndex
(),
validationError
);
errorMessage
.
setData
(
contractVO
);
errorMessageListAll
.
add
(
errorMessage
);
// 跳过当前合同,继续处理下一条
continue
;
}
LocalDate
localDate
=
contractPre
.
getJoinLeaveDate
().
toInstant
()
.
atZone
(
ZoneId
.
systemDefault
())
...
...
@@ -1373,4 +1416,61 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
return
true
;
}
/**
* 电子签必填项校验
*
* @param contractPre 合同待派单数据
* @return 错误信息,如果为空表示校验通过
*/
private
String
validateElectronicSignRequiredFields
(
TEmployeeContractPre
contractPre
)
{
String
contractType
=
contractPre
.
getContractType
();
String
salaryType
=
contractPre
.
getSalaryType
();
// 规则1:标准合同(1)或劳务派遣合同(20),工资形式为计时/计件时,对应字段必填
// 兼容中文和数字两种格式
boolean
isStandardOrDispatch
=
(
"1"
.
equals
(
contractType
)
||
"20"
.
equals
(
contractType
)
||
"标准合同"
.
equals
(
contractType
)
||
"劳务派遣合同"
.
equals
(
contractType
));
if
(
isStandardOrDispatch
)
{
if
(
"1"
.
equals
(
salaryType
))
{
// 计时工资:计时工资标准必填
if
(
Common
.
isEmpty
(
contractPre
.
getSalaryStandardPerHour
()))
{
return
"标准合同/劳务派遣合同的计时工资形式,计时工资标准不能为空,请至“入职确认信息”点击修改补充完整"
;
}
}
else
if
(
"2"
.
equals
(
salaryType
))
{
// 计件工资:计件工资单价必填
if
(
Common
.
isEmpty
(
contractPre
.
getSalaryStandardPerPiece
()))
{
return
"标准合同/劳务派遣合同的计件工资形式,计件工资单价不能为空,请至“入职确认信息”点击修改补充完整"
;
}
}
}
// 规则2:劳务协议(3),劳务费必填
if
(
"3"
.
equals
(
contractType
)
||
"劳务协议"
.
equals
(
contractType
))
{
if
(
Common
.
isEmpty
(
contractPre
.
getLaborCost
()))
{
return
"劳务协议的劳务费不能为空,请至“入职确认信息”点击修改补充完整"
;
}
}
// 规则3:非全日制(8),工资形式必须为计时工资(1),且计时工资标准必填
if
(
"8"
.
equals
(
contractType
)
||
"非全日制"
.
equals
(
contractType
))
{
if
(!
"1"
.
equals
(
salaryType
))
{
return
"非全日制合同的工资形式必须为计时工资,请至“入职确认信息”点击修改补充完整"
;
}
if
(
Common
.
isEmpty
(
contractPre
.
getSalaryStandardPerHour
()))
{
return
"非全日制合同的计时工资标准不能为空,请至“入职确认信息”点击修改补充完整"
;
}
}
// 规则4:实习协议(5),工资形式只能为其他(3),项目配置处已保持"必填",无需额外校验
// 如果需要严格校验,可以添加:
// if ("5".equals(contractType) || "实习协议".equals(contractType)) {
// if (!"3".equals(salaryType)) {
// return "实习协议的工资形式必须为其他";
// }
// }
return
null
;
// 校验通过
}
}
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