新增入职管理界面
This commit is contained in:
parent
51d959237d
commit
f0ffb2cf5b
|
@ -5,14 +5,14 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
|
||||||
url: jdbc:mysql://192.168.1.165:3306/zeoa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
|
||||||
username: zeoa
|
|
||||||
password: dHahLWNYB7tD2Mia
|
|
||||||
# master:
|
# master:
|
||||||
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.1.165:3306/zeoa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# username: root
|
# username: zeoa
|
||||||
# password: zero
|
# password: dHahLWNYB7tD2Mia
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: zero
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
@ -7,8 +7,8 @@ ruoyi:
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2024
|
copyrightYear: 2024
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
#profile: D:/zeroerr/uploadPath
|
profile: D:/zeroerr/uploadPath
|
||||||
profile: /home/zeroerr_oa/uploadPath
|
#profile: /home/zeroerr_oa/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: false
|
addressEnabled: false
|
||||||
# 验证码类型 math 数字计算 char 字符验证
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
@ -69,15 +69,15 @@ spring:
|
||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: 192.168.1.189
|
#host: 192.168.1.189
|
||||||
#host: localhost
|
host: localhost
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
password: 123456
|
#password: 123456
|
||||||
#password:
|
password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
|
|
@ -0,0 +1,135 @@
|
||||||
|
package cn.zeroerr.controller;
|
||||||
|
|
||||||
|
import cn.zeroerr.common.annotation.Log;
|
||||||
|
import cn.zeroerr.common.core.controller.BaseController;
|
||||||
|
import cn.zeroerr.common.core.domain.AjaxResult;
|
||||||
|
import cn.zeroerr.common.core.domain.entity.SysRole;
|
||||||
|
import cn.zeroerr.common.core.domain.entity.SysUser;
|
||||||
|
import cn.zeroerr.common.core.page.TableDataInfo;
|
||||||
|
import cn.zeroerr.common.enums.BusinessType;
|
||||||
|
import cn.zeroerr.common.utils.poi.ExcelUtil;
|
||||||
|
import cn.zeroerr.domain.entity.EntryManage;
|
||||||
|
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||||
|
import cn.zeroerr.domain.vo.UserVO;
|
||||||
|
import cn.zeroerr.service.EntryManageService;
|
||||||
|
import cn.zeroerr.service.ResumeFollowRecordService;
|
||||||
|
import cn.zeroerr.system.service.ISysRoleService;
|
||||||
|
import cn.zeroerr.system.service.ISysUserService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/recruit/entryManage")
|
||||||
|
@Api(tags = "招聘管理-入职管理")
|
||||||
|
public class EntryManageController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EntryManageService entryManageService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService iSysUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysRoleService iSysRoleService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ResumeFollowRecordService resumeFollowRecordService;
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:add')")
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation(value = "增加入职管理的记录")
|
||||||
|
public AjaxResult addEntryManage(@Validated @RequestBody EntryManage req) {
|
||||||
|
req.setHrId(getUserId());
|
||||||
|
SysUser sysUser = iSysUserService.selectUserById(getUserId());
|
||||||
|
req.setHrName(sysUser.getNickName());
|
||||||
|
req.setCreateTime(LocalDateTime.now());
|
||||||
|
return toAjax(entryManageService.save(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:edit')")
|
||||||
|
@PutMapping("/edit")
|
||||||
|
@ApiOperation(value = "修改入职管理的记录")
|
||||||
|
public AjaxResult editEntryManage(@Validated @RequestBody EntryManage req) {
|
||||||
|
return toAjax(entryManageService.updateById(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:edit')")
|
||||||
|
@GetMapping("/get/{entryId}")
|
||||||
|
@ApiOperation(value = "查询某个入职管理的记录")
|
||||||
|
public AjaxResult queryEntryManage(@PathVariable("entryId") String entryId) {
|
||||||
|
return AjaxResult.success(entryManageService.getById(entryId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation(value = "入职管理的记录列表")
|
||||||
|
public TableDataInfo listEntryManage(EntryManage req) {
|
||||||
|
boolean isHr = false;
|
||||||
|
List<SysRole> sysRoles = iSysRoleService.rolesByUserId(getUserId());
|
||||||
|
if (!CollectionUtils.isEmpty(sysRoles)) {
|
||||||
|
for (SysRole sysRole : sysRoles) {
|
||||||
|
//如果角色是hr
|
||||||
|
if (sysRole.getRoleKey().equals("hr") || sysRole.getRoleKey().equals("hrleader")) {
|
||||||
|
isHr = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isHr) {
|
||||||
|
req.setHrId(getUserId());
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
List<EntryManage> entryManageList = entryManageService.listBySelect(req);
|
||||||
|
return getDataTable(entryManageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:delete')")
|
||||||
|
@DeleteMapping("/delete/{entryId}")
|
||||||
|
@ApiOperation(value = "删除某个入职管理的记录")
|
||||||
|
public AjaxResult deleteEntryManage(@PathVariable("entryId") String entryId) {
|
||||||
|
return toAjax(entryManageService.removeById(entryId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/export")
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:export')")
|
||||||
|
@ApiOperation(value = "下载入职管理记录")
|
||||||
|
@Log(title = "下载入职管理记录", businessType = BusinessType.EXPORT)
|
||||||
|
public void export(HttpServletResponse response, EntryManage req) {
|
||||||
|
boolean isHr = false;
|
||||||
|
List<SysRole> sysRoles = iSysRoleService.rolesByUserId(getUserId());
|
||||||
|
if (!CollectionUtils.isEmpty(sysRoles)) {
|
||||||
|
for (SysRole sysRole : sysRoles) {
|
||||||
|
//如果角色是hr
|
||||||
|
if (sysRole.getRoleKey().equals("hr") || sysRole.getRoleKey().equals("hrleader")) {
|
||||||
|
isHr = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isHr) {
|
||||||
|
req.setHrId(getUserId());
|
||||||
|
}
|
||||||
|
List<EntryManage> entryManageList = entryManageService.listBySelect(req);
|
||||||
|
//将序号重新排列
|
||||||
|
for (int i = 0; i < entryManageList.size(); i++) {
|
||||||
|
EntryManage entry = entryManageList.get(i);
|
||||||
|
entry.setEntryId(Long.valueOf(i));
|
||||||
|
}
|
||||||
|
ExcelUtil<EntryManage> util = new ExcelUtil<EntryManage>(EntryManage.class);
|
||||||
|
util.exportExcel(response,entryManageList, "入职管理数据");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -204,14 +204,14 @@ public class HomePageController extends BaseController {
|
||||||
//某月份,岗位ids
|
//某月份,岗位ids
|
||||||
List<Long> postIdsList=new ArrayList<>();
|
List<Long> postIdsList=new ArrayList<>();
|
||||||
//筛除已经招聘到的岗位
|
//筛除已经招聘到的岗位
|
||||||
List<Long> postIdList=recruitStructureService.filterByPostIdList(uniquePostIdList);
|
//List<Long> postIdList=recruitStructureService.filterByPostIdList(uniquePostIdList);
|
||||||
if(!CollectionUtils.isEmpty(postIdList)){
|
if(!CollectionUtils.isEmpty(uniquePostIdList)){
|
||||||
postIdList.forEach(
|
uniquePostIdList.forEach(
|
||||||
postId->{
|
uniquePostId->{
|
||||||
List<ResumeFollowRecord> resumeFollowRecordListByPostId = groupedResumeFollowRecords.get(postId);
|
List<ResumeFollowRecord> resumeFollowRecordListByPostId = groupedResumeFollowRecords.get(uniquePostId);
|
||||||
List<ResumeHandleRecord> resumeHandleRecordListByPostId = groupedResumeHandleRecords.get(postId);
|
List<ResumeHandleRecord> resumeHandleRecordListByPostId = groupedResumeHandleRecords.get(uniquePostId);
|
||||||
PostDetailDTO postDetailDTO = new PostDetailDTO();
|
PostDetailDTO postDetailDTO = new PostDetailDTO();
|
||||||
postDetailDTO.setPostId(postId);
|
postDetailDTO.setPostId(uniquePostId);
|
||||||
if(!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)){
|
if(!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)){
|
||||||
postDetailDTO.setPostName(resumeFollowRecordListByPostId.get(0).getPostName());
|
postDetailDTO.setPostName(resumeFollowRecordListByPostId.get(0).getPostName());
|
||||||
}else if(!CollectionUtils.isEmpty(resumeHandleRecordListByPostId)) {
|
}else if(!CollectionUtils.isEmpty(resumeHandleRecordListByPostId)) {
|
||||||
|
@ -230,10 +230,11 @@ public class HomePageController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
//封装该岗位合格简历数
|
//封装该岗位合格简历数
|
||||||
if(!CollectionUtils.isEmpty(resumeHandleRecordListByPostId)){
|
if(!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)){
|
||||||
postDetailDTO.setPostQualifiedResumeCounts( resumeHandleRecordListByPostId.stream()
|
// postDetailDTO.setPostQualifiedResumeCounts( resumeHandleRecordListByPostId.stream()
|
||||||
.mapToInt(ResumeHandleRecord::getQualifiedNum)
|
// .mapToInt(ResumeHandleRecord::getQualifiedNum)
|
||||||
.sum());
|
// .sum());
|
||||||
|
postDetailDTO.setPostQualifiedResumeCounts(resumeFollowRecordListByPostId.size());
|
||||||
}else {
|
}else {
|
||||||
postDetailDTO.setPostQualifiedResumeCounts(0);
|
postDetailDTO.setPostQualifiedResumeCounts(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,127 @@
|
||||||
|
package cn.zeroerr.domain.entity;
|
||||||
|
|
||||||
|
import cn.zeroerr.common.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName entry_manage
|
||||||
|
*/
|
||||||
|
@TableName(value ="entry_manage")
|
||||||
|
@Data
|
||||||
|
public class EntryManage implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "entry_id",type = IdType.AUTO)
|
||||||
|
@Excel(name = "用户序号", prompt = "用户编号")
|
||||||
|
private Long entryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名字
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_name")
|
||||||
|
@Excel(name = "部门")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位id
|
||||||
|
*/
|
||||||
|
@TableField(value = "post_id")
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位名字
|
||||||
|
*/
|
||||||
|
@TableField(value = "post_name")
|
||||||
|
@Excel(name = "岗位")
|
||||||
|
private String postName;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 入职者id
|
||||||
|
// */
|
||||||
|
// @TableField(value = "user_id")
|
||||||
|
// private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入职者name
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_name")
|
||||||
|
@Excel(name = "姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hr的id
|
||||||
|
*/
|
||||||
|
@TableField(value = "hr_id")
|
||||||
|
private Long hrId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hr的name
|
||||||
|
*/
|
||||||
|
@TableField(value = "hr_name")
|
||||||
|
@Excel(name = "招聘HR")
|
||||||
|
private String hrName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终试通过的日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "final_pass_date",updateStrategy = FieldStrategy.IGNORED)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "终试通过的日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private LocalDate finalPassDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计入职日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "join_date",updateStrategy = FieldStrategy.IGNORED)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "预计入职日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private LocalDate joinDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际入职日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "actual_join_date",updateStrategy = FieldStrategy.IGNORED)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "实际入职日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private LocalDate actualJoinDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入职失败的原因
|
||||||
|
*/
|
||||||
|
@TableField(value = "entry_fail_reason")
|
||||||
|
@Excel(name = "未入职原因")
|
||||||
|
private String entryFailReason;
|
||||||
|
|
||||||
|
@TableField(value = "create_time")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@TableField(value = "update_time")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
|
@ -8,10 +8,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel
|
@ApiModel
|
||||||
public class UserVO {
|
public class UserVO {
|
||||||
@ApiModelProperty(value = "hr的用户id")
|
@ApiModelProperty(value = "用户id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "hr的名字")
|
@ApiModelProperty(value = "用户名字")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package cn.zeroerr.mapper;
|
||||||
|
|
||||||
|
import cn.zeroerr.domain.entity.EntryManage;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ze-java
|
||||||
|
* @description 针对表【entry_manage】的数据库操作Mapper
|
||||||
|
* @createDate 2024-06-25 10:07:23
|
||||||
|
* @Entity cn.zeroerr.domain.entity.EntryManage
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface EntryManageMapper extends BaseMapper<EntryManage> {
|
||||||
|
|
||||||
|
List<EntryManage> listBySelect(@Param("req") EntryManage req);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package cn.zeroerr.service;
|
||||||
|
|
||||||
|
import cn.zeroerr.domain.entity.EntryManage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ze-java
|
||||||
|
* @description 针对表【entry_manage】的数据库操作Service
|
||||||
|
* @createDate 2024-06-25 10:07:23
|
||||||
|
*/
|
||||||
|
public interface EntryManageService extends IService<EntryManage> {
|
||||||
|
|
||||||
|
|
||||||
|
List<EntryManage> listBySelect(EntryManage req);
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package cn.zeroerr.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import cn.zeroerr.domain.entity.EntryManage;
|
||||||
|
import cn.zeroerr.service.EntryManageService;
|
||||||
|
import cn.zeroerr.mapper.EntryManageMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ze-java
|
||||||
|
* @description 针对表【entry_manage】的数据库操作Service实现
|
||||||
|
* @createDate 2024-06-25 10:07:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EntryManageServiceImpl extends ServiceImpl<EntryManageMapper, EntryManage>
|
||||||
|
implements EntryManageService{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EntryManage> listBySelect(EntryManage req) {
|
||||||
|
return this.baseMapper.listBySelect(req);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?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="cn.zeroerr.mapper.EntryManageMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.zeroerr.domain.entity.EntryManage">
|
||||||
|
<result property="entryId" column="entry_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="postId" column="post_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="postName" column="post_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="hrId" column="hr_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="hrName" column="hr_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="finalPassDate" column="final_pass_date" jdbcType="DATE"/>
|
||||||
|
<result property="joinDate" column="join_date" jdbcType="DATE"/>
|
||||||
|
<result property="actualJoinDate" column="actual_join_date" jdbcType="DATE"/>
|
||||||
|
<result property="entryFailReason" column="entry_fail_reason" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
entry_id,dept_id,dept_name,
|
||||||
|
post_id,post_name,
|
||||||
|
user_name,hr_id,hr_name,
|
||||||
|
final_pass_date,join_date,actual_join_date,
|
||||||
|
entry_fail_reason
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="listBySelect" resultMap="BaseResultMap">
|
||||||
|
select <include refid="Base_Column_List"/>
|
||||||
|
from entry_manage
|
||||||
|
where dept_id is not null
|
||||||
|
<if test="req.finalPassDate!=null"> and final_pass_date <![CDATA[=]]> #{req.finalPassDate}</if>
|
||||||
|
<if test="req.joinDate!=null"> and join_date <![CDATA[=]]> #{req.joinDate}</if>
|
||||||
|
<if test="req.actualJoinDate!=null"> and actual_join_date <![CDATA[=]]> #{req.actualJoinDate}</if>
|
||||||
|
<if test="req.hrName!=null and req.hrName != ''">and hr_name like concat('%', #{req.hrName}, '%')</if>
|
||||||
|
<if test="req.postName!=null and req.postName != ''">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||||
|
<if test="req.deptId!=null">and dept_id = #{req.deptId}</if>
|
||||||
|
<if test="req.entryId!=null">and entry_id = #{req.entryId}</if>
|
||||||
|
<if test="req.hrId!=null">and hr_id = #{req.hrId}</if>
|
||||||
|
order by final_pass_date desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue