1.修改保存是create_time为空情况
2.修改职务录用是,修改岗位申请表录用状态
This commit is contained in:
@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -49,9 +47,8 @@ public class EmployeeConfirm extends BaseEntity {
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("入职日期")
|
||||
private Date entryDate;
|
||||
private String entryDate;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@@ -63,4 +60,12 @@ public class EmployeeConfirm extends BaseEntity {
|
||||
@ApiModelProperty("劳动合同期限")
|
||||
private String contractTerm;
|
||||
|
||||
@ApiModelProperty("工作id")
|
||||
private Long jobId;
|
||||
|
||||
/**
|
||||
* 申请id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Long applyId;
|
||||
}
|
||||
|
@@ -38,4 +38,6 @@ public class JobApply extends BaseEntity
|
||||
@ApiModelProperty("匹配度")
|
||||
private Long matchingDegree;
|
||||
|
||||
@ApiModelProperty("是否录用 0录用 2或null未录用")
|
||||
private String hire;
|
||||
}
|
||||
|
@@ -11,4 +11,5 @@ public class CandidateVO extends AppUser {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date applyDate;
|
||||
private Integer matchingDegree;
|
||||
private String applyId;
|
||||
}
|
||||
|
@@ -1,7 +1,9 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.ruoyi.cms.domain.EmployeeConfirm;
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.mapper.EmployeeConfirmMapper;
|
||||
import com.ruoyi.cms.mapper.JobApplyMapper;
|
||||
import com.ruoyi.cms.service.EmployeeConfirmService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -15,6 +17,8 @@ public class EmployeeConfirmServiceImpl implements EmployeeConfirmService {
|
||||
|
||||
@Autowired
|
||||
EmployeeConfirmMapper employeeConfirmMapper;
|
||||
@Autowired
|
||||
private JobApplyMapper jobApplyMapper;
|
||||
|
||||
@Override
|
||||
public List<EmployeeConfirm> getEmployeeConfirmList(EmployeeConfirm employeeConfirm) {
|
||||
@@ -23,7 +27,14 @@ public class EmployeeConfirmServiceImpl implements EmployeeConfirmService {
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@@ -40,7 +40,7 @@
|
||||
ORDER BY ja.create_time DESC
|
||||
</select>
|
||||
<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
|
||||
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'
|
||||
|
@@ -9,7 +9,8 @@ import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -31,7 +32,8 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
|
||||
@Override
|
||||
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()) {
|
||||
LoginUser loginUser = null;
|
||||
LoginSiteUser siteUser = null;
|
||||
@@ -50,12 +52,12 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
|
||||
strictInsertFill(metaObject, CREATE_BY, String.class, name);
|
||||
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_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");
|
||||
}else {
|
||||
@@ -63,12 +65,12 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
|
||||
strictInsertFill(metaObject, CREATE_BY, String.class, "匿名登录");
|
||||
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_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");
|
||||
}
|
||||
@@ -81,6 +83,8 @@ public class FieldMetaObjectConfig implements MetaObjectHandler {
|
||||
LoginSiteUser siteUser = null;
|
||||
String name = "";
|
||||
Long userId = null;
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String formattedDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
try {
|
||||
loginUser = SecurityUtils.getLoginUser();
|
||||
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_TIME, Date.class, new Date());
|
||||
strictUpdateFill(metaObject, UPDATE_TIME, String.class, formattedDate);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user