Commit b037a918 authored by huyuchen's avatar huyuchen

huych-合同自动化提交

parent 9355a2ec
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Data
@TableName("t_employee_contract_pre")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "合同待签订任务记录表")
public class TEmployeeContractPre extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private String id;
@Schema(description = "项目名称")
private String deptName;
@Schema(description = "项目编码")
private String deptNo;
@Schema(description = "项目id")
private String deptId;
@Schema(description = "员工姓名")
private String employeeName;
@Schema(description = "身份证号")
private String empIdcard;
@Schema(description = "手机号码")
private String empPhone;
@Schema(description = "就职岗位")
private String position;
@Schema(description = "入职日期")
private Date joinLeaveDate;
@Schema(description = "合同类型,标准合同/劳务协议/实习协议/劳务派遣合同/非全日制/其他合同")
private String contractType;
@Schema(description = "状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9已完结")
private String processStatus;
@Schema(description = "签署甲方")
private String signatory;
@Schema(description = "前端客服")
private String customerUsername;
@Schema(description = "前端客服登录名")
private String customerUserLoginname;
@Schema(description = "签署方式0线下签1电子签")
private String signType;
@Schema(description = "是否撤销签署0是1否")
private String signFlag;
@Schema(description = "撤销签署原因")
private String revokeReason;
@Schema(description = "异常原因")
private String errorInfo;
@Schema(description = "法大大模版名称")
private String fadadaTemplate;
@Schema(description = "数据来源1客户端 2客服端")
private String dataSource;
/**
* 预计确认时间
*/
@Schema(description = "预计确认时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime expectedConfirmTime;
@Schema(description = "预计发起时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime expectedCollectionTime;
@Schema(description = "确认人")
private String confirmUser;
@Schema(description = "合同名称")
private String contractName;
@Schema(description = "合同起始时间")
private Date contractStart;
@Schema(description = "合同到期时间")
private Date contractEnd;
@Schema(description = "签订类型")
private String situation;
@Schema(description = "合同年限, 0 固定期限 1 无固定期限 3.以完成一定工作任务为期限")
private String contractTerm;
@Schema(description = "合同年限-年")
private String contractDuratioYear;
@Schema(description = "合同年限-月")
private String contractDuratioMonth;
@Schema(description = "合同试用期开始时间")
private Date periodStart;
@Schema(description = "合同试用期结束时间")
private Date periodEnd;
@Schema(description = "配置名称")
private String configName;
@Schema(description = "是否允许修改 0是 1否")
private String updateFlag;
@Schema(description = "是否有试用期 0是1否")
private String tryPeriodType;
@Schema(description = "试用期(单位月)")
private String tryPeriod;
@Schema(description = "试用期工资 元/月")
private BigDecimal periodSalaryPerMonth;
@Schema(description = "工资形式 1.计时工资 2.计件工资 3.其他")
private String salaryType;
@Schema(description = "计时工资 工资标准 元/月 ")
private BigDecimal salaryStandardPerHour;
@Schema(description = "计件工资 工资标准单价/元 ")
private BigDecimal salaryStandardPerPiece;
@Schema(description = "配置id")
private String configId;
@Schema(description = "工作部门")
private String workingDept;
@Schema(description = "用工单位名称")
private String workingCompany;
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制")
private String workingHours;
@Schema(description = "试用期工资(元/月)")
private String workingReward;
@Schema(description = "购买补充保险说明")
private String riskBuyDesc;
@Schema(description = "其他 (工资形式其他时的工资)")
private String otherWage;
@Schema(description = "劳务费(元/月)")
private String laborCost;
@Schema(description = "违约责任(金额)")
private String defaultAmount;
@Schema(description = "工资结算周期")
private String settlementCycle;
@Schema(description = "工资发放时间")
private String paymentTime;
@Schema(description = "工资发放方式 0 直接发放/委托银行代发")
private String paymentType;
@Schema(description = "派遣期限")
private String dispatchPeriod;
@Schema(description = "派遣开始日期")
private Date dispatchPeriodStart;
@Schema(description = "派遣结束日期")
private Date dispatchPeriodEnd;
@Schema(description = "工作方式 0 第一种方式 1 第二种方式")
private String workType;
@Schema(description = "每周工作天数")
private String workDayCount;
@Schema(description = "每周工作日")
private String workDay;
@Schema(description = "每日工作时长")
private String workHours;
@Schema(description = "其他工作时间 (工作方式为第二种方式)")
private String otherWorkDay;
@Schema(description = "实习期限 无/一个月/两个月.../十二个月")
private String internshipPeriod;
@Schema(description = "实习开始日期")
private Date internshipPeriodStart;
@Schema(description = "实习结束日期")
private Date internshipPeriodEnd;
@Schema(description = "合同岗位 0 固定岗位 1 等于档案处维护 2 自定义")
private String postType;
@Schema(description = "合同岗位名称")
private String post;
@Schema(description = "关联合同id")
private String contractId;
@Schema(description = "工作地点")
private String workAddress;
@Schema(description = "入离职登记主表id")
private String registerId;
}
......@@ -31,6 +31,7 @@ import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* 员工合同-批量操作的VO
*
......
......@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -124,6 +123,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "商险待派单信息集合")
private List<TEmployeeInsurancePreVo> employeeInsurancePreVos;
@Schema(description = "合同待派单信息")
private TEmployeeContractPreVo employeeContractPreVo;
@Schema(description = "附件集合")
private List<TAttaInfoSaveVo> attaList;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 自动化办理反馈vo
*
* @author huych
* @date 2025-06-12 10:01:13
*/
@Data
public class TEmployeeAutoRegistCheckVo implements Serializable {
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "类型")
@Schema(description = "类型,社保、公积金、商险、合同")
@ExcelProperty("类型")
private String type;
@ExcelAttribute(name = "错误信息")
@Schema(description = "错误信息")
@ExcelProperty("错误信息")
private String errorMsg;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 自动化办理反馈vo
*
* @author huych
* @date 2025-06-12 10:01:13
*/
@Data
public class TEmployeeAutoRegistRevokeVo implements Serializable {
@Schema(description = "类型,社保、公积金、商险、合同")
private String id;
@Schema(description = "撤销签署原因")
private String reason;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Data
public class TEmployeeContractPreExportVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "手机号码")
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
@ExcelAttribute(name = "就职岗位")
@Schema(description = "就职岗位")
@ExcelProperty("就职岗位")
private String position;
/**
* 入职日期
*/
@ExcelAttribute(name = "入职日期", isDate = true)
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private Date joinLeaveDate;
@ExcelAttribute(name = "合同类型")
@Schema(description = "合同类型")
@ExcelProperty("合同类型")
private String contractType;
@ExcelAttribute(name = "签署甲方")
@Schema(description = "签署甲方")
@ExcelProperty("签署甲方")
private String signatory;
@ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服")
@ExcelProperty("前端客服")
private String customerUsername;
@ExcelAttribute(name = "签署方式")
@Schema(description = "签署方式")
@ExcelProperty("签署方式")
private String signType;
@ExcelAttribute(name = "法大大模版名称")
@Schema(description = "法大大模版名称")
@ExcelProperty("法大大模版名称")
private String fadadaTemplate;
/**
* 预计确认时间
*/
@ExcelAttribute(name = "预计确认时间", isDate = true)
@Schema(description = "预计确认时间")
@ExcelProperty("预计确认时间")
private Date expectedConfirmTime;
/**
* 预计发起时间
*/
@ExcelAttribute(name = "预计发起时间", isDate = true)
@Schema(description = "预计发起时间")
@ExcelProperty("预计发起时间")
private Date expectedCollectionTime;
@ExcelAttribute(name = "状态")
@Schema(description = "状态")
@ExcelProperty("状态")
private String processStatus;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Data
public class TEmployeeContractPreSearchVo extends TEmployeeContractPre {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,id数组")
private List<String> idList;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
//开始时间(查询专用)
@Schema(description = "入离职开始时间")
@TableField(exist = false)
private LocalDateTime joinTimeStart;
//截止时间(查询专用)
@Schema(description = "入离职截止时间")
@TableField(exist = false)
private LocalDateTime joinTimeEnd;
@Schema(description = "处理状态数组")
@TableField(exist = false)
private List<String> statusList;
@Schema(description = "项目权限数组")
@TableField(exist = false)
private List<String> deptNoList;
@Schema(description = "列表类型 1 待办 2监控")
private String type;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
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.vo.RowIndex;
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.math.BigDecimal;
import java.util.Date;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Data
public class TEmployeeContractPreVo extends RowIndex implements Serializable {
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码 不能为空")
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码 不能为空", maxLength = 30)
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 项目id
*/
@Length(max = 36, message = "项目id 不能超过36 个字符")
@ExcelAttribute(name = "项目id", maxLength = 36)
@Schema(description = "项目id")
@ExcelProperty("项目id")
private String deptId;
/**
* 员工姓名
*/
@Length(max = 30, message = "员工姓名 不能超过30 个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 30)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String employeeName;
/**
* 身份证号
*/
@NotBlank(message = "身份证号 不能为空")
@Length(max = 18, message = "身份证号 不能超过18 个字符")
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号 不能为空", maxLength = 18)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 手机号码
*/
@Length(max = 11, message = "手机号码 不能超过11 个字符")
@ExcelAttribute(name = "手机号码", maxLength = 11)
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
/**
* 就职岗位
*/
@Length(max = 50, message = "就职岗位 不能超过50 个字符")
@ExcelAttribute(name = "就职岗位", maxLength = 50)
@Schema(description = "就职岗位")
@ExcelProperty("就职岗位")
private String position;
/**
* 入职日期
*/
@ExcelAttribute(name = "入职日期", isDate = true)
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private Date joinLeaveDate;
/**
* 合同类型
*/
@Length(max = 32, message = "合同类型 不能超过32 个字符")
@ExcelAttribute(name = "合同类型", maxLength = 32)
@Schema(description = "合同类型")
@ExcelProperty("合同类型")
private String contractType;
/**
* 是否已签署合同
*/
@ExcelAttribute(name = "是否已签署合同")
@Schema(description = "是否已签署合同 0是1否")
@ExcelProperty("是否已签署合同")
private String contractFlag;
/**
* 状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档
*/
@Length(max = 1, message = "状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档 不能超过1 个字符")
@ExcelAttribute(name = "状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档", maxLength = 1)
@Schema(description = "状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档")
@ExcelProperty("状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档")
private String processStatus;
/**
* 签署甲方
*/
@Length(max = 50, message = "签署甲方 不能超过50 个字符")
@ExcelAttribute(name = "签署甲方", maxLength = 50)
@Schema(description = "签署甲方")
@ExcelProperty("签署甲方")
private String signatory;
/**
* 前端客服
*/
@Length(max = 30, message = "前端客服 不能超过30 个字符")
@ExcelAttribute(name = "前端客服", maxLength = 30)
@Schema(description = "前端客服")
@ExcelProperty("前端客服")
private String customerUsername;
/**
* 前端客服登录名
*/
@Length(max = 30, message = "前端客服登录名 不能超过30 个字符")
@ExcelAttribute(name = "前端客服登录名", maxLength = 30)
@Schema(description = "前端客服登录名")
@ExcelProperty("前端客服登录名")
private String customerUserLoginname;
/**
* 签署方式0线下签1电子签
*/
@Length(max = 1, message = "签署方式0线下签1电子签 不能超过1 个字符")
@ExcelAttribute(name = "签署方式0线下签1电子签", maxLength = 1)
@Schema(description = "签署方式0线下签1电子签")
@ExcelProperty("签署方式0线下签1电子签")
private String signType;
/**
* 法大大模版名称
*/
@Length(max = 50, message = "法大大模版名称 不能超过50 个字符")
@ExcelAttribute(name = "法大大模版名称", maxLength = 50)
@Schema(description = "法大大模版名称")
@ExcelProperty("法大大模版名称")
private String fadadaTemplate;
/**
* 数据来源1客户端 2客服端
*/
@Length(max = 1, message = "数据来源1客户端 2客服端 不能超过1 个字符")
@ExcelAttribute(name = "数据来源1客户端 2客服端", maxLength = 1)
@Schema(description = "数据来源1客户端 2客服端")
@ExcelProperty("数据来源1客户端 2客服端")
private String dataSource;
/**
* 预计确认时间
*/
@ExcelAttribute(name = "预计确认时间", isDate = true)
@Schema(description = "预计确认时间")
@ExcelProperty("预计确认时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private Date confirmTime;
/**
* 预计发起时间
*/
@ExcelAttribute(name = "预计发起时间", isDate = true)
@Schema(description = "预计发起时间")
@ExcelProperty("预计发起时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private Date expectedCollectionTime;
/**
* 确认人
*/
@Length(max = 30, message = "确认人 不能超过30 个字符")
@ExcelAttribute(name = "确认人", maxLength = 30)
@Schema(description = "确认人")
@ExcelProperty("确认人")
private String confirmUser;
@Schema(description = "创建人-姓名")
private String createName;
@Schema(description = "创建人")
private String createBy;
@Schema(description = "更新人")
private String updateBy;
/**
* 合同名称
*/
@Length(max = 50, message = "合同名称 不能超过50 个字符")
@ExcelAttribute(name = "合同名称", maxLength = 50)
@Schema(description = "合同名称")
@ExcelProperty("合同名称")
private String contractName;
/**
* 合同起始时间
*/
@ExcelAttribute(name = "合同起始时间", isDate = true)
@Schema(description = "合同起始时间")
@ExcelProperty("合同起始时间")
private Date contractStart;
/**
* 合同到期时间
*/
@ExcelAttribute(name = "合同到期时间", isDate = true)
@Schema(description = "合同到期时间")
@ExcelProperty("合同到期时间")
private Date contractEnd;
/**
* 签订类型
*/
@Length(max = 20, message = "签订类型 不能超过20 个字符")
@ExcelAttribute(name = "签订类型", maxLength = 20)
@Schema(description = "签订类型")
@ExcelProperty("签订类型")
private String situation;
/**
* 合同年限
*/
@NotBlank(message = "合同年限不能为空")
@ExcelAttribute(name = "合同年限", errorInfo = "合同年限不能为空")
@Schema(description = "合同年限")
private String contractTerm;
/**
* 合同年限-年
*/
@Length(max = 11, message = "合同年限-年 不能超过11 个字符")
@ExcelAttribute(name = "合同年限-年", maxLength = 11)
@Schema(description = "合同年限-年")
@ExcelProperty("合同年限-年")
private String contractDuratioYear;
/**
* 合同年限-月
*/
@Length(max = 11, message = "合同年限-月 不能超过11 个字符")
@ExcelAttribute(name = "合同年限-月", maxLength = 11)
@Schema(description = "合同年限-月")
@ExcelProperty("合同年限-月")
private String contractDuratioMonth;
/**
* 合同试用期开始时间
*/
@ExcelAttribute(name = "合同试用期开始时间", isDate = true)
@Schema(description = "合同试用期开始时间")
@ExcelProperty("合同试用期开始时间")
private Date periodStart;
/**
* 合同试用期结束时间
*/
@ExcelAttribute(name = "合同试用期结束时间", isDate = true)
@Schema(description = "合同试用期结束时间")
@ExcelProperty("合同试用期结束时间")
private Date periodEnd;
/**
* 预计确认时间
*/
@ExcelAttribute(name = "预计确认时间", isDate = true)
@Schema(description = "预计确认时间")
@ExcelProperty("预计确认时间")
private Date expectedConfirmTime;
/**
* 配置名称
*/
@Length(max = 100, message = "配置名称 不能超过100 个字符")
@ExcelAttribute(name = "配置名称", maxLength = 100)
@Schema(description = "配置名称")
@ExcelProperty("配置名称")
private String configName;
/**
* 是否允许修改 0是 1否
*/
@Length(max = 1, message = "是否允许修改 0是 1否 不能超过1 个字符")
@ExcelAttribute(name = "是否允许修改 0是 1否", maxLength = 1)
@Schema(description = "是否允许修改 0是 1否")
@ExcelProperty("是否允许修改 0是 1否")
private String updateFlag;
/**
* 是否有试用期 0是1否
*/
@Length(max = 1, message = "是否有试用期 0是1否 不能超过1 个字符")
@ExcelAttribute(name = "是否有试用期 0是1否", maxLength = 1)
@Schema(description = "是否有试用期 0是1否")
@ExcelProperty("是否有试用期 0是1否")
private String tryPeriodType;
/**
* 试用期(单位月)
*/
@Length(max = 5, message = "试用期(单位月) 不能超过5 个字符")
@ExcelAttribute(name = "试用期(单位月)", maxLength = 5)
@Schema(description = "试用期(单位月)")
@ExcelProperty("试用期(单位月)")
private String tryPeriod;
/**
* 试用期工资 元/月
*/
@ExcelAttribute(name = "试用期工资 元/月")
@Schema(description = "试用期工资 元/月")
@ExcelProperty("试用期工资 元/月")
private BigDecimal periodSalaryPerMonth;
/**
* 工资形式 1.计时工资 2.计件工资 3.其他
*/
@Length(max = 1, message = "工资形式 1.计时工资 2.计件工资 3.其他 不能超过1 个字符")
@ExcelAttribute(name = "工资形式 1.计时工资 2.计件工资 3.其他", maxLength = 1)
@Schema(description = "工资形式 1.计时工资 2.计件工资 3.其他")
@ExcelProperty("工资形式 1.计时工资 2.计件工资 3.其他")
private String salaryType;
/**
* 计时工资 工资标准 元/月
*/
@ExcelAttribute(name = "计时工资 工资标准 元/月 ")
@Schema(description = "计时工资 工资标准 元/月 ")
@ExcelProperty("计时工资 工资标准 元/月 ")
private BigDecimal salaryStandardPerHour;
/**
* 计件工资 工资标准单价/元
*/
@ExcelAttribute(name = "计件工资 工资标准单价/元 ")
@Schema(description = "计件工资 工资标准单价/元 ")
@ExcelProperty("计件工资 工资标准单价/元 ")
private BigDecimal salaryStandardPerPiece;
/**
* 配置id
*/
@Length(max = 36, message = "配置id 不能超过36 个字符")
@ExcelAttribute(name = "配置id", maxLength = 36)
@Schema(description = "配置id")
@ExcelProperty("配置id")
private String configId;
/**
* 工作部门
*/
@Length(max = 50, message = "工作部门 不能超过50 个字符")
@ExcelAttribute(name = "工作部门", maxLength = 50)
@Schema(description = "工作部门")
@ExcelProperty("工作部门")
private String workingDept;
/**
* 用工单位名称
*/
@Length(max = 50, message = "用工单位名称 不能超过50 个字符")
@ExcelAttribute(name = "用工单位名称", maxLength = 50)
@Schema(description = "用工单位名称")
@ExcelProperty("用工单位名称")
private String workingCompany;
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制")
private String workingHours;
@Schema(description = "试用期工资(元/月)")
private String workingReward;
/**
* 购买补充保险说明
*/
@Length(max = 50, message = "购买补充保险说明 不能超过50 个字符")
@ExcelAttribute(name = "购买补充保险说明", maxLength = 50)
@Schema(description = "购买补充保险说明")
@ExcelProperty("购买补充保险说明")
private String riskBuyDesc;
/**
* 其他 (工资形式其他时的工资)
*/
@Length(max = 20, message = "其他 (工资形式其他时的工资) 不能超过20 个字符")
@ExcelAttribute(name = "其他 (工资形式其他时的工资)", maxLength = 20)
@Schema(description = "其他 (工资形式其他时的工资)")
@ExcelProperty("其他 (工资形式其他时的工资)")
private String otherWage;
/**
* 劳务费(元/月)
*/
@Length(max = 20, message = "劳务费(元/月) 不能超过20 个字符")
@ExcelAttribute(name = "劳务费(元/月)", maxLength = 20)
@Schema(description = "劳务费(元/月)")
@ExcelProperty("劳务费(元/月)")
private String laborCost;
/**
* 违约责任(金额)
*/
@Length(max = 20, message = "违约责任(金额) 不能超过20 个字符")
@ExcelAttribute(name = "违约责任(金额)", maxLength = 20)
@Schema(description = "违约责任(金额)")
@ExcelProperty("违约责任(金额)")
private String defaultAmount;
/**
* 工资结算周期
*/
@Length(max = 20, message = "工资结算周期 不能超过20 个字符")
@ExcelAttribute(name = "工资结算周期", maxLength = 20)
@Schema(description = "工资结算周期")
@ExcelProperty("工资结算周期")
private String settlementCycle;
/**
* 工资发放时间
*/
@Length(max = 50, message = "工资发放时间 不能超过50 个字符")
@ExcelAttribute(name = "工资发放时间", maxLength = 50)
@Schema(description = "工资发放时间")
@ExcelProperty("工资发放时间")
private String paymentTime;
/**
* 工资发放方式 0 直接发放/委托银行代发
*/
@Length(max = 1, message = "工资发放方式 0 直接发放/委托银行代发 不能超过1 个字符")
@ExcelAttribute(name = "工资发放方式 0 直接发放/委托银行代发", maxLength = 1)
@Schema(description = "工资发放方式 0 直接发放/委托银行代发")
@ExcelProperty("工资发放方式 0 直接发放/委托银行代发")
private String paymentType;
/**
* 派遣期限
*/
@Length(max = 1, message = "派遣期限 不能超过1 个字符")
@ExcelAttribute(name = "派遣期限", maxLength = 1)
@Schema(description = "派遣期限")
@ExcelProperty("派遣期限")
private String dispatchPeriod;
/**
* 派遣开始日期
*/
@ExcelAttribute(name = "派遣开始日期", isDate = true)
@Schema(description = "派遣开始日期")
@ExcelProperty("派遣开始日期")
private Date dispatchPeriodStart;
/**
* 派遣结束日期
*/
@ExcelAttribute(name = "派遣结束日期", isDate = true)
@Schema(description = "派遣结束日期")
@ExcelProperty("派遣结束日期")
private Date dispatchPeriodEnd;
/**
* 工作方式 0 第一种方式 1 第二种方式
*/
@Length(max = 5, message = "工作方式 0 第一种方式 1 第二种方式 不能超过5 个字符")
@ExcelAttribute(name = "工作方式 0 第一种方式 1 第二种方式", maxLength = 5)
@Schema(description = "工作方式 0 第一种方式 1 第二种方式")
@ExcelProperty("工作方式 0 第一种方式 1 第二种方式")
private String workType;
/**
* 每周工作天数
*/
@Length(max = 10, message = "每周工作天数 不能超过10 个字符")
@ExcelAttribute(name = "每周工作天数", maxLength = 10)
@Schema(description = "每周工作天数")
@ExcelProperty("每周工作天数")
private String workDayCount;
/**
* 每周工作日
*/
@Length(max = 50, message = "每周工作日 不能超过50 个字符")
@ExcelAttribute(name = "每周工作日", maxLength = 50)
@Schema(description = "每周工作日")
@ExcelProperty("每周工作日")
private String workDay;
/**
* 每日工作时长
*/
@Length(max = 10, message = "每日工作时长 不能超过10 个字符")
@ExcelAttribute(name = "每日工作时长", maxLength = 10)
@Schema(description = "每日工作时长")
@ExcelProperty("每日工作时长")
private String workHours;
/**
* 其他工作时间 (工作方式为第二种方式)
*/
@Length(max = 50, message = "其他工作时间 (工作方式为第二种方式) 不能超过50 个字符")
@ExcelAttribute(name = "其他工作时间 (工作方式为第二种方式)", maxLength = 50)
@Schema(description = "其他工作时间 (工作方式为第二种方式)")
@ExcelProperty("其他工作时间 (工作方式为第二种方式)")
private String otherWorkDay;
/**
* 实习期限 无/一个月/两个月.../十二个月
*/
@Length(max = 5, message = "实习期限 无/一个月/两个月.../十二个月 不能超过5 个字符")
@ExcelAttribute(name = "实习期限 无/一个月/两个月.../十二个月", maxLength = 5)
@Schema(description = "实习期限 无/一个月/两个月.../十二个月")
@ExcelProperty("实习期限 无/一个月/两个月.../十二个月")
private String internshipPeriod;
/**
* 实习开始日期
*/
@ExcelAttribute(name = "实习开始日期", isDate = true)
@Schema(description = "实习开始日期")
@ExcelProperty("实习开始日期")
private Date internshipPeriodStart;
/**
* 实习结束日期
*/
@ExcelAttribute(name = "实习结束日期", isDate = true)
@Schema(description = "实习结束日期")
@ExcelProperty("实习结束日期")
private Date internshipPeriodEnd;
/**
* 合同岗位 0 固定岗位 1 等于档案处维护 2 自定义
*/
@Length(max = 1, message = "合同岗位 0 固定岗位 1 等于档案处维护 2 自定义 不能超过1 个字符")
@ExcelAttribute(name = "合同岗位 0 固定岗位 1 等于档案处维护 2 自定义", maxLength = 1)
@Schema(description = "合同岗位 0 固定岗位 1 等于档案处维护 2 自定义")
@ExcelProperty("合同岗位 0 固定岗位 1 等于档案处维护 2 自定义")
private String postType;
/**
* 合同岗位名称
*/
@Length(max = 50, message = "合同岗位名称 不能超过50 个字符")
@ExcelAttribute(name = "合同岗位名称", maxLength = 50)
@Schema(description = "合同岗位名称")
@ExcelProperty("合同岗位名称")
private String post;
/**
* 工作地点
*/
@Length(max = 200, message = "工作地点 不能超过200 个字符")
@ExcelAttribute(name = "工作地点", maxLength = 200)
@Schema(description = "工作地点")
@ExcelProperty("工作地点")
private String workAddress;
/**
* 入职确认信息id
*/
@ExcelAttribute(name = "入职确认信息主表id")
@Schema(description = "入职确认信息主表id")
@ExcelProperty("入职确认信息主表id")
private String registerId;
@Schema(description = "是否撤销签署0是1否")
private String signFlag;
}
......@@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAuditVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.ErrorMessage;
......@@ -413,4 +410,18 @@ public class TEmployeeContractInfoController {
return tEmployeeContractInfoService.getMinDateByCardAndDeptId(idVo);
}
/**
* @Author huych
* @Description 查询是否存在正常或者在途的合同
* @Date 10:36 2025/6/12
* @Param
* @return
**/
@Operation(summary = "查询是否存在正常或者在途的合同", description = "查询是否存在正常或者在途的合同")
@Inner
@PostMapping("/selectExitEmpCopntract")
public Boolean selectExitEmpCopntract(@RequestBody TEmployeeAutoRegistCheckVo cardVo) {
return tEmployeeContractInfoService.selectExitEmpCopntract(cardVo);
}
}
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistRevokeVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/temployeecontractpre" )
@Tag(name = "合同待签订任务记录表管理")
public class TEmployeeContractPreController {
private final TEmployeeContractPreService tEmployeeContractPreService;
private final MenuUtil menuUtil;
private final TEmployeeContractInfoMapper employeeContractInfoMapper;
/**
* 简单分页查询
* @param page 分页对象
* @param tEmployeeContractPre 合同待签订任务记录表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TEmployeeContractPre>> getTEmployeeContractPrePage(Page<TEmployeeContractPre> page, TEmployeeContractPreSearchVo tEmployeeContractPre) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tEmployeeContractPre);
return new R<>(tEmployeeContractPreService.getTEmployeeContractPrePage(page,tEmployeeContractPre));
}
/**
* 通过id查询合同待签订任务记录表
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
public R<TEmployeeContractPre> getById(@PathVariable("id" ) String id) {
return R.ok(tEmployeeContractPreService.getById(id));
}
/**
* 不分页查询
* @param tEmployeeContractPre 商险待办任务表
* @return
*/
@Operation(description = "不分页查询")
@GetMapping("/noPage")
public R<List<TEmployeeContractPre>> getTEmployeeContractPreNoPage(TEmployeeContractPreSearchVo tEmployeeContractPre) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tEmployeeContractPre);
return new R<>(tEmployeeContractPreService.getTEmployeeContractPreNoPage(tEmployeeContractPre));
}
/**
* 合同待签订数量查询
* @param tEmployeeContractPre 合同待签订任务表
* @return
*/
@Operation(description = "合同待签订数量查询")
@GetMapping("/getListCount")
public R getListCount(TEmployeeContractPreSearchVo tEmployeeContractPre) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tEmployeeContractPre);
return R.ok(tEmployeeContractPreService.getTEmployeeContractCount(tEmployeeContractPre));
}
/**
* 合同待签订信息单个/批量确认
* @param idList id数组
**/
@Operation(description = "合同待签订信息单个/批量确认")
@PostMapping("/confirm")
public R confirm(@RequestBody List<String> idList) {
return tEmployeeContractPreService.confirm(idList);
}
/**
* 合同待签订信息单个/批量发起签署任务
* @param idList id数组
**/
@Operation(description = "合同待签订信息单个/批量发起签署任务")
@PostMapping("/dispatcherContract")
public R dispatcherContract(@RequestBody List<String> idList) {
return tEmployeeContractPreService.dispatcherContract(idList);
}
/**
* 合同待签订撤销签署
* @param registRevokeVoList 撤销合同数组
**/
@Operation(description = "合同待签订撤销签署")
@PostMapping("/revokeSign")
public R revokeSign(@RequestBody List<TEmployeeAutoRegistRevokeVo> registRevokeVoList) {
return tEmployeeContractPreService.revokeSign(registRevokeVoList);
}
/**
* 新增合同待签订任务记录表
* @param tEmployeeContractPre 合同待签订任务记录表
* @return R
*/
@Operation(summary = "新增合同待签订任务记录表", description = "新增合同待签订任务记录表")
@SysLog("新增合同待签订任务记录表" )
@PostMapping
public R<Boolean> save(@RequestBody TEmployeeContractPre tEmployeeContractPre) {
return R.ok(tEmployeeContractPreService.save(tEmployeeContractPre));
}
/**
* 修改合同待签订任务记录表
* @param tEmployeeContractPre 合同待签订任务记录表
* @return R
*/
@Operation(summary = "修改合同待签订任务记录表", description = "修改合同待签订任务记录表")
@SysLog("修改合同待签订任务记录表" )
@PutMapping
public R<Boolean> updateById(@RequestBody TEmployeeContractPre tEmployeeContractPre) {
return R.ok(tEmployeeContractPreService.updateById(tEmployeeContractPre));
}
/**
* 通过id删除合同待签订任务记录表
* @param id id
* @return R
*/
@Operation(summary = "通过id删除合同待签订任务记录表", description = "通过id删除合同待签订任务记录表:hasPermission('archives_temployeecontractpre_del')")
@SysLog("通过id删除合同待签订任务记录表" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_temployeecontractpre_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tEmployeeContractPreService.removeById(id));
}
/**
* 合同待签订任务记录表 批量导出
* @author huych
* @date 2025-06-11 14:15:53
**/
@Operation(description = "导出合同待签订任务记录表")
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody TEmployeeContractPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tEmployeeContractPreService.listExport(response,searchVo);
}
/**
* 新增合同待签订任务记录表
* @author huych
* @date 2025-06-12 14:26:32
**/
@Operation(description = "新增合同待签订任务记录表")
@Inner
@PostMapping("/inner/saveContractPreInfo")
public Boolean saveContractPreInfo(@RequestBody TEmployeeContractPreVo preVo) {
return tEmployeeContractPreService.saveContractPreInfo(preVo);
}
/**
* 查询在用或者在途的合同数据
* @param deptNo 项目编码
* @param empIdcard 身份证号
* @return
*/
@Operation(description = "查询在用或者在途的合同数据")
@GetMapping("/getContractInfo")
public R<TEmployeeContractInfo> getInuseContractInfo(@RequestParam String deptNo,@RequestParam String empIdcard) {
TEmployeeContractInfo employeeContractInfo = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, empIdcard)
.eq(TEmployeeContractInfo::getDeptNo, deptNo)
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
return R.ok(employeeContractInfo);
}
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Mapper
public interface TEmployeeContractPreMapper extends BaseMapper<TEmployeeContractPre> {
/**
* 合同待签订任务记录表简单分页查询
* @param tEmployeeContractPre 合同待签订任务记录表
* @return
*/
IPage<TEmployeeContractPre> getTEmployeeContractPrePage(Page<TEmployeeContractPre> page, @Param("tEmployeeContractPre") TEmployeeContractPreSearchVo tEmployeeContractPre);
List<TEmployeeContractPre> getTEmployeeContractPreNoPage(@Param("TEmployeeContractPre") TEmployeeContractPreSearchVo tEmployeeContractPre);
long getTEmployeeContractPreExportCount(@Param("tEmployeeContractPre") TEmployeeContractPreSearchVo tEmployeeContractPre);
List<TEmployeeContractPreExportVo> getTEmployeeContractPreExport(@Param("tEmployeeContractPre") TEmployeeContractPreSearchVo tEmployeeContractPre);
List<EmployeeContractVO> getDisPatcherContractList(@Param("idList") List<String> idList,@Param("statusList") List<String> statusList);
}
......@@ -141,6 +141,8 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
**/
R<List<ErrorMessage>> batchImport(InputStream inputStream);
void importContract(List<EmployeeContractVO> excelVOList, List<ErrorMessage> errorMessageList);
/**
* @param inputStream
* @Description: 批量更新
......@@ -188,4 +190,6 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
String getMinDateByCardAndDeptId(IdNameNoVo vo);
Boolean selectExitEmpCopntract(TEmployeeAutoRegistCheckVo cardVo);
}
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistRevokeVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
public interface TEmployeeContractPreService extends IService<TEmployeeContractPre> {
/**
* 合同待签订任务记录表简单分页查询
* @param tEmployeeContractPre 合同待签订任务记录表
* @return
*/
IPage<TEmployeeContractPre> getTEmployeeContractPrePage(Page<TEmployeeContractPre> page, TEmployeeContractPreSearchVo tEmployeeContractPre);
List<TEmployeeContractPre> getTEmployeeContractPreNoPage(@Param("tEmployeeContractPre") TEmployeeContractPreSearchVo tEmployeeContractPre);
/**
* 查询合同待签订数量
* @param tEmployeeContractPre 查询合同待签订vo
* @return
*/
long getTEmployeeContractCount(TEmployeeContractPreSearchVo tEmployeeContractPre);
/**
* 导出合同待签订任务记录表
* @param response
* @param searchVo
*/
void listExport(HttpServletResponse response, TEmployeeContractPreSearchVo searchVo);
/**
* 新增合同待签订
* @param preVo
* @return
*/
Boolean saveContractPreInfo(TEmployeeContractPreVo preVo);
/**
* 合同待签订信息单个/批量确认
* @param idList id集合
* @return
*/
R confirm(List<String> idList);
/**
* 合同待签订信息单个/批量发起签署任务
* @param idList id集合
* @return
*/
R dispatcherContract(List<String> idList);
/**
* 合同待签订撤销签署
* @param registRevokeVoList
* @return
*/
R revokeSign(List<TEmployeeAutoRegistRevokeVo> registRevokeVoList);
}
......@@ -1971,6 +1971,24 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return baseMapper.getMinDateByCardAndDeptId(vo);
}
@Override
public Boolean selectExitEmpCopntract(TEmployeeAutoRegistCheckVo cardVo) {
if (Common.isNotNull(cardVo) && Common.isNotNull(cardVo.getEmpIdcard()) && Common.isNotNull(cardVo.getDeptNo())) {
return baseMapper.selectCount(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, cardVo.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, cardVo.getDeptNo())
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)) > 0;
} else {
return false;
}
}
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
public void changeStatus(TEmployeeContractInfo contractInfo,YifuUser user) {
//同步任务处理清单执行详情
......
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
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.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAudit;
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.mapper.TEmployeeContractPreMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractAuditService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContractPreMapper, TEmployeeContractPre> implements TEmployeeContractPreService {
private final TSettleDomainService tSettleDomainService;
private final TEmployeeContractAuditService tEmployeeContractAuditService;
private final TEmployeeContractInfoService contractInfoService;
/**
* 合同待签订任务记录表简单分页查询
* @param tEmployeeContractPre 合同待签订任务记录表
* @return
*/
@Override
public IPage<TEmployeeContractPre> getTEmployeeContractPrePage(Page<TEmployeeContractPre> page, TEmployeeContractPreSearchVo tEmployeeContractPre){
//权限赋值
initSearchVo(tEmployeeContractPre);
if (Common.isEmpty(tEmployeeContractPre.getProcessStatus()) && Common.isEmpty(tEmployeeContractPre.getStatusList())) {
tEmployeeContractPre.setStatusList(Stream.of("0","1","2","3","4","5","6","7","8").collect(Collectors.toList()));
}
return baseMapper.getTEmployeeContractPrePage(page,tEmployeeContractPre);
}
/**
* 合同待签订任务记录表手机端不分页查询
* @param tEmployeeContractPre 合同待签订任务记录表
* @return
*/
@Override
public List<TEmployeeContractPre> getTEmployeeContractPreNoPage(TEmployeeContractPreSearchVo tEmployeeContractPre) {
//权限赋值
initSearchVo(tEmployeeContractPre);
if (Common.isEmpty(tEmployeeContractPre.getStatusList())) {
tEmployeeContractPre.setStatusList(Stream.of("0").collect(Collectors.toList()));
}
return baseMapper.getTEmployeeContractPreNoPage(tEmployeeContractPre);
}
/**
* 合同待签订数量查询
* @param tEmployeeContractPre 合同待签订任务记录表
* @return
*/
@Override
public long getTEmployeeContractCount(TEmployeeContractPreSearchVo tEmployeeContractPre) {
//权限赋值
initSearchVo(tEmployeeContractPre);
if (Common.isEmpty(tEmployeeContractPre.getProcessStatus())&& Common.isEmpty(tEmployeeContractPre.getStatusList())) {
tEmployeeContractPre.setStatusList(Stream.of("0","1","2","3","4","5","6","7","8").collect(Collectors.toList()));
}
return baseMapper.getTEmployeeContractPreExportCount(tEmployeeContractPre);
}
/**
* 合同待签订任务记录表批量导出
* @param searchVo 合同待签订任务记录表
* @return
*/
@Override
public void listExport(HttpServletResponse response, TEmployeeContractPreSearchVo searchVo){
String fileName = "合同待签订任务记录批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TEmployeeContractPreExportVo> list = new ArrayList<>();
//权限赋值
initSearchVo(searchVo);
if (Common.isEmpty(searchVo.getProcessStatus())&& Common.isEmpty(searchVo.getStatusList())) {
searchVo.setStatusList(Stream.of("0","1","2","3","4","5","6","7","8").collect(Collectors.toList()));
}
long count = baseMapper.getTEmployeeContractPreExportCount(searchVo);
try(ServletOutputStream out = response.getOutputStream();) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
//这里需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TEmployeeContractPreExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmployeeContractPreExport(searchVo);
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("合同待签订任务记录"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("合同待签订任务记录"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}
}
/**
* 保存合同待签订
* @param preVo 合同待签订的视图对象,包含待保存的合同预信息
* @return 如果保存成功返回true,否则返回false或null
*/
@Override
public Boolean saveContractPreInfo(TEmployeeContractPreVo preVo) {
// 检查传入的视图对象是否不为空
if (null != preVo) {
try {
// 判断是否存在合同待签订信息
TEmployeeContractPre preExit = baseMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId, preVo.getRegisterId())
.eq(TEmployeeContractPre::getEmpIdcard, preVo.getEmpIdcard())
.eq(TEmployeeContractPre::getDeptNo, preVo.getDeptNo())
.last(CommonConstants.LAST_ONE_SQL));
// 创建一个新的合同待签订对象
TEmployeeContractPre pre = new TEmployeeContractPre();
// 将视图对象中的属性复制到合同待签订对象中
BeanUtils.copyProperties(preVo, pre);
// 如果预期领取时间不为空,则将其转换为LocalDateTime类型并设置
if (Common.isNotNull(preVo.getExpectedCollectionTime())) {
pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime()));
}
// 如果预期确认时间不为空,则将其转换为LocalDateTime类型并设置
if (Common.isNotNull(preVo.getExpectedConfirmTime())) {
pre.setExpectedConfirmTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedConfirmTime()));
}
// 如果已存在合同预信息,则删除旧的信息并插入新的信息
if (Common.isNotNull(preExit)) {
pre.setId(preExit.getId());
baseMapper.deleteById(preExit);
baseMapper.insert(pre);
} else {
// 如果不存在,则直接插入新的合同预信息
baseMapper.insert(pre);
}
// 暂时不需要,先注释,后续可能会需要
// if (Common.isNotNull(pre.getExpectedCollectionTime())) {
// // 事务提交后触发调度
// TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
// @Override
// public void afterCommit() {
// LocalDateTime now = LocalDateTime.now();
// if (pre.getExpectedCollectionTime().isEqual(now)) {
// scheduleService.executeTask(pre.getId());
// } else if (preVo.getExpectedCollectionTime().compareTo(LocalDateTimeUtils.convertLDTToDate(now)) > 0){
// scheduleService.scheduleTask(pre);
// }
// }
// });
// }
} catch (Exception e) {
// 记录执行异常信息
log.error("执行异常", e);
// 异常情况下返回null
return null;
}
}
// 保存成功返回true
return true;
}
/**
* 确认合同待签订列表
* 此方法用于将选定的合同待签订状态从"未处理"更新为"已处理"
* 它首先查询具有给定ID且处于未处理状态的合同预览如果找到符合条件的合同预览,它将它们的状态更新为已处理
* 如果没有找到任何符合条件的合同预览,它将返回一个失败的消息
*
* @param idList 合同待签订的ID列表,代表需要确认的合同
* @return 返回一个表示操作结果的R对象如果操作成功,返回R.ok(),否则返回R.failed(),包含错误消息
*/
@Override
public R confirm(List<String> idList) {
// 查询给定ID列表中所有未处理的合同待签订
List<TEmployeeContractPre> contractPreList = baseMapper.selectList(Wrappers.<TEmployeeContractPre>query()
.lambda().in(TEmployeeContractPre::getId, idList)
.eq(TEmployeeContractPre::getProcessStatus, CommonConstants.ZERO_STRING));
// 如果没有找到任何未处理的合合同待签订,返回失败消息
if (Common.isEmpty(contractPreList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
// 准备更新条件,将找到的合同待签订状态从"未处理"更新为"已处理"
LambdaUpdateWrapper<TEmployeeContractPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TEmployeeContractPre::getId, idList)
.eq(TEmployeeContractPre::getProcessStatus, CommonConstants.ZERO_STRING)
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.ONE_STRING);
// 执行更新操作
this.update(updateWrapper);
// 返回成功消息
return R.ok();
}
@Override
public R dispatcherContract(List<String> idList) {
List<TEmployeeContractPre> contractPreList = baseMapper.selectList(Wrappers.<TEmployeeContractPre>query()
.lambda().in(TEmployeeContractPre::getId, idList)
.in(TEmployeeContractPre::getProcessStatus, CommonConstants.socialInfoStatus));
if (Common.isEmpty(contractPreList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
//发起派单
List<ErrorMessage> errorMessageList = new ArrayList<>();
List<EmployeeContractVO> excelVOList = baseMapper.getDisPatcherContractList(idList,CommonConstants.socialInfoStatus);
if (Common.isNotNull(excelVOList) && !excelVOList.isEmpty()) {
//调用批量派单接口
contractInfoService.importContract(excelVOList, errorMessageList);
}
return R.ok(errorMessageList);
}
@Override
public R revokeSign(List<TEmployeeAutoRegistRevokeVo> registRevokeVoList) {
if (Common.isNotNull(registRevokeVoList)) {
List<String> idList = registRevokeVoList.stream().map(TEmployeeAutoRegistRevokeVo::getId).collect(Collectors.toList());
List<TEmployeeContractPre> contractPreList = baseMapper.selectList(Wrappers.<TEmployeeContractPre>query()
.lambda().in(TEmployeeContractPre::getId, idList)
.ne(TEmployeeContractPre::getProcessStatus, CommonConstants.NINE_STRING)
.ne(TEmployeeContractPre::getProcessStatus, CommonConstants.FOUR_STRING)
.ne(TEmployeeContractPre::getProcessStatus, CommonConstants.EIGHT_STRING));
if (Common.isEmpty(contractPreList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
TEmployeeContractPre pre;
TEmployeeContractInfo contractInfo;
for (TEmployeeAutoRegistRevokeVo registRevokeVo : registRevokeVoList) {
pre = baseMapper.selectById(registRevokeVo.getId());
//电子待归档、线下签待归档、已完结的不能撤销签署
if (Common.isNotNull(pre) && !CommonConstants.NINE_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.FOUR_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.EIGHT_STRING.equals(pre.getProcessStatus())) {
//如果不是待确认和待发起,需要记录操作记录
if (!CommonConstants.ZERO_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.ONE_STRING.equals(pre.getProcessStatus()) &&
Common.isNotNull(pre.getContractId())) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("撤销签署");
audit.setLinkId(pre.getContractId());
audit.setLinkType(CommonConstants.ONE_INT);
tEmployeeContractAuditService.save(audit);
}
pre.setProcessStatus(CommonConstants.NINE_STRING);
pre.setSignFlag(CommonConstants.ZERO_STRING);
pre.setRevokeReason(registRevokeVo.getReason());
baseMapper.updateById(pre);
}
if (Common.isNotNull(pre.getContractId())) {
//如果存在合同申请审核数据,将状态更新成袋提交
contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getId, pre.getContractId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractInfo)) {
contractInfo.setAuditStatus(CommonConstants.ZERO_INT);
contractInfoService.updateById(contractInfo);
}
}
}
}
return R.ok();
}
/**
* @Description: 获取前端客服的所有项目权限
* @Author: huych
* @Date: 2025/6/11 16:55
* @return:
**/
public void initSearchVo(TEmployeeContractPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
if (isSsc || CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
searchVo.setAuthSql(null);
return;
}
if (Common.isNotNull(searchVo.getType()) && CommonConstants.ONE_STRING.equals(searchVo.getType())) {
searchVo.setAuthSql(null);
//获取项目信息
List<String> deptNos = tSettleDomainService.getAllDeptByCustomerLoginName(user.getUsername());
if (null != deptNos && !deptNos.isEmpty()) {
searchVo.setDeptNoList(deptNos);
} else {
searchVo.setId(CommonConstants.ONE_STRING_NEGATE);
}
}
}
public boolean haveRole(YifuUser user, long roleId) {
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) {
if (role == roleId) {
return true;
}
}
return false;
}
}
......@@ -27,13 +27,11 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap;
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.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
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.TSettleDomainMapper;
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.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
......@@ -80,6 +78,10 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Autowired
private InsuranceDaprUtil insuranceDaprUtil;
@Autowired
@Lazy
private TEmployeeContractPreService employeeContractPreService;
@Autowired
@Lazy
private EmployeeRegistrationPreService registrationPreService;
......@@ -588,6 +590,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
//更新商险待购买的前端客服
updateVo.setCustomerUserLoginName(vo.getLoginName());
insuranceDaprUtil.updateInsurancePreCustomerName(updateVo);
//更新合同待申请的前端客服
LambdaUpdateWrapper<TEmployeeContractPre> updateContractWrapper = new LambdaUpdateWrapper<>();
updateContractWrapper.eq(TEmployeeContractPre::getDeptNo,vo.getDepartNo())
.set(TEmployeeContractPre::getCustomerUsername, vo.getName())
.set(TEmployeeContractPre::getCustomerUserLoginname, vo.getLoginName());
employeeContractPreService.update(updateContractWrapper);
}
}
}catch (Exception e){
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper">
<resultMap id="tEmployeeContractPreMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre">
<id property="id" column="id"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="deptId" column="dept_id"/>
<result property="employeeName" column="employee_name"/>
<result property="empIdcard" column="emp_idcard"/>
<result property="empPhone" column="emp_phone"/>
<result property="position" column="position"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="contractType" column="contract_type"/>
<result property="processStatus" column="process_status"/>
<result property="signatory" column="signatory"/>
<result property="customerUsername" column="customer_username"/>
<result property="customerUserLoginname" column="customer_user_loginname"/>
<result property="signType" column="sign_type"/>
<result property="signFlag" column="sign_flag"/>
<result property="errorInfo" column="error_info"/>
<result property="fadadaTemplate" column="fadada_template"/>
<result property="dataSource" column="data_source"/>
<result property="expectedCollectionTime" column="expected_collection_time"/>
<result property="confirmUser" column="confirm_user"/>
<result property="contractName" column="contract_name"/>
<result property="contractStart" column="contract_start"/>
<result property="contractEnd" column="contract_end"/>
<result property="situation" column="situation"/>
<result property="contractDuratioYear" column="contract_duration_year"/>
<result property="contractDuratioMonth" column="contract_duration_month"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="periodStart" column="period_start"/>
<result property="periodEnd" column="period_end"/>
<result property="expectedConfirmTime" column="expected_confirm_time"/>
<result property="configName" column="config_name"/>
<result property="updateFlag" column="update_flag"/>
<result property="tryPeriodType" column="TRY_PERIOD_TYPE"/>
<result property="tryPeriod" column="TRY_PERIOD"/>
<result property="periodSalaryPerMonth" column="PERIOD_SALARY_PER_MONTH"/>
<result property="salaryType" column="SALARY_TYPE"/>
<result property="salaryStandardPerHour" column="SALARY_STANDARD_PER_HOUR"/>
<result property="salaryStandardPerPiece" column="SALARY_STANDARD_PER_PIECE"/>
<result property="configId" column="config_id"/>
<result property="workingDept" column="WORKING_DEPT"/>
<result property="workingCompany" column="WORKING_COMPANY"/>
<result property="workingHours" column="working_hours"/>
<result property="workingReward" column="working_reward"/>
<result property="riskBuyDesc" column="RISK_BUY_DESC"/>
<result property="otherWage" column="OTHER_WAGE"/>
<result property="laborCost" column="LABOR_COST"/>
<result property="defaultAmount" column="DEFAULT_AMOUNT"/>
<result property="settlementCycle" column="SETTLEMENT_CYCLE"/>
<result property="paymentTime" column="PAYMENT_TIME"/>
<result property="paymentType" column="PAYMENT_TYPE"/>
<result property="dispatchPeriod" column="DISPATCH_PERIOD"/>
<result property="dispatchPeriodStart" column="DISPATCH_PERIOD_START"/>
<result property="registerId" column="register_id"/>
<result property="revokeReason" column="revoke_reason"/>
<result property="dispatchPeriodEnd" column="DISPATCH_PERIOD_END"/>
<result property="workType" column="WORK_TYPE"/>
<result property="workDayCount" column="WORK_DAY_COUNT"/>
<result property="workDay" column="WORK_DAY"/>
<result property="workHours" column="WORK_HOURS"/>
<result property="otherWorkDay" column="OTHER_WORK_DAY"/>
<result property="internshipPeriod" column="INTERNSHIP_PERIOD"/>
<result property="internshipPeriodStart" column="INTERNSHIP_PERIOD_START"/>
<result property="internshipPeriodEnd" column="INTERNSHIP_PERIOD_END"/>
<result property="postType" column="POST_TYPE"/>
<result property="post" column="POST"/>
<result property="contractId" column="contract_id"/>
<result property="workAddress" column="WORK_ADDRESS"/>
<result property="updateTime" column="update_time"/>
<result property="createBy" column="create_by"/>
<result property="createName" column="create_name"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.dept_name,
a.dept_no,
a.dept_id,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
a.join_leave_date,
a.contract_type,
a.process_status,
a.signatory,
a.customer_username,
a.customer_user_loginname,
a.sign_type,
a.fadada_template,
a.data_source,
a.expected_collection_time,
a.confirm_user,
a.contract_name,
a.contract_start,
a.contract_end,
a.situation,
a.contract_duration_year,
a.contract_duration_month,
a.period_start,
a.period_end,
a.expected_confirm_time,
a.config_name,
a.update_flag,
a.TRY_PERIOD_TYPE,
a.TRY_PERIOD,
a.PERIOD_SALARY_PER_MONTH,
a.SALARY_TYPE,
a.SALARY_STANDARD_PER_HOUR,
a.SALARY_STANDARD_PER_PIECE,
a.config_id,
a.WORKING_DEPT,
a.WORKING_COMPANY,
a.RISK_BUY_DESC,
a.OTHER_WAGE,
a.LABOR_COST,
a.DEFAULT_AMOUNT,
a.SETTLEMENT_CYCLE,
a.PAYMENT_TIME,
a.PAYMENT_TYPE,
a.DISPATCH_PERIOD,
a.DISPATCH_PERIOD_START,
a.DISPATCH_PERIOD_END,
a.WORK_TYPE,
a.WORK_DAY_COUNT,
a.WORK_DAY,
a.WORK_HOURS,
a.OTHER_WORK_DAY,
a.INTERNSHIP_PERIOD,
a.INTERNSHIP_PERIOD_START,
a.INTERNSHIP_PERIOD_END,
a.POST_TYPE,
a.POST,
a.WORK_ADDRESS,
a.update_time,
a.create_by,
a.create_name,
a.create_time,
a.update_by,a.contract_term,a.sign_flag,a.error_info,a.contract_id,a.revoke_reason,
a.working_hours,a.working_reward
</sql>
<sql id="tEmployeeContractPre_where">
<if test="tEmployeeContractPre != null">
<if test="tEmployeeContractPre.id != null and tEmployeeContractPre.id.trim() != ''">
AND a.id = #{tEmployeeContractPre.id}
</if>
<if test="tEmployeeContractPre.idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="tEmployeeContractPre.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeContractPre.deptName != null and tEmployeeContractPre.deptName.trim() != ''">
AND a.dept_name like CONCAT('%',#{tEmployeeContractPre.dept_name},'%')
</if>
<if test="tEmployeeContractPre.deptNo != null and tEmployeeContractPre.deptNo.trim() != ''">
AND a.dept_no = #{tEmployeeContractPre.deptNo}
</if>
<if test="tEmployeeContractPre.deptId != null and tEmployeeContractPre.deptId.trim() != ''">
AND a.dept_id = #{tEmployeeContractPre.deptId}
</if>
<if test="tEmployeeContractPre.employeeName != null and tEmployeeContractPre.employeeName.trim() != ''">
AND a.employee_name = #{tEmployeeContractPre.employeeName}
</if>
<if test="tEmployeeContractPre.empIdcard != null and tEmployeeContractPre.empIdcard.trim() != ''">
AND a.emp_idcard like CONCAT('%',#{tEmployeeContractPre.empIdcard},'%')
</if>
<if test="tEmployeeContractPre.empPhone != null and tEmployeeContractPre.empPhone.trim() != ''">
AND a.emp_phone = #{tEmployeeContractPre.empPhone}
</if>
<if test="tEmployeeContractPre.position != null and tEmployeeContractPre.position.trim() != ''">
AND a.position like CONCAT('%',#{tEmployeeContractPre.position},'%')
</if>
<if test="tEmployeeContractPre.joinTimeStart != null">
AND a.join_leave_date <![CDATA[ >= ]]> #{tEmployeeContractPre.joinTimeStart}
</if>
<if test="tEmployeeContractPre.joinTimeEnd != null">
AND a.join_leave_date <![CDATA[ <= ]]> #{tEmployeeContractPre.joinTimeEnd}
</if>
<if test="tEmployeeContractPre.contractType != null and tEmployeeContractPre.contractType.trim() != ''">
AND a.contract_type = #{tEmployeeContractPre.contractType}
</if>
<if test="tEmployeeContractPre.processStatus != null and tEmployeeContractPre.processStatus.trim() != ''">
AND a.process_status = #{tEmployeeContractPre.processStatus}
</if>
<if test="tEmployeeContractPre.statusList != null and tEmployeeContractPre.statusList.size() > 0">
AND a.process_status in
<foreach item="item" index="index" collection="tEmployeeContractPre.statusList" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
<if test="tEmployeeContractPre.signatory != null and tEmployeeContractPre.signatory.trim() != ''">
AND a.signatory like CONCAT('%',#{tEmployeeContractPre.signatory},'%')
</if>
<if test="tEmployeeContractPre.customerUsername != null and tEmployeeContractPre.customerUsername.trim() != ''">
AND a.customer_username = #{tEmployeeContractPre.customerUsername}
</if>
<if test="tEmployeeContractPre.customerUserLoginname != null and tEmployeeContractPre.customerUserLoginname.trim() != ''">
AND a.customer_user_loginname = #{tEmployeeContractPre.customerUserLoginname}
</if>
<if test="tEmployeeContractPre.signType != null and tEmployeeContractPre.signType.trim() != ''">
AND a.sign_type = #{tEmployeeContractPre.signType}
</if>
<if test="tEmployeeContractPre.fadadaTemplate != null and tEmployeeContractPre.fadadaTemplate.trim() != ''">
AND a.fadada_template like CONCAT('%',#{tEmployeeContractPre.fadada_template},'%')
</if>
<if test="tEmployeeContractPre.dataSource != null and tEmployeeContractPre.dataSource.trim() != ''">
AND a.data_source = #{tEmployeeContractPre.dataSource}
</if>
<if test="tEmployeeContractPre.expectedCollectionTime != null">
AND a.expected_collection_time = #{tEmployeeContractPre.expectedCollectionTime}
</if>
<if test="tEmployeeContractPre.confirmUser != null and tEmployeeContractPre.confirmUser.trim() != ''">
AND a.confirm_user = #{tEmployeeContractPre.confirmUser}
</if>
<if test="tEmployeeContractPre.contractName != null and tEmployeeContractPre.contractName.trim() != ''">
AND a.contract_name = #{tEmployeeContractPre.contractName}
</if>
<if test="tEmployeeContractPre.contractStart != null">
AND a.contract_start = #{tEmployeeContractPre.contractStart}
</if>
<if test="tEmployeeContractPre.contractEnd != null">
AND a.contract_end = #{tEmployeeContractPre.contractEnd}
</if>
<if test="tEmployeeContractPre.situation != null and tEmployeeContractPre.situation.trim() != ''">
AND a.situation = #{tEmployeeContractPre.situation}
</if>
<if test="tEmployeeContractPre.contractDuratioYear != null and tEmployeeContractPre.contractDuratioYear.trim() != ''">
AND a.contract_duration_year = #{tEmployeeContractPre.contractDuratioYear}
</if>
<if test="tEmployeeContractPre.contractDuratioMonth != null and tEmployeeContractPre.contractDuratioMonth.trim() != ''">
AND a.contract_duration_month = #{tEmployeeContractPre.contractDuratioMonth}
</if>
<if test="tEmployeeContractPre.periodStart != null">
AND a.period_start = #{tEmployeeContractPre.periodStart}
</if>
<if test="tEmployeeContractPre.periodEnd != null">
AND a.period_end = #{tEmployeeContractPre.periodEnd}
</if>
<if test="tEmployeeContractPre.expectedConfirmTime != null">
AND a.expected_confirm_time = #{tEmployeeContractPre.expectedConfirmTime}
</if>
<if test="tEmployeeContractPre.configName != null and tEmployeeContractPre.configName.trim() != ''">
AND a.config_name = #{tEmployeeContractPre.configName}
</if>
<if test="tEmployeeContractPre.updateFlag != null and tEmployeeContractPre.updateFlag.trim() != ''">
AND a.update_flag = #{tEmployeeContractPre.updateFlag}
</if>
<if test="tEmployeeContractPre.tryPeriodType != null and tEmployeeContractPre.tryPeriodType.trim() != ''">
AND a.TRY_PERIOD_TYPE = #{tEmployeeContractPre.tryPeriodType}
</if>
<if test="tEmployeeContractPre.tryPeriod != null and tEmployeeContractPre.tryPeriod.trim() != ''">
AND a.TRY_PERIOD = #{tEmployeeContractPre.tryPeriod}
</if>
<if test="tEmployeeContractPre.periodSalaryPerMonth != null">
AND a.PERIOD_SALARY_PER_MONTH = #{tEmployeeContractPre.periodSalaryPerMonth}
</if>
<if test="tEmployeeContractPre.salaryType != null and tEmployeeContractPre.salaryType.trim() != ''">
AND a.SALARY_TYPE = #{tEmployeeContractPre.salaryType}
</if>
<if test="tEmployeeContractPre.salaryStandardPerHour != null">
AND a.SALARY_STANDARD_PER_HOUR = #{tEmployeeContractPre.salaryStandardPerHour}
</if>
<if test="tEmployeeContractPre.salaryStandardPerPiece != null">
AND a.SALARY_STANDARD_PER_PIECE = #{tEmployeeContractPre.salaryStandardPerPiece}
</if>
<if test="tEmployeeContractPre.configId != null and tEmployeeContractPre.configId.trim() != ''">
AND a.config_id = #{tEmployeeContractPre.configId}
</if>
<if test="tEmployeeContractPre.workingDept != null and tEmployeeContractPre.workingDept.trim() != ''">
AND a.WORKING_DEPT = #{tEmployeeContractPre.workingDept}
</if>
<if test="tEmployeeContractPre.workingCompany != null and tEmployeeContractPre.workingCompany.trim() != ''">
AND a.WORKING_COMPANY = #{tEmployeeContractPre.workingCompany}
</if>
<if test="tEmployeeContractPre.riskBuyDesc != null and tEmployeeContractPre.riskBuyDesc.trim() != ''">
AND a.RISK_BUY_DESC = #{tEmployeeContractPre.riskBuyDesc}
</if>
<if test="tEmployeeContractPre.otherWage != null and tEmployeeContractPre.otherWage.trim() != ''">
AND a.OTHER_WAGE = #{tEmployeeContractPre.otherWage}
</if>
<if test="tEmployeeContractPre.laborCost != null and tEmployeeContractPre.laborCost.trim() != ''">
AND a.LABOR_COST = #{tEmployeeContractPre.laborCost}
</if>
<if test="tEmployeeContractPre.defaultAmount != null and tEmployeeContractPre.defaultAmount.trim() != ''">
AND a.DEFAULT_AMOUNT = #{tEmployeeContractPre.defaultAmount}
</if>
<if test="tEmployeeContractPre.settlementCycle != null and tEmployeeContractPre.settlementCycle.trim() != ''">
AND a.SETTLEMENT_CYCLE = #{tEmployeeContractPre.settlementCycle}
</if>
<if test="tEmployeeContractPre.paymentTime != null and tEmployeeContractPre.paymentTime.trim() != ''">
AND a.PAYMENT_TIME = #{tEmployeeContractPre.paymentTime}
</if>
<if test="tEmployeeContractPre.paymentType != null and tEmployeeContractPre.paymentType.trim() != ''">
AND a.PAYMENT_TYPE = #{tEmployeeContractPre.paymentType}
</if>
<if test="tEmployeeContractPre.dispatchPeriod != null and tEmployeeContractPre.dispatchPeriod.trim() != ''">
AND a.DISPATCH_PERIOD = #{tEmployeeContractPre.dispatchPeriod}
</if>
<if test="tEmployeeContractPre.dispatchPeriodStart != null">
AND a.DISPATCH_PERIOD_START = #{tEmployeeContractPre.dispatchPeriodStart}
</if>
<if test="tEmployeeContractPre.dispatchPeriodEnd != null">
AND a.DISPATCH_PERIOD_END = #{tEmployeeContractPre.dispatchPeriodEnd}
</if>
<if test="tEmployeeContractPre.workType != null and tEmployeeContractPre.workType.trim() != ''">
AND a.WORK_TYPE = #{tEmployeeContractPre.workType}
</if>
<if test="tEmployeeContractPre.workDayCount != null and tEmployeeContractPre.workDayCount.trim() != ''">
AND a.WORK_DAY_COUNT = #{tEmployeeContractPre.workDayCount}
</if>
<if test="tEmployeeContractPre.workDay != null and tEmployeeContractPre.workDay.trim() != ''">
AND a.WORK_DAY = #{tEmployeeContractPre.workDay}
</if>
<if test="tEmployeeContractPre.workHours != null and tEmployeeContractPre.workHours.trim() != ''">
AND a.WORK_HOURS = #{tEmployeeContractPre.workHours}
</if>
<if test="tEmployeeContractPre.otherWorkDay != null and tEmployeeContractPre.otherWorkDay.trim() != ''">
AND a.OTHER_WORK_DAY = #{tEmployeeContractPre.otherWorkDay}
</if>
<if test="tEmployeeContractPre.internshipPeriod != null and tEmployeeContractPre.internshipPeriod.trim() != ''">
AND a.INTERNSHIP_PERIOD = #{tEmployeeContractPre.internshipPeriod}
</if>
<if test="tEmployeeContractPre.internshipPeriodStart != null">
AND a.INTERNSHIP_PERIOD_START = #{tEmployeeContractPre.internshipPeriodStart}
</if>
<if test="tEmployeeContractPre.internshipPeriodEnd != null">
AND a.INTERNSHIP_PERIOD_END = #{tEmployeeContractPre.internshipPeriodEnd}
</if>
<if test="tEmployeeContractPre.postType != null and tEmployeeContractPre.postType.trim() != ''">
AND a.POST_TYPE = #{tEmployeeContractPre.postType}
</if>
<if test="tEmployeeContractPre.post != null and tEmployeeContractPre.post.trim() != ''">
AND a.POST = #{tEmployeeContractPre.post}
</if>
<if test="tEmployeeContractPre.workAddress != null and tEmployeeContractPre.workAddress.trim() != ''">
AND a.WORK_ADDRESS = #{tEmployeeContractPre.workAddress}
</if>
<if test="tEmployeeContractPre.authSql != null and tEmployeeContractPre.authSql.trim() != ''">
${tEmployeeContractPre.authSql}
</if>
<if test="tEmployeeContractPre.deptNoList != null and tEmployeeContractPre.deptNoList.size > 0">
AND a.dept_no in
<foreach item="idStr" index="index" collection="tEmployeeContractPre.deptNoList" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
</if>
</sql>
<!--tEmployeeContractPre简单分页查询-->
<select id="getTEmployeeContractPrePage" resultMap="tEmployeeContractPreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_contract_pre a
<where>
1=1
<include refid="tEmployeeContractPre_where"/>
</where>
order by a.create_time desc
</select>
<!--tEmployeeContractPre c端不分页查询-->
<select id="getTEmployeeContractPreNoPage" resultMap="tEmployeeContractPreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_contract_pre a
<where>
1=1
<include refid="tEmployeeContractPre_where"/>
</where>
order by a.create_time desc
limit 0,2000
</select>
<!--tEmployeeContractPre导出查询-->
<select id="getTEmployeeContractPreExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_employee_contract_pre a
<where>
1=1
<include refid="tEmployeeContractPre_where"/>
</where>
</select>
<!--tEmployeeContractPre导出查询-->
<select id="getTEmployeeContractPreExport" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreExportVo">
SELECT
a.dept_name,
a.dept_no,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
a.join_leave_date,
CASE WHEN a.contract_type=0 THEN "标准合同"
WHEN a.contract_type =1 THEN "劳务协议"
WHEN a.contract_type =2 THEN "实习协议"
WHEN a.contract_type =3 THEN "劳务派遣合同"
WHEN a.contract_type =4 THEN "非全日制"
WHEN a.contract_type =5 THEN "其他合同"
ELSE a.contract_type END as contract_type,
a.signatory,
a.customer_username,
if(a.sign_type = '0','线下签','电子签') sign_type,
a.fadada_template,
DATE_FORMAT(a.expected_confirm_time,'%Y-%m-%d %H:%i') expected_confirm_time,
DATE_FORMAT(a.expected_collection_time,'%Y-%m-%d %H:%i') expected_collection_time,
CASE WHEN a.process_status=0 THEN "待确认"
WHEN a.process_status =1 THEN "待发起"
WHEN a.process_status =2 THEN "线下签待审核"
WHEN a.process_status =3 THEN "线下签审核不通过"
WHEN a.process_status =4 THEN "线下签待归档"
WHEN a.process_status =5 THEN "发起失败"
WHEN a.process_status =6 THEN "签署中"
WHEN a.process_status =7 THEN "签署失败"
WHEN a.process_status =8 THEN "电子待归档"
ELSE a.process_status END as process_status
FROM t_employee_contract_pre a
<where>
1=1
<include refid="tEmployeeContractPre_where"/>
</where>
order by a.create_time desc
<if test="tEmployeeContractPre.limitStart != null">
limit #{tEmployeeContractPre.limitStart},#{tEmployeeContractPre.limitEnd}
</if>
</select>
<!--tEmployeeContractPre合同派单查询-->
<select id="getDisPatcherContractList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO">
SELECT
a.employee_name empName,
a.emp_idcard empIdcard,
a.dept_no deptNo,
a.situation,
a.contract_type contractName,
null contractSubName,
null reason,
a.signatory contractParty,
CASE WHEN a.CONTRACT_TERM=0 THEN "已完成一定工作任务为期限"
WHEN a.CONTRACT_TERM =1 THEN "固定期限"
WHEN a.CONTRACT_TERM =2 THEN "无固定期限"
ELSE a.CONTRACT_TERM END as contractType,
a.CONTRACT_START as contractStart,
if(a.CONTRACT_TERM ='1',a.CONTRACT_END,null) as contractEnd,
a.post,
CASE WHEN a.CONTRACT_TERM=1 THEN "已完成一定工作任务为期限"
WHEN a.CONTRACT_TERM =2 THEN "固定期限"
WHEN a.CONTRACT_TERM =3 THEN "无固定期限"
WHEN a.CONTRACT_TERM =4 THEN "无固定期限"
ELSE a.CONTRACT_TERM END as workingHours,
null contractNo,
null fileCabinetNo,
null leaveDate,
null reduceReason,
null remark,
null changeContractAndEmployee,
a.TRY_PERIOD tryPeriod
FROM t_employee_contract_pre a
<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>
</mapper>
......@@ -611,4 +611,15 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Author huyc
* @Description 判断是否存在正常或者在途的合同
* @Date 10:26 2025/6/12
* @Param
* @return
**/
public R<Boolean> selectExitEmpCopntract(TEmployeeAutoRegistCheckVo cardVo) {
return HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeecontractinfo/inner/selectExitEmpCopntract", JSON.toJSONString(cardVo), Boolean.class, SecurityConstants.FROM_IN);
}
}
package com.yifu.cloud.plus.v1.csp.vo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistCheckVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceExitCheckVo;
import lombok.Data;
......@@ -17,7 +18,6 @@ public class EmployeeRegistrationBatchErrorVo implements Serializable {
private List<EmployeeRegistrationReceiveVo> registrationReceiveVoList;
private List<TEmployeeInsuranceExitCheckVo> errorList;
private List<TEmployeeAutoRegistCheckVo> errorList;
}
......@@ -40,7 +40,6 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceExitCheckVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo;
......@@ -568,8 +567,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
List<TEmployeeInsuranceExitCheckVo> errorList = new ArrayList<>();
TEmployeeInsuranceExitCheckVo checkVo;
List<TEmployeeAutoRegistCheckVo> errorList = new ArrayList<>();
TEmployeeAutoRegistCheckVo checkVo;
String key;
// 判断重复性MAP
Map<String, Integer> keyMap = new HashMap<>();
......@@ -584,7 +583,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insurancePreVo.setEmpIdcard(registration.getEmpIdcard());
insurancePreVo.setDeptNo(registration.getDeptNo());
//商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo,registration.getEmployeeName(),registration.getEmpIdcard());
checkVo = checkInsuranceExit(insurancePreVo,registration);
if (null != checkVo) {
errorList.add(checkVo);
} else {
......@@ -597,6 +596,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.other(CommonConstants.TWO_INT,null,errorList);
}
}
//1.9.12合同自动化校验逻辑
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVo()) {
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVo();
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
cardVo.setDeptNo(registration.getDeptNo());
R<Boolean> flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
//是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) {
return R.other(CommonConstants.TWO_INT,null,"未找到流程中或者在用的合同!");
}
//是否已签署为否需要判断是否在用或者流程中的合同
if (CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag()) &&
Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
return R.other(CommonConstants.TWO_INT,null,"该项目下存在在途/有效的合同数据,请“是否已签署合同”是否调整为“是”");
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
......@@ -630,6 +648,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initInsruancePreInfo(registration, insurancePreVo, user,domainR.getData());
}
insuranceDaprUtil.saveInsurancePreInfo(preVo);
if (Common.isNotNull(preVo.getEmployeeContractPreVo()) &&
CommonConstants.ONE_STRING.equals(preVo.getEmployeeContractPreVo().getContractFlag())) {
//生成合同待购买数据
initContractPreInfo(registration, preVo.getEmployeeContractPreVo(), user, domainR.getData());
}
}
} catch (Exception e) {
log.error("执行异常", e);
......@@ -637,6 +660,57 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.ok();
}
/**
* 初始化合同预信息
* 该方法用于将员工注册信息转换并填充到合同预信息对象中,以便后续的合同签订流程使用
* @param registration 员工注册信息对象,包含员工的基本注册信息
* @param employeeContractPreVo 员工合同预信息对象,将被填充数据以用于合同签订流程
* @param user 当前用户信息,用于记录合同预信息的创建和更新者
* @param id 员工注册ID,用于关联合同预信息和员工注册信息
* @throws ParseException 日期解析异常,当日期格式不符合预期时抛出
*/
private void initContractPreInfo(EmployeeRegistration registration, TEmployeeContractPreVo employeeContractPreVo,
YifuUser user, String id) throws ParseException {
employeeContractPreVo.setProcessStatus(CommonConstants.ZERO_STRING);
employeeContractPreVo.setSituation("正常签订");
// 设置员工注册ID
employeeContractPreVo.setRegisterId(id);
// 设置客户用户名
employeeContractPreVo.setCustomerUsername(registration.getCustomerUsernameNew());
// 设置客户用户登录名
employeeContractPreVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
// 设置部门名称
employeeContractPreVo.setDeptName(registration.getDeptName());
// 设置部门ID
employeeContractPreVo.setDeptId(registration.getDeptId());
// 设置数据源
employeeContractPreVo.setDataSource(registration.getDataSource());
// 设置职位
employeeContractPreVo.setPosition(registration.getPosition());
// 设置入职或离职日期
employeeContractPreVo.setJoinLeaveDate(registration.getJoinLeaveDate());
// 设置部门编号
employeeContractPreVo.setDeptNo(registration.getDeptNo());
// 设置员工联系电话
employeeContractPreVo.setEmpPhone(registration.getEmpPhone());
// 设置员工姓名
employeeContractPreVo.setEmployeeName(registration.getEmployeeName());
// 设置员工身份证号
employeeContractPreVo.setEmpIdcard(registration.getEmpIdcard());
// 设置创建者ID
employeeContractPreVo.setCreateBy(user.getId());
// 设置创建者
employeeContractPreVo.setCreateName(user.getNickname());
// 设置更新者ID
employeeContractPreVo.setUpdateBy(user.getId());
// 预计提醒时间、预计合同发起时间
employeeContractPreVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
employeeContractPreVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
employeeContractPreVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
employeeContractPreVo.getExpectedConfirmTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
}
/**
* 入职待确认表确认接收
*
......@@ -664,11 +738,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
//商险存在校验
List<TEmployeeInsuranceExitCheckVo> errorList = new ArrayList<>();
TEmployeeInsuranceExitCheckVo checkVo;
List<TEmployeeAutoRegistCheckVo> errorList = new ArrayList<>();
TEmployeeAutoRegistCheckVo checkVo;
List<EmployeeRegistrationReceiveVo> receiveVoList = new ArrayList<>();
R<TEmployeeInsuranceWorkDayVo> dataR;
R<Boolean> flag;
for (EmployeeRegistration registration:registrationList) {
if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0);
......@@ -700,21 +775,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)
|| (DateUtil.dateToString(insurancePreVo.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT).
compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)) {
TEmployeeInsuranceExitCheckVo exitCheckVo = new TEmployeeInsuranceExitCheckVo();
exitCheckVo.setBuyType(insurancePreVo.getBuyType());
TEmployeeAutoRegistCheckVo exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setPolicyStart(insurancePreVo.getPolicyStart());
exitCheckVo.setPolicyEnd(insurancePreVo.getPolicyEnd());
exitCheckVo.setBuyStandard(insurancePreVo.getBuyStandard());
exitCheckVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName());
exitCheckVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
exitCheckVo.setType("商险");
exitCheckVo.setErrorMsg("入职日期需要小于等于保单截止日期/保单开始日期需小于等于保单截止日期");
errorList.add(exitCheckVo);
continue;
}
//商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo, registration.getEmployeeName(), registration.getEmpIdcard());
checkVo = checkInsuranceExit(insurancePreVo, registration);
if (null != checkVo) {
errorList.add(checkVo);
continue;
......@@ -724,6 +796,39 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
}
//1.9.12合同自动化校验逻辑
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVo()) {
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVo();
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
cardVo.setDeptNo(registration.getDeptNo());
flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
//是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) {
TEmployeeAutoRegistCheckVo exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg("未找到流程中或者在用的合同!");
continue;
}
//是否已签署为否需要判断是否在用或者流程中的合同
if (CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag()) &&
Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
TEmployeeAutoRegistCheckVo exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg("该项目下存在在途/有效的合同数据,请“是否已签署合同”是否调整为“是”");
continue;
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo();
......@@ -756,6 +861,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0);
initInsruancePreInfo(registration, insurancePreVo, user,domainR.getData());
insuranceDaprUtil.saveInsurancePreInfo(preVo);
if (Common.isNotNull(preVo.getEmployeeContractPreVo()) &&
CommonConstants.ONE_STRING.equals(preVo.getEmployeeContractPreVo().getContractFlag())) {
//生成合同待购买数据
initContractPreInfo(registration, preVo.getEmployeeContractPreVo(), user, domainR.getData());
}
}
}catch (Exception e) {
log.error("执行异常", e);
......@@ -1343,9 +1453,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//商险是否存在判断
private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo,String empName,String empIdcard) {
private TEmployeeAutoRegistCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo,EmployeeRegistration registration) {
//查询入职确认信息数据
TEmployeeInsuranceExitCheckVo exitCheckVo = new TEmployeeInsuranceExitCheckVo();
TEmployeeAutoRegistCheckVo exitCheckVo = new TEmployeeAutoRegistCheckVo();
boolean erorFlag = false;
R<TEmployeeInsuranceSelectVo> dataR = insuranceDaprUtil.selectInsurancePreInfoList(preVo);
//查询商险数据
......@@ -1408,14 +1518,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//组装错误信息
if (erorFlag) {
exitCheckVo.setBuyType(preVo.getBuyType());
exitCheckVo.setEmployeeName(empName);
exitCheckVo.setEmpIdcard(empIdcard);
exitCheckVo.setPolicyStart(preVo.getPolicyStart());
exitCheckVo.setPolicyEnd(preVo.getPolicyEnd());
exitCheckVo.setBuyStandard(preVo.getBuyStandard());
exitCheckVo.setInsuranceCompanyName(preVo.getInsuranceCompanyName());
exitCheckVo.setInsuranceTypeName(preVo.getInsuranceTypeName());
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
exitCheckVo.setType("商险");
exitCheckVo.setErrorMsg("存在流程中/已完结的商险数据");
} else {
return null;
......
......@@ -253,6 +253,7 @@
1=1
<include refid="employeeRegistration_where"/>
</where>
limit 0,2000
</select>
<!--employeeRegistration简单分页查询-->
......
......@@ -42,6 +42,13 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
*/
List<Map<String,String>> getAllserioNo();
/**
* 获取近七天的到账明细的交易流水号
* @param
* @return
*/
List<Map<String,String>> getAllserioNoLsatSevenDays();
/**
* 获取需要拉流水的银行账户
* @param
......
......@@ -1137,6 +1137,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
log.info("未找到对应的索引文件:{}", indexFileName);
continue;
}
// 3. 创建临时目录
String tempDir = System.getProperty("java.io.tmpdir") + "sftp_processing/" + System.currentTimeMillis() + "/";
File dir = new File(tempDir);
if (!dir.exists() && !dir.mkdirs()) {
......
......@@ -126,18 +126,18 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
String beginDate = tranDate;
String endDate = tranDate;
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate);
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate,"0");
}
@Override
public R getIcbcTransactionFlowYesterdayInner() throws IcbcApiException {
log.info("开始推昨日新增网银到账明细条数");
String tranDate = DateUtil.addDay(-1).replace("-","");
String tranDate = DateUtil.addDay(-7).replace("-","");
String beginDate = tranDate;
String endDate = tranDate;
String endDate = DateUtil.getThisDay();
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate);
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate, "1");
}
......@@ -148,7 +148,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
* @date 2024-09-26
* @since mvp1.6.11
*/
private R getIcbcTransactionFlowCommon(String tranDate, String beginDate, String endDate) throws IcbcApiException {
private R getIcbcTransactionFlowCommon(String tranDate, String beginDate, String endDate,String flag) throws IcbcApiException {
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化
......@@ -167,7 +167,13 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
// 查询当天的所有入账记录数据, 查账号和流水号
List<Map<String,String>> serioList = baseMapper.getAllserioNo();
List<Map<String,String>> serioList;
if ("0".equals(flag)) {
serioList = baseMapper.getAllserioNo();
} else {
//ekp1.9.12 获取近七天的到账明细的交易流水号
serioList = baseMapper.getAllserioNoLsatSevenDays();
}
// 整理各个账户下的流水:账号为key,账户下流水号列表作为value
Map<String,List<String>> serioMapByAccount = new HashMap<>();
if (!serioList.isEmpty()) {
......
......@@ -124,6 +124,14 @@
and fd_3b57f8de9df354 = '是'
</select>
<!--ekp1.9.12查询近七天的所有入账记录数据, 查账号和流水号-->
<select id="getAllserioNoLsatSevenDays" resultType="Map">
SELECT fd_3b573843db30ce as onlySequence,fd_3b62f3470beb30 as receiveBkNo from ekp_79c234bf64d412294f23
where DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d') between DATE_SUB(curdate(), INTERVAL 8 day) and DATE_ADD(now(), INTERVAL 1 day)
and fd_3b57f8de9df354 = '是'
</select>
<!--查询付款账户信息-->
<select id="getAccountList" resultType="Map">
select fd_3b14a2430ac214 as bank_name,fd_3b14a24376d86a as bank_no from ekp_fe8247b4cbb4b27881dd where fd_3b14a24b9adb52='启用' and fd_3b56747b811872='是';
......
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