Commit 4bcc820c authored by fangxinjiang's avatar fangxinjiang

失败原因清空-fxj

parent 68efb7f8
...@@ -83,6 +83,7 @@ public class TEmployeeContractPre extends BaseEntity { ...@@ -83,6 +83,7 @@ public class TEmployeeContractPre extends BaseEntity {
@Schema(description = "撤销签署原因") @Schema(description = "撤销签署原因")
private String revokeReason; private String revokeReason;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@Schema(description = "发起失败原因") @Schema(description = "发起失败原因")
private String errorInfo; private String errorInfo;
......
...@@ -592,11 +592,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -592,11 +592,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractPreNew.setProcessStatus("1".equals(contractPreNew.getSignType()) ? contractPreNew.setProcessStatus("1".equals(contractPreNew.getSignType()) ?
CommonConstants.TWO_STRING : CommonConstants.SIX_STRING); CommonConstants.TWO_STRING : CommonConstants.SIX_STRING);
contractPreNew.setContractId(tEmployeeContractInfo.getId()); contractPreNew.setContractId(tEmployeeContractInfo.getId());
contractPreNew.setErrorInfo("");
contractPreNew.setErrorTime(null);
contractPreNew.setSignFlag(CommonConstants.ONE_STRING); contractPreNew.setSignFlag(CommonConstants.ONE_STRING);
contractPreNew.setRevokeReason(""); contractPreNew.setRevokeReason("");
contractPreNew.setErrorInfo(null);
contractPreNew.setErrorTime(null);
contractPreNewMapper.updateById(contractPreNew); contractPreNewMapper.updateById(contractPreNew);
//更新续签待办提醒的办理状态为处理中 //更新续签待办提醒的办理状态为处理中
LambdaUpdateWrapper<TEmpContractAlert> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TEmpContractAlert> updateWrapper = new LambdaUpdateWrapper<>();
...@@ -623,6 +623,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -623,6 +623,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractPre.setProcessStatus(CommonConstants.FOUR_STRING); contractPre.setProcessStatus(CommonConstants.FOUR_STRING);
} else if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.ONE_INT) { } else if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.ONE_INT) {
contractPre.setProcessStatus(CommonConstants.TWO_STRING); contractPre.setProcessStatus(CommonConstants.TWO_STRING);
contractPre.setErrorInfo(null);
contractPre.setErrorTime(null);
} }
contractPre.setRevokeReason(""); contractPre.setRevokeReason("");
contractPre.setSignFlag(CommonConstants.ONE_STRING); contractPre.setSignFlag(CommonConstants.ONE_STRING);
...@@ -638,6 +640,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -638,6 +640,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractPreNew.setProcessStatus(CommonConstants.FOUR_STRING); contractPreNew.setProcessStatus(CommonConstants.FOUR_STRING);
} else if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.ONE_INT) { } else if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.ONE_INT) {
contractPreNew.setProcessStatus(CommonConstants.TWO_STRING); contractPreNew.setProcessStatus(CommonConstants.TWO_STRING);
contractPreNew.setErrorInfo(null);
contractPreNew.setErrorTime(null);
} }
contractPreNew.setRevokeReason(""); contractPreNew.setRevokeReason("");
contractPreNew.setSignFlag(CommonConstants.ONE_STRING); contractPreNew.setSignFlag(CommonConstants.ONE_STRING);
......
...@@ -1019,7 +1019,15 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -1019,7 +1019,15 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
} }
//更新合同的办理状态 //更新合同的办理状态
updateEmpContractAlertHandleStatus(contractPre.getContractId(), CommonConstants.ONE_STRING); updateEmpContractAlertHandleStatus(contractPre.getContractId(), CommonConstants.ONE_STRING);
// 更新processStatus为电子签发起失败 // 如果之前是发起失败状态,清空错误信息
if (CommonConstants.FIVE_STRING.equals(contractPreTemp.getProcessStatus())) {
LambdaUpdateWrapper<TEmployeeContractPreNew> clearErrorWrapper = new LambdaUpdateWrapper<>();
clearErrorWrapper.eq(TEmployeeContractPreNew::getId, contractPreTemp.getId())
.set(TEmployeeContractPreNew::getErrorInfo, null)
.set(TEmployeeContractPreNew::getErrorTime, null);
this.update(clearErrorWrapper);
}
// 更新processStatus为电子签签署中
LambdaUpdateWrapper<TEmployeeContractPreNew> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TEmployeeContractPreNew> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeContractPreNew::getId, contractPreTemp.getId()) updateWrapper.eq(TEmployeeContractPreNew::getId, contractPreTemp.getId())
.set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.SIX_STRING); .set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.SIX_STRING);
...@@ -1118,11 +1126,18 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -1118,11 +1126,18 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
} else { } else {
//处理成功更新数据 //处理成功更新数据
EmployeeContractVO contractVO = disList.stream().filter(vo -> Objects.equals(vo.getRowIndex(), errorMessage.getLineNum())).collect(Collectors.toList()).get(0); EmployeeContractVO contractVO = disList.stream().filter(vo -> Objects.equals(vo.getRowIndex(), errorMessage.getLineNum())).collect(Collectors.toList()).get(0);
// 先查询旧状态,判断是否需要清空错误信息
TEmployeeContractPreNew oldPre = baseMapper.selectById(contractVO.getPreNewId());
LambdaUpdateWrapper<TEmployeeContractPreNew> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TEmployeeContractPreNew> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TEmployeeContractPreNew::getId, contractVO.getPreNewId()) updateWrapper.in(TEmployeeContractPreNew::getId, contractVO.getPreNewId())
.in(TEmployeeContractPreNew::getProcessStatus, CommonConstants.contractDIsStatus) .in(TEmployeeContractPreNew::getProcessStatus, CommonConstants.contractDIsStatus)
.set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.TWO_STRING) .set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.TWO_STRING)
.set(TEmployeeContractPreNew::getSignType, CommonConstants.ONE_STRING); .set(TEmployeeContractPreNew::getSignType, CommonConstants.ONE_STRING);
// 如果之前是发起失败状态,清空错误信息
if (Common.isNotNull(oldPre) && CommonConstants.FIVE_STRING.equals(oldPre.getProcessStatus())) {
updateWrapper.set(TEmployeeContractPreNew::getErrorInfo, null)
.set(TEmployeeContractPreNew::getErrorTime, null);
}
this.update(updateWrapper); this.update(updateWrapper);
//更新合同的办理状态 //更新合同的办理状态
updateEmpContractAlertHandleStatus(contractVO.getContractId(), CommonConstants.ONE_STRING); updateEmpContractAlertHandleStatus(contractVO.getContractId(), CommonConstants.ONE_STRING);
...@@ -1134,11 +1149,18 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -1134,11 +1149,18 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
if (errorMessage.getMessage().equals(CommonConstants.SAVE_SUCCESS)){ if (errorMessage.getMessage().equals(CommonConstants.SAVE_SUCCESS)){
//处理成功更新数据 //处理成功更新数据
EmployeeContractVO contractVO = disList.stream().filter(vo -> Objects.equals(vo.getRowIndex(), errorMessage.getLineNum())).collect(Collectors.toList()).get(0); EmployeeContractVO contractVO = disList.stream().filter(vo -> Objects.equals(vo.getRowIndex(), errorMessage.getLineNum())).collect(Collectors.toList()).get(0);
// 先查询旧状态,判断是否需要清空错误信息
TEmployeeContractPreNew oldPre = baseMapper.selectById(contractVO.getPreNewId());
LambdaUpdateWrapper<TEmployeeContractPreNew> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TEmployeeContractPreNew> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeContractPreNew::getId, contractVO.getPreNewId()) updateWrapper.eq(TEmployeeContractPreNew::getId, contractVO.getPreNewId())
.in(TEmployeeContractPreNew::getProcessStatus, CommonConstants.contractDIsStatus) .in(TEmployeeContractPreNew::getProcessStatus, CommonConstants.contractDIsStatus)
.set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.TWO_STRING) .set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.TWO_STRING)
.set(TEmployeeContractPreNew::getSignType, CommonConstants.ONE_STRING); .set(TEmployeeContractPreNew::getSignType, CommonConstants.ONE_STRING);
// 如果之前是发起失败状态,清空错误信息
if (Common.isNotNull(oldPre) && CommonConstants.FIVE_STRING.equals(oldPre.getProcessStatus())) {
updateWrapper.set(TEmployeeContractPreNew::getErrorInfo, null)
.set(TEmployeeContractPreNew::getErrorTime, null);
}
this.update(updateWrapper); this.update(updateWrapper);
//更新合同的办理状态 //更新合同的办理状态
......
...@@ -495,6 +495,14 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -495,6 +495,14 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
audit.setCreateName("法大大电子签"); audit.setCreateName("法大大电子签");
audit.setCreateBy("1"); audit.setCreateBy("1");
tEmployeeContractAuditService.save(audit); tEmployeeContractAuditService.save(audit);
// 如果之前是发起失败状态,清空错误信息
if (CommonConstants.FIVE_STRING.equals(contractPre.getProcessStatus())) {
LambdaUpdateWrapper<TEmployeeContractPre> clearErrorWrapper = new LambdaUpdateWrapper<>();
clearErrorWrapper.eq(TEmployeeContractPre::getId, contractPre.getId())
.set(TEmployeeContractPre::getErrorInfo, null)
.set(TEmployeeContractPre::getErrorTime, null);
this.update(clearErrorWrapper);
}
} }
} }
} }
......
...@@ -2712,7 +2712,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2712,7 +2712,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.eq(TEmployeeContractPre::getProcessStatus, CommonConstants.TWO_STRING) .eq(TEmployeeContractPre::getProcessStatus, CommonConstants.TWO_STRING)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractPre)) { if (Common.isNotNull(contractPre)) {
String oldStatus = contractPre.getProcessStatus();
contractPre.setProcessStatus(CommonConstants.FOUR_STRING); contractPre.setProcessStatus(CommonConstants.FOUR_STRING);
// 如果之前是发起失败状态,清空错误信息
if (CommonConstants.FIVE_STRING.equals(oldStatus)) {
contractPre.setErrorInfo(null);
contractPre.setErrorTime(null);
}
contractPreMapper.updateById(contractPre); contractPreMapper.updateById(contractPre);
} }
//瓜子项目编码:皖A694302 //瓜子项目编码:皖A694302
...@@ -2763,10 +2769,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2763,10 +2769,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
//更新合同状态为2线下签审核不通过 //更新合同状态为2线下签审核不通过
TEmployeeContractPre contractPre = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda() TEmployeeContractPre contractPre = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getContractId, c.getId()) .eq(TEmployeeContractPre::getContractId, c.getId())
.eq(TEmployeeContractPre::getProcessStatus, CommonConstants.TWO_STRING) .in(TEmployeeContractPre::getProcessStatus, CommonConstants.FIVE_STRING, CommonConstants.TWO_STRING)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractPre)) { if (Common.isNotNull(contractPre)) {
String oldStatus = contractPre.getProcessStatus();
contractPre.setProcessStatus(CommonConstants.THREE_STRING); contractPre.setProcessStatus(CommonConstants.THREE_STRING);
// 如果之前是发起失败状态,清空错误信息
if (CommonConstants.FIVE_STRING.equals(oldStatus)) {
contractPre.setErrorInfo(null);
contractPre.setErrorTime(null);
}
contractPreMapper.updateById(contractPre); contractPreMapper.updateById(contractPre);
} }
c.setAuditStatus(CommonConstants.THREE_INT); c.setAuditStatus(CommonConstants.THREE_INT);
......
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