1.修改保存是create_time为空情况

2.修改职务录用是,修改岗位申请表录用状态
This commit is contained in:
sh
2025-10-14 13:32:46 +08:00
parent 60a9445e6f
commit d843197e5b
6 changed files with 36 additions and 13 deletions

View File

@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@@ -49,9 +47,8 @@ public class EmployeeConfirm extends BaseEntity {
/** /**
* 入职日期 * 入职日期
*/ */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("入职日期") @ApiModelProperty("入职日期")
private Date entryDate; private String entryDate;
/** /**
* 联系电话 * 联系电话
*/ */
@@ -63,4 +60,12 @@ public class EmployeeConfirm extends BaseEntity {
@ApiModelProperty("劳动合同期限") @ApiModelProperty("劳动合同期限")
private String contractTerm; private String contractTerm;
@ApiModelProperty("工作id")
private Long jobId;
/**
* 申请id
*/
@TableField(exist = false)
private Long applyId;
} }

View File

@@ -38,4 +38,6 @@ public class JobApply extends BaseEntity
@ApiModelProperty("匹配度") @ApiModelProperty("匹配度")
private Long matchingDegree; private Long matchingDegree;
@ApiModelProperty("是否录用 0录用 2或null未录用")
private String hire;
} }

View File

@@ -11,4 +11,5 @@ public class CandidateVO extends AppUser {
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date applyDate; private Date applyDate;
private Integer matchingDegree; private Integer matchingDegree;
private String applyId;
} }

View File

@@ -1,7 +1,9 @@
package com.ruoyi.cms.service.impl; package com.ruoyi.cms.service.impl;
import com.ruoyi.cms.domain.EmployeeConfirm; import com.ruoyi.cms.domain.EmployeeConfirm;
import com.ruoyi.cms.domain.JobApply;
import com.ruoyi.cms.mapper.EmployeeConfirmMapper; import com.ruoyi.cms.mapper.EmployeeConfirmMapper;
import com.ruoyi.cms.mapper.JobApplyMapper;
import com.ruoyi.cms.service.EmployeeConfirmService; import com.ruoyi.cms.service.EmployeeConfirmService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -15,6 +17,8 @@ public class EmployeeConfirmServiceImpl implements EmployeeConfirmService {
@Autowired @Autowired
EmployeeConfirmMapper employeeConfirmMapper; EmployeeConfirmMapper employeeConfirmMapper;
@Autowired
private JobApplyMapper jobApplyMapper;
@Override @Override
public List<EmployeeConfirm> getEmployeeConfirmList(EmployeeConfirm employeeConfirm) { public List<EmployeeConfirm> getEmployeeConfirmList(EmployeeConfirm employeeConfirm) {
@@ -23,7 +27,14 @@ public class EmployeeConfirmServiceImpl implements EmployeeConfirmService {
@Override @Override
public int insertEmployeeConfirm(EmployeeConfirm employeeConfirm) { public int insertEmployeeConfirm(EmployeeConfirm employeeConfirm) {
return employeeConfirmMapper.insert(employeeConfirm); int t=employeeConfirmMapper.insert(employeeConfirm);
if(t>0){
JobApply apply=new JobApply();
apply.setId(employeeConfirm.getApplyId());
apply.setHire("0");
jobApplyMapper.updateById(apply);
}
return t;
} }
@Override @Override

View File

@@ -40,7 +40,7 @@
ORDER BY ja.create_time DESC ORDER BY ja.create_time DESC
</select> </select>
<select id="candidates" resultType="com.ruoyi.cms.domain.vo.CandidateVO"> <select id="candidates" resultType="com.ruoyi.cms.domain.vo.CandidateVO">
SELECT au.*,jc.create_time as apply_date,jc.matching_degree SELECT au.*,jc.create_time as apply_date,jc.matching_degree,jc.id as applyId
from job_apply as jc from job_apply as jc
inner join app_user as au on jc.user_id = au.user_id inner join app_user as au on jc.user_id = au.user_id
where jc.job_id = #{jobId} and jc.del_flag = '0' and au.del_flag ='0' where jc.job_id = #{jobId} and jc.del_flag = '0' and au.del_flag ='0'

View File

@@ -9,7 +9,8 @@ import com.ruoyi.common.utils.SiteSecurityUtils;
import org.apache.ibatis.reflection.MetaObject; import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Date; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Objects; import java.util.Objects;
/** /**
@@ -31,7 +32,8 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
@Override @Override
public void insertFill(MetaObject metaObject) { public void insertFill(MetaObject metaObject) {
Date date = new Date(); LocalDateTime now = LocalDateTime.now();
String formattedDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
if(SecurityUtils.isLogin()) { if(SecurityUtils.isLogin()) {
LoginUser loginUser = null; LoginUser loginUser = null;
LoginSiteUser siteUser = null; LoginSiteUser siteUser = null;
@@ -50,12 +52,12 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
strictInsertFill(metaObject, CREATE_BY, String.class, name); strictInsertFill(metaObject, CREATE_BY, String.class, name);
strictInsertFill(metaObject, CREATE_BY_ID, Long.class, userId); strictInsertFill(metaObject, CREATE_BY_ID, Long.class, userId);
// 创建时间 // 创建时间
strictInsertFill(metaObject, CREATE_TIME, Date.class, date); strictInsertFill(metaObject, CREATE_TIME, String.class, formattedDate);
// 更新者 // 更新者
strictInsertFill(metaObject, UPDATE_BY, String.class, name); strictInsertFill(metaObject, UPDATE_BY, String.class, name);
strictInsertFill(metaObject, UPDATE_BY_ID, Long.class, userId); strictInsertFill(metaObject, UPDATE_BY_ID, Long.class, userId);
// 更新时间 // 更新时间
strictInsertFill(metaObject, UPDATE_TIME, Date.class, date); strictInsertFill(metaObject, UPDATE_TIME, String.class, formattedDate);
// 删除标识 // 删除标识
strictInsertFill(metaObject, DEL_FLAG, String.class, "0"); strictInsertFill(metaObject, DEL_FLAG, String.class, "0");
}else { }else {
@@ -63,12 +65,12 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
strictInsertFill(metaObject, CREATE_BY, String.class, "匿名登录"); strictInsertFill(metaObject, CREATE_BY, String.class, "匿名登录");
strictInsertFill(metaObject, CREATE_BY_ID, Long.class, 0l); strictInsertFill(metaObject, CREATE_BY_ID, Long.class, 0l);
// 创建时间 // 创建时间
strictInsertFill(metaObject, CREATE_TIME, Date.class, date); strictInsertFill(metaObject, CREATE_TIME, String.class, formattedDate);
// 更新者 // 更新者
strictInsertFill(metaObject, UPDATE_BY, String.class, "匿名登录"); strictInsertFill(metaObject, UPDATE_BY, String.class, "匿名登录");
strictInsertFill(metaObject, UPDATE_BY_ID, Long.class, 0l); strictInsertFill(metaObject, UPDATE_BY_ID, Long.class, 0l);
// 更新时间 // 更新时间
strictInsertFill(metaObject, UPDATE_TIME, Date.class, date); strictInsertFill(metaObject, UPDATE_TIME, String.class, formattedDate);
// 删除标识 // 删除标识
strictInsertFill(metaObject, DEL_FLAG, String.class, "0"); strictInsertFill(metaObject, DEL_FLAG, String.class, "0");
} }
@@ -81,6 +83,8 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
LoginSiteUser siteUser = null; LoginSiteUser siteUser = null;
String name = ""; String name = "";
Long userId = null; Long userId = null;
LocalDateTime now = LocalDateTime.now();
String formattedDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
try { try {
loginUser = SecurityUtils.getLoginUser(); loginUser = SecurityUtils.getLoginUser();
if(Objects.nonNull(loginUser)){ if(Objects.nonNull(loginUser)){
@@ -104,6 +108,6 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
strictUpdateFill(metaObject, UPDATE_BY_ID, Long.class, loginUser.getUserId()); strictUpdateFill(metaObject, UPDATE_BY_ID, Long.class, loginUser.getUserId());
} }
// 更新时间 // 更新时间
strictUpdateFill(metaObject, UPDATE_TIME, Date.class, new Date()); strictUpdateFill(metaObject, UPDATE_TIME, String.class, formattedDate);
} }
} }