Commit 98f39acd authored by huyuchen's avatar huyuchen

huych-入离职登记提交

parent 46680ef7
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @Author hgw
* @Date 2022-10-21 09:50:08
* @Description 通用Vo
* @Version 1.0
*/
@Data
public class EmpProjectStatusVo implements Serializable {
private String deptNo;
private String empIdcard;
private LocalDateTime projectTime;
}
......@@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainDataVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
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;
......@@ -375,11 +372,24 @@ public class TEmployeeProjectController {
* @Description: 通过id获取结算主体及单位部分信息
* @Author: huyc
* @Date: 2025/2/25 17:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
* @return:
**/
@Inner
@PostMapping("/inner/getUnProjectEmpList")
public TSalaryStandardSelectViewVo getUnProjectEmpList(@RequestBody List<TSalaryStandardUnprojectVo> voList) {
return tEmployeeProjectService.getUnProjectEmpList(voList);
}
/**
* @param vo 人员信息
* @Description: 获取人员项目档案信息
* @Author: huyc
* @Date: 2025/2/27 15:18
* @return:
**/
@Inner
@PostMapping("/inner/getEmpProjectStatus")
public EmpProjectStatusVo getEmpProjectStatus(@RequestBody EmpProjectStatusVo vo) {
return tEmployeeProjectService.getEmpProjectStatus(vo);
}
}
......@@ -44,6 +44,8 @@ import java.util.Map;
public interface TEmployeeProjectService extends IService<TEmployeeProject> {
TSalaryStandardSelectViewVo getUnProjectEmpList(List<TSalaryStandardUnprojectVo> voList);
EmpProjectStatusVo getEmpProjectStatus(EmpProjectStatusVo vo);
/**
* @param tEmployeeProject
* @Description: 新增项目档案校验
......
......@@ -138,6 +138,20 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
@Override
public EmpProjectStatusVo getEmpProjectStatus(EmpProjectStatusVo vo) {
TEmployeeProject employeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, vo.getEmpIdcard())
.eq(TEmployeeProject::getDeptNo, vo.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(employeeProject)) {
vo.setProjectTime(employeeProject.getCreateTime());
return vo;
}
return null;
}
@Override
public R addCheck(TEmployeeProject tEmployeeProject) {
......
......@@ -634,6 +634,8 @@ public interface CommonConstants {
List<String> socialStatus = Stream.of("3","4","6","7","9","11","12").collect(Collectors.toList());
List<String> processStatus = Stream.of("0","1").collect(Collectors.toList());
List<String> socialInfoStatus = Stream.of("1","3","5","7").collect(Collectors.toList());
List<String> deptList = Stream.of("安徽一册档案管理有限公司","安徽顾合企业管理咨询有限公司","安徽赤道线数字传媒科技有限公司","劳务业务中心","易服智享&研究院").collect(Collectors.toList());
......
package com.yifu.cloud.plus.v1.csp.constants;
/**
* @author licancan
* @description 商险常量
* @date 2022-07-18 17:52:59
*/
public class RegistConstants {
public static final String IMPORT_EXIT_CHECK = "模板中已存在该员工的登记信息";
public static final String NO_DATA_TO_HANDLE = "未找到对应未处理状态的数据!";
public static final String IDCARD_FORMAT_ERROR = "身份证格式错误!";
public static final String PHONE_FORMAT_ERROR = "手机号格式错误!";
public static final String REGIST_SAME_CHECK = "该人员入职/离职数据已登记,请勿重复操作";
public static final String EMP_PROJECT_EXIT_CHECK = "未找到该人员对应的在项信息!";
}
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.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.util.Date;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Data
@TableName("employee_registration")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "入离职登记表")
public class EmployeeRegistration extends BaseEntity {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键ID")
private String id;
@ExcelProperty(value ="项目编码")
private String deptNo;
@ExcelProperty(value ="项目名称")
private String deptName;
@ExcelProperty(value ="项目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 = "反馈类型 1入职 2离职")
private String feedbackType;
@Schema(description = "入/离职日期")
private Date joinLeaveDate;
@Schema(description = "处理状态,0已接收,1未处理,2已处理")
private String processStatus;
@Schema(description = "登记人")
private String registorUsername;
@Schema(description = "登记人所在部门名称")
private String registorDeptname;
@Schema(description = "登记人部门id")
private String registorDeptid;
@Schema(description = "登记人手机号")
private String registorPhone;
@Schema(description = "员工所在部门名称")
private String empDeptname;
@Schema(description = "员工部门id")
private String empDeptid;
@Schema(description = "客服手机号")
private String customerPhone;
@Schema(description = "客服姓名号")
private String customerUsername;
}
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
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-02-25 14:48:11
*/
@Data
@ColumnWidth(12)
public class EmployeeRegistrationExportVo extends RowIndex 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 empPhone;
@ExcelAttribute(name = "所属部门")
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String empDeptname;
@ExcelAttribute(name = "就职岗位")
@Schema(description = "就职岗位")
@ExcelProperty("就职岗位")
private String position;
@ExcelAttribute(name = "登记类型")
@Schema(description = "登记类型 1入职 2离职")
@ExcelProperty("登记类型")
private String feedbackType;
@ExcelAttribute(name = "入/离职日期", isDate = true)
@Schema(description = "入/离职日期")
@ExcelProperty("入/离职日期")
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 = "处理状态,0已接收,1未处理,2已处理")
@ExcelProperty("处理状态")
private String processStatus;
}
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
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-02-25 14:48:11
*/
@Data
@ColumnWidth(12)
public class EmployeeRegistrationHrExportVo 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 empDeptname;
@ExcelAttribute(name = "就职岗位")
@Schema(description = "就职岗位")
@ExcelProperty("就职岗位")
private String position;
@ExcelAttribute(name = "登记类型")
@Schema(description = "登记类型 1入职 2离职")
@ExcelProperty("登记类型")
private String feedbackType;
@ExcelAttribute(name = "入/离职日期", isDate = true)
@Schema(description = "入/离职日期")
@ExcelProperty("入/离职日期")
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 = "处理状态,0已接收,1未处理,2已处理")
@ExcelProperty("处理状态")
private String processStatus;
}
package com.yifu.cloud.plus.v1.csp.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Data
public class EmployeeRegistrationSearchVo extends EmployeeRegistration {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
//开始时间(查询专用)
@Schema(description = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
//截止时间(查询专用)
@Schema(description = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
//开始时间(查询专用)
@Schema(description = "入离职开始时间")
@TableField(exist = false)
private Date joinTimeStart;
//截止时间(查询专用)
@Schema(description = "入离职截止时间")
@TableField(exist = false)
private Date joinTimeEnd;
}
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.util.Date;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Data
public class EmployeeRegistrationVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@NotBlank(message = "员工姓名 不能为空")
@Length(max = 50, message = "员工姓名 不能超过50 个字符")
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, errorInfo = "员工姓名不能为空", maxLength = 50)
@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;
/**
* 员工手机号
*/
@NotBlank(message = "员工手机号 不能为空")
@Length(max = 11, message = "员工手机号不能超过11 个字符")
@ExcelAttribute(name = "员工手机号", isNotEmpty = true, errorInfo = "员工手机号不能为空", maxLength = 11)
@Schema(description = "员工手机号")
@ExcelProperty("员工手机号")
private String empPhone;
/**
* 岗位
*/
@Length(max = 50, message = "岗位不能超过50个字符")
@ExcelAttribute(name = "岗位", maxLength = 50)
@Schema(description = "岗位")
@ExcelProperty("岗位")
private String position;
/**
* 反馈类型 1入职 2离职
*/
@ExcelAttribute(name = "反馈类型")
@Schema(description = "反馈类型")
@ExcelProperty("反馈类型")
private String feedbackType;
/**
* 入/离职日期
*/
@ExcelAttribute(name = "入/离职日期", isDate = true)
@Schema(description = "入/离职日期")
@ExcelProperty("入/离职日期")
private Date joinLeaveDate;
}
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.EmployeeRegistration;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/employeeregistration")
@Tag(name = "入离职登记表管理")
public class EmployeeRegistrationController {
private final EmployeeRegistrationService employeeRegistrationService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param employeeRegistration 入离职登记表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<EmployeeRegistration>> getEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
return new R<>(employeeRegistrationService.getEmployeeRegistrationPage(page, employeeRegistration));
}
/**
* 通过id查询入离职登记表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission(' ')")
@GetMapping("/{id}")
public R<EmployeeRegistration> getById(@PathVariable("id") String id) {
return R.ok(employeeRegistrationService.getById(id));
}
/**
* 新增入离职登记表
*
* @param employeeRegistration 入离职登记表
* @return R
*/
@Operation(summary = "新增入离职登记表")
@SysLog("新增入离职登记表")
@PostMapping("/registAdd")
public R registAdd(@RequestBody EmployeeRegistration employeeRegistration) {
return employeeRegistrationService.registAdd(employeeRegistration);
}
/**
* 修改入离职登记表
*
* @param employeeRegistration 入离职登记表
* @return R
*/
@Operation(summary = "修改入离职登记表")
@SysLog("修改入离职登记表")
@PostMapping("/updateById")
public R updateById(@RequestBody EmployeeRegistration employeeRegistration) {
return employeeRegistrationService.updateRegist(employeeRegistration);
}
/**
* 修改入离职登记表
*
* @param employeeRegistration 入离职登记表
* @return R
*/
@Operation(summary = "确认接收")
@SysLog("确认接收")
@PostMapping("/confirmSubmit")
public R confirmSubmit(@RequestBody EmployeeRegistration employeeRegistration) {
return employeeRegistrationService.confirmSubmit(employeeRegistration);
}
/**
* 通过id删除入离职登记表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除入离职登记表", description = "通过id删除入离职登记表:hasPermission('csp_employeeregistration_del')")
@SysLog("通过id删除入离职登记表")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('csp_employeeregistration_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(employeeRegistrationService.removeById(id));
}
/**
* 入离职登记表 批量导入
*
* @author huych
* @date 2025-02-25 14:48:11
**/
@SneakyThrows
@Operation(description = "批量新增入离职登记表")
@SysLog("批量新增入离职登记表")
@PostMapping("/importListAdd")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file,String deptId) {
return employeeRegistrationService.importDiy(file.getInputStream(),deptId);
}
/**
* 入离职登记表 批量导出
*
* @author huych
* @date 2025-02-25 14:48:11
**/
@Operation(description = "导出入离职登记表")
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody EmployeeRegistrationSearchVo searchVo) {
employeeRegistrationService.listExport(response, searchVo);
}
/**
* 入离职登记表 批量导出
*
* @author huych
* @date 2025-02-25 14:48:11
**/
@Operation(description = "导出入离职待办任务")
@PostMapping("/hrExport")
public void hrExport(HttpServletResponse response, @RequestBody EmployeeRegistrationSearchVo searchVo) {
employeeRegistrationService.listHrExport(response, searchVo);
}
}
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.EmployeeRegistration;
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.EmployeeRegistrationSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Mapper
public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistration> {
/**
* 入离职登记表简单分页查询
* @param employeeRegistration 入离职登记表
* @return
*/
IPage<EmployeeRegistration> getEmployeeRegistrationPage(Page<EmployeeRegistration> page, @Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
long selectExportCount(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
List<EmployeeRegistrationExportVo> selectExportList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
List<EmployeeRegistrationHrExportVo> selectHrExportList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
}
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.EmployeeRegistration;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
public interface EmployeeRegistrationService extends IService<EmployeeRegistration> {
/**
* 入离职登记表简单分页查询
* @param employeeRegistration 入离职登记表
* @return
*/
IPage<EmployeeRegistration> getEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration);
/**
* 入离职登记表导入
* @param inputStream 文件流
* @return
*/
R<List<ErrorMessage>> importDiy(InputStream inputStream,String deptId);
/**
* 入离职登记新增
* @param registration 入离职登记
* @return
*/
R registAdd(EmployeeRegistration registration);
/**
* 确认提交
* @param registration 入离职登记
* @return
*/
R confirmSubmit(EmployeeRegistration registration);
/**
* 单个更新
* @param registration 入离职登记
* @return
*/
R updateRegist(EmployeeRegistration registration);
/**
* 导出
* @param searchVo 入离职登记
* @return
*/
void listExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo);
/**
* 代办列表导出
* @param searchVo 入离职登记
* @return
*/
void listHrExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo);
}
package com.yifu.cloud.plus.v1.csp.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
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.csp.constants.RegistConstants;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
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.vo.EmployeeRegistrationExportVo;
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.archives.vo.EmpProjectStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
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.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.net.URLEncoder;
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.Pattern;
import static java.util.regex.Pattern.compile;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Log4j2
@Service
@AllArgsConstructor
@EnableConfigurationProperties(DaprArchivesProperties.class)
public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistrationMapper, EmployeeRegistration> implements EmployeeRegistrationService {
private final DaprArchivesProperties archivesProperties;
@Autowired
private ArchivesDaprUtil archivesDaprUtil;
/**
* 入离职登记表简单分页查询
*
* @param employeeRegistration 入离职登记表
* @return
*/
@Override
public IPage<EmployeeRegistration> getEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
return baseMapper.getEmployeeRegistrationPage(page, employeeRegistration);
}
/**
* 入离职登记表批量导出
*
* @param searchVo 入离职登记表
* @return
*/
@Override
public void listExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo) {
String fileName = "入离职登记表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationExportVo> list = new ArrayList<>();
long count = baseMapper.selectExportCount(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, EmployeeRegistrationExportVo.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.selectExportList(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();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
}
}
/**
* 入离职登记表批量导出
*
* @param searchVo 入离职登记表
* @return
*/
@Override
public void listHrExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo) {
String fileName = "入离职登记表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationHrExportVo> list = new ArrayList<>();
long count = baseMapper.selectExportCount(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, EmployeeRegistrationHrExportVo.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.selectHrExportList(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();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
}
}
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream,String deptId) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<EmployeeRegistrationVo> util1 = new ExcelUtil<>(EmployeeRegistrationVo.class);
YifuUser user = SecurityUtils.getUser();
//获取项目信息
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(deptId);
if (null == domainR || null == domainR.getData()) {
errorMessageList.add(new ErrorMessage(-1, "访问员工基础服务异常:"));
}
TSettleDomainSelectVo selectVo = domainR.getData();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, EmployeeRegistrationVo.class, new ReadListener<EmployeeRegistrationVo>() {
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
/**
*临时存储
*/
private List<EmployeeRegistrationVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(EmployeeRegistrationVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage);
} else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
/**
* 加上存储数据库
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importEmployeeRegistration(cachedDataList, errorMessageList,user, selectVo);
log.info("存储数据库成功!");
}
}).sheet().doRead();
} catch (Exception e) {
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}
private void importEmployeeRegistration(List<EmployeeRegistrationVo> excelVOList,
List<ErrorMessage> errorMessageList,YifuUser user,TSettleDomainSelectVo selectVo) {
List<EmployeeRegistration> successList = new ArrayList<>();
Map<String, String> exitMap = new HashMap<>();
for (int i = 0; i < excelVOList.size(); i++) {
EmployeeRegistrationVo excel = excelVOList.get(i);
// 插入
EmployeeRegistration insert = new EmployeeRegistration();
BeanUtil.copyProperties(excel, insert);
//表数据验重
//表内数据重复 员工姓名、员工身份证号码、反馈类型
StringBuilder errorTemp = new StringBuilder();
errorTemp.append(excel.getEmployeeName());
errorTemp.append("_");
errorTemp.append(excel.getEmpIdcard());
errorTemp.append("_");
errorTemp.append(excel.getFeedbackType());
if (null == exitMap.get(errorTemp.toString())) {
exitMap.put(errorTemp.toString(), "1");
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), RegistConstants.IMPORT_EXIT_CHECK, excel));
continue;
}
String error = registCheck(insert);
if (null != error) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), error, excel));
continue;
}
initRegistInfo(insert,user, selectVo);
successList.add(insert);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
}
// 执行数据插入操作 组装
if (!successList.isEmpty()) {
this.saveBatch(successList);
}
}
public R registAdd(EmployeeRegistration registration) {
//提交校验内容:
//1、身份证号位数、手机号码位数及格式,就职岗位下拉选择“内勤、揽投员、其他”
//2、按照类型、按照身份证号、按照项目进行去重校验
String errorInfo = registCheck(registration);
if (null != errorInfo) {
return R.failed(errorInfo);
} else {
baseMapper.insert(registration);
}
return R.ok();
}
public R confirmSubmit(EmployeeRegistration registration) {
EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId());
if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) {
EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(registration.getEmpIdcard());
vo.setDeptNo(registration.getDeptNo());
EmpProjectStatusVo exit = getEmpProjectStatus(vo);
if (Common.isNotNull(exit)) {
return R.ok(CommonConstants.ONE_STRING);
}
}
baseMapper.updateById(registration);
return R.ok();
}
public R updateRegist(EmployeeRegistration registration) {
EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId());
if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
}
baseMapper.updateById(registration);
return R.ok();
}
//单个新增、导入校验
private String registCheck(EmployeeRegistration registration) {
//定义判别用户身份证号的正则表达式(要么是15位,要么是18位,最后一位可以为字母)
Pattern idNumPattern = compile("(\\d{14}[0-9a-zA-Z])|(\\d{17}[0-9a-zA-Z])");
//通过Pattern获得Matcher
Matcher idNumMatcher = idNumPattern.matcher(registration.getEmpIdcard());
if (!idNumMatcher.matches()) {
return RegistConstants.IDCARD_FORMAT_ERROR;
}
if (!ValidityUtil.validateEmpPhone(registration.getEmpPhone())) {
return RegistConstants.PHONE_FORMAT_ERROR;
}
EmployeeRegistration exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(exit)) {
return RegistConstants.REGIST_SAME_CHECK;
}
//针对离职的判断人员项目档案状态是否正常
if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) {
EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(registration.getEmpIdcard());
vo.setDeptNo(registration.getDeptNo());
EmpProjectStatusVo exitVo = getEmpProjectStatus(vo);
if (Common.isEmpty(exitVo)) {
return RegistConstants.EMP_PROJECT_EXIT_CHECK;
}
}
return null;
}
//获取人员档案信息
private EmpProjectStatusVo getEmpProjectStatus(EmpProjectStatusVo vo) {
//找到不在项人员的身份证信息
R<EmpProjectStatusVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/temployeeproject/inner/getEmpProjectStatus", vo, EmpProjectStatusVo.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null) {
vo = sdr.getData();
return vo;
} else {
return null;
}
}
//数据初始化
private void initRegistInfo(EmployeeRegistration insert,YifuUser user,TSettleDomainSelectVo selectVo) {
insert.setRegistorDeptname(user.getDeptName());
insert.setRegistorDeptid(user.getDeptId().toString());
insert.setRegistorUsername(user.getUsername());
insert.setRegistorPhone(user.getPhone());
insert.setEmpDeptid(user.getDeptId().toString());
insert.setEmpDeptname(user.getDeptName());
insert.setCustomerPhone(selectVo.getCsPhone());
insert.setCustomerUsername(selectVo.getCsName());
insert.setDeptNo(selectVo.getDepartNo());
insert.setDeptName(selectVo.getDepartName());
insert.setDeptId(selectVo.getId());
}
}
<?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.csp.mapper.EmployeeRegistrationMapper">
<resultMap id="employeeRegistrationMap" type="com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration">
<id property="id" column="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="feedbackType" column="feedback_type"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="processStatus" column="process_status"/>
<result property="registorUsername" column="registor_username"/>
<result property="registorDeptname" column="registor_deptname"/>
<result property="registorDeptid" column="registor_deptid"/>
<result property="registorPhone" column="registor_phone"/>
<result property="empDeptname" column="emp_deptname"/>
<result property="empDeptid" column="emp_deptid"/>
<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="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="deptId" column="dept_id"/>
<result property="customerPhone" column="customer_phone"/>
<result property="customerUsername" column="customer_username"/>
</resultMap>
<resultMap id="employeeRegistrationExportMap" type="com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationExportVo">
<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="feedbackType" column="feedback_type"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="processStatus" column="process_status"/>
<result property="registorUsername" column="registor_username"/>
<result property="empDeptname" column="emp_deptname"/>
<result property="createTime" column="create_time"/>
</resultMap>
<resultMap id="employeeRegistrationHrExportMap" type="com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationHrExportVo">
<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="feedbackType" column="feedback_type"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="processStatus" column="process_status"/>
<result property="registorUsername" column="registor_username"/>
<result property="empDeptname" column="emp_deptname"/>
<result property="createTime" column="create_time"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
a.feedback_type,
a.join_leave_date,
a.process_status,
a.registor_username,
a.registor_deptname,
a.registor_deptid,
a.registor_deptno,
a.registor_phone,
a.emp_deptname,
a.emp_deptid,
a.emp_deptno,
a.create_by,
a.create_name,
a.create_time,
a.update_by,
a.update_time,
a.dept_name,
a.dept_id,
a.dept_no,
a.customer_username,
a.customer_phone
</sql>
<sql id="employeeRegistration_where">
<if test="employeeRegistration != null">
<if test="employeeRegistration.id != null and employeeRegistration.id.trim() != ''">
AND a.id = #{employeeRegistration.id}
</if>
<if test="employeeRegistration.employeeName != null and employeeRegistration.employeeName.trim() != ''">
AND a.employee_name like CONCAT(#{employeeRegistration.employeeName},'%')
</if>
<if test="employeeRegistration.empIdcard != null and employeeRegistration.empIdcard.trim() != ''">
AND a.emp_idcard like CONCAT(#{employeeRegistration.empIdcard},'%')
</if>
<if test="employeeRegistration.empPhone != null and employeeRegistration.empPhone.trim() != ''">
AND a.emp_phone like CONCAT(#{employeeRegistration.empPhone},'%')
</if>
<if test="employeeRegistration.position != null and employeeRegistration.position.trim() != ''">
AND a.position = #{employeeRegistration.position}
</if>
<if test="employeeRegistration.feedbackType != null and employeeRegistration.feedbackType.trim() != ''">
AND a.feedback_type = #{employeeRegistration.feedbackType}
</if>
<if test="employeeRegistration.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{employeeRegistration.createTimeStart}
</if>
<if test="employeeRegistration.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{employeeRegistration.createTimeEnd}
</if>
<if test="employeeRegistration.joinTimeStart != null">
AND a.join_leave_date <![CDATA[ >= ]]> #{employeeRegistration.joinTimeStart}
</if>
<if test="employeeRegistration.joinTimeEnd != null">
AND a.join_leave_date <![CDATA[ <= ]]> #{employeeRegistration.joinTimeEnd}
</if>
<if test="employeeRegistration.joinLeaveDate != null">
AND a.join_leave_date = #{employeeRegistration.joinLeaveDate}
</if>
<if test="employeeRegistration.processStatus != null and employeeRegistration.processStatus.trim() != ''">
AND a.process_status = #{employeeRegistration.processStatus}
</if>
<if test="employeeRegistration.registorUsername != null and employeeRegistration.registorUsername.trim() != ''">
AND a.registor_username = #{employeeRegistration.registorUsername}
</if>
<if test="employeeRegistration.registorDeptname != null and employeeRegistration.registorDeptname.trim() != ''">
AND a.registor_deptname like CONCAT(#{employeeRegistration.registorDeptname},'%')
</if>
<if test="employeeRegistration.registorDeptid != null and employeeRegistration.registorDeptid.trim() != ''">
AND a.registor_deptid = #{employeeRegistration.registorDeptid}
</if>
<if test="employeeRegistration.registorPhone != null and employeeRegistration.registorPhone.trim() != ''">
AND a.registor_phone = #{employeeRegistration.registorPhone}
</if>
<if test="employeeRegistration.empDeptname != null and employeeRegistration.empDeptname.trim() != ''">
AND a.emp_deptname = #{employeeRegistration.empDeptname}
</if>
<if test="employeeRegistration.empDeptid != null and employeeRegistration.empDeptid.trim() != ''">
AND a.emp_deptid = #{employeeRegistration.empDeptid}
</if>
<if test="employeeRegistration.createBy != null and employeeRegistration.createBy.trim() != ''">
AND a.create_by = #{employeeRegistration.createBy}
</if>
<if test="employeeRegistration.createName != null and employeeRegistration.createName.trim() != ''">
AND a.create_name = #{employeeRegistration.createName}
</if>
</if>
</sql>
<!--employeeRegistration简单分页查询-->
<select id="getEmployeeRegistrationPage" resultMap="employeeRegistrationMap">
SELECT
<include refid="Base_Column_List"/>
FROM employee_registration a
<where>
1=1
<include refid="employeeRegistration_where"/>
</where>
</select>
<select id="selectExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM employee_registration a
<where>
1=1
<include refid="employeeRegistration_where"/>
</where>
</select>
<select id="selectExportList" resultMap="employeeRegistrationExportMap">
SELECT
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
if(a.feedback_type = '1','入职','离职') feedback_type,
a.join_leave_date,
if(a.process_status= '0','已接收',if(a.process_status= '1','待处理','已处理')) process_status,
a.registor_username,
a.emp_deptname,
a.create_time
FROM employee_registration a
<where>
1=1
<include refid="employeeRegistration_where"/>
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</where>
</select>
<select id="selectHrExportList" resultMap="employeeRegistrationHrExportMap">
SELECT
a.dept_name,
a.dept_no,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
if(a.feedback_type = '1','入职','离职') feedback_type,
a.join_leave_date,
if(a.process_status= '0','已接收',if(a.process_status= '1','待处理','已处理')) process_status,
a.registor_username,
a.emp_deptname,
a.create_time
FROM employee_registration a
<where>
1=1
<include refid="employeeRegistration_where"/>
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</where>
</select>
</mapper>
......@@ -138,7 +138,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
R<TSalaryStandardSelectViewVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/temployeeproject/inner/getUnProjectEmpList", voList, TSalaryStandardSelectViewVo.class, SecurityConstants.FROM_IN);
// 结算主体
TSalaryStandardSelectViewVo viewVo = new TSalaryStandardSelectViewVo();
TSalaryStandardSelectViewVo viewVo;
if (sdr != null && sdr.getData() != null) {
viewVo = sdr.getData();
} else {
......
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