Commit 624bbbf0 authored by hongguangwu's avatar hongguangwu

合同更新,添加操作记录

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