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
6f540bcf
Commit
6f540bcf
authored
Mar 06, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.20' into MVP1.7.20
parents
5abe14e2
e4e1175f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
365 additions
and
144 deletions
+365
-144
ContractAlertConfirmResVo.java
...d/plus/v1/yifu/archives/vo/ContractAlertConfirmResVo.java
+149
-0
ContractAlertConfirmVo.java
...loud/plus/v1/yifu/archives/vo/ContractAlertConfirmVo.java
+19
-0
TEmployeeAutoRegistCheckVo.java
.../plus/v1/yifu/archives/vo/TEmployeeAutoRegistCheckVo.java
+3
-0
TEmployeeContractPreNewVo.java
...d/plus/v1/yifu/archives/vo/TEmployeeContractPreNewVo.java
+6
-0
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+4
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+2
-1
TEmployeeContractPreNewServiceImpl.java
...ives/service/impl/TEmployeeContractPreNewServiceImpl.java
+177
-141
DoFascTask.java
...om/yifu/cloud/plus/v1/yifu/archives/utils/DoFascTask.java
+5
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ContractAlertConfirmResVo.java
0 → 100644
View file @
6f540bcf
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author fxj
* @Date 2022/7/1
* @Description
* @Version 1.0
*/
@Data
public
class
ContractAlertConfirmResVo
implements
Serializable
{
@ExcelAttribute
(
name
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
@ExcelAttribute
(
name
=
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelAttribute
(
name
=
"主键"
)
@Schema
(
description
=
"主键"
)
@ExcelIgnore
private
String
id
;
/**
* 员工名称
*/
@ExcelAttribute
(
name
=
"员工名称"
)
@Schema
(
description
=
"员工名称"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工名称"
)
private
String
empName
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 上一份合同起止日期
*/
@Schema
(
description
=
"上一份合同起止日期"
)
private
String
lastContractEndAndStart
;
/**
* 就职岗位
*/
@ExcelAttribute
(
name
=
"就职岗位"
)
@Schema
(
description
=
"就职岗位"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"就职岗位"
)
private
String
post
;
/**
* 合同类型
*/
@ExcelAttribute
(
name
=
"合同类型"
)
@Schema
(
description
=
"合同类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同类型"
)
private
String
contractType
;
/**
* 签署甲方
*/
@ExcelAttribute
(
name
=
"签署甲方"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"签署甲方不能超过50个字符"
)
@ExcelProperty
(
"签署甲方"
)
@Schema
(
description
=
"签署甲方"
)
private
String
signatory
;
/**
* 签署方式
*/
@ExcelAttribute
(
name
=
"签署方式"
,
maxLength
=
32
)
@ExcelProperty
(
"签署方式"
)
@Schema
(
description
=
"签署方式1线下签0电子签"
)
private
String
signType
;
/**
* 合同开始日期
*/
@ExcelAttribute
(
name
=
"合同开始日期"
)
@Schema
(
description
=
"合同开始日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同开始日期"
)
private
Date
contractStart
;
/**
* 合同截止日期
*/
@ExcelAttribute
(
name
=
"合同截止日期"
)
@Schema
(
description
=
"合同截止日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同截止日期"
)
private
Date
contractEnd
;
/**
* 合同截止日期-续签
*/
@ExcelAttribute
(
name
=
"合同截止日期-续签"
)
@Schema
(
description
=
"合同截止日期-续签"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同截止日期-续签"
)
private
Date
contractEndNew
;
/**
* 合同开始日期-续签
*/
@ExcelAttribute
(
name
=
"合同开始日期-续签"
)
@Schema
(
description
=
"合同开始日期-续签"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同开始日期-续签"
)
private
Date
contractStartNew
;
/**
* 合同ID
*/
@ExcelAttribute
(
name
=
"合同ID"
,
isExport
=
false
)
@Schema
(
description
=
"合同ID"
)
@ExcelIgnore
private
String
contractId
;
@ExcelAttribute
(
name
=
"错误信息"
)
@Schema
(
description
=
"错误信息"
)
@ExcelProperty
(
"错误信息"
)
private
String
errorMsg
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ContractAlertConfirmVo.java
View file @
6f540bcf
...
...
@@ -125,4 +125,23 @@ public class ContractAlertConfirmVo implements Serializable {
@ExcelIgnore
private
String
contractId
;
@ExcelAttribute
(
name
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
@ExcelAttribute
(
name
=
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
@ExcelAttribute
(
name
=
"错误信息"
)
@Schema
(
description
=
"错误信息"
)
@ExcelProperty
(
"错误信息"
)
private
String
errorMsg
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeAutoRegistCheckVo.java
View file @
6f540bcf
...
...
@@ -47,4 +47,7 @@ public class TEmployeeAutoRegistCheckVo implements Serializable {
@ExcelProperty
(
"错误信息"
)
private
String
errorMsg
;
//反馈文件要求
ContractAlertConfirmResVo
confirmVo
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeContractPreNewVo.java
View file @
6f540bcf
...
...
@@ -721,4 +721,10 @@ public class TEmployeeContractPreNewVo extends TEmployeeContractPreNew implement
**/
private
List
<
String
>
contractIds
;
/**
* @Author fxj
* @Description 批量确认返回对象
**/
private
List
<
ContractAlertConfirmResVo
>
confirmVos
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
6f540bcf
...
...
@@ -107,4 +107,8 @@ public class EmployeeConstants {
public
static
final
String
DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR
=
"待续签合同超期一个月,需走线下签"
;
public
static
final
String
ERROR_TYPE_CONTRACT
=
"合同"
;
public
static
final
String
ERROR_DUPLICATE_CONFIRM
=
"已确认,请勿重复确认"
;
public
static
final
String
ERROR_NO_ALERT_FOUND
=
"未找到合同续签待办信息"
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
6f540bcf
...
...
@@ -1059,7 +1059,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//更新合同提醒办理状态
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TEmpContractAlert:
:
getContractId
,
contractPreNew
.
getContractId
())
.
eq
(
TEmpContractAlert:
:
getHandleStatus
,
CommonConstants
.
ZERO_STRING
);
.
set
(
TEmpContractAlert:
:
getHandleStatus
,
CommonConstants
.
ZERO_STRING
);
contractAlertMapper
.
update
(
null
,
updateWrapper
);
}
}
if
(
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
contractInfo
.
getSituation
()))
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreNewServiceImpl.java
View file @
6f540bcf
...
...
@@ -53,6 +53,7 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestTemplate
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -236,6 +237,17 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
if
(
contract
==
null
){
return
R
.
failed
(
EmployeeConstants
.
DATA_CAN_NOT_FOUND
);
}
long
preNewCount
=
0
;
if
(
Common
.
isNotNull
(
preVo
.
getId
())){
preNewCount
=
baseMapper
.
selectCount
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getContractId
,
preVo
.
getContractId
())
.
ne
(
TEmployeeContractPreNew:
:
getId
,
preVo
.
getId
()));
}
else
{
preNewCount
=
baseMapper
.
selectCount
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
().
eq
(
TEmployeeContractPreNew:
:
getContractId
,
preVo
.
getContractId
()));
}
if
(
preNewCount
>
CommonConstants
.
ZERO_INT
){
return
R
.
failed
(
"已存在确认数据,请确认后重试"
);
}
//电子签判断预计发起时间是否为当前时间的一个月前
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
())
...
...
@@ -246,7 +258,15 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return
R
.
failed
(
EmployeeConstants
.
DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR
);
}
}
//电子签判断合同开始时间是否为当前时间的一个月前
if
(
Common
.
isNotNull
(
preVo
.
getContractStart
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
())){
LocalDate
reminderDate
=
LocalDateUtil
.
parseLocalDate
(
DateUtil
.
dateToString
(
preVo
.
getContractStart
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
));
LocalDate
nowDate
=
LocalDate
.
now
();
if
(
null
!=
nowDate
&&
nowDate
.
isAfter
(
reminderDate
.
plusMonths
(
1
))){
return
R
.
failed
(
EmployeeConstants
.
DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR
);
}
}
////如果电子签是系统自动撤销对应的签署方式必须更新为 线下签
TEmployeeContractPreNew
preNew
=
null
;
if
(
Common
.
isNotNull
(
preVo
.
getId
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
())){
...
...
@@ -268,21 +288,19 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
TEmployeeContractPreNew
pre
=
new
TEmployeeContractPreNew
();
BeanCopyUtils
.
copyProperties
(
preVo
,
pre
);
pre
.
setProcessStatus
(
CommonConstants
.
ONE_STRING
);
if
(
null
!=
alert
){
pre
.
setCustomerUsername
(
alert
.
getCsName
());
pre
.
setCustomerUserLoginname
(
alert
.
getCsLoginName
());
pre
.
setDeptName
(
alert
.
getProject
());
pre
.
setDeptNo
(
alert
.
getProjectNo
());
pre
.
setEmployeeName
(
alert
.
getEmpName
());
pre
.
setEmpIdcard
(
alert
.
getEmpIdcard
());
pre
.
setDeptId
(
alert
.
getDeptId
());
pre
.
setEmpPhone
(
alert
.
getEmpPhone
());
pre
.
setEmployeeNature
(
alert
.
getEmpType
());
pre
.
setPosition
(
alert
.
getPost
());
pre
.
setIsUrg
(
CommonConstants
.
ZERO_STRING
);
pre
.
setOverFlag
(
CommonConstants
.
ONE_STRING
);
pre
.
setSignFlag
(
CommonConstants
.
ONE_STRING
);
}
pre
.
setCustomerUsername
(
alert
.
getCsName
());
pre
.
setCustomerUserLoginname
(
alert
.
getCsLoginName
());
pre
.
setDeptName
(
alert
.
getProject
());
pre
.
setDeptNo
(
alert
.
getProjectNo
());
pre
.
setEmployeeName
(
alert
.
getEmpName
());
pre
.
setEmpIdcard
(
alert
.
getEmpIdcard
());
pre
.
setDeptId
(
alert
.
getDeptId
());
pre
.
setEmpPhone
(
alert
.
getEmpPhone
());
pre
.
setEmployeeNature
(
alert
.
getEmpType
());
pre
.
setPosition
(
alert
.
getPost
());
pre
.
setIsUrg
(
CommonConstants
.
ZERO_STRING
);
pre
.
setOverFlag
(
CommonConstants
.
ONE_STRING
);
pre
.
setSignFlag
(
CommonConstants
.
ONE_STRING
);
String
errorInfo
=
initDateInfo
(
pre
,
contract
);
if
(
null
!=
errorInfo
){
return
R
.
failed
(
errorInfo
);
...
...
@@ -324,132 +342,60 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
alertMap
=
alertList
.
stream
().
filter
(
v
->
v
.
getContractId
()
!=
null
)
.
collect
(
Collectors
.
toMap
(
TEmpContractAlert:
:
getContractId
,
v
->
v
));
}
List
<
TEmployeeContractPreNew
>
exsitPreList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
in
(
TEmployeeContractPreNew:
:
getContractId
,
contractIds
));
Map
<
String
,
String
>
preMap
=
new
HashMap
<>();
if
(
exsitPreList
!=
null
){
preMap
=
exsitPreList
.
stream
().
filter
(
v
->
v
.
getContractId
()
!=
null
)
.
collect
(
Collectors
.
toMap
(
TEmployeeContractPreNew:
:
getContractId
,
v
->
v
.
getId
()));
}
TAutoContractScheme
scheme
=
null
;
if
(
null
!=
preVo
.
getConfigId
()){
scheme
=
contractSchemeMapper
.
selectById
(
preVo
.
getConfigId
());
}
TAutoContractRuleInfo
rule
=
null
;
if
(
null
!=
scheme
){
rule
=
contractRuleInfoMapper
.
selectOne
(
Wrappers
.<
TAutoContractRuleInfo
>
query
().
lambda
()
.
eq
(
TAutoContractRuleInfo:
:
getDeptNo
,
scheme
.
getDeptNo
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
TEmployeeContractPreNew
pre
=
null
;
List
<
TEmployeeContractPreNew
>
preList
=
new
ArrayList
<>();
List
<
TEmployeeAutoRegistCheckVo
>
errorList
=
new
ArrayList
<>();
TEmployeeAutoRegistCheckVo
checkVo
;
TEmpContractAlert
alert
=
null
;
TEmployeeContractDateVo
vo
=
null
;
TEmployeeContractPreNew
preNew
=
null
;
String
innitError
=
null
;
//已合同Id 组建map
Map
<
String
,
ContractAlertConfirmResVo
>
confirmMap
=
null
;
List
<
ContractAlertConfirmResVo
>
confirmVos
=
preVo
.
getConfirmVos
();
if
(
null
!=
confirmVos
&&
confirmVos
.
size
()
>
0
){
confirmMap
=
confirmVos
.
stream
().
filter
(
v
->
v
.
getContractId
()
!=
null
)
.
collect
(
Collectors
.
toMap
(
ContractAlertConfirmResVo:
:
getContractId
,
v
->
v
));
}
ContractAlertConfirmResVo
temp
=
null
;
TEmployeeContractPreNewVo
preVoTemp
=
null
;
for
(
TEmployeeContractInfo
contract
:
contractList
){
preVoTemp
=
new
TEmployeeContractPreNewVo
();
BeanCopyUtils
.
copyProperties
(
preVo
,
preVoTemp
);
alert
=
alertMap
.
get
(
contract
.
getId
());
if
(
null
==
alert
){
checkVo
=
new
TEmployeeAutoRegistCheckVo
();
checkVo
.
setEmployeeName
(
contract
.
getEmpName
());
checkVo
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
checkVo
.
setDeptName
(
preVo
.
getDeptName
());
checkVo
.
setDeptNo
(
preVo
.
getDeptNo
());
checkVo
.
setType
(
"合同"
);
checkVo
.
setErrorMsg
(
"未找到合同续签待办信息"
);
errorList
.
add
(
checkVo
);
continue
;
}
//初始化数据
innitError
=
initDateInfo
(
preVo
,
contract
);
if
(
Common
.
isNotNull
(
innitError
)){
checkVo
=
new
TEmployeeAutoRegistCheckVo
();
checkVo
.
setEmployeeName
(
contract
.
getEmpName
());
checkVo
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
checkVo
.
setDeptName
(
preVo
.
getDeptName
());
checkVo
.
setDeptNo
(
preVo
.
getDeptNo
());
checkVo
.
setType
(
"合同"
);
checkVo
.
setErrorMsg
(
innitError
);
errorList
.
add
(
checkVo
);
continue
;
}
//判断两个合同时间是否重合
if
(
LocalDateUtil
.
hasOverlap
(
contract
.
getContractStart
(),
contract
.
getContractEnd
(),
preVo
.
getContractStart
(),
preVo
.
getContractEnd
())){
checkVo
=
new
TEmployeeAutoRegistCheckVo
();
checkVo
.
setEmployeeName
(
contract
.
getEmpName
());
checkVo
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
checkVo
.
setDeptName
(
preVo
.
getDeptName
());
checkVo
.
setDeptNo
(
preVo
.
getDeptNo
());
checkVo
.
setType
(
"合同"
);
checkVo
.
setErrorMsg
(
EmployeeConstants
.
DATA_CONTRACT_OVERLAP
);
errorList
.
add
(
checkVo
);
continue
;
}
//如果电子签是系统自动撤销对应的签署方式必须更新为 线下签,
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getSignType
())){
preNew
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getContractId
,
contract
.
getId
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
null
!=
preNew
&&
CommonConstants
.
ELEVEN_STRING
.
equals
(
preNew
.
getProcessStatus
())){
checkVo
=
new
TEmployeeAutoRegistCheckVo
();
checkVo
.
setEmployeeName
(
contract
.
getEmpName
());
checkVo
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
checkVo
.
setDeptName
(
preVo
.
getDeptName
());
checkVo
.
setDeptNo
(
preVo
.
getDeptNo
());
checkVo
.
setType
(
"合同"
);
checkVo
.
setErrorMsg
(
EmployeeConstants
.
DATA_CONTRACT_CANCEL_MUST_OFFLINE_SIGN
);
errorList
.
add
(
checkVo
);
continue
;
}
}
//初始化岗位名称
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
;
if
(
null
!=
scheme
){
rule
=
contractRuleInfoMapper
.
selectOne
(
Wrappers
.<
TAutoContractRuleInfo
>
query
().
lambda
()
.
eq
(
TAutoContractRuleInfo:
:
getDeptNo
,
scheme
.
getDeptNo
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
null
!=
rule
&&
null
!=
contract
.
getContractEnd
()){
//上一份合同到期前第5个工作日: 20251229(含)前第5个工作日_25年12月23日,若是已过去的时间,则按照当前日期(含)往后继续找工作日,若超过一个月后了,
// 则也呈现,但是只能是线下签
// 计算往前3个工作日
if
(
null
!=
rule
&&
null
!=
contract
.
getContractEnd
())
{
// 解析合同结束日期
LocalDate
contractEndDate
=
parseContractEndDate
(
contract
.
getContractEnd
());
if
(
null
==
contractEndDate
)
{
checkVo
=
buildErrorCheckVo
(
contract
,
preVo
,
"合同结束日期解析失败"
);
errorList
.
add
(
checkVo
);
continue
;
}
// 计算预计发起日期
LocalDate
reminderDate
=
calculateReminderDate
(
rule
.
getRenewalDateType
(),
contractEndDate
);
if
(
null
==
reminderDate
)
{
checkVo
=
buildErrorCheckVo
(
contract
,
preVo
,
"预计发起时间初始化失败"
);
errorList
.
add
(
checkVo
);
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
());
if
(
null
==
contractEndDate
)
{
checkVo
=
buildErrorCheckVo
(
contract
,
preVo
,
"续签合同开始日期解析失败"
);
errorList
.
add
(
checkVo
);
continue
;
}
if
(
reminderDate
.
isAfter
(
contractStartDateNew
.
plusMonths
(
1
)))
{
checkVo
=
buildErrorCheckVo
(
contract
,
preVo
,
EmployeeConstants
.
DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR
);
errorList
.
add
(
checkVo
);
continue
;
}
temp
=
null
==
confirmMap
?
null
:
confirmMap
.
get
(
contract
.
getId
());
checkVo
=
check
(
preMap
,
scheme
,
rule
,
alert
,
preVoTemp
,
contract
);
if
(
null
!=
checkVo
){
if
(
null
!=
temp
)
{
if
(
null
!=
alert
){
temp
.
setDeptNo
(
alert
.
getProjectNo
());
temp
.
setDeptName
(
alert
.
getProject
());
}
// 设置预计发起时间
preVo
.
setExpectedCollectionTime
(
DateUtil
.
getDateByLocalDate
(
reminderDate
));
temp
.
setErrorMsg
(
checkVo
.
getErrorMsg
());
temp
.
setPost
(
preVoTemp
.
getPost
());
temp
.
setContractEndNew
(
preVoTemp
.
getContractEnd
());
temp
.
setContractStartNew
(
preVoTemp
.
getContractStart
());
checkVo
.
setConfirmVo
(
temp
);
}
errorList
.
add
(
checkVo
);
continue
;
}
pre
=
new
TEmployeeContractPreNew
();
BeanCopyUtils
.
copyProperties
(
preVo
,
pre
);
BeanCopyUtils
.
copyProperties
(
preVo
Temp
,
pre
);
pre
.
setContractId
(
contract
.
getId
());
pre
.
setProcessStatus
(
CommonConstants
.
ONE_STRING
);
if
(
null
!=
alert
){
...
...
@@ -488,6 +434,79 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
}
}
private
TEmployeeAutoRegistCheckVo
check
(
Map
<
String
,
String
>
preMap
,
TAutoContractScheme
scheme
,
TAutoContractRuleInfo
rule
,
TEmpContractAlert
alert
,
TEmployeeContractPreNewVo
preVoTemp
,
TEmployeeContractInfo
contract
)
{
String
preId
;
String
initError
;
if
(
null
==
alert
){
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
EmployeeConstants
.
ERROR_NO_ALERT_FOUND
);
}
preId
=
preMap
.
get
(
contract
.
getId
());
if
(
Common
.
isNotNull
(
preId
)){
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
EmployeeConstants
.
ERROR_DUPLICATE_CONFIRM
);
}
//初始化数据
initError
=
initDateInfo
(
preVoTemp
,
contract
);
if
(
Common
.
isNotNull
(
initError
)){
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
initError
);
}
//判断两个合同时间是否重合
if
(
LocalDateUtil
.
hasOverlap
(
contract
.
getContractStart
(),
contract
.
getContractEnd
(),
preVoTemp
.
getContractStart
(),
preVoTemp
.
getContractEnd
())){
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
EmployeeConstants
.
DATA_CONTRACT_OVERLAP
);
}
//如果电子签是系统自动撤销对应的签署方式必须更新为 线下签, 如果是批量确认 有已确认直接提示了不做这个判断
//初始化岗位名称
if
(
Common
.
isNotNull
(
preVoTemp
.
getConfigId
())
&&
"固定岗位"
.
equals
(
preVoTemp
.
getPost
())
&&
null
!=
scheme
){
preVoTemp
.
setPost
(
scheme
.
getPost
());
}
else
{
//等于上一份合同的岗位明细
preVoTemp
.
setPost
(
contract
.
getPost
());
}
//处理预计发起时间
//上一份合同到期前第5个工作日: 20251229(含)前第5个工作日_25年12月23日,若是已过去的时间,则按照当前日期(含)往后继续找工作日,若超过一个月后了,
// 则也呈现,但是只能是线下签
// 计算往前3个工作日
if
(
null
!=
rule
&&
null
!=
contract
.
getContractEnd
())
{
// 解析合同结束日期
LocalDate
contractEndDate
=
parseContractEndDate
(
contract
.
getContractEnd
());
if
(
null
==
contractEndDate
)
{
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
"合同结束日期解析失败"
);
}
// 计算预计发起日期
LocalDate
reminderDate
=
calculateReminderDate
(
rule
.
getRenewalDateType
(),
contractEndDate
);
if
(
null
==
reminderDate
)
{
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
"预计发起时间初始化失败"
);
}
// 调整提醒日期为最近工作日 (0 上一份合同到期前第5个工作日的场景才调整)
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
rule
.
getRenewalDateType
())){
reminderDate
=
adjustToNearestWorkday
(
reminderDate
);
}
// 检查电子签是否超期(和续签的合同开始日期进行比较)
if
(
null
!=
preVoTemp
.
getContractStart
()
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVoTemp
.
getSignType
())){
LocalDate
contractStartDateNew
=
parseContractEndDate
(
preVoTemp
.
getContractStart
());
if
(
null
==
contractStartDateNew
)
{
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
"续签合同开始日期解析失败"
);
}
if
(
reminderDate
.
isAfter
(
contractStartDateNew
.
plusMonths
(
1
)))
{
return
buildErrorCheckVo
(
contract
,
preVoTemp
,
EmployeeConstants
.
DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR
);
}
}
// 设置预计发起时间
preVoTemp
.
setExpectedCollectionTime
(
DateUtil
.
getDateByLocalDate
(
reminderDate
));
}
return
null
;
}
/**
* 解析合同结束日期
*/
...
...
@@ -524,11 +543,15 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
*/
private
TEmployeeAutoRegistCheckVo
buildErrorCheckVo
(
TEmployeeContractInfo
contract
,
TEmployeeContractPreNewVo
preVo
,
String
errorMsg
)
{
TEmployeeAutoRegistCheckVo
checkVo
=
new
TEmployeeAutoRegistCheckVo
();
checkVo
.
setEmployeeName
(
contract
.
getEmpName
());
checkVo
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
checkVo
.
setDeptName
(
preVo
.
getDeptName
());
checkVo
.
setDeptNo
(
preVo
.
getDeptNo
());
checkVo
.
setType
(
"合同"
);
// 可配置化处理
if
(
null
!=
contract
){
checkVo
.
setEmployeeName
(
contract
.
getEmpName
());
checkVo
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
}
if
(
null
!=
preVo
){
checkVo
.
setDeptName
(
preVo
.
getDeptName
());
checkVo
.
setDeptNo
(
preVo
.
getDeptNo
());
}
checkVo
.
setType
(
EmployeeConstants
.
ERROR_TYPE_CONTRACT
);
// 可配置化处理
checkVo
.
setErrorMsg
(
errorMsg
);
return
checkVo
;
}
...
...
@@ -1966,14 +1989,27 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
@Override
public
void
updateByIdAndUpdateAlert
(
TEmployeeContractPreNew
preNew
)
{
baseMapper
.
updateById
(
preNew
);
//已完成同步更新续签待办提醒为已办理
if
(
preNew
.
getProcessStatus
().
equals
(
CommonConstants
.
dingleDigitStrArray
[
9
])
&&
null
!=
preNew
.
getContractId
()){
TEmpContractAlert
alert
=
empContractAlertMapper
.
selectOne
(
Wrappers
.<
TEmpContractAlert
>
query
().
lambda
()
//已完成同步更新续签待办提醒为已办理
.
TEmpContractAlert
alert
=
null
;
if
(
null
!=
preNew
.
getContractId
()){
alert
=
empContractAlertMapper
.
selectOne
(
Wrappers
.<
TEmpContractAlert
>
query
().
lambda
()
.
eq
(
TEmpContractAlert:
:
getContractId
,
preNew
.
getContractId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
null
!=
alert
){
}
if
(
null
!=
alert
){
//已完成
if
(
preNew
.
getProcessStatus
().
equals
(
CommonConstants
.
dingleDigitStrArray
[
9
])){
alert
.
setHandleStatus
(
CommonConstants
.
dingleDigitStrArray
[
2
]);
}
//撤销签署
if
(
preNew
.
getProcessStatus
().
equals
(
CommonConstants
.
dingleDigitStrArray
[
10
])){
alert
.
setHandleStatus
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
}
//签署失败
if
(
preNew
.
getProcessStatus
().
equals
(
CommonConstants
.
dingleDigitStrArray
[
7
])){
alert
.
setHandleStatus
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
}
if
(
null
!=
alert
){
empContractAlertMapper
.
updateById
(
alert
);
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/DoFascTask.java
View file @
6f540bcf
...
...
@@ -147,6 +147,8 @@ public class DoFascTask {
preNew
.
setSignFlag
(
CommonConstants
.
ZERO_STRING
);
preNew
.
setRevokeReason
(
Common
.
isEmpty
(
terminationNote
)?
CommonConstants
.
EMPTY_STRING
:
terminationNote
);
tEmployeeContractPreNewService
.
updateById
(
preNew
);
//更新合同待办
tEmployeeContractPreNewService
.
updateByIdAndUpdateAlert
(
preNew
);
}
//如果存在合同申请审核数据,将状态更新成5撤销签署
contractInfo
.
setAuditStatus
(
CommonConstants
.
FIVE_INT
);
...
...
@@ -178,9 +180,10 @@ public class DoFascTask {
contractAutoLog
.
setMainId
(
preNew
.
getId
());
contractAutoLog
.
setErrorInfo
(
null
==
terminationNote
?
"法大大签署失败"
:
terminationNote
);
contractAutoLogService
.
save
(
contractAutoLog
);
//更新合同待办
tEmployeeContractPreNewService
.
updateByIdAndUpdateAlert
(
preNew
);
//签署失败发送企微消息
sendFddFalureInfoToWx
(
preNew
,
contractAutoLog
.
getId
());
// 加日志
this
.
saveAuditLogFail
(
"签署失败"
,
terminationNote
,
contractInfo
.
getId
());
pushLog
.
setReturnData
(
"签署任务参与方签署失败事件:fddEvent:"
+
fddEvent
+
FASC_BIZ_CONTENT_STR
+
fddBizContent
);
...
...
@@ -492,7 +495,7 @@ public class DoFascTask {
StringBuilder
description
=
new
StringBuilder
();
String
title
=
"作业自动化——电子合同续签失败提醒"
;
description
.
append
(
pre
.
getEmployeeName
()
+
"-"
+
pre
.
getEmpIdcard
()
+
"-"
+
pre
.
getEmpPhone
()
+
",电子合同
签署
失败"
).
append
(
"<br>"
);
",电子合同
续签
失败"
).
append
(
"<br>"
);
description
.
append
(
"请及时处理,以免产生用工风险!"
).
append
(
"<br>"
);
textcard
.
put
(
"title"
,
title
);
textcard
.
put
(
"url"
,
authUrl
);
...
...
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