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
35ed9bc1
You need to sign in or sign up before continuing.
Commit
35ed9bc1
authored
Feb 25, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同续签待办-fxj
parent
92bb4f0f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
775 additions
and
142 deletions
+775
-142
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+10
-1
TEmployeeContractPreNew.java
...plus/v1/yifu/archives/entity/TEmployeeContractPreNew.java
+9
-0
ContractAlertConfirmVo.java
...loud/plus/v1/yifu/archives/vo/ContractAlertConfirmVo.java
+8
-0
EmployeeContractVO.java
...fu/cloud/plus/v1/yifu/archives/vo/EmployeeContractVO.java
+13
-0
TEmployeeContractPreNewDetailVo.java
.../v1/yifu/archives/vo/TEmployeeContractPreNewDetailVo.java
+16
-3
TEmployeeContractPreNewVo.java
...d/plus/v1/yifu/archives/vo/TEmployeeContractPreNewVo.java
+10
-1
TEmployeeContractPreNewController.java
...rchives/controller/TEmployeeContractPreNewController.java
+24
-11
TEmployeeContractPreNewMapper.java
...1/yifu/archives/mapper/TEmployeeContractPreNewMapper.java
+2
-0
TEmployeeContractPreNewService.java
...yifu/archives/service/TEmployeeContractPreNewService.java
+4
-0
FascServiceImpl.java
...d/plus/v1/yifu/archives/service/impl/FascServiceImpl.java
+7
-3
TEmpContractAlertServiceImpl.java
...u/archives/service/impl/TEmpContractAlertServiceImpl.java
+12
-5
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+16
-9
TEmployeeContractPreNewServiceImpl.java
...ives/service/impl/TEmployeeContractPreNewServiceImpl.java
+292
-100
ContractTermCalculator.java
...d/plus/v1/yifu/archives/utils/ContractTermCalculator.java
+145
-0
DoFascTask.java
...om/yifu/cloud/plus/v1/yifu/archives/utils/DoFascTask.java
+3
-1
FascUtil.java
.../com/yifu/cloud/plus/v1/yifu/archives/utils/FascUtil.java
+1
-0
TEmpContractAlertMapper.xml
...biz/src/main/resources/mapper/TEmpContractAlertMapper.xml
+3
-1
TEmployeeContractPreNewMapper.xml
...c/main/resources/mapper/TEmployeeContractPreNewMapper.xml
+136
-7
ArchiveTask.java
.../java/com/yifu/cloud/plus/v1/job/compont/ArchiveTask.java
+64
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
35ed9bc1
...
@@ -544,6 +544,10 @@ public class TEmployeeContractInfo extends BaseEntity {
...
@@ -544,6 +544,10 @@ public class TEmployeeContractInfo extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
preId
;
private
String
preId
;
@Schema
(
description
=
"合同续签待办确认preNewId"
)
private
String
preNewId
;
/**
/**
* preName
* preName
*/
*/
...
@@ -566,5 +570,10 @@ public class TEmployeeContractInfo extends BaseEntity {
...
@@ -566,5 +570,10 @@ public class TEmployeeContractInfo extends BaseEntity {
private
String
tryPeriod
;
private
String
tryPeriod
;
/**
* 自动化提交人
*/
@Schema
(
description
=
"自动化提交人"
)
@TableField
(
exist
=
false
)
private
String
reNewSubmitter
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractPreNew.java
View file @
35ed9bc1
...
@@ -204,6 +204,15 @@ public class TEmployeeContractPreNew extends BaseEntity {
...
@@ -204,6 +204,15 @@ public class TEmployeeContractPreNew extends BaseEntity {
@ExcelProperty
(
"合同类型"
)
@ExcelProperty
(
"合同类型"
)
@Schema
(
description
=
"合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同"
)
@Schema
(
description
=
"合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同"
)
private
String
contractType
;
private
String
contractType
;
/**
* 合同名称 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同
*/
@ExcelAttribute
(
name
=
"合同名称"
,
maxLength
=
8
)
@Length
(
max
=
8
,
message
=
"合同名称不能超过8个字符"
)
@ExcelProperty
(
"合同名称"
)
@Schema
(
description
=
"合同名称 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同"
)
private
String
contractName
;
/**
/**
* 签署甲方
* 签署甲方
*/
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ContractAlertConfirmVo.java
View file @
35ed9bc1
...
@@ -25,6 +25,14 @@ import java.util.Date;
...
@@ -25,6 +25,14 @@ import java.util.Date;
@Data
@Data
public
class
ContractAlertConfirmVo
implements
Serializable
{
public
class
ContractAlertConfirmVo
implements
Serializable
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelAttribute
(
name
=
"主键"
)
@Schema
(
description
=
"主键"
)
@ExcelIgnore
private
String
id
;
/**
/**
* 员工名称
* 员工名称
*/
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractVO.java
View file @
35ed9bc1
...
@@ -249,6 +249,13 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
...
@@ -249,6 +249,13 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelProperty
(
value
=
"preId"
)
@ExcelProperty
(
value
=
"preId"
)
private
String
preId
;
private
String
preId
;
/**
* 续签待办确认信息ID
*/
@ExcelAttribute
(
name
=
"preNewId"
)
@ExcelProperty
(
value
=
"preNewId"
)
private
String
preNewId
;
/**
/**
* preName
* preName
*/
*/
...
@@ -263,4 +270,10 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
...
@@ -263,4 +270,10 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
leaveName
;
private
String
leaveName
;
/**
* 自动化提交人
*/
@Schema
(
description
=
"自动化提交人"
)
@TableField
(
exist
=
false
)
private
String
reNewSubmitter
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeContractPreNewDetailVo.java
View file @
35ed9bc1
...
@@ -19,16 +19,13 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
...
@@ -19,16 +19,13 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 合同续签确认信息--批量发起明细 系统会自动拉取当前前端客服+“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息;
* 合同续签确认信息--批量发起明细 系统会自动拉取当前前端客服+“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息;
...
@@ -147,4 +144,20 @@ public class TEmployeeContractPreNewDetailVo {
...
@@ -147,4 +144,20 @@ public class TEmployeeContractPreNewDetailVo {
@Schema
(
description
=
"合同截止日期"
)
@Schema
(
description
=
"合同截止日期"
)
private
Date
contractEnd
;
private
Date
contractEnd
;
/**
* 合同开始日期-上一份合同
*/
@ExcelAttribute
(
name
=
"合同开始日期-上一份合同"
)
@Schema
(
description
=
"合同开始日期-上一份合同"
)
@ExcelProperty
(
"合同开始日期-上一份合同"
)
private
Date
contractStartPre
;
/**
* 合同截止日期-上一份合同
*/
@ExcelAttribute
(
name
=
"合同截止日期-上一份合同"
)
@Schema
(
description
=
"合同截止日期-上一份合同"
)
@ExcelProperty
(
"合同截止日期-上一份合同"
)
private
Date
contractEndPre
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeContractPreNewVo.java
View file @
35ed9bc1
...
@@ -204,6 +204,15 @@ public class TEmployeeContractPreNewVo extends TEmployeeContractPreNew implement
...
@@ -204,6 +204,15 @@ public class TEmployeeContractPreNewVo extends TEmployeeContractPreNew implement
@ExcelProperty
(
"合同类型"
)
@ExcelProperty
(
"合同类型"
)
@Schema
(
description
=
"合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同"
)
@Schema
(
description
=
"合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同"
)
private
String
contractType
;
private
String
contractType
;
/**
* 合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同
*/
@ExcelAttribute
(
name
=
"合同名称"
,
maxLength
=
8
)
@Length
(
max
=
8
,
message
=
"合合同名称不能超过8个字符"
)
@ExcelProperty
(
"合同名称"
)
@Schema
(
description
=
"合同名称 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同"
)
private
String
contractName
;
/**
/**
* 签署甲方
* 签署甲方
*/
*/
...
@@ -570,7 +579,7 @@ public class TEmployeeContractPreNewVo extends TEmployeeContractPreNew implement
...
@@ -570,7 +579,7 @@ public class TEmployeeContractPreNewVo extends TEmployeeContractPreNew implement
@Schema
(
description
=
"发起失败时间"
)
@Schema
(
description
=
"发起失败时间"
)
private
Date
errorTime
;
private
Date
errorTime
;
/**
/**
* 合同截止日期类型
* 合同截止日期类型
0 合同年限推算 1 同商务合同一致 2 工作任务完成时止 3 指定日期
*/
*/
@ExcelAttribute
(
name
=
"合同截止日期类型"
,
maxLength
=
1
)
@ExcelAttribute
(
name
=
"合同截止日期类型"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"合同截止日期类型不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"合同截止日期类型不能超过1个字符"
)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractPreNewController.java
View file @
35ed9bc1
...
@@ -79,6 +79,18 @@ public class TEmployeeContractPreNewController {
...
@@ -79,6 +79,18 @@ public class TEmployeeContractPreNewController {
public
R
<
List
<
TEmployeeContractPreNewDetailVo
>>
getDetailList
(
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
)
{
public
R
<
List
<
TEmployeeContractPreNewDetailVo
>>
getDetailList
(
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
)
{
return
tEmployeeContractPreNewService
.
getDetailList
(
tEmployeeContractPreNew
);
return
tEmployeeContractPreNewService
.
getDetailList
(
tEmployeeContractPreNew
);
}
}
/**
* 简单分页查询--批量发起总数(权限内)
* 系统会自动拉取当前客服且“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息;
*
* @param tEmployeeContractPreNew 合同续签预派单信息
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/getDetailListCount"
)
public
R
<
Integer
>
getDetailListCount
(
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
)
{
return
tEmployeeContractPreNewService
.
getDetailListCount
(
tEmployeeContractPreNew
);
}
/**
/**
* 不分页查询
* 不分页查询
...
@@ -101,7 +113,6 @@ public class TEmployeeContractPreNewController {
...
@@ -101,7 +113,6 @@ public class TEmployeeContractPreNewController {
*/
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('archives_temployeecontractprenew_get')"
)
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('archives_temployeecontractprenew_get')"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('archives_temployeecontractprenew_get')"
)
public
R
<
TEmployeeContractPreNew
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
<
TEmployeeContractPreNew
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tEmployeeContractPreNewService
.
getById
(
id
));
return
R
.
ok
(
tEmployeeContractPreNewService
.
getById
(
id
));
}
}
...
@@ -208,8 +219,8 @@ public class TEmployeeContractPreNewController {
...
@@ -208,8 +219,8 @@ public class TEmployeeContractPreNewController {
/**
/**
* 每天11点15点/15点20推送待派单数据 --- 工作日
* 每天11点15点/15点20推送待派单数据 --- 工作日
* 会将发起失败、签署失败、审核不通过的“预计合同发起时间”为当日及之前日期的(空白的不在)合同续签任务自动尝试发起
* 会将发起失败、签署失败、审核不通过的“预计合同发起时间”为当日及之前日期的(空白的不在)合同续签任务自动尝试发起
* @author
huych
* @author
fxj
* @date 2025-0
6-16 14:18:26
* @date 2025-0
2-24
* @return void
* @return void
*/
*/
@SysLog
(
"每天11、15、15:20 发起电子签自动发起任务"
)
@SysLog
(
"每天11、15、15:20 发起电子签自动发起任务"
)
...
@@ -254,6 +265,7 @@ public class TEmployeeContractPreNewController {
...
@@ -254,6 +265,7 @@ public class TEmployeeContractPreNewController {
/**
/**
* @Author fxj
* @Author fxj
* @Description 一键催办
* @Description 一键催办
* @Param id loginName
* @Date 19:19 2026/2/10
* @Date 19:19 2026/2/10
**/
**/
@Operation
(
description
=
"一键催办"
)
@Operation
(
description
=
"一键催办"
)
...
@@ -294,20 +306,21 @@ public class TEmployeeContractPreNewController {
...
@@ -294,20 +306,21 @@ public class TEmployeeContractPreNewController {
* 提醒至前端客服,点击提醒,提示:请至HRO系统及时进行合同确认,以免续签不及时!
* 提醒至前端客服,点击提醒,提示:请至HRO系统及时进行合同确认,以免续签不及时!
* @author fxj
* @author fxj
*/
*/
@SysLog
(
"
派单当
日9点统一推送续签确认信息"
)
@SysLog
(
"
每
日9点统一推送续签确认信息"
)
@Inner
@Inner
@PostMapping
(
"/inner/pushWxConfrimMessage"
)
@PostMapping
(
"/inner/pushWxConfrimMessage"
)
public
R
pushWxConfrimMessage
()
{
public
R
pushWxConfrimMessage
()
{
return
tEmployeeContractPreNewService
.
pushWxConfrimMessage
();
return
tEmployeeContractPreNewService
.
pushWxConfrimMessage
();
}
}
/**
/**
* @Author fxj
* @Author fxj
* @Description
* @Description
反推年限信息
* @Date 19:
08
2026/2/10
* @Date 19:
19
2026/2/10
**/
**/
/*@Inner
@Operation
(
description
=
"反推年限信息"
)
@
PostMapping("/inner/electronicSignExpiringReminder
")
@
GetMapping
(
"/getContractTerm
"
)
public R
electronicSignExpiringReminder(
) {
public
R
getContractTerm
(
@RequestParam
String
startDate
,
@RequestParam
String
endDate
)
{
return tEmployeeContractPreNewService.
electronicSignExpiringReminder(
);
return
tEmployeeContractPreNewService
.
getContractTerm
(
startDate
,
endDate
);
}
*/
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeContractPreNewMapper.java
View file @
35ed9bc1
...
@@ -50,4 +50,6 @@ public interface TEmployeeContractPreNewMapper extends BaseMapper<TEmployeeContr
...
@@ -50,4 +50,6 @@ public interface TEmployeeContractPreNewMapper extends BaseMapper<TEmployeeContr
List
<
TEmployeeContractPreNewDetailVo
>
getDetailList
(
@Param
(
"tEmployeeContractPreNew"
)
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
);
List
<
TEmployeeContractPreNewDetailVo
>
getDetailList
(
@Param
(
"tEmployeeContractPreNew"
)
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
);
List
<
String
>
getUnDispatchList
();
List
<
String
>
getUnDispatchList
();
int
getDetailListCount
(
@Param
(
"tEmployeeContractPreNew"
)
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeContractPreNewService.java
View file @
35ed9bc1
...
@@ -78,4 +78,8 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
...
@@ -78,4 +78,8 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
R
pushWxConfrimMessage
();
R
pushWxConfrimMessage
();
void
pushDisConfrimContracts
();
void
pushDisConfrimContracts
();
R
<
Integer
>
getDetailListCount
(
TEmployeeContractPreNewSearchVo
tEmployeeContractPreNew
);
R
getContractTerm
(
String
startDate
,
String
endDate
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FascServiceImpl.java
View file @
35ed9bc1
...
@@ -383,7 +383,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
...
@@ -383,7 +383,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return
R
.
failed
(
FASC_NO_CONTRACT
);
return
R
.
failed
(
FASC_NO_CONTRACT
);
}
}
TEmployeeContractInfo
empContract
=
tEmployeeContractInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
TEmployeeContractInfo
empContract
=
tEmployeeContractInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getPreId
,
id
)
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getPreNewId
,
id
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
String
empIdCard
=
contract
.
getEmpIdcard
();
String
empIdCard
=
contract
.
getEmpIdcard
();
if
(
Common
.
isEmpty
(
empIdCard
))
{
if
(
Common
.
isEmpty
(
empIdCard
))
{
...
@@ -416,8 +417,11 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
...
@@ -416,8 +417,11 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
}
}
// 如果状态过多,可以改为这个:
// 如果状态过多,可以改为这个:
// ArrayUtils.contains(forbidStatusArr, tGzOfferInfo.getOfferStatus())
// ArrayUtils.contains(forbidStatusArr, tGzOfferInfo.getOfferStatus())
//系统自动撤销及客服撤销都放行
if
(
Common
.
isNotNull
(
contract
.
getRequestId
()))
{
if
(
Common
.
isNotNull
(
contract
.
getRequestId
())
&&
!
CommonConstants
.
ELEVEN_STRING
.
equals
(
contract
.
getProcessStatus
())
&&
!
CommonConstants
.
TEN_STRING
.
equals
(
contract
.
getProcessStatus
())
&&
!
CommonConstants
.
FIVE_STRING
.
equals
(
contract
.
getProcessStatus
()))
{
return
R
.
failed
(
"合同已发起,请勿重复发起!"
);
return
R
.
failed
(
"合同已发起,请勿重复发起!"
);
}
}
TFascTemplate
tFascTemplate
=
tFascTemplateService
.
getOne
(
Wrappers
.<
TFascTemplate
>
query
()
TFascTemplate
tFascTemplate
=
tFascTemplateService
.
getOne
(
Wrappers
.<
TFascTemplate
>
query
()
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpContractAlertServiceImpl.java
View file @
35ed9bc1
...
@@ -529,7 +529,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
...
@@ -529,7 +529,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert
.
setFirstAlertTime
(
new
Date
());
alert
.
setFirstAlertTime
(
new
Date
());
}
}
//获取项目信息,合同配置信息,初始化前端客服、续签状态、自动化标识
//获取项目信息,合同配置信息,初始化前端客服、续签状态、自动化标识
alert
.
setProcessStatus
(
CommonConstants
.
ZERO_INT
);
//
alert.setProcessStatus(CommonConstants.ZERO_INT);
if
(
null
!=
project
){
if
(
null
!=
project
){
alert
.
setCsName
(
project
.
getCsName
());
alert
.
setCsName
(
project
.
getCsName
());
...
@@ -1270,7 +1270,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
...
@@ -1270,7 +1270,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if
(
null
==
alert
){
if
(
null
==
alert
){
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
vo
.
setEmpContractAlert
(
alert
);
if
(
Common
.
isNotNull
(
alert
.
getContractId
())){
if
(
Common
.
isNotNull
(
alert
.
getContractId
())){
TEmployeeContractPreNew
preNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
preNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getContractId
,
alert
.
getContractId
())
.
eq
(
TEmployeeContractPreNew:
:
getContractId
,
alert
.
getContractId
())
...
@@ -1278,19 +1278,26 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
...
@@ -1278,19 +1278,26 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
vo
.
setContractPreNew
(
preNew
);
vo
.
setContractPreNew
(
preNew
);
if
(
null
!=
preNew
&&
Common
.
isNotNull
(
preNew
.
getId
())){
if
(
null
!=
preNew
&&
Common
.
isNotNull
(
preNew
.
getId
())){
TEmployeeContractInfo
contractInfo
=
contractInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
TEmployeeContractInfo
contractInfo
=
contractInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getPreId
,
preNew
.
getId
())
.
eq
(
TEmployeeContractInfo:
:
getPreNewId
,
preNew
.
getId
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
vo
.
setContractInfo
(
contractInfo
);
vo
.
setContractInfo
(
contractInfo
);
if
(
Common
.
isNotNull
(
preNew
.
getProcessStatus
())){
alert
.
setProcessStatus
(
Integer
.
parseInt
(
preNew
.
getProcessStatus
()));
}
}
else
{
alert
.
setProcessStatus
(
CommonConstants
.
ZERO_INT
);
}
}
}
}
vo
.
setEmpContractAlert
(
alert
);
return
R
.
ok
(
vo
);
return
R
.
ok
(
vo
);
}
}
@Override
@Override
public
R
<
List
<
ContractAlertConfirmVo
>>
getAutoRenewForConfirm
(
ContractAlertSearchVo
tEmpContractAlert
)
{
public
R
<
List
<
ContractAlertConfirmVo
>>
getAutoRenewForConfirm
(
ContractAlertSearchVo
tEmpContractAlert
)
{
// 如果查询条件续签状态为空默认查询 非已完成 状态数据
// 如果查询条件续签状态为空默认查询 非已完成 状态数据
if
(
Common
.
isNotNull
(
tEmpContractAlert
.
getProcessStatusList
())){
if
(
!
Common
.
isNotNull
(
tEmpContractAlert
.
getProcessStatusList
())){
tEmpContractAlert
.
setProcessStatusList
(
Stream
.
of
(
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"10"
,
"11"
).
collect
(
Collectors
.
toList
()));
tEmpContractAlert
.
setProcessStatusList
(
Stream
.
of
(
"0"
).
collect
(
Collectors
.
toList
()));
}
}
//初始化客服的项目权限 ,管理员及SSC 全量
//初始化客服的项目权限 ,管理员及SSC 全量
initSearchVo
(
tEmpContractAlert
);
initSearchVo
(
tEmpContractAlert
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
35ed9bc1
...
@@ -584,7 +584,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -584,7 +584,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//续签待办自动化状态更新
//续签待办自动化状态更新
if
(
Common
.
isNotNull
(
tEmployeeContractInfo
.
getPreId
()))
{
if
(
Common
.
isNotNull
(
tEmployeeContractInfo
.
getPreId
()))
{
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
tEmployeeContractInfo
.
getPreId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
tEmployeeContractInfo
.
getPre
New
Id
())
.
in
(
TEmployeeContractPreNew:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"3"
,
"5"
,
"7"
,
"11"
))
.
in
(
TEmployeeContractPreNew:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"3"
,
"5"
,
"7"
,
"11"
))
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
...
@@ -630,7 +630,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -630,7 +630,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
//续签撤销签署重新提交的话判断有没有合同待签订数据,有的话更新状态 2026-02-10
//续签撤销签署重新提交的话判断有没有合同待签订数据,有的话更新状态 2026-02-10
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
tEmployeeContractInfo
.
getPreId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
tEmployeeContractInfo
.
getPre
New
Id
())
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TEN_STRING
)
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TEN_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
...
@@ -762,6 +762,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -762,6 +762,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
audit
.
setCreateBy
(
"1"
);
audit
.
setCreateBy
(
"1"
);
audit
.
setCreateTime
(
LocalDateTime
.
now
());
audit
.
setCreateTime
(
LocalDateTime
.
now
());
}
}
if
(
Common
.
isNotNull
(
tEmployeeContractInfo
.
getReNewSubmitter
())){
audit
.
setCreateName
(
tEmployeeContractInfo
.
getReNewSubmitter
());
}
tEmployeeContractAuditMapper
.
updateById
(
audit
);
tEmployeeContractAuditMapper
.
updateById
(
audit
);
}
}
}
}
...
@@ -1013,8 +1016,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -1013,8 +1016,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
//更新续签待办续签状态为4线下签待归档
//更新续签待办续签状态为4线下签待归档
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contractInfo
.
getPreId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contractInfo
.
getPre
New
Id
())
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
FOUR
_STRING
)
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO
_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
contractPreNew
.
setProcessStatus
(
CommonConstants
.
FOUR_STRING
);
contractPreNew
.
setProcessStatus
(
CommonConstants
.
FOUR_STRING
);
...
@@ -1045,11 +1048,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -1045,11 +1048,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
//更新续签待办的续签状态为3线下签审核不通过
//更新续签待办的续签状态为3线下签审核不通过
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contractInfo
.
getId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contractInfo
.
get
PreNew
Id
())
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
contractPreNew
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
contractPreNew
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
contractPreNew
.
setErrorInfo
(
tEmployeeContractInfo
.
getAuditRemark
());
contractPreNew
.
setErrorTime
(
new
Date
());
contractPreNewMapper
.
updateById
(
contractPreNew
);
contractPreNewMapper
.
updateById
(
contractPreNew
);
//更新合同提醒办理状态
//更新合同提醒办理状态
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
...
@@ -1192,7 +1197,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -1192,7 +1197,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
//更新续签待办合同待签订数据状态为4线下签待归档 为已归档
//更新续签待办合同待签订数据状态为4线下签待归档 为已归档
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
tEmployeeContractInfo
.
getPreId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
tEmployeeContractInfo
.
getPre
New
Id
())
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
FOUR_STRING
)
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
FOUR_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
...
@@ -1201,7 +1206,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -1201,7 +1206,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//更新合同续签提醒办理状态为已完成
//更新合同续签提醒办理状态为已完成
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapperAlert
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapperAlert
=
new
LambdaUpdateWrapper
<>();
updateWrapperAlert
.
eq
(
TEmpContractAlert:
:
getContractId
,
contractPreNew
.
getContractId
())
updateWrapperAlert
.
eq
(
TEmpContractAlert:
:
getContractId
,
contractPreNew
.
getContractId
())
.
eq
(
TEmpContractAlert:
:
getHandleStatus
,
CommonConstants
.
TWO_INT
);
.
set
(
TEmpContractAlert:
:
getHandleStatus
,
CommonConstants
.
TWO_INT
);
contractAlertMapper
.
update
(
null
,
updateWrapperAlert
);
contractAlertMapper
.
update
(
null
,
updateWrapperAlert
);
//把关联的其他附件置空
//把关联的其他附件置空
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TAttaInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
...
@@ -2255,7 +2260,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -2255,7 +2260,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
//续签待办:更新续签状态为4线下签待归档
//续签待办:更新续签状态为4线下签待归档
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contract
.
getPreId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contract
.
getPre
New
Id
())
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
...
@@ -2287,11 +2292,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -2287,11 +2292,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
//续签待办:更新合同状态为3线下签审核不通过,合同续签提醒更新为待处理
//续签待办:更新合同状态为3线下签审核不通过,合同续签提醒更新为待处理
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
TEmployeeContractPreNew
contractPreNew
=
contractPreNewMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractPreNew
>
query
().
lambda
()
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contract
.
getPreId
())
.
eq
(
TEmployeeContractPreNew:
:
getId
,
contract
.
getPre
New
Id
())
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TEmployeeContractPreNew:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
contractPreNew
))
{
if
(
Common
.
isNotNull
(
contractPreNew
))
{
contractPreNew
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
contractPreNew
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
contractPreNew
.
setErrorInfo
(
tEmployeeContractInfo
.
getAuditRemark
());
contractPreNew
.
setErrorTime
(
new
Date
());
contractPreNewMapper
.
updateById
(
contractPreNew
);
contractPreNewMapper
.
updateById
(
contractPreNew
);
//更新合同提醒办理状态为待处理
//更新合同提醒办理状态为待处理
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TEmpContractAlert
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreNewServiceImpl.java
View file @
35ed9bc1
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/ContractTermCalculator.java
0 → 100644
View file @
35ed9bc1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
utils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
/**
* @Author fxj
* @Date 2026/2/24
* @Description
* @Version 1.0
*/
@Service
public
class
ContractTermCalculator
{
/**
* 合同期限计算结果
*/
public
static
class
ContractTerm
{
private
final
int
years
;
private
final
int
months
;
public
ContractTerm
(
int
years
,
int
months
)
{
this
.
years
=
years
;
this
.
months
=
months
;
}
public
int
getYears
()
{
return
years
;
}
public
int
getMonths
()
{
return
months
;
}
}
/**
* 计算合同期限(年数和月数)
* @param startDate 合同开始日期
* @param endDate 合同截止日期
* @return ContractTerm 包含年数和月数
*/
public
static
ContractTerm
calculateTerm
(
String
startDate
,
String
endDate
)
{
// 验证日期
if
(
startDate
==
null
||
endDate
==
null
)
{
throw
new
IllegalArgumentException
(
"开始日期和截止日期不能为空"
);
}
// 计算相差的年数
int
years
=
0
;
int
months
=
(
int
)
LocalDateUtil
.
betweenMonth
(
startDate
,
endDate
);
// 处理月份进位
if
(
months
>=
12
)
{
years
=
(
months
/
12
);
months
=
months
%
12
;
}
return
new
ContractTerm
(
years
,
months
);
}
/**
* 解析日期字符串(支持yyyy-MM-dd和yyyy年MM月dd日格式)
*/
private
static
LocalDate
parseDate
(
String
dateStr
)
{
if
(
dateStr
==
null
||
dateStr
.
trim
().
isEmpty
())
{
throw
new
IllegalArgumentException
(
"日期不能为空"
);
}
dateStr
=
dateStr
.
trim
();
try
{
// 处理 yyyy-MM-dd 格式
if
(
dateStr
.
contains
(
"-"
))
{
String
[]
parts
=
dateStr
.
split
(
"-"
);
if
(
parts
.
length
==
3
)
{
return
LocalDate
.
of
(
Integer
.
parseInt
(
parts
[
0
]),
Integer
.
parseInt
(
parts
[
1
]),
Integer
.
parseInt
(
parts
[
2
])
);
}
}
// 处理 yyyy年MM月dd日 格式
if
(
dateStr
.
contains
(
"年"
))
{
String
yearPart
=
dateStr
.
substring
(
0
,
dateStr
.
indexOf
(
"年"
));
String
monthPart
=
dateStr
.
substring
(
dateStr
.
indexOf
(
"年"
)
+
1
,
dateStr
.
indexOf
(
"月"
));
String
dayPart
=
dateStr
.
substring
(
dateStr
.
indexOf
(
"月"
)
+
1
,
dateStr
.
indexOf
(
"日"
));
return
LocalDate
.
of
(
Integer
.
parseInt
(
yearPart
),
Integer
.
parseInt
(
monthPart
),
Integer
.
parseInt
(
dayPart
)
);
}
throw
new
IllegalArgumentException
(
"不支持的日期格式: "
+
dateStr
);
}
catch
(
Exception
e
)
{
throw
new
IllegalArgumentException
(
"日期解析失败: "
+
dateStr
,
e
);
}
}
/**
* 测试方法
*/
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"=== 合同期限计算测试 ==="
);
// 测试示例1:2026年2月3日到2027年2月2日(正好一年)
testCase
(
"2026-02-03"
,
"2027-02-02"
,
"正好一年"
);
// 测试示例2:2026年2月3日到2027年2月3日(一年零一天,应算一年一个月)
testCase
(
"2026-02-03"
,
"2027-02-03"
,
"一年零一天"
);
// 测试示例3:2026年2月3日到2027年2月28日(一年零25天,应算一年一个月)
testCase
(
"2026-02-03"
,
"2027-02-28"
,
"一年零25天"
);
// 测试示例3:2026年2月3日到2027年3月3日(应算一年2个月)
testCase
(
"2026-02-03"
,
"2027-03-02"
,
"一年1月零1天"
);
// 测试示例4:2026年2月3日到2027年3月1日(一年零26天,应算一年一个月)
testCase
(
"2026-02-03"
,
"2027-03-03"
,
"跨月一天"
);
// 测试示例5:2026年2月3日到2028年2月2日(正好两年)
testCase
(
"2026-02-03"
,
"2028-03-04"
,
"正好两年"
);
// 测试示例6:2026年2月3日到2028年3月1日(两年多,应算两年一个月)
testCase
(
"2026-02-03"
,
"2028-03-01"
,
"两年多一天"
);
// 测试示例7:2026年1月31日到2026年2月28日(一个月差几天)
testCase
(
"2026-01-31"
,
"2026-02-28"
,
"跨月边界"
);
}
private
static
void
testCase
(
String
start
,
String
end
,
String
description
)
{
try
{
ContractTerm
term
=
calculateTerm
(
start
,
end
);
LocalDate
startDate
=
parseDate
(
start
);
LocalDate
endDate
=
parseDate
(
end
);
System
.
out
.
printf
(
"开始:%-12s | 截止:%-12s | 结果:(%d年%d个月)%n"
,
start
,
end
,
term
.
getYears
(),
term
.
getMonths
());
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"错误:"
+
e
.
getMessage
());
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/DoFascTask.java
View file @
35ed9bc1
...
@@ -79,7 +79,8 @@ public class DoFascTask {
...
@@ -79,7 +79,8 @@ public class DoFascTask {
TEmployeeContractInfo
contractInfo
=
null
;
TEmployeeContractInfo
contractInfo
=
null
;
if
(
preNew
!=
null
){
if
(
preNew
!=
null
){
contractInfo
=
tEmployeeContractInfoService
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
contractInfo
=
tEmployeeContractInfoService
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getPreId
,
preNew
.
getId
())
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getPreNewId
,
preNew
.
getId
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
}
if
(
contractInfo
!=
null
)
{
if
(
contractInfo
!=
null
)
{
...
@@ -139,6 +140,7 @@ public class DoFascTask {
...
@@ -139,6 +140,7 @@ public class DoFascTask {
}
}
if
(!
CommonConstants
.
ELEVEN_STRING
.
equals
(
preNew
.
getProcessStatus
()))
{
if
(!
CommonConstants
.
ELEVEN_STRING
.
equals
(
preNew
.
getProcessStatus
()))
{
preNew
.
setProcessStatus
(
CommonConstants
.
TEN_STRING
);
preNew
.
setProcessStatus
(
CommonConstants
.
TEN_STRING
);
preNew
.
setRequestId
(
""
);
}
}
preNew
.
setSignFlag
(
CommonConstants
.
ZERO_STRING
);
preNew
.
setSignFlag
(
CommonConstants
.
ZERO_STRING
);
preNew
.
setRevokeReason
(
terminationNote
);
preNew
.
setRevokeReason
(
terminationNote
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/FascUtil.java
View file @
35ed9bc1
...
@@ -1196,6 +1196,7 @@ public class FascUtil {
...
@@ -1196,6 +1196,7 @@ public class FascUtil {
contract
.
setProcessStatus
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
contract
.
setProcessStatus
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
contract
.
setSignType
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
contract
.
setSignType
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
contract
.
setRequestMsg
(
""
);
contract
.
setRequestMsg
(
""
);
contract
.
setRequestId
(
""
);
tEmployeeContractPreNewMapper
.
updateById
(
contract
);
tEmployeeContractPreNewMapper
.
updateById
(
contract
);
return
R
.
ok
();
return
R
.
ok
();
}
else
{
}
else
{
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmpContractAlertMapper.xml
View file @
35ed9bc1
...
@@ -420,6 +420,7 @@
...
@@ -420,6 +420,7 @@
<!--tEmpContractAlert简单分页查询-->
<!--tEmpContractAlert简单分页查询-->
<select
id=
"getAutoRenewForConfirm"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertConfirmVo"
>
<select
id=
"getAutoRenewForConfirm"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertConfirmVo"
>
SELECT
SELECT
a.id,
a.EMP_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.EMP_TYPE,
a.EMP_TYPE,
...
@@ -429,7 +430,8 @@
...
@@ -429,7 +430,8 @@
a.FILE_PROVINCE,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_CITY,
a.FILE_TOWN,
a.FILE_TOWN,
c.EMP_PHONE
c.EMP_PHONE,
a.contract_id
FROM t_emp_contract_alert a
FROM t_emp_contract_alert a
LEFT JOIN t_employee_contract_pre_new b on a.CONTRACT_ID = b.contract_id
LEFT JOIN t_employee_contract_pre_new b on a.CONTRACT_ID = b.contract_id
LEFT JOIN t_employee_info c on a.EMP_ID = c.id
LEFT JOIN t_employee_info c on a.EMP_ID = c.id
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractPreNewMapper.xml
View file @
35ed9bc1
...
@@ -149,10 +149,6 @@
...
@@ -149,10 +149,6 @@
a.default_amount,
a.default_amount,
a.contract_duration_year,
a.contract_duration_year,
a.contract_duration_month,
a.contract_duration_month,
a.try_period_start,
a.try_period_end,
a.try_period_type,
a.try_period,
a.labor_cost,
a.labor_cost,
a.risk_buy_desc,
a.risk_buy_desc,
a.salary_standard_per_hour,
a.salary_standard_per_hour,
...
@@ -485,7 +481,8 @@
...
@@ -485,7 +481,8 @@
a.emp_idcard empIdcard,
a.emp_idcard empIdcard,
a.dept_no deptNo,
a.dept_no deptNo,
a.situation,
a.situation,
a.contract_type contractName,
a.contract_name contractName,
a.contract_term contractType,
a.CONTRACT_SUB_NAME contractSubName,
a.CONTRACT_SUB_NAME contractSubName,
null reason,
null reason,
a.signatory contractParty,
a.signatory contractParty,
...
@@ -501,8 +498,8 @@
...
@@ -501,8 +498,8 @@
null remark,
null remark,
a.sign_type signType,
a.sign_type signType,
null changeContractAndEmployee,
null changeContractAndEmployee,
if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD)
as tryPeriod,
'无'
as tryPeriod,
a.id preId,a.contract_id contractId,
a.id pre
New
Id,a.contract_id contractId,
if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
FROM t_employee_contract_pre_new a,(select @i:=0) as itable
FROM t_employee_contract_pre_new a,(select @i:=0) as itable
<where>
<where>
...
@@ -525,4 +522,136 @@
...
@@ -525,4 +522,136 @@
FROM t_employee_contract_pre_new a
FROM t_employee_contract_pre_new a
where a.process_status in('3','4','7') and (a.expected_collection_time is null or a.expected_collection_time
<![CDATA[ <= ]]>
now())
where a.process_status in('3','4','7') and (a.expected_collection_time is null or a.expected_collection_time
<![CDATA[ <= ]]>
now())
</select>
</select>
<!--tEmployeeContractPreNew简单分页查询-->
<select
id=
"getDetailList"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo"
>
SELECT
a.id,
a.dept_name,
a.dept_no,
a.dept_id,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.employee_nature,
a.position,
a.customer_username,
a.customer_user_loginname,
a.sign_type,
a.contract_content,
a.fadada_template,
a.data_source,
a.process_status,
a.config_name,
a.update_flag,
a.contract_type,
a.signatory,
a.expected_confirm_time,
a.expected_collection_time,
a.situation,
a.contract_term,
case when a.CONTRACT_TYPE = 5 then a.internship_period_start
else a.contract_start end as "CONTRACT_START",
case when a.CONTRACT_TYPE = 5 then a.internship_period_end
else a.contract_end end as "CONTRACT_END",
a.post_type,
a.post,
a.working_dept,
a.work_address,
a.working_hours,
a.salary_type,
a.other_wage,
a.default_amount,
a.contract_duration_year,
a.contract_duration_month,
a.labor_cost,
a.risk_buy_desc,
a.salary_standard_per_hour,
a.salary_standard_per_piece,
a.config_id,
a.work_type,
a.work_day_count,
a.work_day,
a.work_hours,
a.settlement_cycle,
a.payment_time,
a.payment_type,
a.working_company,
a.dispatch_period_year,
a.dispatch_period_month,
a.dispatch_period_start,
a.dispatch_period_end,
a.other_work_day,
a.internship_period,
a.internship_period_start,
a.internship_period_end,
a.sign_flag,
a.error_info,
a.contract_id,
a.revoke_reason,
a.error_time,
a.contract_end_type,
a.confirm_emp_select,
a.timeout_elec_sign,
a.task,
a.task_type,
a.task_end_standard,
a.contract_flag,
a.CONTRACT_SUB_NAME,
a.fadada_template_id,
a.request_id,
a.request_msg,
a.over_flag,
a.change_type_reason,
a.change_type_user,
a.change_type_time,
a.is_urg,
a.working_reward,
a.update_time,
a.create_by,
a.create_name,
a.create_time,
a.update_by,
b.CONTRACT_START as "CONTRACT_START_PRE",
b.CONTRACT_END as "CONTRACT_END_PRE"
FROM t_employee_contract_pre_new a
LEFT JOIN t_employee_contract_info b on b.id=a.contract_id
<where>
1=1 AND (a.expected_collection_time is null or a.expected_collection_time
<![CDATA[ <= ]]>
concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if
test=
"tEmployeeContractPreNew != null"
>
<if
test=
"tEmployeeContractPreNew.statusList != null and tEmployeeContractPreNew.statusList.size>0"
>
AND a.process_status IN
<foreach
collection=
"tEmployeeContractPreNew.statusList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"tEmployeeContractPreNew.customerUserLoginname != null and tEmployeeContractPreNew.customerUserLoginname.trim() != ''"
>
AND a.customer_user_loginname = #{tEmployeeContractPreNew.customerUserLoginname}
</if>
</if>
<include
refid=
"tEmployeeContractPreNew_where"
/>
</where>
limit 2000
</select>
<select
id=
"getDetailListCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_employee_contract_pre_new a
<where>
1=1 AND (a.expected_collection_time is null or a.expected_collection_time
<![CDATA[ <= ]]>
concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if
test=
"tEmployeeContractPreNew != null"
>
<if
test=
"tEmployeeContractPreNew.statusList != null and tEmployeeContractPreNew.statusList.size>0"
>
AND a.process_status IN
<foreach
collection=
"tEmployeeContractPreNew.statusList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"tEmployeeContractPreNew.customerUserLoginname != null and tEmployeeContractPreNew.customerUserLoginname.trim() != ''"
>
AND a.customer_user_loginname = #{tEmployeeContractPreNew.customerUserLoginname}
</if>
</if>
<include
refid=
"tEmployeeContractPreNew_where"
/>
</where>
</select>
</mapper>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/ArchiveTask.java
View file @
35ed9bc1
...
@@ -182,4 +182,68 @@ public class ArchiveTask {
...
@@ -182,4 +182,68 @@ public class ArchiveTask {
log
.
info
(
"-------------每日定时获取法大大模板和详情-定时任务结束------------"
);
log
.
info
(
"-------------每日定时获取法大大模板和详情-定时任务结束------------"
);
}
}
/**
* @Author fxj
* @Description 每天15、15:20 续签待办发起电子签自动发起任务
* @Date 15:25 2026/2/24
**/
public
void
pushDisConfrimContractsNew
()
{
log
.
info
(
"-------------每天11、15.00、15.20点续签待办发起电子签自动发起任务--定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeecontractprenew/inner/pushDisConfrimContracts"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每天11、15.00、15.20点续签待办发起电子签自动发起任务--定时任务截止------------"
);
}
/**
* @Author fxj
* @Description 每日晚23:00自动撤销超时电子签署任务(当前时间正好为合同开始日期一个月的数据)
* @Date 15:25 2026/2/24
**/
public
void
autoRevokeElectronicSign
()
{
log
.
info
(
"-------------每日晚23:00自动撤销超时电子签署任务--定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeecontractprenew/inner/autoRevokeElectronicSign"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每日晚23:00自动撤销超时电子签署任务--定时任务截止------------"
);
}
/**
* @Author fxj
* @Description 每日早9点通知前端客服前一日撤销电子签署情况
* @Date 15:25 2026/2/24
**/
public
void
notifyRevokedElectronicSign
()
{
log
.
info
(
"-------------每日早9点通知前端客服前一日撤销电子签署情况--定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeecontractprenew/inner/notifyRevokedElectronicSign"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每日早9点通知前端客服前一日撤销电子签署情况--定时任务截止------------"
);
}
/**
* @Author fxj
* @Description 每日早9点电子签合同即将超期提醒
* @Date 15:25 2026/2/24
**/
public
void
electronicSignExpiringReminder
()
{
log
.
info
(
"-------------每日早9点电子签合同即将超期提醒--定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeecontractprenew/inner/electronicSignExpiringReminder"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每日早9点电子签合同即将超期提醒--定时任务截止------------"
);
}
/**
* @Author fxj
* @Description 每日9点统一推送续签确认信息
* @Date 15:25 2026/2/24
**/
public
void
pushWxConfrimMessage
()
{
log
.
info
(
"-------------每日9点统一推送续签确认信息--定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeecontractprenew/inner/pushWxConfrimMessage"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每日9点统一推送续签确认信息--定时任务截止------------"
);
}
}
}
\ No newline at end of file
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