Commit ec3b01b2 authored by fangxinjiang's avatar fangxinjiang

合同续签-fxj

parent 7e38887d
...@@ -61,6 +61,14 @@ public class TContractAutoLog extends BaseEntity { ...@@ -61,6 +61,14 @@ public class TContractAutoLog extends BaseEntity {
@ExcelProperty("入职日期") @ExcelProperty("入职日期")
@Schema(description = "入职日期") @Schema(description = "入职日期")
private Date joinLeaveDate; private Date joinLeaveDate;
/**
* 合同开始日期
*/
@ExcelAttribute(name = "合同开始日期", isDate = true)
@ExcelProperty("合同开始日期")
@Schema(description = "合同开始日期")
private Date contractStartDate;
/** /**
* 手机号码 * 手机号码
*/ */
......
...@@ -321,6 +321,7 @@ public class TEmpContractAlert extends BaseEntity { ...@@ -321,6 +321,7 @@ public class TEmpContractAlert extends BaseEntity {
/** /**
* 预计合同发起时间 * 预计合同发起时间
*/ */
@TableField(exist = false)
@ExcelAttribute(name = "预计合同发起时间" ) @ExcelAttribute(name = "预计合同发起时间" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("预计合同发起时间") @ExcelProperty("预计合同发起时间")
...@@ -329,6 +330,7 @@ public class TEmpContractAlert extends BaseEntity { ...@@ -329,6 +330,7 @@ public class TEmpContractAlert extends BaseEntity {
/** /**
* 签署方式:1线下签0电子签 * 签署方式:1线下签0电子签
*/ */
@TableField(exist = false)
@ExcelAttribute(name = "签署方式" ) @ExcelAttribute(name = "签署方式" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("签署方式") @ExcelProperty("签署方式")
...@@ -338,15 +340,17 @@ public class TEmpContractAlert extends BaseEntity { ...@@ -338,15 +340,17 @@ public class TEmpContractAlert extends BaseEntity {
/** /**
* 续签状态:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署 * 续签状态:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署
*/ */
@TableField(exist = false)
@ExcelAttribute(name = "续签状态" ) @ExcelAttribute(name = "续签状态" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("续签状态") @ExcelProperty("续签状态")
@Schema(description = "签署方式:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署") @Schema(description = "签署方式:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署-客服撤销 11撤销签署-系统自动撤销")
private Integer processStatus; private Integer processStatus;
/** /**
* 前端客服 * 前端客服
*/ */
@TableField(exist = false)
@ExcelAttribute(name = "前端客服" ) @ExcelAttribute(name = "前端客服" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("前端客服") @ExcelProperty("前端客服")
...@@ -356,6 +360,7 @@ public class TEmpContractAlert extends BaseEntity { ...@@ -356,6 +360,7 @@ public class TEmpContractAlert extends BaseEntity {
/** /**
* 前端客服 * 前端客服
*/ */
@TableField(exist = false)
@ExcelAttribute(name = "前端客服" ) @ExcelAttribute(name = "前端客服" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("前端客服") @ExcelProperty("前端客服")
......
...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
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.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
...@@ -148,12 +149,12 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -148,12 +149,12 @@ public class TEmployeeContractPreNew extends BaseEntity {
@Schema(description = "签署方式1线下签0电子签") @Schema(description = "签署方式1线下签0电子签")
private String signType; private String signType;
/** /**
* 合同签订内容:0自定义、上一份合同 * 合同签订内容:0项目配置、1自定义、2上一份合同
*/ */
@ExcelAttribute(name = "合同签订内容", maxLength = 100) @ExcelAttribute(name = "合同签订内容", maxLength = 100)
@Length(max = 100, message = "合同签订内容同不能超过100个字符") @Length(max = 100, message = "合同签订内容同不能超过100个字符")
@ExcelProperty("合同签订内容") @ExcelProperty("合同签订内容")
@Schema(description = "合同签订内容:0自定义、上一份合同") @Schema(description = "合同签订内容:0项目配置、1自定义、2上一份合同")
private String contractContent; private String contractContent;
/** /**
* 法大大模版名称 * 法大大模版名称
...@@ -177,7 +178,7 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -177,7 +178,7 @@ public class TEmployeeContractPreNew extends BaseEntity {
@ExcelAttribute(name = "续签状态", maxLength = 2) @ExcelAttribute(name = "续签状态", maxLength = 2)
@Length(max = 2, message = "续签状态不能超过2个字符") @Length(max = 2, message = "续签状态不能超过2个字符")
@ExcelProperty("续签状态") @ExcelProperty("续签状态")
@Schema(description = "续签状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署") @Schema(description = "续签状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署-客服撤销 11撤销签署-系统自动撤销")
private String processStatus; private String processStatus;
/** /**
* 配置名称 * 配置名称
...@@ -248,6 +249,16 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -248,6 +249,16 @@ public class TEmployeeContractPreNew extends BaseEntity {
@ExcelProperty("合同开始日期") @ExcelProperty("合同开始日期")
@Schema(description = "合同开始日期") @Schema(description = "合同开始日期")
private Date contractStart; private Date contractStart;
/**
* 合同截止日期类型
*/
@ExcelAttribute(name = "合同截止日期类型", maxLength = 1)
@Length(max = 1, message = "合同截止日期类型不能超过1个字符")
@ExcelProperty("合同截止日期类型")
@Schema(description = "合同截止日期类型: 0 合同年限推算 1 同商务合同一致 2 工作任务完成时止 3 指定日期 ")
private String contractEndType;
/** /**
* 合同截止日期 * 合同截止日期
*/ */
...@@ -335,36 +346,7 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -335,36 +346,7 @@ public class TEmployeeContractPreNew extends BaseEntity {
@ExcelProperty("合同年限-月") @ExcelProperty("合同年限-月")
@Schema(description = "合同年限-月") @Schema(description = "合同年限-月")
private String contractDurationMonth; private String contractDurationMonth;
/**
* 合同试用期开始时间-续签无,冗余
*/
@ExcelAttribute(name = "合同试用期开始时间", isDate = true)
@ExcelProperty("合同试用期开始时间")
@Schema(description = "合同试用期开始时间-续签无,冗余")
private Date tryPeriodStart;
/**
* 合同试用期结束时间-续签无,冗余
*/
@ExcelAttribute(name = "合同试用期结束时间", isDate = true)
@ExcelProperty("合同试用期结束时间")
@Schema(description = "合同试用期结束时间-续签无,冗余")
private Date tryPeriodEnd;
/**
* 是否有试用期 0是1否-续签无,冗余
*/
@ExcelAttribute(name = "是否有试用期", maxLength = 1)
@Length(max = 1, message = "是否有试用期不能超过1个字符")
@ExcelProperty("是否有试用期")
@Schema(description = "是否有试用期 0是1否-续签无,冗余")
private String tryPeriodType;
/**
* 试用期(单位月)-续签无,冗余
*/
@ExcelAttribute(name = "试用期(单位月)", maxLength = 5)
@Length(max = 5, message = "试用期(单位月)不能超过5个字符")
@ExcelProperty("试用期(单位月)")
@Schema(description = "试用期(单位月)-续签无,冗余")
private String tryPeriod;
/** /**
* 劳务费(元/月) * 劳务费(元/月)
*/ */
...@@ -561,6 +543,14 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -561,6 +543,14 @@ public class TEmployeeContractPreNew extends BaseEntity {
@ExcelProperty("撤销签署原因") @ExcelProperty("撤销签署原因")
@Schema(description = "撤销签署原因") @Schema(description = "撤销签署原因")
private String revokeReason; private String revokeReason;
/**
* 撤销签署时间
*/
@ExcelAttribute(name = "撤销签署时间")
@ExcelProperty("撤销签署时间")
@Schema(description = "撤销签署时间")
private Date revokeTime;
/** /**
* 发起失败时间 * 发起失败时间
*/ */
...@@ -568,14 +558,7 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -568,14 +558,7 @@ public class TEmployeeContractPreNew extends BaseEntity {
@ExcelProperty("发起失败时间") @ExcelProperty("发起失败时间")
@Schema(description = "发起失败时间") @Schema(description = "发起失败时间")
private Date errorTime; private Date errorTime;
/**
* 合同截止日期类型
*/
@ExcelAttribute(name = "合同截止日期类型", maxLength = 1)
@Length(max = 1, message = "合同截止日期类型不能超过1个字符")
@ExcelProperty("合同截止日期类型")
@Schema(description = "合同截止日期类型")
private String contractEndType;
/** /**
* 入职确认选择 0 配置方案内选择、1 自定义 2 配置方案+自定义 * 入职确认选择 0 配置方案内选择、1 自定义 2 配置方案+自定义
*/ */
...@@ -705,4 +688,32 @@ public class TEmployeeContractPreNew extends BaseEntity { ...@@ -705,4 +688,32 @@ public class TEmployeeContractPreNew extends BaseEntity {
@Schema(description = "试用期工资(元/月)") @Schema(description = "试用期工资(元/月)")
private String workingReward; private String workingReward;
// 紧急联系人表
@TableField(exist = false)
@ExcelAttribute(name = "紧急联系人")
private String contactEmpName;
@TableField(exist = false)
@ExcelAttribute(name = "紧急联系人电话")
private String contactTel;
// relationProvince,relationCity,relationTown
// address
@TableField(exist = false)
@ExcelAttribute(name = "紧急联系人地址")
private String contactAddress;
// 电子签推送需要的新字段:——START
@TableField(exist = false)
@ExcelAttribute(name = "户籍所在地")
private String huArea;
// contactProvince,contactCity,contactTown,
// contactAddress
@TableField(exist = false)
@ExcelAttribute(name = "通讯地址")
private String contactArea;
@TableField(exist = false)
@ExcelAttribute(name = "邮箱")
private String empEmail;
} }
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.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
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 ContractAlertConfirmVo implements Serializable {
/**
* 员工名称
*/
@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 empPhone;
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型" )
@Schema(description ="员工类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
/**
* 合同类型
*/
@ExcelAttribute(name = "合同类型" )
@Schema(description ="合同类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同类型")
private String contractType;
/**
* 合同开始日期
*/
@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 String fileProvince;
/**
* 档案地-市
*/
@ExcelAttribute(name = "档案地-市" )
@Schema(description ="档案地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案地-市")
private String fileCity;
/**
* 档案地-县
*/
@ExcelAttribute(name = "档案地-县" )
@Schema(description ="档案地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案地-县")
private String fileTown;
/**
* 合同ID
*/
@ExcelAttribute(name = "合同ID" , isExport = false)
@Schema(description ="合同ID")
@ExcelIgnore
private String contractId;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Description 获取合同续签待办的 续签提醒数据、续签确认数据、新续签合同信息
* @Date 16:54 2026/2/11
* @Param
* @return
**/
@Data
public class EmpContractRenewVO implements Serializable {
private static final long serialVersionUID = 1L;
//合同续签提醒数据
private TEmpContractAlert empContractAlert;
//新续签合同信息
private TEmployeeContractInfo contractInfo;
//续签确认数据
private TEmployeeContractPreNew contractPreNew;
}
...@@ -20,6 +20,10 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -20,6 +20,10 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreHistory;
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 com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
...@@ -34,13 +38,11 @@ import java.io.Serializable; ...@@ -34,13 +38,11 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* 项目档案表excel对应的实体 * @Author fxj
* * @Description 人员手机号、项目信息、提醒对应合同信息、提醒对应合同的电子签信息
* @author huyc * @Date 17:32 2026/2/11
* @date 2022-06-20 17:54:40 **/
*/
@Data @Data
@ColumnWidth(30)
public class EmpProjectVO extends RowIndex implements Serializable { public class EmpProjectVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -48,35 +50,27 @@ public class EmpProjectVO extends RowIndex implements Serializable { ...@@ -48,35 +50,27 @@ public class EmpProjectVO extends RowIndex implements Serializable {
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理)
*/ */
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE) @ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型") @ExcelProperty(value ="员工类型")
private String empNatrue; private String empNatrue;
/** /**
* 员工姓名 * 员工姓名
*/ */
@NotNull(message = "员工姓名不能为空")
@ExcelAttribute(name = "员工姓名",isNotEmpty = true, errorInfo = "员工姓名不能为空",maxLength = 20) @ExcelAttribute(name = "员工姓名",isNotEmpty = true, errorInfo = "员工姓名不能为空",maxLength = 20)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工姓名") @ExcelProperty(value ="员工姓名")
private String empName; private String empName;
/** /**
* 身份证号码 * 身份证号码
*/ */
@NotNull(message = "身份证号不能为空")
@ExcelAttribute(name = "身份证号",isNotEmpty = true, errorInfo = "身份证号不能为空",maxLength = 20) @ExcelAttribute(name = "身份证号",isNotEmpty = true, errorInfo = "身份证号不能为空",maxLength = 20)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="身份证号") @ExcelProperty(value ="身份证号")
private String empIdcard; private String empIdcard;
/** /**
* 项目编码 * 项目编码
*/ */
@NotNull(message = "项目编码不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="项目编码") @ExcelProperty(value ="项目编码")
@ExcelAttribute(name = "项目编码",isNotEmpty = true, errorInfo = "项目编码不能为空",maxLength = 20) @ExcelAttribute(name = "项目编码",isNotEmpty = true, errorInfo = "项目编码不能为空",maxLength = 20)
private String deptNo; private String deptNo;
...@@ -85,18 +79,24 @@ public class EmpProjectVO extends RowIndex implements Serializable { ...@@ -85,18 +79,24 @@ public class EmpProjectVO extends RowIndex implements Serializable {
* 项目名称 * 项目名称
*/ */
@ExcelAttribute(name = "项目名称", maxLength = 50) @ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称") @ExcelProperty("项目名称")
@Schema(description = "项目名称") @Schema(description = "项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
private String departName; private String departName;
/** /**
* 手机号码 * 手机号码
*/ */
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "手机号码") @ExcelProperty(value = "手机号码")
@Size(max = 11, message = "手机号码不可超过11位") @Size(max = 11, message = "手机号码不可超过11位")
private String empPhone; private String empPhone;
/**
* 合同信息
*/
@ExcelProperty(value = "合同信息")
private TEmployeeContractInfo contractInfo;
//自动化合同续签确认信息
private TEmployeeContractPreNew preNew;
//自动化合同新签信息
private TEmployeeContractPreHistory pre;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo; 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.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
...@@ -296,11 +291,11 @@ public class TEmpContractAlertExportVo { ...@@ -296,11 +291,11 @@ public class TEmpContractAlertExportVo {
/** /**
* 续签状态:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署 * 续签状态:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署
*/ */
@ExcelAttribute(name = "续签状态", isDataId = true, readConverterExp = "0=待确认,1=待发起,2=线待审核,3=审核不通过,4=线下签待归档,5=发起失败,6=签署中,7=签署失败,8=电子待归档,9=已归档,10=撤销签署") @ExcelAttribute(name = "续签状态", readConverterExp = "0=待确认,1=待发起,2=线待审核,3=审核不通过,4=线下签待归档,5=发起失败,6=签署中,7=签署失败,8=电子待归档,9=已归档,10=撤销签署-客服撤销 11=撤销签署-系统自动撤销")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("续签状态") @ExcelProperty("续签状态")
@Schema(description = "签署方式:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署") @Schema(description = "签署方式:0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署-客服撤销 11撤销签署-系统自动撤销")
private Integer processStatus; private String processStatus;
/** /**
* 预计合同发起时间 * 预计合同发起时间
*/ */
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 合同续签确认信息--批量发起明细 系统会自动拉取当前前端客服+“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息;
*
* @author fxj
* @date 2026-02-05 15:45:40
*/
@Data
public class TEmployeeContractPreNewDetailVo {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 30)
@NotBlank(message = "项目编码不能为空")
@Length(max = 30, message = "项目编码不能超过30个字符")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目id
*/
@ExcelAttribute(name = "项目id", maxLength = 36)
@Length(max = 36, message = "项目id不能超过36个字符")
@ExcelProperty("项目id")
@Schema(description = "项目id")
private String deptId;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", maxLength = 30)
@Length(max = 30, message = "员工姓名不能超过30个字符")
@ExcelProperty("员工姓名")
@Schema(description = "员工姓名")
private String employeeName;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 18)
@NotBlank(message = "身份证号不能为空")
@Length(max = 18, message = "身份证号不能超过18个字符")
@ExcelProperty("身份证号")
@Schema(description = "身份证号")
private String empIdcard;
/**
* 上一份合同起止日期
*/
@ExcelAttribute(name = "上一份合同起止日期", isDate = true)
@ExcelProperty("上一份合同起止日期")
@Schema(description = "上一份合同起止日期")
private String lastContractDate;
/**
* 就职岗位
*/
@ExcelAttribute(name = "就职岗位", maxLength = 50)
@Length(max = 50, message = "就职岗位不能超过50个字符")
@ExcelProperty("就职岗位")
@Schema(description = "就职岗位")
private String position;
/**
* 合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同
*/
@ExcelAttribute(name = "合同类型", maxLength = 8)
@Length(max = 8, message = "合同类型不能超过8个字符")
@ExcelProperty("合同类型")
@Schema(description = "合同类型 标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同")
private String contractType;
/**
* 签署甲方
*/
@ExcelAttribute(name = "签署甲方", maxLength = 50)
@Length(max = 50, message = "签署甲方不能超过50个字符")
@ExcelProperty("签署甲方")
@Schema(description = "签署甲方")
private String signatory;
/**
* 签署方式1线下签0电子签
*/
@ExcelAttribute(name = "签署方式", maxLength = 1)
@Length(max = 1, message = "签署方式不能超过1个字符")
@ExcelProperty("签署方式")
@Schema(description = "签署方式1线下签0电子签")
private String signType;
/**
* 合同开始日期
*/
@ExcelAttribute(name = "合同开始日期", isDate = true)
@ExcelProperty("合同开始日期")
@Schema(description = "合同开始日期")
private Date contractStart;
/**
* 合同截止日期
*/
@ExcelAttribute(name = "合同截止日期", isDate = true)
@ExcelProperty("合同截止日期")
@Schema(description = "合同截止日期")
private Date contractEnd;
}
...@@ -16,11 +16,13 @@ ...@@ -16,11 +16,13 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
/** /**
* 合同续签预派单信息 * 合同续签预派单信息
...@@ -55,4 +57,8 @@ public class TEmployeeContractPreNewSearchVo extends TEmployeeContractPreNew { ...@@ -55,4 +57,8 @@ public class TEmployeeContractPreNewSearchVo extends TEmployeeContractPreNew {
@Schema(description = "查询limit 数据条数") @Schema(description = "查询limit 数据条数")
private int limitEnd; private int limitEnd;
@Schema(description = "处理状态数组")
@TableField(exist = false)
private List<String> statusList;
} }
...@@ -20,6 +20,8 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -20,6 +20,8 @@ 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.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -40,7 +42,7 @@ import java.util.List; ...@@ -40,7 +42,7 @@ import java.util.List;
* @date 2026-02-05 15:45:40 * @date 2026-02-05 15:45:40
*/ */
@Data @Data
public class TEmployeeContractPreNewVo implements Serializable { public class TEmployeeContractPreNewVo extends TEmployeeContractPreNew implements Serializable {
/** /**
* id * id
...@@ -147,12 +149,12 @@ public class TEmployeeContractPreNewVo implements Serializable { ...@@ -147,12 +149,12 @@ public class TEmployeeContractPreNewVo implements Serializable {
@Schema(description = "签署方式1线下签0电子签") @Schema(description = "签署方式1线下签0电子签")
private String signType; private String signType;
/** /**
* 合同签订内容:0自定义、上一份合同 * 合同签订内容:0项目配置、1自定义、2上一份合同
*/ */
@ExcelAttribute(name = "合同签订内容", maxLength = 100) @ExcelAttribute(name = "合同签订内容", maxLength = 100)
@Length(max = 100, message = "合同签订内容同不能超过100个字符") @Length(max = 100, message = "合同签订内容同不能超过100个字符")
@ExcelProperty("合同签订内容") @ExcelProperty("合同签订内容")
@Schema(description = "合同签订内容:0自定义、上一份合同") @Schema(description = "合同签订内容:0项目配置、1自定义、2上一份合同")
private String contractContent; private String contractContent;
/** /**
* 法大大模版名称 * 法大大模版名称
...@@ -287,12 +289,12 @@ public class TEmployeeContractPreNewVo implements Serializable { ...@@ -287,12 +289,12 @@ public class TEmployeeContractPreNewVo implements Serializable {
@Schema(description = "工作地点") @Schema(description = "工作地点")
private String workAddress; private String workAddress;
/** /**
* 工时制 0 标准工时 1综合工时 2 不定时工时制 * 工时制 1标准工时 2 综合工时 3不定时工时制
*/ */
@ExcelAttribute(name = "工时制 ", maxLength = 1) @ExcelAttribute(name = "工时制 ", maxLength = 1)
@Length(max = 1, message = "工时制不能超过1个字符") @Length(max = 1, message = "工时制不能超过1个字符")
@ExcelProperty("工时制 ") @ExcelProperty("工时制 ")
@Schema(description = "工时制 0 标准工时 1综合工时 2 不定时工时制") @Schema(description = "工时制:1标准工时 2 综合工时 3不定时工时制 4其他")
private String workingHours; private String workingHours;
/** /**
* 工资形式 1.计时工资 2.计件工资 3.其他 * 工资形式 1.计时工资 2.计件工资 3.其他
......
...@@ -90,4 +90,20 @@ public class EmployeeConstants { ...@@ -90,4 +90,20 @@ public class EmployeeConstants {
**/ **/
public static final String CONTRACT_NAME[] = {"标准合同","劳务派遣合同","其他"}; public static final String CONTRACT_NAME[] = {"标准合同","劳务派遣合同","其他"};
/**
* 未找到合同信息
**/
public static final String DATA_CAN_NOT_FOUND = "未找到合同信息!";
/**
* 合同起止日期与被续签合同日期重叠
**/
public static final String DATA_CONTRACT_OVERLAP = "合同起止日期与被续签合同日期重叠!";
/**
* 系统自动撤销签署必须走线下签
**/
public static final String DATA_CONTRACT_CANCEL_MUST_OFFLINE_SIGN = "系统自动撤销签署必须走线下签!";
} }
...@@ -128,6 +128,19 @@ public class FascController { ...@@ -128,6 +128,19 @@ public class FascController {
return fascService.submitContract(id); return fascService.submitContract(id);
} }
/**
* @Author fxj
* @Description 自动化待办续签:发起电子签署
* @Date 9:40 2026/2/11
* @Param 合同待签订任务记录表TEmployeeContractPreNew:id
* @return
**/
@Operation(description = "自动化待办续签:发起电子签署")
@GetMapping("/submitContractRenew")
public R<String> submitContractRenew(@RequestParam String id) throws ApiException {
return fascService.submitContractRenew(id);
}
/** /**
* @param id 合同待签订任务记录表TEmployeeContractPre:id * @param id 合同待签订任务记录表TEmployeeContractPre:id
* @Description: 撤销签署 * @Description: 撤销签署
...@@ -140,7 +153,18 @@ public class FascController { ...@@ -140,7 +153,18 @@ public class FascController {
public R<String> cancelTask(@RequestParam String id) throws ApiException { public R<String> cancelTask(@RequestParam String id) throws ApiException {
return fascService.cancelTask(id); return fascService.cancelTask(id);
} }
/**
* @Author fxj
* @Description 自动化待办续签:撤销签署
* @Date 9:41 2026/2/11
* @Param id 合同待签订任务记录表TEmployeeContractPreNew:id
* @return
**/
@Operation(description = "自动化待办续签:撤销签署")
@GetMapping("/cancelTaskRenew")
public R<String> cancelTaskRenew(@RequestParam String id) throws ApiException {
return fascService.cancelTaskRenew(id);
}
/** /**
* @param id 合同待签订任务记录表TEmployeeContractPre:id * @param id 合同待签订任务记录表TEmployeeContractPre:id
* @Description: 催办 * @Description: 催办
...@@ -154,6 +178,19 @@ public class FascController { ...@@ -154,6 +178,19 @@ public class FascController {
return fascService.urgeTask(id); return fascService.urgeTask(id);
} }
/**
* @Author fxj
* @Description
* @Date 9:42 2026/2/11
* @Param 合同待签订任务记录表TEmployeeContractPreNew:id
* @return
**/
@Operation(description = "自动化待办续签:催办")
@GetMapping("/urgeTaskRenew")
public R<String> urgeTaskRenew(@RequestParam String id) throws ApiException {
return fascService.urgeTaskRenew(id);
}
/** /**
* @param id 合同待签订任务记录表TEmployeeContractPre:id * @param id 合同待签订任务记录表TEmployeeContractPre:id
* @Description: 获取附件 * @Description: 获取附件
...@@ -167,6 +204,19 @@ public class FascController { ...@@ -167,6 +204,19 @@ public class FascController {
fascService.getFileByRequestId(id); fascService.getFileByRequestId(id);
return R.ok(); return R.ok();
} }
/**
* @Author fxj
* @Description 获取附件
* @Date 19:37 2026/2/10
* @Param id 合同待签订任务记录表TEmployeeContractPreNew:id
* @return
**/
@Operation(description = "自动化待办续签获取附件")
@GetMapping("/getRenewFileByRequestId")
public R<String> getRenewFileByRequestId(@RequestParam String id) throws ApiException {
fascService.getFileByRequestIdRenew(id);
return R.ok();
}
@Operation(summary = "异步通知", description = "异步通知") @Operation(summary = "异步通知", description = "异步通知")
@RequestMapping(value = "/api/fascCallback") @RequestMapping(value = "/api/fascCallback")
......
...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAlertUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -44,6 +41,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -44,6 +41,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -69,12 +67,29 @@ public class TEmpContractAlertController { ...@@ -69,12 +67,29 @@ public class TEmpContractAlertController {
*/ */
@Operation(description = "自动化合同续签待办查询") @Operation(description = "自动化合同续签待办查询")
@GetMapping("/autoPage") @GetMapping("/autoPage")
public R<IPage<TEmpContractAlert>> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert) { public R<IPage<ContractAlertAutoVo>> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert) {
//默认开启自动化的 //默认开启自动化的
tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING); tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING);
return R.ok(tEmpContractAlertService.getTEmpContractAlertAutoPage(page,tEmpContractAlert)); return R.ok(tEmpContractAlertService.getTEmpContractAlertAutoPage(page,tEmpContractAlert));
} }
/**
* 自动化合同续签待办查询
* @param tEmpContractAlert 自动化合同续签待办查询
* @return
*/
@Operation(description = "自动化合同续签待办查询")
@GetMapping("/autoRenewForConfirm")
public R<List<ContractAlertConfirmVo>> getAutoRenewForConfirm(ContractAlertSearchVo tEmpContractAlert) {
//默认开启自动化的
tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING);
//默认查询待确认的信息
List<String> processStatusList = new ArrayList<>();
processStatusList.add(CommonConstants.ZERO_STRING);
tEmpContractAlert.setProcessStatusList(processStatusList);
return tEmpContractAlertService.getAutoRenewForConfirm(tEmpContractAlert);
}
/** /**
* @Author fxj * @Author fxj
* @Description 自动化合同续签待办数量 * @Description 自动化合同续签待办数量
...@@ -334,4 +349,15 @@ public class TEmpContractAlertController { ...@@ -334,4 +349,15 @@ public class TEmpContractAlertController {
public R<EmpProjectVO> getProjectInfoByContractId(@RequestParam("id" ) String id) { public R<EmpProjectVO> getProjectInfoByContractId(@RequestParam("id" ) String id) {
return R.ok(tEmpContractAlertService.getProjectInfoByContractId(id)); return R.ok(tEmpContractAlertService.getProjectInfoByContractId(id));
} }
/**
* @Author fxj
* @Description 通过合同提醒ID查询合同提醒信息、确认接收信息、新增续签合同信息
* @Date 16:53 2026/2/11
**/
@Operation(summary = "通过合同提醒ID查询合同提醒信息、确认接收信息、新增续签合同信息", description = "通过合同提醒ID查询合同提醒信息、确认接收信息、新增续签合同信息")
@GetMapping("/getAllRenewInfoById" )
public R<EmpContractRenewVO> getAllRenewInfoById(@RequestParam("id" ) String id) {
return tEmpContractAlertService.getAllRenewInfoById(id);
}
} }
...@@ -18,25 +18,22 @@ ...@@ -18,25 +18,22 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller; package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreNewService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreNewService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistRevokeVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewSearchVo;
import lombok.SneakyThrows; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewVo;
import org.springframework.security.access.prepost.PreAuthorize; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
...@@ -70,6 +67,19 @@ public class TEmployeeContractPreNewController { ...@@ -70,6 +67,19 @@ public class TEmployeeContractPreNewController {
return new R<>(tEmployeeContractPreNewService.getTEmployeeContractPreNewPage(page, tEmployeeContractPreNew)); return new R<>(tEmployeeContractPreNewService.getTEmployeeContractPreNewPage(page, tEmployeeContractPreNew));
} }
/**
* 简单分页查询--批量发起选择数据 最大2000条
* 系统会自动拉取当前客服且“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息;
*
* @param tEmployeeContractPreNew 合同续签预派单信息
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/getDetailList")
public R<List<TEmployeeContractPreNewDetailVo>> getDetailList( TEmployeeContractPreNewSearchVo tEmployeeContractPreNew) {
return tEmployeeContractPreNewService.getDetailList(tEmployeeContractPreNew);
}
/** /**
* 不分页查询 * 不分页查询
* *
...@@ -175,4 +185,129 @@ public class TEmployeeContractPreNewController { ...@@ -175,4 +185,129 @@ public class TEmployeeContractPreNewController {
public R batchConfirmReceive(@RequestBody TEmployeeContractPreNewVo preVo) { public R batchConfirmReceive(@RequestBody TEmployeeContractPreNewVo preVo) {
return tEmployeeContractPreNewService.batchCconfirmRenewalContract(preVo); return tEmployeeContractPreNewService.batchCconfirmRenewalContract(preVo);
} }
/**
* 合同续签待签订信息单个/批量发起签署任务
* @param idList id数组
**/
@Operation(description = "合同续签待签订信息单个/批量发起签署任务")
@PostMapping("/dispatcherContract")
public R dispatcherContract(@RequestBody List<String> idList) {
return tEmployeeContractPreNewService.dispatcherContract(idList,"1");
}
/**
* 合同待签订撤销签署
* @param registRevokeVoList 撤销合同数组
**/
@Operation(description = "合同待签订撤销签署")
@PostMapping("/revokeSign")
public R revokeSign(@RequestBody List<TEmployeeAutoRegistRevokeVo> registRevokeVoList) {
return tEmployeeContractPreNewService.revokeSign(registRevokeVoList);
}
/**
* 每天11点15点/15点20推送待派单数据 --- 工作日
* 会将发起失败、签署失败、审核不通过的“预计合同发起时间”为当日及之前日期的(空白的不在)合同续签任务自动尝试发起
* @author huych
* @date 2025-06-16 14:18:26
* @return void
*/
@SysLog("每天11、15、15:20 发起电子签自动发起任务")
@Inner
@PostMapping("/inner/pushDisConfrimContracts")
public void pushDisConfrimContracts() {
tEmployeeContractPreNewService.pushDisConfrimContracts();
}
/**
* @Author fxj
* @Description 每日晚23:00自动撤销超时电子签署任务(当前时间超出当前合同开始日期一个月的数据)
* @Date 18:06 2026/2/10
**/
@Inner
@PostMapping("/inner/autoRevokeElectronicSign")
public R autoRevokeElectronicSign() {
return tEmployeeContractPreNewService.autoRevokeElectronicSign();
}
/**
* @Author fxj
* @Description 每日早9点通知前端客服前一日撤销电子签署情况
* @Date 18:42 2026/2/10
**/
@Inner
@PostMapping("/inner/notifyRevokedElectronicSign")
public R notifyRevokedElectronicSign() {
return tEmployeeContractPreNewService.notifyRevokedElectronicSign();
}
/**
* @Author fxj
* @Description 每日早9点电子签合同即将超期提醒
* @Date 19:08 2026/2/10
**/
@Inner
@PostMapping("/inner/electronicSignExpiringReminder")
public R electronicSignExpiringReminder() {
return tEmployeeContractPreNewService.electronicSignExpiringReminder();
}
/**
* @Author fxj
* @Description 一键催办
* @Date 19:19 2026/2/10
**/
@Operation(description = "一键催办")
@PostMapping("/contractUrg")
public R contractUrg(@RequestParam String id) {
return tEmployeeContractPreNewService.contractUrg(id);
}
/**
* 通过preId查询合同续签已确认信息
* @param preId
* @return R
*/
@Operation(summary = "通过id查询", description = "通过preId查询合同续签已确认信息")
@GetMapping("/getInfoByPreId" )
public R<TEmployeeContractPreNew> getInfoByPreId(@RequestParam("preId" ) String preId) {
return tEmployeeContractPreNewService.getInfoByPreId(preId);
}
/**
* 通过preId查询已续签合同信息
* @param preId
* @return R
*/
@Operation(summary = "通过id查询", description = "通过preId查询已续签合同信息")
@GetMapping("/getRenewContractByPreId" )
public R<TEmployeeContractInfo> getRenewContractByPreId(@RequestParam("preId" ) String preId) {
return tEmployeeContractPreNewService.getRenewContractByPreId(preId);
}
/**
* 续签确认提醒 9:00
* 续签确认提醒节点:
* 第一个时间:上一份合同截止日期前一个月往前找最近的工作日(若前一个月当天是工作日,那就取当日);
* 第二个时间:合同截止日期(若为节假日,往前找最近的一个工作日);
* 第三个时间:合同截止日期后一个月往前找第五个工作日(找不到就找第四、第三、第二、第一),都找不到,就不提醒
* 提醒至前端客服,点击提醒,提示:请至HRO系统及时进行合同确认,以免续签不及时!
* @author fxj
*/
@SysLog("派单当日9点统一推送续签确认信息")
@Inner
@PostMapping("/inner/pushWxConfrimMessage")
public R pushWxConfrimMessage() {
return tEmployeeContractPreNewService.pushWxConfrimMessage();
}
/**
* @Author fxj
* @Description
* @Date 19:08 2026/2/10
**/
/*@Inner
@PostMapping("/inner/electronicSignExpiringReminder")
public R electronicSignExpiringReminder() {
return tEmployeeContractPreNewService.electronicSignExpiringReminder();
}*/
} }
...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAlertUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAlertExportVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -50,7 +47,7 @@ public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> { ...@@ -50,7 +47,7 @@ public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> {
* @param tEmpContractAlert 员工合同续签待办 * @param tEmpContractAlert 员工合同续签待办
* @return * @return
*/ */
IPage<TEmpContractAlert> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, @Param("tEmpContractAlert") TEmpContractAlert tEmpContractAlert); IPage<ContractAlertAutoVo> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, @Param("tEmpContractAlert") ContractAlertSearchVo tEmpContractAlert);
/** /**
* @Author fxj * @Author fxj
...@@ -62,4 +59,10 @@ public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> { ...@@ -62,4 +59,10 @@ public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> {
int getTEmpContractAlertAutoCount(@Param("tEmpContractAlert") ContractAlertSearchVo tEmpContractAlert); int getTEmpContractAlertAutoCount(@Param("tEmpContractAlert") ContractAlertSearchVo tEmpContractAlert);
List<TEmpContractAlertExportVo> listExport(@Param("tEmpContractAlert") ContractAlertSearchVo searchVo); List<TEmpContractAlertExportVo> listExport(@Param("tEmpContractAlert") ContractAlertSearchVo searchVo);
void updateProcessStatus();
List<ContractAlertConfirmVo> getAutoRenewForConfirm(@Param("tEmpContractAlert")ContractAlertSearchVo tEmpContractAlert);
List<ContractAlertAutoVo> getPushWxConfrimInfos();
} }
...@@ -21,9 +21,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -21,9 +21,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewSearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 合同续签预派单信息 * 合同续签预派单信息
* *
...@@ -39,4 +44,10 @@ public interface TEmployeeContractPreNewMapper extends BaseMapper<TEmployeeContr ...@@ -39,4 +44,10 @@ public interface TEmployeeContractPreNewMapper extends BaseMapper<TEmployeeContr
* @return * @return
*/ */
IPage<TEmployeeContractPreNew> getTEmployeeContractPreNewPage(Page<TEmployeeContractPreNew> page, @Param("tEmployeeContractPreNew") TEmployeeContractPreNew tEmployeeContractPreNew); IPage<TEmployeeContractPreNew> getTEmployeeContractPreNewPage(Page<TEmployeeContractPreNew> page, @Param("tEmployeeContractPreNew") TEmployeeContractPreNew tEmployeeContractPreNew);
List<EmployeeContractVO> getDisPatcherContractListRenew(@Param("idList") List<String> idList,@Param("statusList") List<String> statusList,@Param("type") String type);
List<TEmployeeContractPreNewDetailVo> getDetailList(@Param("tEmployeeContractPreNew")TEmployeeContractPreNewSearchVo tEmployeeContractPreNew);
List<String> getUnDispatchList();
} }
...@@ -45,12 +45,25 @@ public interface FascService extends IService<FddContractInfo> { ...@@ -45,12 +45,25 @@ public interface FascService extends IService<FddContractInfo> {
// 推送法大大任务 // 推送法大大任务
R<String> submitContract(String id) throws ApiException; R<String> submitContract(String id) throws ApiException;
// 自动化续签待办:推送法大大任务
R<String> submitContractRenew(String id) throws ApiException;
// 撤销签署任务 // 撤销签署任务
R<String> cancelTask(String id) throws ApiException; R<String> cancelTask(String id) throws ApiException;
// 自动化续签待办:撤销签署任务
R<String> cancelTaskRenew(String id) throws ApiException;
// 催办签署任务 // 催办签署任务
R<String> urgeTask(String id) throws ApiException; R<String> urgeTask(String id) throws ApiException;
// 自动化续签待办:催办签署任务
R<String> urgeTaskRenew(String id) throws ApiException;
// 获取附件 // 获取附件
boolean getFileByRequestId(String id) throws ApiException; boolean getFileByRequestId(String id) throws ApiException;
// 自动化续签待办:获取附件
boolean getFileByRequestIdRenew(String id) throws ApiException;
} }
...@@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail; import com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAlertUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -46,7 +43,7 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> { ...@@ -46,7 +43,7 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
* @param tEmpContractAlert 员工合同续签待办 * @param tEmpContractAlert 员工合同续签待办
* @return * @return
*/ */
IPage<TEmpContractAlert> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert); IPage<ContractAlertAutoVo> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert);
IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo); IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo);
// 给自动化用的-合同待续签-分页查询 // 给自动化用的-合同待续签-分页查询
...@@ -88,4 +85,8 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> { ...@@ -88,4 +85,8 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
void listAutoExport(HttpServletResponse response, ContractAlertSearchVo searchVo); void listAutoExport(HttpServletResponse response, ContractAlertSearchVo searchVo);
EmpProjectVO getProjectInfoByContractId(String id); EmpProjectVO getProjectInfoByContractId(String id);
R<EmpContractRenewVO> getAllRenewInfoById(String id);
R<List<ContractAlertConfirmVo>> getAutoRenewForConfirm(ContractAlertSearchVo tEmpContractAlert);
} }
...@@ -18,9 +18,13 @@ ...@@ -18,9 +18,13 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistRevokeVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -52,4 +56,26 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra ...@@ -52,4 +56,26 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
R confirmRenewalContract(TEmployeeContractPreNewVo preVo); R confirmRenewalContract(TEmployeeContractPreNewVo preVo);
R batchCconfirmRenewalContract(TEmployeeContractPreNewVo preVo); R batchCconfirmRenewalContract(TEmployeeContractPreNewVo preVo);
R dispatcherContract(List<String> idList, String type);
R revokeSign(List<TEmployeeAutoRegistRevokeVo> registRevokeVoList);
R autoRevokeElectronicSign();
R notifyRevokedElectronicSign();
R electronicSignExpiringReminder();
R contractUrg(String id);
R<TEmployeeContractPreNew> getInfoByPreId(String preId);
R<List<TEmployeeContractPreNewDetailVo>> getDetailList(TEmployeeContractPreNewSearchVo tEmployeeContractPreNew);
R<TEmployeeContractInfo> getRenewContractByPreId(String preId);
R pushWxConfrimMessage();
void pushDisConfrimContracts();
} }
...@@ -59,6 +59,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -59,6 +59,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private final TFascTemplateService tFascTemplateService; private final TFascTemplateService tFascTemplateService;
private final TFascTemplateDetailService tFascTemplateDetailService; private final TFascTemplateDetailService tFascTemplateDetailService;
private final TEmployeeContractPreMapper tEmployeeContractPreMapper; private final TEmployeeContractPreMapper tEmployeeContractPreMapper;
private final TEmployeeContractPreNewMapper tEmployeeContractPreNewMapper;
private final TEmployeeContractInfoMapper tEmployeeContractInfoMapper; private final TEmployeeContractInfoMapper tEmployeeContractInfoMapper;
private final TEmployeeInfoMapper tEmployeeInfoMapper; private final TEmployeeInfoMapper tEmployeeInfoMapper;
private final TEmpContactInfoMapper tEmpContactInfoMapper; private final TEmpContactInfoMapper tEmpContactInfoMapper;
...@@ -374,7 +375,67 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -374,7 +375,67 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return requestInfo; return requestInfo;
} }
@Override
public R<String> submitContractRenew(String id) throws ApiException {
// templateName 签署任务模板名称
TEmployeeContractPreNew contract = tEmployeeContractPreNewMapper.selectById(id);
if (contract == null) {
return R.failed(FASC_NO_CONTRACT);
}
TEmployeeContractInfo empContract = tEmployeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreId,id)
.last(CommonConstants.LAST_ONE_SQL));
String empIdCard = contract.getEmpIdcard();
if (Common.isEmpty(empIdCard)) {
return R.failed("未找到身份证,请联系管理员");
}
if (empContract == null) {
return R.failed(FASC_NO_EMP_CONTRACT);
}
TEmployeeContractPrePushFascVo empContactInfo = tEmpContactInfoMapper.getTEmpContactInfoOneByCard(empIdCard);
TEmployeeContractPrePushFascVo empInfo = tEmpContactInfoMapper.getTEmpInfoOneByCard(empIdCard);
if (empContactInfo != null) {
contract.setContactEmpName(empContactInfo.getContactEmpName());
contract.setContactTel(empContactInfo.getContactTel());
contract.setContactAddress(empContactInfo.getContactAddress());
}
if (empInfo != null) {
contract.setHuArea(empInfo.getHuArea());
contract.setContactArea(empInfo.getContactArea());
contract.setEmpEmail(empInfo.getEmpEmail());
}
if (Common.isEmpty(contract.getFadadaTemplateId())) {
return R.failed("未找到合同模板ID,请联系管理员");
}
if (Common.isEmpty(contract.getSignType())) {
return R.failed("签署方式为空,请联系管理员");
} else if (!CommonConstants.ZERO_STRING.equals(contract.getSignType())) {
return R.failed("签署方式不是电子签,不可发起电子签署");
}
// 如果状态过多,可以改为这个:
// ArrayUtils.contains(forbidStatusArr, tGzOfferInfo.getOfferStatus())
if (Common.isNotNull(contract.getRequestId())) {
return R.failed("合同已发起,请勿重复发起!");
}
TFascTemplate tFascTemplate = tFascTemplateService.getOne(Wrappers.<TFascTemplate>query()
.lambda().eq(TFascTemplate::getSignTemplateId, contract.getFadadaTemplateId())
.last(CommonConstants.LAST_ONE_SQL));
if (tFascTemplate == null) {
return R.failed(FASC_NO_TEMPLATE);
} else if (!"valid".equals(tFascTemplate.getSignTemplateStatus())) {
return R.failed("法大大模版状态不是“启用”,不可发起电子签署");
}
List<TFascTemplateDetail> detailList = tFascTemplateDetailService.getTDetailListByFieldType(contract.getFadadaTemplateId());
// - 判断是否入职超过1个月——接口入口做了
TFascCompany company = tFascCompanyService.getById(tFascTemplate.getCompanyId());
R<String> requestInfo = fascUtil.submitContract(contract, tFascPushLogService, tEmployeeContractPreNewMapper, tFascTemplate, detailList, company);
return requestInfo;
}
/** /**
* @param id TEmployeeContractPre主键 * @param id TEmployeeContractPre主键
* @Description: 撤销签署任务 * @Description: 撤销签署任务
...@@ -399,7 +460,23 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -399,7 +460,23 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return fascUtil.cancelTask(contract, tFascPushLogService, tEmployeeContractPreMapper, company); return fascUtil.cancelTask(contract, tFascPushLogService, tEmployeeContractPreMapper, company);
} }
@Override
public R<String> cancelTaskRenew(String id) throws ApiException {
// templateName 签署任务模板名称
TEmployeeContractPreNew contract = tEmployeeContractPreNewMapper.selectById(id);
if (contract == null) {
return R.failed(FASC_NO_CONTRACT);
}
if (Common.isEmpty(contract.getRequestId())) {
return R.failed("无requestId,请检查数据");
}
TFascCompany company = getTFascCompany(contract);
if (company == null) {
return R.failed("无公司信息,请检查数据!");
}
return fascUtil.cancelTask(contract, tFascPushLogService, tEmployeeContractPreNewMapper, company);
}
private TFascCompany getTFascCompany(TEmployeeContractPre contract) { private TFascCompany getTFascCompany(TEmployeeContractPre contract) {
TFascCompany company = null; TFascCompany company = null;
if (Common.isNotNull(contract.getFadadaTemplateId())) { if (Common.isNotNull(contract.getFadadaTemplateId())) {
...@@ -413,6 +490,19 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -413,6 +490,19 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return company; return company;
} }
private TFascCompany getTFascCompany(TEmployeeContractPreNew contract) {
TFascCompany company = null;
if (Common.isNotNull(contract.getFadadaTemplateId())) {
TFascTemplate tFascTemplate = tFascTemplateService.getOne(Wrappers.<TFascTemplate>query()
.lambda().eq(TFascTemplate::getSignTemplateId, contract.getFadadaTemplateId())
.last(CommonConstants.LAST_ONE_SQL));
if (tFascTemplate != null && Common.isNotNull(tFascTemplate.getCompanyId())) {
company = tFascCompanyService.getById(tFascTemplate.getCompanyId());
}
}
return company;
}
/** /**
* @param id TEmployeeContractPre主键 * @param id TEmployeeContractPre主键
* @Description: 催办签署任务 * @Description: 催办签署任务
...@@ -439,6 +529,30 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -439,6 +529,30 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
} }
/**
* @Author fxj
* @Description 续签待办自动化:催办签署任务
* @Date 19:25 2026/2/10
**/
@Override
public R<String> urgeTaskRenew(String id) throws ApiException {
// templateName 签署任务模板名称
TEmployeeContractPreNew contract = tEmployeeContractPreNewMapper.selectById(id);
if (contract == null) {
return R.failed(FASC_NO_CONTRACT);
}
if (Common.isEmpty(contract.getRequestId())) {
return R.failed("无requestId,请检查数据");
}
TFascCompany company = getTFascCompany(contract);
if (company == null) {
return R.failed("无公司信息,请检查数据!");
}
return fascUtil.urgeTask(contract, tFascPushLogService, tEmployeeContractPreNewMapper, company);
}
/** /**
* @param id TEmployeeContractPre主键 * @param id TEmployeeContractPre主键
* @Description: 获取附件 * @Description: 获取附件
...@@ -463,6 +577,22 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -463,6 +577,22 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
} }
return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company); return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company);
} }
@Override
public boolean getFileByRequestIdRenew(String id) throws ApiException {
// templateName 签署任务模板名称
TEmployeeContractPreNew contract = tEmployeeContractPreNewMapper.selectById(id);
if (contract == null) {
return false;
}
if (Common.isEmpty(contract.getRequestId())) {
// return R.failed("无requestId,请检查数据")
return false;
}
TFascCompany company = getTFascCompany(contract);
if (company == null) {
return false;
}
return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company);
}
} }
...@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo; ...@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService; import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService;
...@@ -82,6 +83,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -82,6 +83,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Autowired @Autowired
private InsuranceDaprUtil insuranceDaprUtil; private InsuranceDaprUtil insuranceDaprUtil;
@Autowired
private TEmpContractAlertMapper empContractAlertMapper;
@Autowired @Autowired
@Lazy @Lazy
private TEmployeeContractPreService employeeContractPreService; private TEmployeeContractPreService employeeContractPreService;
...@@ -604,6 +608,13 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -604,6 +608,13 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
employeeContractPreService.update(updateContractWrapper); employeeContractPreService.update(updateContractWrapper);
//更新社保待购买的前端客服 //更新社保待购买的前端客服
socialDaprUtils.updateSocialPreCustomerName(updateVo); socialDaprUtils.updateSocialPreCustomerName(updateVo);
//更新合同续签待办提醒前端客服
LambdaUpdateWrapper<TEmpContractAlert> updateCtractWrapper = new LambdaUpdateWrapper<>();
updateCtractWrapper.eq(TEmpContractAlert::getProjectNo,vo.getDepartNo())
.set(TEmpContractAlert::getCsName, vo.getName())
.set(TEmpContractAlert::getCsLoginName, vo.getLoginName());
empContractAlertMapper.update(null,updateCtractWrapper);
} }
} }
}catch (Exception e){ }catch (Exception e){
......
...@@ -37,6 +37,8 @@ public class DoFascTask { ...@@ -37,6 +37,8 @@ public class DoFascTask {
@Autowired @Autowired
private TEmployeeContractPreService tEmployeeContractPreService; private TEmployeeContractPreService tEmployeeContractPreService;
@Autowired @Autowired
private TEmployeeContractPreNewService tEmployeeContractPreNewService;
@Autowired
private TEmployeeContractPreHistoryService tEmployeeContractPreHistoryService; private TEmployeeContractPreHistoryService tEmployeeContractPreHistoryService;
@Autowired @Autowired
private TEmployeeContractInfoService tEmployeeContractInfoService; private TEmployeeContractInfoService tEmployeeContractInfoService;
...@@ -68,10 +70,120 @@ public class DoFascTask { ...@@ -68,10 +70,120 @@ public class DoFascTask {
// 根据requestId获取信息: // 根据requestId获取信息:
TEmployeeContractPre pre = tEmployeeContractPreService.getOne(Wrappers.<TEmployeeContractPre>query().lambda() TEmployeeContractPre pre = tEmployeeContractPreService.getOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRequestId, signTaskId).last(CommonConstants.LAST_ONE_SQL)); .eq(TEmployeeContractPre::getRequestId, signTaskId).last(CommonConstants.LAST_ONE_SQL));
TEmployeeContractPreNew preNew = tEmployeeContractPreNewService.getOne(Wrappers.<TEmployeeContractPreNew>query().lambda()
.eq(TEmployeeContractPreNew::getRequestId, signTaskId).last(CommonConstants.LAST_ONE_SQL));
YifuUser user = getNewYifuUser(); YifuUser user = getNewYifuUser();
//自动化续签待办处理
if (preNew != null) {
TEmployeeContractInfo contractInfo = null;
if (preNew != null){
contractInfo = tEmployeeContractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreId,preNew.getId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (contractInfo != null) {
if (fddEvent.equals("sign-task-finished")) {
if (Common.isNotNull(preNew.getProcessStatus()) && !preNew.getProcessStatus().equals(CommonConstants.dingleDigitStrArray[9])) {
// 1:签署任务完成事件
// 8电子待归档
preNew.setProcessStatus(CommonConstants.dingleDigitStrArray[8]);
// 加日志
this.saveAuditLogSuccess("签署成功",contractInfo.getId());
// 尝试获取归档文件
boolean flag = fascService.getFileByRequestIdRenew(preNew.getId());
contractInfo.setAuditStatus(CommonConstants.TWO_INT);
// 传了false,就不要审核日志
tEmployeeContractInfoService.auditContract(contractInfo, user, false);
if (flag) {
// 加日志
this.saveAuditLogSuccess("归档成功",contractInfo.getId());
preNew.setProcessStatus(CommonConstants.dingleDigitStrArray[9]);
contractInfo.setIsFile(CommonConstants.ZERO_STRING);
contractInfo.setContractNo(preNew.getRequestId());
tEmployeeContractInfoService.updateById(contractInfo);
//瓜子项目编码:皖A694302
if (CommonConstants.GZ_DEPT_NO.equals(contractInfo.getDeptNo())) {
//合同归档瓜子合同状态更新已归档
tEmployeeContractInfoService.updateGzOfferStatus(contractInfo, CommonConstants.EIGHT_STRING, CommonConstants.NINETY_NINE, user.getId(), user.getNickname());
}
}
tEmployeeContractPreNewService.updateById(preNew);
pushLog.setReturnData("签署任务完成事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
}
} else if (fddEvent.equals("sign-task-canceled") || fddEvent.equals("sign-task-abolish")) {
// 2:签署任务撤销事件 || 4:签署任务作废事件
if (fddEvent.equals("sign-task-canceled")) {
// 4:签署任务作废事件
pushLog.setReturnData("签署任务撤销事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
} else {
// 4:签署任务作废事件
pushLog.setReturnData("签署任务作废事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
}
//电子待归档、线下签待归档、已完结的不能撤销签署
if (Common.isNotNull(preNew) && !CommonConstants.NINE_STRING.equals(preNew.getProcessStatus()) &&
!CommonConstants.FOUR_STRING.equals(preNew.getProcessStatus()) &&
!CommonConstants.EIGHT_STRING.equals(preNew.getProcessStatus())) {
//如果不是待确认和待发起,需要记录操作记录
if (!CommonConstants.ZERO_STRING.equals(preNew.getProcessStatus()) &&
!CommonConstants.ONE_STRING.equals(preNew.getProcessStatus()) &&
Common.isNotNull(preNew.getContractId())) {
// 加日志
this.saveAuditLogFail("撤销签署成功", terminationNote,contractInfo.getId());
}
if (!CommonConstants.ELEVEN_STRING.equals(preNew.getProcessStatus())) {
preNew.setProcessStatus(CommonConstants.TEN_STRING);
}
preNew.setSignFlag(CommonConstants.ZERO_STRING);
preNew.setRevokeReason(terminationNote);
tEmployeeContractPreNewService.updateById(preNew);
}
//如果存在合同申请审核数据,将状态更新成5撤销签署
contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo);
} else if (fddEvent.equals("sign-task-sign-failed")
|| fddEvent.equals("sign-task-sign-rejected")
|| fddEvent.equals("sign-task-ignore")
|| fddEvent.equals("sign-task-fill-rejected")) {
// 3:签署任务参与方签署失败事件
preNew.setProcessStatus(CommonConstants.dingleDigitStrArray[7]);
preNew.setRequestId("");
tEmployeeContractPreNewService.updateById(preNew);
//如果存在合同申请审核数据,将状态更新成6签署失败
contractInfo.setAuditStatus(CommonConstants.SIX_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo);
UUID uuid = UUID.randomUUID();
//生成快照数据
TContractAutoLog contractAutoLog = new TContractAutoLog();
contractAutoLog.setContractId(uuid.toString());
contractAutoLog.setEmpName(preNew.getEmployeeName());
contractAutoLog.setEmpIdcard(preNew.getEmpIdcard());
contractAutoLog.setPhone(preNew.getEmpPhone());
contractAutoLog.setMainId(preNew.getId());
contractAutoLog.setErrorInfo(null == terminationNote ? "法大大签署失败" : terminationNote);
contractAutoLogService.save(contractAutoLog);
//签署失败发送企微消息
sendFddFalureInfoToWx(preNew, contractAutoLog.getId());
// 加日志
this.saveAuditLogFail("签署失败", terminationNote,contractInfo.getId());
pushLog.setReturnData("签署任务参与方签署失败事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
}
}
}
if (pre != null) { if (pre != null) {
TEmployeeContractInfo contractInfo = null; TEmployeeContractInfo contractInfo = null;
if (Common.isNotNull(pre.getContractId())) { if (pre != null && Common.isNotNull(pre.getContractId())) {
//如果存在合同申请审核数据,将状态更新成待提交 //如果存在合同申请审核数据,将状态更新成待提交
contractInfo = tEmployeeContractInfoService.getById(pre.getContractId()); contractInfo = tEmployeeContractInfoService.getById(pre.getContractId());
} }
...@@ -260,7 +372,13 @@ public class DoFascTask { ...@@ -260,7 +372,13 @@ public class DoFascTask {
this.saveAuditLogInfo(tEmployeeContractPre.getContractId(), rootName, null); this.saveAuditLogInfo(tEmployeeContractPre.getContractId(), rootName, null);
} }
} }
// 自动化续签待办:加合同里的流程进展明细的日志——成功
public void saveAuditLogSuccess(String rootName,String contractId) {
// 加流程进展明细
if (Common.isNotNull(contractId)) {
this.saveAuditLogInfo(contractId, rootName, null);
}
}
// 加合同里的流程进展明细的日志——失败 // 加合同里的流程进展明细的日志——失败
public void saveAuditLogFail(TEmployeeContractPre tEmployeeContractPre, String rootName, String remark) { public void saveAuditLogFail(TEmployeeContractPre tEmployeeContractPre, String rootName, String remark) {
// 加流程进展明细 // 加流程进展明细
...@@ -268,6 +386,13 @@ public class DoFascTask { ...@@ -268,6 +386,13 @@ public class DoFascTask {
this.saveAuditLogInfo(tEmployeeContractPre.getContractId(), rootName, remark); this.saveAuditLogInfo(tEmployeeContractPre.getContractId(), rootName, remark);
} }
} }
// 自动化续签待办:加合同里的流程进展明细的日志——失败
public void saveAuditLogFail(String rootName, String remark, String contractId) {
// 加流程进展明细
if (Common.isNotNull(contractId)) {
this.saveAuditLogInfo(contractId, rootName, remark);
}
}
// 加合同里的流程进展明细的日志 // 加合同里的流程进展明细的日志
public void saveAuditLogInfo(String contractId, String rootName, String remark) { public void saveAuditLogInfo(String contractId, String rootName, String remark) {
...@@ -331,5 +456,49 @@ public class DoFascTask { ...@@ -331,5 +456,49 @@ public class DoFascTask {
} }
} }
} }
/**
* 自动化合同续签待办:发送法大大失败提醒通知到企微
*
* @param pre 合同待购买
*/
private void sendFddFalureInfoToWx(TEmployeeContractPreNew pre, String id) {
//获取前端客服
SysUser user;
if (Common.isEmpty(pre.getCustomerUserLoginname())) {
return;
}
R<SysUser> res = upmsDaprUtils.getSimpleUserByLoginName(pre.getCustomerUserLoginname());
if (Common.isNotNull(res) && Common.isNotNull(res.getData())) {
user = res.getData();
} else {
return;
}
StringBuilder sendUser = null;
if (Common.isNotKong(user.getWxMessage())) {
sendUser = new StringBuilder(user.getWxMessage());
}
if (sendUser != null) {
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid()
, wxConfig.getDomainName() + "/auth/oauth/wxLogin", "82" + id);
StringBuilder description = new StringBuilder();
String title = "作业自动化——电子合同续签失败提醒";
description.append(pre.getEmployeeName() + "-" + pre.getEmpIdcard() + "-" + pre.getEmpPhone() +
",电子合同签署失败").append("<br>");
description.append("请及时处理,以免产生用工风险!").append("<br>");
textcard.put("title", title);
textcard.put("url", authUrl);
textcard.put("description", description.toString());
requestMap.put("touser", sendUser);
requestMap.put("agentid", wxConfig.getAgentid());
requestMap.put("msgtype", "textcard");
requestMap.put("textcard", textcard);
// 必须加上header说明
if (!wxConfig.sendTextCard(restTemplate, requestMap)) {
wxConfig.sendTextCard(restTemplate, requestMap);
}
}
}
} }
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
<result property="joinLeaveDate" column="JOIN_LEAVE_DATE"/> <result property="joinLeaveDate" column="JOIN_LEAVE_DATE"/>
<result property="contractStartDate" column="CONTRACT_START_DATE"/>
<result property="phone" column="PHONE"/> <result property="phone" column="PHONE"/>
<result property="errorInfo" column="ERROR_INFO"/> <result property="errorInfo" column="ERROR_INFO"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
...@@ -31,7 +32,7 @@ ...@@ -31,7 +32,7 @@
a.UPDATE_BY, a.UPDATE_BY,
a.CREATE_NAME, a.CREATE_NAME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.CREATE_TIME,a.CONTRACT_ID,a.MAIN_ID,a.is_urg a.CREATE_TIME,a.CONTRACT_ID,a.MAIN_ID,a.is_urg,a.CONTRACT_START_DATE
</sql> </sql>
<sql id="tContractAutoLog_where"> <sql id="tContractAutoLog_where">
<if test="tContractAutoLog != null"> <if test="tContractAutoLog != null">
......
...@@ -57,14 +57,59 @@ ...@@ -57,14 +57,59 @@
<result property="applyNo" column="APPLY_NO"/> <result property="applyNo" column="APPLY_NO"/>
<result property="workingHours" column="WORKING_HOURS"/> <result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/> <result property="post" column="POST"/>
<!-- 合同自动化新增字段 --> <!-- 合同自动化新增字段
<result property="expectedCollectionTime" column="EXPECTED_COLLECTION_TIME"/> <result property="expectedCollectionTime" column="EXPECTED_COLLECTION_TIME"/>
<result property="signType" column="SIGN_TYPE"/> <result property="signType" column="SIGN_TYPE"/>
<result property="processStatus" column="PROCESS_STATUS"/> <result property="processStatus" column="PROCESS_STATUS"/>-->
<result property="csName" column="CS_NAME"/> <result property="csName" column="CS_NAME"/>
<result property="csLoginName" column="CS_LOGIN_NAME"/> <result property="csLoginName" column="CS_LOGIN_NAME"/>
<result property="autoFlag" column="AUTO_FLAG"/> <result property="autoFlag" column="AUTO_FLAG"/>
</resultMap> </resultMap>
<resultMap id="tEmpContractAlertAutoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertAutoVo">
<id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empId" column="EMP_ID"/>
<result property="project" column="PROJECT"/>
<result property="projectNo" column="PROJECT_NO"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empCode" column="EMP_CODE"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="empType" column="EMP_TYPE"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="daysDue" column="DAYS_DUE"/>
<result property="dueFlag" column="DUE_FLAG"/>
<result property="daysOver" column="DAYS_OVER"/>
<result property="firstAlertTime" column="FIRST_ALERT_TIME"/>
<result property="alertPerson" column="ALERT_PERSON"/>
<result property="handleStatus" column="HANDLE_STATUS"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="isFeedback" column="IS_FEEDBACK"/>
<result property="feedbackReason" column="FEEDBACK_REASON"/>
<result property="feedbackDetail" column="FEEDBACK_DATAIL"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
<!-- 合同自动化新增字段 -->
<result property="expectedCollectionTime" column="EXPECTED_COLLECTION_TIME"/>
<result property="signType" column="SIGN_TYPE"/>
<result property="processStatus" column="PROCESS_STATUS"/>
<result property="csName" column="CS_NAME"/>
<result property="csLoginName" column="CS_LOGIN_NAME"/>
<result property="autoFlag" column="AUTO_FLAG"/>
<result property="errorInfo" column="ERROR_INFO"/>
<result property="errorTime" column="ERROR_TIME"/>
<result property="preId" column="preId"/>
</resultMap>
<update id="truncate"> <update id="truncate">
TRUNCATE t_emp_contract_alert TRUNCATE t_emp_contract_alert
</update> </update>
...@@ -136,9 +181,6 @@ ...@@ -136,9 +181,6 @@
a.APPLY_NO, a.APPLY_NO,
a.POST, a.POST,
a.WORKING_HOURS, a.WORKING_HOURS,
a.EXPECTED_COLLECTION_TIME,
a.SIGN_TYPE,
a.PROCESS_STATUS,
a.CS_NAME, a.CS_NAME,
a.CS_LOGIN_NAME, a.CS_LOGIN_NAME,
a.AUTO_FLAG a.AUTO_FLAG
...@@ -281,17 +323,17 @@ ...@@ -281,17 +323,17 @@
AND a.WORKING_HOURS = #{tEmpContractAlert.workingHours} AND a.WORKING_HOURS = #{tEmpContractAlert.workingHours}
</if> </if>
<if test="tEmpContractAlert.expectedCollectionTime != null"> <if test="tEmpContractAlert.expectedCollectionTime != null">
AND a.EXPECTED_COLLECTION_TIME = #{tEmpContractAlert.expectedCollectionTime} AND b.EXPECTED_COLLECTION_TIME = #{tEmpContractAlert.expectedCollectionTime}
</if> </if>
<if test="tEmpContractAlert.signType != null and tEmpContractAlert.signType.trim() != ''"> <if test="tEmpContractAlert.signType != null">
AND a.SIGN_TYPE = #{tEmpContractAlert.signType} AND b.SIGN_TYPE = #{tEmpContractAlert.signType}
</if> </if>
<if test="tEmpContractAlert.processStatus != null and tEmpContractAlert.processStatus.trim() != ''"> <if test="tEmpContractAlert.processStatus != null and tEmpContractAlert.processStatus.trim() != ''">
AND a.PROCESS_STATUS = #{tEmpContractAlert.processStatus} AND IFNULL(b.PROCESS_STATUS,'0') = #{tEmpContractAlert.processStatus}
</if> </if>
<if test="tEmpContractAlert.processStatusList != null and tEmpContractAlert.processStatusList.length>0"> <if test="tEmpContractAlert.processStatusList != null and tEmpContractAlert.processStatusList.size>0">
AND a.PROCESS_STATUS IN AND IFNULL(b.PROCESS_STATUS,'0') IN
<foreach collection="tEmpContractAlert.processStatusList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="tEmpContractAlert.processStatusList" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -300,10 +342,10 @@ ...@@ -300,10 +342,10 @@
AND a.CS_NAME like CONCAT('%',#{tEmpContractAlert.csName},'%') AND a.CS_NAME like CONCAT('%',#{tEmpContractAlert.csName},'%')
</if> </if>
<if test="tEmpContractAlert.expectedCollectionTimeStart != null"> <if test="tEmpContractAlert.expectedCollectionTimeStart != null">
AND a.EXPECTED_COLLECTION_TIME <![CDATA[ >= ]]> #{tEmpContractAlert.expectedCollectionTimeStart} AND b.EXPECTED_COLLECTION_TIME <![CDATA[ >= ]]> #{tEmpContractAlert.expectedCollectionTimeStart}
</if> </if>
<if test="tEmpContractAlert.expectedCollectionTimeEnd != null"> <if test="tEmpContractAlert.expectedCollectionTimeEnd != null">
AND a.EXPECTED_COLLECTION_TIME <![CDATA[ <= ]]> #{tEmpContractAlert.expectedCollectionTimeEnd} AND b.EXPECTED_COLLECTION_TIME <![CDATA[ <= ]]> #{tEmpContractAlert.expectedCollectionTimeEnd}
</if> </if>
<if test="tEmpContractAlert.csLoginName != null and tEmpContractAlert.csLoginName.trim() != ''"> <if test="tEmpContractAlert.csLoginName != null and tEmpContractAlert.csLoginName.trim() != ''">
AND a.CS_LOGIN_NAME = #{tEmpContractAlert.csLoginName} AND a.CS_LOGIN_NAME = #{tEmpContractAlert.csLoginName}
...@@ -314,10 +356,17 @@ ...@@ -314,10 +356,17 @@
</if> </if>
</sql> </sql>
<!--tEmpContractAlert简单分页查询--> <!--tEmpContractAlert简单分页查询-->
<select id="getTEmpContractAlertAutoPage" resultMap="tEmpContractAlertMap"> <select id="getTEmpContractAlertAutoPage" resultMap="tEmpContractAlertAutoMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>,
b.EXPECTED_COLLECTION_TIME,
b.SIGN_TYPE,
IFNULL(b.PROCESS_STATUS,'0') PROCESS_STATUS,
b.ERROR_INFO,
b.ERROR_TIME,
IFNULL(b.id,null) as 'preId'
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
<where> <where>
1=1 1=1
<include refid="tEmpContractAlert_where"/> <include refid="tEmpContractAlert_where"/>
...@@ -328,6 +377,7 @@ ...@@ -328,6 +377,7 @@
SELECT SELECT
count(1) count(1)
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
<where> <where>
1=1 1=1
<include refid="tEmpContractAlert_where"/> <include refid="tEmpContractAlert_where"/>
...@@ -337,8 +387,12 @@ ...@@ -337,8 +387,12 @@
<!--tEmpContractAlert简单分页查询--> <!--tEmpContractAlert简单分页查询-->
<select id="listExport" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAlertExportVo"> <select id="listExport" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAlertExportVo">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>,
b.EXPECTED_COLLECTION_TIME,
b.SIGN_TYPE,
IFNULL(b.PROCESS_STATUS,'0') PROCESS_STATUS
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
<where> <where>
1=1 1=1
<include refid="tEmpContractAlert_where"/> <include refid="tEmpContractAlert_where"/>
...@@ -349,4 +403,55 @@ ...@@ -349,4 +403,55 @@
</if> </if>
</where> </where>
</select> </select>
<update id="updateProcessStatus">
UPDATE t_emp_contract_alert a
JOIN t_employee_contract_pre_new b ON a.CONTRACT_ID = b.contract_id
SET a.HANDLE_STATUS =
CASE
WHEN b.process_status = '9' THEN '2'
WHEN b.process_status IN ('6', '8', '2', '4') THEN '1'
ELSE a.HANDLE_STATUS -- 保持不变
END
WHERE a.AUTO_FLAG = '0'
AND b.process_status IN ('9', '6', '8', '2', '4') -- 只处理这些状态
</update>
<!--tEmpContractAlert简单分页查询-->
<select id="getAutoRenewForConfirm" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertConfirmVo">
SELECT
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.CONTRACT_TYPE,
a.CONTRACT_START,
a.CONTRACT_END,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,
c.EMP_PHONE
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_info c on a.EMP_ID = c.id
<where>
1=1
<include refid="tEmpContractAlert_where"/>
</where>
limit 2000
</select>
<!--tEmpContractAlert简单分页查询-->
<select id="getPushWxConfrimInfos" resultMap="tEmpContractAlertAutoMap">
SELECT a.CONTRACT_END, a.CS_LOGIN_NAME
FROM t_emp_contract_alert a
WHERE a.AUTO_FLAG = '0'
AND a.CS_LOGIN_NAME IS NOT NULL
AND a.CONTRACT_END BETWEEN CURDATE() - INTERVAL 1 MONTH - INTERVAL 15 DAY
AND CURDATE() + INTERVAL 1 MONTH + INTERVAL 15 DAY
AND NOT EXISTS (
SELECT 1
FROM t_employee_contract_pre_new b
WHERE b.contract_id = a.CONTRACT_ID
)
</select>
</mapper> </mapper>
...@@ -61,10 +61,6 @@ ...@@ -61,10 +61,6 @@
<result property="defaultAmount" column="default_amount"/> <result property="defaultAmount" column="default_amount"/>
<result property="contractDurationYear" column="contract_duration_year"/> <result property="contractDurationYear" column="contract_duration_year"/>
<result property="contractDurationMonth" column="contract_duration_month"/> <result property="contractDurationMonth" column="contract_duration_month"/>
<result property="tryPeriodStart" column="try_period_start"/>
<result property="tryPeriodEnd" column="try_period_end"/>
<result property="tryPeriodType" column="try_period_type"/>
<result property="tryPeriod" column="try_period"/>
<result property="laborCost" column="labor_cost"/> <result property="laborCost" column="labor_cost"/>
<result property="riskBuyDesc" column="risk_buy_desc"/> <result property="riskBuyDesc" column="risk_buy_desc"/>
<result property="salaryStandardPerHour" column="salary_standard_per_hour"/> <result property="salaryStandardPerHour" column="salary_standard_per_hour"/>
...@@ -90,6 +86,7 @@ ...@@ -90,6 +86,7 @@
<result property="errorInfo" column="error_info"/> <result property="errorInfo" column="error_info"/>
<result property="contractId" column="contract_id"/> <result property="contractId" column="contract_id"/>
<result property="revokeReason" column="revoke_reason"/> <result property="revokeReason" column="revoke_reason"/>
<result property="revokeTime" column="revoke_time"/>
<result property="errorTime" column="error_time"/> <result property="errorTime" column="error_time"/>
<result property="contractEndType" column="contract_end_type"/> <result property="contractEndType" column="contract_end_type"/>
<result property="confirmEmpSelect" column="confirm_emp_select"/> <result property="confirmEmpSelect" column="confirm_emp_select"/>
...@@ -258,6 +255,12 @@ ...@@ -258,6 +255,12 @@
<if test="tEmployeeContractPreNew.processStatus != null and tEmployeeContractPreNew.processStatus.trim() != ''"> <if test="tEmployeeContractPreNew.processStatus != null and tEmployeeContractPreNew.processStatus.trim() != ''">
AND a.process_status = #{tEmployeeContractPreNew.processStatus} AND a.process_status = #{tEmployeeContractPreNew.processStatus}
</if> </if>
<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.configName != null and tEmployeeContractPreNew.configName.trim() != ''"> <if test="tEmployeeContractPreNew.configName != null and tEmployeeContractPreNew.configName.trim() != ''">
AND a.config_name = #{tEmployeeContractPreNew.configName} AND a.config_name = #{tEmployeeContractPreNew.configName}
</if> </if>
...@@ -318,18 +321,6 @@ ...@@ -318,18 +321,6 @@
<if test="tEmployeeContractPreNew.contractDurationMonth != null and tEmployeeContractPreNew.contractDurationMonth.trim() != ''"> <if test="tEmployeeContractPreNew.contractDurationMonth != null and tEmployeeContractPreNew.contractDurationMonth.trim() != ''">
AND a.contract_duration_month = #{tEmployeeContractPreNew.contractDurationMonth} AND a.contract_duration_month = #{tEmployeeContractPreNew.contractDurationMonth}
</if> </if>
<if test="tEmployeeContractPreNew.tryPeriodStart != null">
AND a.try_period_start = #{tEmployeeContractPreNew.tryPeriodStart}
</if>
<if test="tEmployeeContractPreNew.tryPeriodEnd != null">
AND a.try_period_end = #{tEmployeeContractPreNew.tryPeriodEnd}
</if>
<if test="tEmployeeContractPreNew.tryPeriodType != null and tEmployeeContractPreNew.tryPeriodType.trim() != ''">
AND a.try_period_type = #{tEmployeeContractPreNew.tryPeriodType}
</if>
<if test="tEmployeeContractPreNew.tryPeriod != null and tEmployeeContractPreNew.tryPeriod.trim() != ''">
AND a.try_period = #{tEmployeeContractPreNew.tryPeriod}
</if>
<if test="tEmployeeContractPreNew.laborCost != null and tEmployeeContractPreNew.laborCost.trim() != ''"> <if test="tEmployeeContractPreNew.laborCost != null and tEmployeeContractPreNew.laborCost.trim() != ''">
AND a.labor_cost = #{tEmployeeContractPreNew.laborCost} AND a.labor_cost = #{tEmployeeContractPreNew.laborCost}
</if> </if>
...@@ -486,4 +477,52 @@ ...@@ -486,4 +477,52 @@
<include refid="tEmployeeContractPreNew_where"/> <include refid="tEmployeeContractPreNew_where"/>
</where> </where>
</select> </select>
<select id="getDisPatcherContractListRenew" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO">
SELECT
(@i :=@i+1) as rowIndex,
a.employee_name empName,
a.emp_idcard empIdcard,
a.dept_no deptNo,
a.situation,
a.contract_type contractName,
a.CONTRACT_SUB_NAME contractSubName,
null reason,
a.signatory contractParty,
if(a.CONTRACT_TERM = '' or a.CONTRACT_TERM is null,'2',a.CONTRACT_TERM) contractType,
a.CONTRACT_START as contractStart,
if(a.contract_type = '实习协议',a.CONTRACT_END,if(a.CONTRACT_TERM ='1' ,a.CONTRACT_END,null)) as contractEnd,
a.post,
if(a.working_hours = '' or a.working_hours is null,'4',a.working_hours) as workingHours,
null contractNo,
null fileCabinetNo,
null leaveDate,
null reduceReason,
null remark,
a.sign_type signType,
null changeContractAndEmployee,
if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD) as tryPeriod,
a.id preId,a.contract_id contractId,
if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
FROM t_employee_contract_pre_new a,(select @i:=0) as itable
<where>
1=1
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
AND a.process_status in
<foreach item="status" index="index" collection="statusList" open="(" separator="," close=")">
#{status}
</foreach>
</where>
</select>
<!--tEmployeeContractPreNew简单分页查询-->
<select id="getUnDispatchList" resultType="java.lang.String">
SELECT
a.id
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())
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment