Commit bfee7080 authored by hongguangwu's avatar hongguangwu

MVP1.7.17-离职待办

parent 1a946cf3
/*
* 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.csp.entity;
import com.alibaba.excel.annotation.ExcelProperty;
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.core.constant.ExcelAttribute;
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 org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
@TableName("employee_registration_leave")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "自动化离职待办")
public class EmployeeRegistrationLeave extends BaseEntity {
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键ID")
@Schema(description = "主键ID")
private String id;
/**
* 离职处理状态:0待确认1待处理2处理中3已处理
*/
@ExcelAttribute(name = "离职处理状态:0待确认1待处理2处理中3已处理", maxLength = 1)
@Length(max = 1, message = "离职处理状态:0待确认1待处理2处理中3已处理不能超过1个字符")
@ExcelProperty("离职处理状态:0待确认1待处理2处理中3已处理")
@Schema(description = "离职处理状态:0待确认1待处理2处理中3已处理")
private String leaveStatus;
/**
* 执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理
*/
@ExcelAttribute(name = "执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理", maxLength = 1)
@Length(max = 1, message = "执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理不能超过1个字符")
@ExcelProperty("执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理")
@Schema(description = "执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理")
private String doStatus;
/**
* 执行详情
*/
@ExcelAttribute(name = "执行详情", maxLength = 100)
@Length(max = 100, message = "执行详情不能超过100个字符")
@ExcelProperty("执行详情")
@Schema(description = "执行详情")
private String doDetail;
/**
* 原因
*/
@ExcelAttribute(name = "原因", maxLength = 100)
@Length(max = 100, message = "原因不能超过100个字符")
@ExcelProperty("原因")
@Schema(description = "原因")
private String doRemark;
/**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
*/
@ExcelAttribute(name = "合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过", maxLength = 2)
@Length(max = 2, message = "合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过不能超过2个字符")
@ExcelProperty("合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过")
@Schema(description = "合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过")
private String doStatusContract;
/**
* 社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过
*/
@ExcelAttribute(name = "社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过", maxLength = 2)
@Length(max = 2, message = "社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过不能超过2个字符")
@ExcelProperty("社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过")
@Schema(description = "社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过")
private String doStatusSocial;
/**
* 公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过
*/
@ExcelAttribute(name = "公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过", maxLength = 2)
@Length(max = 2, message = "公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过不能超过2个字符")
@ExcelProperty("公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过")
@Schema(description = "公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过")
private String doStatusFund;
/**
* 商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回
*/
@ExcelAttribute(name = "商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回", maxLength = 2)
@Length(max = 2, message = "商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回不能超过2个字符")
@ExcelProperty("商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回")
@Schema(description = "商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回")
private String doStatusInsurance;
/**
* 减项:0空1无需处理2待减项8减项成功9减项失败
*/
@ExcelAttribute(name = "减项:0空1无需处理2待减项8减项成功9减项失败", maxLength = 2)
@Length(max = 2, message = "减项:0空1无需处理2待减项8减项成功9减项失败不能超过2个字符")
@ExcelProperty("减项:0空1无需处理2待减项8减项成功9减项失败")
@Schema(description = "减项:0空1无需处理2待减项8减项成功9减项失败")
private String doStatusProject;
/**
* 减档:0空1无需处理2待减档8减档成功9减档失败
*/
@ExcelAttribute(name = "减档:0空1无需处理2待减档8减档成功9减档失败", maxLength = 2)
@Length(max = 2, message = "减档:0空1无需处理2待减档8减档成功9减档失败不能超过2个字符")
@ExcelProperty("减档:0空1无需处理2待减档8减档成功9减档失败")
@Schema(description = "减档:0空1无需处理2待减档8减档成功9减档失败")
private String doStatusEmp;
/**
* 需处理项:1社保2公积金3商险4合同5项目档案6人员档案
*/
@ExcelAttribute(name = "需处理项:1社保2公积金3商险4合同5项目档案6人员档案", maxLength = 2)
@Length(max = 2, message = "需处理项:1社保2公积金3商险4合同5项目档案6人员档案不能超过2个字符")
@ExcelProperty("需处理项:1社保2公积金3商险4合同5项目档案6人员档案")
@Schema(description = "需处理项:1社保2公积金3商险4合同5项目档案6人员档案")
private String doType;
/**
* 社保Id
*/
@ExcelAttribute(name = "社保Id", maxLength = 36)
@Length(max = 36, message = "社保Id不能超过36个字符")
@ExcelProperty("社保Id")
@Schema(description = "社保Id")
private String socialId;
/**
* 停缴社保日期
*/
@ExcelAttribute(name = "停缴社保日期", maxLength = 10)
@Length(max = 10, message = "停缴社保日期不能超过10个字符")
@ExcelProperty("停缴社保日期")
@Schema(description = "停缴社保日期")
private String socialReduceDate;
/**
* 减少原因(社保)
*/
@ExcelAttribute(name = "减少原因(社保)", maxLength = 50)
@Length(max = 50, message = "减少原因(社保)不能超过50个字符")
@ExcelProperty("减少原因(社保)")
@Schema(description = "减少原因(社保)")
private String socialReasonType;
/**
* 社保派减备注
*/
@ExcelAttribute(name = "社保派减备注", maxLength = 50)
@Length(max = 50, message = "社保派减备注不能超过50个字符")
@ExcelProperty("社保派减备注")
@Schema(description = "社保派减备注")
private String socialTrustRemark;
/**
* 社保派减时间
*/
@ExcelAttribute(name = "社保派减时间", isDate = true)
@ExcelProperty("社保派减时间")
@Schema(description = "社保派减时间")
private LocalDateTime socialExpectedTime;
/**
* 公积金Id
*/
@ExcelAttribute(name = "公积金Id", maxLength = 36)
@Length(max = 36, message = "公积金Id不能超过36个字符")
@ExcelProperty("公积金Id")
@Schema(description = "公积金Id")
private String fundId;
/**
* 停缴公积金日期
*/
@ExcelAttribute(name = "停缴公积金日期", maxLength = 10)
@Length(max = 10, message = "停缴公积金日期不能超过10个字符")
@ExcelProperty("停缴公积金日期")
@Schema(description = "停缴公积金日期")
private String fundReduceDate;
/**
* 减少原因(公积金)
*/
@ExcelAttribute(name = "减少原因(公积金)", maxLength = 50)
@Length(max = 50, message = "减少原因(公积金)不能超过50个字符")
@ExcelProperty("减少原因(公积金)")
@Schema(description = "减少原因(公积金)")
private String fundReasonType;
/**
* 公积金派减备注
*/
@ExcelAttribute(name = "公积金派减备注", maxLength = 50)
@Length(max = 50, message = "公积金派减备注不能超过50个字符")
@ExcelProperty("公积金派减备注")
@Schema(description = "公积金派减备注")
private String fundTrustRemark;
/**
* 公积金派减时间
*/
@ExcelAttribute(name = "公积金派减时间", isDate = true)
@ExcelProperty("公积金派减时间")
@Schema(description = "公积金派减时间")
private LocalDateTime fundExpectedTime;
/**
* 商险ID
*/
@ExcelAttribute(name = "商险ID", maxLength = 36)
@Length(max = 36, message = "商险ID不能超过36个字符")
@ExcelProperty("商险ID")
@Schema(description = "商险ID")
private String insuranceId;
/**
* 预计商险退保派单时间
*/
@ExcelAttribute(name = "预计商险退保派单时间", isDate = true)
@ExcelProperty("预计商险退保派单时间")
@Schema(description = "预计商险退保派单时间")
private LocalDateTime insuranceExpectedTime;
/**
* 商险停保日期
*/
@ExcelAttribute(name = "商险停保日期", isDate = true)
@ExcelProperty("商险停保日期")
@Schema(description = "商险停保日期")
private LocalDateTime insuranceExpectedTimeNext;
/**
* 合同ID
*/
@ExcelAttribute(name = "合同ID", maxLength = 36)
@Length(max = 36, message = "合同ID不能超过36个字符")
@ExcelProperty("合同ID")
@Schema(description = "合同ID")
private String contractId;
/**
* 合同终止发起时间
*/
@ExcelAttribute(name = "合同终止发起时间", isDate = true)
@ExcelProperty("合同终止发起时间")
@Schema(description = "合同终止发起时间")
private LocalDateTime contractExpectedTime;
/**
* 档案ID
*/
@ExcelAttribute(name = "档案ID", maxLength = 36)
@Length(max = 36, message = "档案ID不能超过36个字符")
@ExcelProperty("档案ID")
@Schema(description = "档案ID")
private String empId;
/**
* 项目档案ID
*/
@ExcelAttribute(name = "项目档案ID", maxLength = 36)
@Length(max = 36, message = "项目档案ID不能超过36个字符")
@ExcelProperty("项目档案ID")
@Schema(description = "项目档案ID")
private String empProjectId;
@Schema(description = "确认人")
private String confirmUser;
@Schema(description = "确认时间")
private LocalDateTime confirmTime;
// 联动端口:固定值:人员离职
@Schema(description = "联动端口")
private String linkPort;
@Schema(description = "是否多项目0否1是")
private String isMultipleDept;
}
/*
* 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.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 自动化离职待办-导出
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveConfirmExportVo {
@ExcelProperty("项目名称")
private String deptName;
@ExcelProperty("项目编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("离职日期")
private String joinLeaveDate;
@ExcelProperty("确认人")
private String confirmUser;
@ExcelProperty("确认时间")
private String confirmTime;
// 联动端口:固定值:人员离职
@ExcelProperty("联动端口")
private String linkPort;
@ExcelProperty("离职处理状态")
private String leaveStatus;
/**
* 执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理
*/
@ExcelProperty("执行结果")
private String doStatus;
@ExcelProperty("执行详情")
private String doDetail;
@ExcelProperty("原因")
private String doRemark;
/**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
*/
@ExcelProperty("合同终止")
private String doStatusContract;
/**
* 社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过
*/
@ExcelProperty("社保减员")
private String doStatusSocial;
/**
* 公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过
*/
@ExcelProperty("公积金减员")
private String doStatusFund;
/**
* 商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回
*/
@ExcelProperty("商险退保")
private String doStatusInsurance;
/**
* 减项:0空1无需处理2待减项8减项成功9减项失败
*/
@ExcelProperty("减项")
private String doStatusProject;
/**
* 减档:0空1无需处理2待减档8减档成功9减档失败
*/
@ExcelProperty("减档")
private String doStatusEmp;
}
/*
* 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.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 自动化离职待办-导出
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveExportVo {
@ExcelProperty("项目名称")
private String deptName;
@ExcelProperty("项目编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("离职日期")
private String joinLeaveDate;
@ExcelProperty("离职处理状态")
private String leaveStatus;
/**
* 执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理
*/
@ExcelProperty("执行结果")
private String doStatus;
@ExcelProperty("执行详情")
private String doDetail;
@ExcelProperty("原因")
private String doRemark;
/**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
*/
@ExcelProperty("合同终止")
private String doStatusContract;
/**
* 社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过
*/
@ExcelProperty("社保减员")
private String doStatusSocial;
/**
* 公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过
*/
@ExcelProperty("公积金减员")
private String doStatusFund;
/**
* 商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回
*/
@ExcelProperty("商险退保")
private String doStatusInsurance;
/**
* 减项:0空1无需处理2待减项8减项成功9减项失败
*/
@ExcelProperty("减项")
private String doStatusProject;
/**
* 减档:0空1无需处理2待减档8减档成功9减档失败
*/
@ExcelProperty("减档")
private String doStatusEmp;
}
/*
* 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.csp.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveSearchVo extends EmployeeRegistrationLeaveTableVo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
//开始时间(查询专用)
@Schema(description = "入离职开始时间")
@TableField(exist = false)
private LocalDateTime joinTimeStart;
//截止时间(查询专用)
@Schema(description = "入离职截止时间")
@TableField(exist = false)
private LocalDateTime joinTimeEnd;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* 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.csp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 自动化离职待办-列表
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveTableVo extends EmployeeRegistrationLeaveExportVo {
@Schema(description = "主键ID")
private String id;
@Schema(description = "确认人")
private String confirmUser;
@Schema(description = "确认时间")
private String confirmTime;
// 联动端口:固定值:人员离职
@Schema(description = "联动端口")
private String linkPort;
}
/*
* 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.csp.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationLeaveService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
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 hgw
* @date 2025-11-19 19:23:15
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/employeeregistrationleave")
@Tag(name = "自动化离职待办管理")
public class EmployeeRegistrationLeaveController {
private final EmployeeRegistrationLeaveService employeeRegistrationLeaveService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Operation(description = "离职待办分页查询")
@GetMapping("/getEmployeeRegistrationLeaveTablePage")
public R<IPage<EmployeeRegistrationLeaveTableVo>> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return new R<>(employeeRegistrationLeaveService.getEmployeeRegistrationLeaveTablePage(page, employeeRegistrationLeave));
}
/**
* 简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Operation(description = "离职待办分页查询2000条")
@GetMapping("/getEmployeeRegistrationLeaveTablePage2000")
public R<List<EmployeeRegistrationLeaveTableVo>> getEmployeeRegistrationLeaveTablePage2000(EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return new R<>(employeeRegistrationLeaveService.getEmployeeRegistrationLeaveTablePage2000(employeeRegistrationLeave));
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Operation(description = "离职确认分页查询")
@GetMapping("/getEmployeeRegistrationLeaveConfirmTablePage")
public R<IPage<EmployeeRegistrationLeaveTableVo>> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return new R<>(employeeRegistrationLeaveService.getEmployeeRegistrationLeaveConfirmTablePage(page, employeeRegistrationLeave));
}
/**
* 通过id查询自动化离职待办
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<EmployeeRegistrationLeave> getById(@PathVariable("id") String id) {
return R.ok(employeeRegistrationLeaveService.getById(id));
}
/**
* 自动化离职待办 批量导出
*
* @author hgw
* @date 2025-11-19 19:23:15
**/
@SysLog(value = "导出自动化离职待办")
@Operation(description = "导出自动化离职待办")
@PostMapping("/exportTable")
public void exportTable(HttpServletResponse response, @RequestBody EmployeeRegistrationLeaveSearchVo searchVo) {
employeeRegistrationLeaveService.exportTable(response, searchVo);
}
/**
* 自动化离职确认 批量导出
*
* @author hgw
* @date 2025-11-19 19:23:15
**/
@SysLog(value = "导出自动化离职确认")
@Operation(description = "导出自动化离职确认")
@PostMapping("/exportConfirmTable")
public void exportConfirmTable(HttpServletResponse response, @RequestBody EmployeeRegistrationLeaveSearchVo searchVo) {
employeeRegistrationLeaveService.exportConfirmTable(response, searchVo);
}
}
/*
* 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.csp.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.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveConfirmExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Mapper
public interface EmployeeRegistrationLeaveMapper extends BaseMapper<EmployeeRegistrationLeave> {
/**
* 自动化离职待办简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, @Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage2000(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, @Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveExportVo> getEmployeeRegistrationLeaveTableList(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveConfirmExportVo> getEmployeeRegistrationLeaveConfirmTableList(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
int getEmployeeRegistrationLeaveTableCount(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
int getEmployeeRegistrationLeaveConfirmTableCount(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
}
/*
* 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.csp.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.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
public interface EmployeeRegistrationLeaveService extends IService<EmployeeRegistrationLeave> {
/**
* 自动化离职待办简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage2000(EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
void exportTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo);
void exportConfirmTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo);
}
/*
* 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.csp.service.impl;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationLeaveMapper;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationLeaveService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveConfirmExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
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.DateUtil;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Log4j2
@Service
public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRegistrationLeaveMapper, EmployeeRegistrationLeave> implements EmployeeRegistrationLeaveService {
/**
* 自动化离职待办简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Override
public IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return baseMapper.getEmployeeRegistrationLeaveTablePage(page, employeeRegistrationLeave);
}
@Override
public List<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage2000(EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return baseMapper.getEmployeeRegistrationLeaveTablePage2000(employeeRegistrationLeave);
}
@Override
public IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return baseMapper.getEmployeeRegistrationLeaveConfirmTablePage(page, employeeRegistrationLeave);
}
/**
* 自动化离职待办批量导出
*
* @param searchVo 自动化离职待办
* @return
*/
@Override
public void exportTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo) {
String fileName = "自动化离职待处理批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationLeaveExportVo> list = new ArrayList<>();
long count = baseMapper.getEmployeeRegistrationLeaveTableCount(searchVo);
ServletOutputStream out = null;
try {
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 = EasyExcelFactory.write(out, EmployeeRegistrationLeave.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.getEmployeeRegistrationLeaveTableList(searchVo);
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职待处理" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职待处理" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public void exportConfirmTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo) {
String fileName = "自动化离职确认批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationLeaveConfirmExportVo> list = new ArrayList<>();
long count = baseMapper.getEmployeeRegistrationLeaveConfirmTableCount(searchVo);
ServletOutputStream out = null;
try {
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 = EasyExcelFactory.write(out, EmployeeRegistrationLeave.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.getEmployeeRegistrationLeaveConfirmTableList(searchVo);
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职确认" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职确认" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!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.csp.mapper.EmployeeRegistrationLeaveMapper">
<!-- 主要使用 -->
<resultMap id="tableAndExportMap" type="com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo">
<id property="id" column="id"/>
<result property="leaveStatus" column="leave_status"/>
<result property="doStatus" column="do_status"/>
<result property="doDetail" column="do_detail"/>
<result property="doRemark" column="do_remark"/>
<result property="doStatusContract" column="do_status_contract"/>
<result property="doStatusSocial" column="do_status_social"/>
<result property="doStatusFund" column="do_status_fund"/>
<result property="doStatusInsurance" column="do_status_insurance"/>
<result property="doStatusProject" column="do_status_project"/>
<result property="doStatusEmp" column="do_status_emp"/>
<result property="confirmUser" column="confirm_user"/>
<result property="confirmTime" column="confirm_time"/>
<result property="linkPort" column="link_port"/>
<result property="employeeName" column="employee_name"/>
<result property="empIdcard" column="emp_idcard"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
</resultMap>
<!-- 新表全量字段 -->
<resultMap id="employeeRegistrationLeaveMap" type="com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave">
<id property="id" column="id"/>
<result property="leaveStatus" column="leave_status"/>
<result property="doStatus" column="do_status"/>
<result property="doDetail" column="do_detail"/>
<result property="doRemark" column="do_remark"/>
<result property="createBy" column="create_by"/>
<result property="createName" column="create_name"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="doStatusContract" column="do_status_contract"/>
<result property="doStatusSocial" column="do_status_social"/>
<result property="doStatusFund" column="do_status_fund"/>
<result property="doStatusInsurance" column="do_status_insurance"/>
<result property="doStatusProject" column="do_status_project"/>
<result property="doStatusEmp" column="do_status_emp"/>
<result property="doType" column="do_type"/>
<result property="socialId" column="social_id"/>
<result property="socialReduceDate" column="social_reduce_date"/>
<result property="socialReasonType" column="social_reason_type"/>
<result property="socialTrustRemark" column="social_trust_remark"/>
<result property="socialExpectedTime" column="social_expected_time"/>
<result property="fundId" column="fund_id"/>
<result property="fundReduceDate" column="fund_reduce_date"/>
<result property="fundReasonType" column="fund_reason_type"/>
<result property="fundTrustRemark" column="fund_trust_remark"/>
<result property="fundExpectedTime" column="fund_expected_time"/>
<result property="insuranceId" column="insurance_id"/>
<result property="insuranceExpectedTime" column="insurance_expected_time"/>
<result property="insuranceExpectedTimeNext" column="insurance_expected_time_next"/>
<result property="contractId" column="contract_id"/>
<result property="contractExpectedTime" column="contract_expected_time"/>
<result property="empId" column="emp_id"/>
<result property="empProjectId" column="emp_project_id"/>
<result property="confirmUser" column="confirm_user"/>
<result property="confirmTime" column="confirm_time"/>
<result property="linkPort" column="link_port"/>
<result property="isMultipleDept" column="is_multiple_dept"/>
</resultMap>
<!-- 全量字段 -->
<sql id="Base_Column_List">
a.id,
a.leave_status,
a.do_status,
a.do_detail,
a.do_remark,
a.create_by,
a.create_name,
a.create_time,
a.update_by,
a.update_time,
a.do_status_contract,
a.do_status_social,
a.do_status_fund,
a.do_status_insurance,
a.do_status_project,
a.do_status_emp,
a.do_type,
a.social_id,
a.social_reduce_date,
a.social_reason_type,
a.social_trust_remark,
a.social_expected_time,
a.fund_id,
a.fund_reduce_date,
a.fund_reason_type,
a.fund_trust_remark,
a.fund_expected_time,
a.insurance_id,
a.insurance_expected_time,
a.insurance_expected_time_next,
a.contract_id,
a.contract_expected_time,
a.emp_id,
a.emp_project_id,
a.confirm_user,
a.confirm_time,
a.link_port,
a.is_multiple_dept
</sql>
<sql id="employeeRegistrationLeave_where">
<if test="employeeRegistrationLeave != null">
<if test="employeeRegistrationLeave.id != null and employeeRegistrationLeave.id.trim() != ''">
AND a.id = #{employeeRegistrationLeave.id}
</if>
<if test="employeeRegistrationLeave.employeeName != null and employeeRegistrationLeave.employeeName.trim() != ''">
AND b.employee_name like CONCAT('%',#{employeeRegistrationLeave.employeeName},'%')
</if>
<if test="employeeRegistrationLeave.empIdcard != null and employeeRegistrationLeave.empIdcard.trim() != ''">
AND b.emp_idcard like CONCAT('%',#{employeeRegistrationLeave.empIdcard},'%')
</if>
<if test="employeeRegistrationLeave.idcardList != null and employeeRegistrationLeave.idcardList.size() > 0 ">
AND b.emp_idcard in
<foreach item="item" index="index" collection="employeeRegistrationLeave.idcardList" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
<if test="employeeRegistrationLeave.deptName != null and employeeRegistrationLeave.deptName.trim() != ''">
AND b.dept_name like CONCAT('%',#{employeeRegistrationLeave.deptName},'%')
</if>
<if test="employeeRegistrationLeave.joinTimeStart != null">
AND b.join_leave_date <![CDATA[ >= ]]> #{employeeRegistrationLeave.joinTimeStart}
</if>
<if test="employeeRegistrationLeave.joinTimeEnd != null">
AND b.join_leave_date <![CDATA[ <= ]]> #{employeeRegistrationLeave.joinTimeEnd}
</if>
<if test="employeeRegistrationLeave.leaveStatus != null and employeeRegistrationLeave.leaveStatus.trim() != ''">
AND a.leave_status = #{employeeRegistrationLeave.leaveStatus}
</if>
<if test="employeeRegistrationLeave.doStatus != null and employeeRegistrationLeave.doStatus.trim() != ''">
AND a.do_status = #{employeeRegistrationLeave.doStatus}
</if>
<if test="employeeRegistrationLeave.doDetail != null and employeeRegistrationLeave.doDetail.trim() != ''">
AND a.do_detail = #{employeeRegistrationLeave.doDetail}
</if>
<if test="employeeRegistrationLeave.doRemark != null and employeeRegistrationLeave.doRemark.trim() != ''">
AND a.do_remark = #{employeeRegistrationLeave.doRemark}
</if>
<if test="employeeRegistrationLeave.createBy != null and employeeRegistrationLeave.createBy.trim() != ''">
AND a.create_by = #{employeeRegistrationLeave.createBy}
</if>
<if test="employeeRegistrationLeave.createName != null and employeeRegistrationLeave.createName.trim() != ''">
AND a.create_name = #{employeeRegistrationLeave.createName}
</if>
<if test="employeeRegistrationLeave.createTime != null">
AND a.create_time = #{employeeRegistrationLeave.createTime}
</if>
<if test="employeeRegistrationLeave.updateBy != null and employeeRegistrationLeave.updateBy.trim() != ''">
AND a.update_by = #{employeeRegistrationLeave.updateBy}
</if>
<if test="employeeRegistrationLeave.updateTime != null">
AND a.update_time = #{employeeRegistrationLeave.updateTime}
</if>
<if test="employeeRegistrationLeave.doStatusContract != null and employeeRegistrationLeave.doStatusContract.trim() != ''">
AND a.do_status_contract = #{employeeRegistrationLeave.doStatusContract}
</if>
<if test="employeeRegistrationLeave.doStatusSocial != null and employeeRegistrationLeave.doStatusSocial.trim() != ''">
AND a.do_status_social = #{employeeRegistrationLeave.doStatusSocial}
</if>
<if test="employeeRegistrationLeave.doStatusFund != null and employeeRegistrationLeave.doStatusFund.trim() != ''">
AND a.do_status_fund = #{employeeRegistrationLeave.doStatusFund}
</if>
<if test="employeeRegistrationLeave.doStatusInsurance != null and employeeRegistrationLeave.doStatusInsurance.trim() != ''">
AND a.do_status_insurance = #{employeeRegistrationLeave.doStatusInsurance}
</if>
<if test="employeeRegistrationLeave.doStatusProject != null and employeeRegistrationLeave.doStatusProject.trim() != ''">
AND a.do_status_project = #{employeeRegistrationLeave.doStatusProject}
</if>
<if test="employeeRegistrationLeave.doStatusEmp != null and employeeRegistrationLeave.doStatusEmp.trim() != ''">
AND a.do_status_emp = #{employeeRegistrationLeave.doStatusEmp}
</if>
<if test="employeeRegistrationLeave.doType != null and employeeRegistrationLeave.doType.trim() != ''">
AND a.do_type = #{employeeRegistrationLeave.doType}
</if>
<if test="employeeRegistrationLeave.socialId != null and employeeRegistrationLeave.socialId.trim() != ''">
AND a.social_id = #{employeeRegistrationLeave.socialId}
</if>
<if test="employeeRegistrationLeave.socialReduceDate != null and employeeRegistrationLeave.socialReduceDate.trim() != ''">
AND a.social_reduce_date = #{employeeRegistrationLeave.socialReduceDate}
</if>
<if test="employeeRegistrationLeave.socialReasonType != null and employeeRegistrationLeave.socialReasonType.trim() != ''">
AND a.social_reason_type = #{employeeRegistrationLeave.socialReasonType}
</if>
<if test="employeeRegistrationLeave.socialTrustRemark != null and employeeRegistrationLeave.socialTrustRemark.trim() != ''">
AND a.social_trust_remark = #{employeeRegistrationLeave.socialTrustRemark}
</if>
<if test="employeeRegistrationLeave.socialExpectedTime != null">
AND a.social_expected_time = #{employeeRegistrationLeave.socialExpectedTime}
</if>
<if test="employeeRegistrationLeave.fundId != null and employeeRegistrationLeave.fundId.trim() != ''">
AND a.fund_id = #{employeeRegistrationLeave.fundId}
</if>
<if test="employeeRegistrationLeave.fundReduceDate != null and employeeRegistrationLeave.fundReduceDate.trim() != ''">
AND a.fund_reduce_date = #{employeeRegistrationLeave.fundReduceDate}
</if>
<if test="employeeRegistrationLeave.fundReasonType != null and employeeRegistrationLeave.fundReasonType.trim() != ''">
AND a.fund_reason_type = #{employeeRegistrationLeave.fundReasonType}
</if>
<if test="employeeRegistrationLeave.fundTrustRemark != null and employeeRegistrationLeave.fundTrustRemark.trim() != ''">
AND a.fund_trust_remark = #{employeeRegistrationLeave.fundTrustRemark}
</if>
<if test="employeeRegistrationLeave.fundExpectedTime != null">
AND a.fund_expected_time = #{employeeRegistrationLeave.fundExpectedTime}
</if>
<if test="employeeRegistrationLeave.insuranceId != null and employeeRegistrationLeave.insuranceId.trim() != ''">
AND a.insurance_id = #{employeeRegistrationLeave.insuranceId}
</if>
<if test="employeeRegistrationLeave.insuranceExpectedTime != null">
AND a.insurance_expected_time = #{employeeRegistrationLeave.insuranceExpectedTime}
</if>
<if test="employeeRegistrationLeave.insuranceExpectedTimeNext != null">
AND a.insurance_expected_time_next = #{employeeRegistrationLeave.insuranceExpectedTimeNext}
</if>
<if test="employeeRegistrationLeave.contractId != null and employeeRegistrationLeave.contractId.trim() != ''">
AND a.contract_id = #{employeeRegistrationLeave.contractId}
</if>
<if test="employeeRegistrationLeave.contractExpectedTime != null">
AND a.contract_expected_time = #{employeeRegistrationLeave.contractExpectedTime}
</if>
<if test="employeeRegistrationLeave.empId != null and employeeRegistrationLeave.empId.trim() != ''">
AND a.emp_id = #{employeeRegistrationLeave.empId}
</if>
<if test="employeeRegistrationLeave.empProjectId != null and employeeRegistrationLeave.empProjectId.trim() != ''">
AND a.emp_project_id = #{employeeRegistrationLeave.empProjectId}
</if>
</if>
</sql>
<!-- 离职待办列表 -->
<sql id="Base_Table_List">
a.id,
<include refid="Base_Export_List"></include>
</sql>
<sql id="Base_Export_List">
a.id,
case a.leave_status when '0' then '待确认' when '1' then '待处理' when '2' then '处理中' when '3' then '已处理' else '-' end leave_status,
case a.do_status when '0' then '——' when '1' then '未执行' when '2' then '执行中' when '3' then '部分成功' when '4' then '全部失败' when '5' then '全部成功' when '6' then '无需处理' else '-' end do_status,
a.do_detail,
a.do_remark,
case a.do_status_contract when '0' then '空' when '1' then '无需处理' when '2' then '待发起' when '3' then '发起失败'
when '4' then '待审核' when '8' then '审核通过' when '10' then '审核不通过' else '-' end do_status_contract,
case a.do_status_social when '0' then '空' when '1' then '无需处理' when '2' then '待派单' when '3' then '发起失败'
when '4' then '待审核' when '5' then '待办理' when '6' then '部分办理失败' when '8' then '办理成功'
when '9' then '办理失败' when '10' then '审核不通过' else '-' end do_status_social,
case a.do_status_fund when '0' then '空' when '1' then '无需处理' when '2' then '待派单' when '3' then '发起失败'
when '4' then '待审核' when '5' then '待办理' when '8' then '办理成功' when '9' then '办理失败' when '10' then '审核不通过' else '-' end do_status_fund,
case a.do_status_insurance when '0' then '空' when '1' then '无需处理' when '2' then '待派单' when '3' then '发起失败'
when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' when '8' then '减员成功' when '9' then '减员退回' else '-' end do_status_insurance,
case a.do_status_project when '0' then '空' when '1' then '无需处理' when '2' then '待减项' when '8' then '减项成功' when '9' then '减项失败' else '-' end do_status_project,
case a.do_status_emp when '0' then '空' when '1' then '无需处理' when '2' then '待减档' when '8' then '减档成功' when '9' then '减档失败' else '-' end do_status_emp,
b.employee_name,
b.emp_idcard,
DATE_FORMAT(b.join_leave_date,'%Y-%m-%d') join_leave_date,
b.dept_name,
b.dept_no
</sql>
<!-- 离职确认列表 -->
<sql id="Base_Confirm_Table_List">
a.id,
<include refid="Base_Confirm_Table_List"></include>
</sql>
<sql id="Base_Confirm_Export_List">
a.confirm_user,
DATE_FORMAT(a.confirm_time,'%Y-%m-%d %H:%i:%s') confirm_time,
a.link_port,
<include refid="Base_Export_List"></include>
</sql>
<!-- 离职待办列表-->
<select id="getEmployeeRegistrationLeaveTablePage" resultMap="tableAndExportMap">
SELECT
<include refid="Base_Table_List"/>
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
ORDER BY b.create_time asc,b.id asc
</select>
<!-- 离职待办列表2000条-->
<select id="getEmployeeRegistrationLeaveTablePage2000" resultMap="tableAndExportMap">
SELECT
<include refid="Base_Table_List"/>
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
ORDER BY b.create_time asc,b.id asc
limit 2000
</select>
<!--离职确认列表-->
<select id="getEmployeeRegistrationLeaveConfirmTablePage" resultMap="tableAndExportMap">
SELECT
<include refid="Base_Confirm_Table_List"/>
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
ORDER BY b.create_time asc,b.id asc
</select>
<!-- 离职待办导出-->
<select id="getEmployeeRegistrationLeaveTableList" resultMap="tableAndExportMap">
SELECT
<include refid="Base_Export_List"/>
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
ORDER BY b.create_time asc,b.id asc
<if test="employeeRegistrationLeave != null">
<if test="employeeRegistrationLeave.limitStart != null">
limit #{employeeRegistrationLeave.limitStart},#{employeeRegistrationLeave.limitEnd}
</if>
</if>
</select>
<!--离职确认导出-->
<select id="getEmployeeRegistrationLeaveConfirmTableList" resultMap="tableAndExportMap">
SELECT
<include refid="Base_Confirm_Export_List"/>
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
ORDER BY b.create_time asc,b.id asc
<if test="employeeRegistrationLeave != null">
<if test="employeeRegistrationLeave.limitStart != null">
limit #{employeeRegistrationLeave.limitStart},#{employeeRegistrationLeave.limitEnd}
</if>
</if>
</select>
<!-- 离职待办导出条数-->
<select id="getEmployeeRegistrationLeaveTableCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
</select>
<!--离职确认导出条数-->
<select id="getEmployeeRegistrationLeaveConfirmTableCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM employee_registration_leave a
left join employee_registration b on a.id=b.id
<where>
1=1
<include refid="employeeRegistrationLeave_where"/>
</where>
</select>
</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