Commit 50cb9dd6 authored by huyuchen's avatar huyuchen

huych-入离职登记提交

parent e80b3fd9
...@@ -68,6 +68,9 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -68,6 +68,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "合同类型(字典值)") @Schema(description = "合同类型(字典值)")
private String contractType; private String contractType;
@Schema(description = "合同业务细分(字典值)")
private String contractSubName;
@Schema(description = "数据来源") @Schema(description = "数据来源")
private String dataSource; private String dataSource;
......
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
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;
import java.util.Date;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Data
@ColumnWidth(17)
public class EmployeeRegistrationHrPreExportVo 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("入职日期")
@DateTimeFormat("yyyy-MM-dd")
private Date joinLeaveDate;
@ExcelAttribute(name = "登记人")
@Schema(description = "登记人")
@ExcelProperty("登记人")
private String registorUsername;
@ExcelAttribute(name = "登记时间", isDate = true)
@Schema(description = "登记时间")
@ExcelProperty("登记时间")
private Date createTime;
@ExcelAttribute(name = "数据来源")
@Schema(description = "数据来源")
@ExcelProperty("数据来源")
private String dataSource;
@ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服")
@ExcelProperty("前端客服")
private String customerUsernameNew;
@ExcelAttribute(name = "状态")
@Schema(description = "状态,0已接收,1未处理,2已处理,3拒绝入职")
@ExcelProperty("状态")
private String processStatus;
}
package com.yifu.cloud.plus.v1.csp.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 org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Data
public class EmployeeRegistrationPreVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@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;
/**
* 状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职
*/
@Length(max = 1, message = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职 不能超过1 个字符")
@ExcelAttribute(name = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职", maxLength = 1)
@Schema(description = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职")
@ExcelProperty("状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职")
private String processStatus;
/**
* 前端客服
*/
@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;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", 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;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@Length(max = 2, message = "员工类型(字典值,0外包1派遣2代理) 不能超过2 个字符")
@ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理)", maxLength = 2)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@ExcelProperty("员工类型(字典值,0外包1派遣2代理)")
private String empNature;
/**
* 合同类型(字典值)
*/
@Length(max = 2, message = "合同类型(字典值) 不能超过2 个字符")
@ExcelAttribute(name = "合同类型(字典值)", maxLength = 2)
@Schema(description = "合同类型(字典值)")
@ExcelProperty("合同类型(字典值)")
private String contractType;
/**
* 数据来源
*/
@Length(max = 5, message = "数据来源 不能超过5 个字符")
@ExcelAttribute(name = "数据来源", maxLength = 5)
@Schema(description = "数据来源")
@ExcelProperty("数据来源")
private String dataSource;
/**
* 预计收集时间
*/
@ExcelAttribute(name = "预计收集时间", isDate = true)
@Schema(description = "预计收集时间")
@ExcelProperty("预计收集时间")
private Date expectedCollectionTime;
/**
* 服务事项
*/
@Length(max = 50, message = "服务事项 不能超过50 个字符")
@ExcelAttribute(name = "服务事项", maxLength = 50)
@Schema(description = "服务事项")
@ExcelProperty("服务事项")
private String serverItem;
/**
* 档案所在地-省
*/
@ExcelAttribute(name = "档案所在地-省")
@Schema(description = "档案所在地-省")
@ExcelProperty("档案所在地-省")
private String fileProvince;
/**
* 档案所在地-市
*/
@ExcelAttribute(name = "档案所在地-市")
@Schema(description = "档案所在地-市")
@ExcelProperty("档案所在地-市")
private String fileCity;
/**
* 档案所在地-县
*/
@ExcelAttribute(name = "档案所在地-县")
@Schema(description = "档案所在地-县")
@ExcelProperty("档案所在地-县")
private String fileTown;
/**
* 确认人
*/
@Length(max = 30, message = "确认人 不能超过30 个字符")
@ExcelAttribute(name = "确认人", maxLength = 30)
@Schema(description = "确认人")
@ExcelProperty("确认人")
private String confirmUser;
/**
* 确认时间
*/
@ExcelAttribute(name = "确认时间", isDate = true)
@Schema(description = "确认时间")
@ExcelProperty("确认时间")
private Date confirmTime;
/**
* 创建人姓名
*/
@Length(max = 36, message = "创建人姓名 不能超过36 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 36)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration; import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationExportVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationHrExportVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationHrExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationHrPreExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeProjectBelongDeptSearchCspVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeProjectBelongDeptSearchCspVo;
...@@ -35,6 +36,8 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat ...@@ -35,6 +36,8 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat
List<EmployeeRegistrationHrExportVo> selectHrExportList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration); List<EmployeeRegistrationHrExportVo> selectHrExportList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
List<EmployeeRegistrationHrPreExportVo> selectHrPreExportList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
// 获取已接收的入离职申请,同步所属部门到项目档案里 // 获取已接收的入离职申请,同步所属部门到项目档案里
List<TEmployeeProjectBelongDept> getZeroRegistrationByIdCard(@Param("searchCspVo") TEmployeeProjectBelongDeptSearchCspVo searchCspVo); List<TEmployeeProjectBelongDept> getZeroRegistrationByIdCard(@Param("searchCspVo") TEmployeeProjectBelongDeptSearchCspVo searchCspVo);
......
...@@ -19,10 +19,7 @@ import com.yifu.cloud.plus.v1.csp.entity.TOperationLog; ...@@ -19,10 +19,7 @@ import com.yifu.cloud.plus.v1.csp.entity.TOperationLog;
import com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationMapper; import com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationMapper;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService; import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService;
import com.yifu.cloud.plus.v1.csp.service.TOperationLogService; import com.yifu.cloud.plus.v1.csp.service.TOperationLogService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationExportVo; import com.yifu.cloud.plus.v1.csp.vo.*;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationHrExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept;
...@@ -54,7 +51,10 @@ import javax.servlet.http.HttpServletResponse; ...@@ -54,7 +51,10 @@ import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
...@@ -238,7 +238,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -238,7 +238,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
public void hrConfirmExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo) { public void hrConfirmExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo) {
String fileName = "入职待确认批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "入职待确认批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<EmployeeRegistrationExportVo> list = new ArrayList<>(); List<EmployeeRegistrationHrPreExportVo> list = new ArrayList<>();
//前端客服的所有项目权限赋值 //前端客服的所有项目权限赋值
initSearchVo(searchVo); initSearchVo(searchVo);
//待办列表只查看未处理的数据 //待办列表只查看未处理的数据
...@@ -251,16 +251,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -251,16 +251,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8)); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationExportVo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationHrPreExportVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.selectExportList(searchVo); list = baseMapper.selectHrPreExportList(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("入职待确认" + index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("入职待确认" + index).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
index++; index++;
} }
...@@ -269,7 +269,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -269,7 +269,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
} else { } else {
WriteSheet writeSheet = EasyExcel.writerSheet("入职待确认" + index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("入职待确认" + index).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
} }
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
......
...@@ -61,6 +61,21 @@ ...@@ -61,6 +61,21 @@
<result property="deptName" column="dept_name"/> <result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/> <result property="deptNo" column="dept_no"/>
</resultMap> </resultMap>
<resultMap id="employeeRegistrationHrPreExportMap" type="com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationHrPreExportVo">
<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="processStatus" column="process_status"/>
<result property="registorUsername" column="registor_username"/>
<result property="createTime" column="create_time"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="dataSource" column="data_source"/>
<result property="customerUsernameNew" column="customer_username_new"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
a.employee_name, a.employee_name,
...@@ -237,7 +252,6 @@ ...@@ -237,7 +252,6 @@
</if> </if>
</select> </select>
<select id="selectHrExportList" resultMap="employeeRegistrationHrExportMap"> <select id="selectHrExportList" resultMap="employeeRegistrationHrExportMap">
SELECT SELECT
a.dept_name, a.dept_name,
...@@ -263,6 +277,31 @@ ...@@ -263,6 +277,31 @@
</if> </if>
</select> </select>
<select id="selectHrPreExportList" resultMap="employeeRegistrationHrPreExportMap">
SELECT
a.dept_name,
a.dept_no,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
a.join_leave_date,
if(a.process_status= '0','已接收',if(a.process_status= '1','待处理',if(a.process_status= '2','已处理','拒绝入职')) process_status,
a.registor_username,
a.create_time,
a.customer_username_new,
a.data_source
FROM employee_registration a
<where>
1=1
<include refid="employeeRegistration_where"/>
</where>
order by a.create_time desc
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</select>
<!-- 获取待处理的数据 --> <!-- 获取待处理的数据 -->
<select id="getZeroRegistrationByIdCard" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept"> <select id="getZeroRegistrationByIdCard" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept">
SELECT SELECT
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<result property="deptId" column="dept_id"/> <result property="deptId" column="dept_id"/>
<result property="empNature" column="emp_nature"/> <result property="empNature" column="emp_nature"/>
<result property="contractType" column="contract_type"/> <result property="contractType" column="contract_type"/>
<result property="contractSubName" column="contract_sub_name"/>
<result property="dataSource" column="data_source"/> <result property="dataSource" column="data_source"/>
<result property="expectedCollectionTime" column="expected_collection_time"/> <result property="expectedCollectionTime" column="expected_collection_time"/>
<result property="serverItem" column="server_item"/> <result property="serverItem" column="server_item"/>
...@@ -60,7 +61,8 @@ ...@@ -60,7 +61,8 @@
a.create_name, a.create_name,
a.create_time, a.create_time,
a.update_by, a.update_by,
a.update_time a.update_time,
a.contract_sub_name
</sql> </sql>
<sql id="employeeRegistrationPre_where"> <sql id="employeeRegistrationPre_where">
<if test="employeeRegistrationPre != null"> <if test="employeeRegistrationPre != null">
......
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