Commit 3c1da978 authored by huyuchen's avatar huyuchen

huych-入职登记提交

parent 2a7b755a
......@@ -265,9 +265,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//新增操作记录
EmployeeRegistrationUpdateVo receiveVo = new EmployeeRegistrationUpdateVo();
receiveVo.setEmployeeName(user.getNickname());
receiveVo.setEmpIdcard(updatePre.getEmpIdcard());
receiveVo.setId(updatePre.getId());
receiveVo.setReason(employeeRegistrationPre.getReason());
receiveVo.setDeptNo(employeeRegistrationPre.getDeptNo());
receiveVo.setEmployeeId(user.getId());
try {
//调用csp服务更新状态和新增操作记录
cspDaprUtils.updateRegistByPreInfo(receiveVo);
......
......@@ -21,6 +21,9 @@ public class EmployeeRegistrationUpdateVo implements Serializable {
@Schema(description = "身份证号")
private String empIdcard;
@Schema(description = "操作人人id")
private String employeeId;
@Schema(description = "操作人人姓名")
private String employeeName;
......
......@@ -56,4 +56,6 @@ public interface TOperationLogService extends IService<TOperationLog> {
**/
TOperationLog saveLog(String mainId, String type, String title, LocalDateTime operationTime, String operationName, String remark);
TOperationLog saveInnerLog(String mainId, String type, String title, LocalDateTime operationTime, String operationName, String remark, String userId);
}
......@@ -713,17 +713,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
@Override
public Boolean updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) {
EmployeeRegistration registration = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, updateVo.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, updateVo.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, CommonConstants.ONE_STRING)
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL));
.eq(EmployeeRegistration::getId, updateVo.getId())
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus));
if (Common.isNotNull(registration)) {
registration.setProcessStatus(CommonConstants.THREE_STRING);
baseMapper.updateById(registration);
//新增拒绝入职操作记录
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.BACK_RECEIVE, LocalDateTime.now(),
updateVo.getEmployeeName(), "拒绝入职原因:" + updateVo.getReason());
logService.saveInnerLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.BACK_RECEIVE, LocalDateTime.now(),
updateVo.getEmployeeName(), updateVo.getReason(),updateVo.getEmployeeId());
}
return true;
}
......
......@@ -123,4 +123,40 @@ public class TOperationLogServiceImpl extends ServiceImpl<TOperationLogMapper, T
return log;
}
/**
* @param mainId 关联ID
* @param type 传0,就是入离职申请(可以为空)
* @param title 标题
* @param operationTime 操作时间
* @param operationName 操作人
* @param remark 备注(可以为空)
* @Description: 新增日志
* @Author: hgw
* @Date: 2025/2/28 16:13
* @return: com.yifu.cloud.plus.v1.csp.entity.TOperationLog
**/
@Override
public TOperationLog saveInnerLog(String mainId, String type, String title, LocalDateTime operationTime,
String operationName, String remark, String userId) {
if (Common.isEmpty(mainId) || Common.isEmpty(title)
|| Common.isEmpty(operationTime) || Common.isEmpty(operationName)) {
return null;
}
TOperationLog log = new TOperationLog();
log.setMainId(mainId);
if (Common.isEmpty(type)) {
type = CommonConstants.ZERO_STRING;
}
log.setType(type);
log.setTitle(title);
log.setOperationTime(operationTime);
log.setOperationName(operationName);
log.setRemark(remark);
log.setCreateBy(userId);
log.setCreateName(operationName);
log.setCreateTime(LocalDateTime.now());
this.save(log);
return log;
}
}
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