Commit 54d0a4bb authored by hongguangwu's avatar hongguangwu

合同变更-更新拦截

parent 40856258
...@@ -8,5 +8,7 @@ public class EmployeeContractConstants { ...@@ -8,5 +8,7 @@ public class EmployeeContractConstants {
public static final String NOT_CREATE_USER = "不是创建人,无法删除"; public static final String NOT_CREATE_USER = "不是创建人,无法删除";
public static final String NOT_AUDIT_STATUS = "不是待提交或审核不通过,无法删除"; public static final String NOT_AUDIT_STATUS = "不是待提交或审核不通过,无法删除";
public static final String NOT_AUDIT = "未审核通过,无法更新";
public static final String INVALID = "作废、终止,无法更新";
} }
...@@ -668,16 +668,21 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -668,16 +668,21 @@ 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())) {
newContractInfo = new TEmployeeContractInfo(); if (CommonConstants.dingleDigitIntArray[2] != contractInfo.getAuditStatus()) {
newContractInfo.setId(contractInfo.getId()); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeContractConstants.NOT_AUDIT));
newContractInfo.setContractNo(excel.getContractNo()); } else if (EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
newContractInfo.setFileCabinetNo(excel.getFileCabinetNo()); || EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation())) {
this.updateById(newContractInfo); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeContractConstants.INVALID));
} else {
// 记录变更日志 newContractInfo = new TEmployeeContractInfo();
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[3], contractInfo.getId(), "", contractInfo, newContractInfo); newContractInfo.setId(contractInfo.getId());
newContractInfo.setContractNo(excel.getContractNo());
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS)); 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 { } 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