Commit 624bbbf0 authored by hongguangwu's avatar hongguangwu

合同更新,添加操作记录

parent d918cf6b
......@@ -44,9 +44,9 @@ public class TEmployeeLog extends BaseEntity {
private String id;
/**
* 类型:0人员档案;1项目档案
* 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新
*/
@Schema(description = "类型:0人员档案;1项目档案")
@Schema(description = "类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新")
private Integer type;
/**
......
......@@ -32,7 +32,7 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> {
* 生成修改记录
* @Author pwang
* @Date 2022-06-22 11:32
* @param type 类型:0人员档案;1项目档案;2人员和项目档案
* @param type 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新
* @param empId 档案id
* @param projectId 项目id
* @param oldInfo
......
......@@ -83,6 +83,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private final TCustomerInfoService tCustomerInfoService;
private final TAttaInfoService tAttaInfoService;
private final TEmployeeContractAuditService tEmployeeContractAuditService;
private final TEmployeeLogService tEmployeeLogService;
// 缓存信息
private final CacheManager cacheManager;
......@@ -534,6 +536,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
/// 个性化校验逻辑
EmployeeContractUpdateVO excel;
TEmployeeContractInfo contractInfo;
TEmployeeContractInfo newContractInfo;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i);
......@@ -543,9 +546,15 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 存储
contractInfo = baseMapper.getOneContractByApplyNo(excel.getApplyNo());
if (contractInfo != null && Common.isNotNull(contractInfo.getId())) {
contractInfo.setContractNo(excel.getContractNo());
contractInfo.setFileCabinetNo(excel.getFileCabinetNo());
this.updateById(contractInfo);
newContractInfo = new TEmployeeContractInfo();
newContractInfo.setId(contractInfo.getId());
newContractInfo.setContractNo(excel.getContractNo());
newContractInfo.setFileCabinetNo(excel.getFileCabinetNo());
this.updateById(newContractInfo);
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[3], contractInfo.getId(), "", contractInfo, newContractInfo);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeContractConstants.NO_INFO));
......
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