Commit a1922052 authored by hongguangwu's avatar hongguangwu

employee.setLeaveTime(LocalDateTime.now());

parent 787ca643
......@@ -307,29 +307,34 @@ public class TEmployeeInfo extends BaseEntity {
* 减档操作人id
*/
@Schema(description = "减档操作人id")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveUser;
/**
* 减档操作人姓名
*/
@Schema(description = "离职操作姓名")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveUserName;
/**
* 离职时间
*/
@Schema(description = "离职时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime leaveTime;
/**
* 离职原因
*/
@Schema(description = "离职原因")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveReason;
/**
* 离职备注
*/
@Schema(description = "离职备注")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveRemark;
/**
......
......@@ -16,10 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -110,24 +107,28 @@ public class TEmployeeProject extends BaseEntity {
* 减项操作人id
*/
@Schema(description ="减项操作人id")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveUser;
/**
* 减项时间
*/
@Schema(description ="减项时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime leaveTime;
/**
* 减项原因
*/
@Schema(description ="减项原因")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveReason;
/**
* 减项备注
*/
@Schema(description ="减项备注")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveRemark;
/**
......
......@@ -308,6 +308,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
for (String pid : idArr) {
for (TEmployeeProject project : projectList) {
if (project.getId().equals(pid)) {
project.setLeaveReason("");
project.setLeaveRemark("");
project.setLeaveUser("");
project.setLeaveTime(null);
project.setProjectStatus(CommonConstants.ZERO_INT);
tEmployeeProjectService.updateById(project);
}
......@@ -316,6 +320,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
employee.setFileStatus(CommonConstants.ZERO_INT);
employee.setLeaveReason("");
employee.setLeaveRemark("");
employee.setLeaveUser("");
employee.setLeaveTime(null);
this.updateById(employee);
// 记录变更日志
......@@ -409,6 +417,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employee.setFileStatus(CommonConstants.ONE_INT);
employee.setLeaveUser(user.getId());
employee.setLeaveUserName(user.getNickname());
employee.setLeaveTime(LocalDateTime.now());
employee.setLeaveReason(excel.getLeaveReason());
employee.setLeaveRemark(excel.getLeaveRemark());
canDeleteList.add(employee);
......@@ -455,6 +464,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employee.setFileStatus(CommonConstants.ONE_INT);
employee.setLeaveUser(user.getId());
employee.setLeaveUserName(user.getNickname());
employee.setLeaveTime(LocalDateTime.now());
employee.setLeaveReason(leaveReason);
employee.setLeaveRemark(leaveRemark);
this.updateById(employee);
......
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