Commit 9538ecb1 authored by fangxinjiang's avatar fangxinjiang

合同续签待办-fxj

parent f90f368d
......@@ -83,4 +83,6 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
R getContractTerm(String startDate, String endDate);
LocalDate getPreDateByConfigId(String configId, Date contractEnd);
void updateByIdAndUpdateAlert(TEmployeeContractPreNew preNew);
}
......@@ -1286,6 +1286,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
TEmployeeContractInfo contractInfo = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getPreNewId,preNew.getId())
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.orderByDesc(TEmployeeContractInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
vo.setContractInfo(contractInfo);
if (Common.isNotNull(preNew.getProcessStatus())){
......
......@@ -736,12 +736,6 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
updateWrapper.eq(TEmployeeContractPreNew::getId, contractPre.getId())
.set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.FIVE_STRING)
.set(TEmployeeContractPreNew::getErrorInfo, "电子签发起失败:已超过合同开始日期一个月")
.set(TEmployeeContractPreNew::getChangeTypeUser, type.equals("1") ? "自动化手动—" +
(null==contractPre.getCustomerUsername()?"":contractPre.getCustomerUsername())
: "自动化自动—" + "超管" )
.set(TEmployeeContractPreNew::getChangeTypeReason, "已超过合同开始日期一个月,自动转线下签")
.set(TEmployeeContractPreNew::getChangeTypeTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()))
.set(TEmployeeContractPreNew::getSignType, CommonConstants.ONE_STRING)
.set(TEmployeeContractPreNew::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper);
......@@ -1107,7 +1101,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
TEmployeeContractPreNew pre;
TEmployeeContractInfo contractInfo;
TEmployeeContractInfo contractInfo = null;
R<String> result;
for (TEmployeeAutoRegistRevokeVo registRevokeVo : registRevokeVoList) {
pre = baseMapper.selectById(registRevokeVo.getId());
......@@ -1125,6 +1119,14 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return R.failed("推送法大大失败!" + e.getMessage());
}
}
if (Common.isNotNull(pre.getId())) {
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreNewId, pre.getId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL));
}
//电子待归档、线下签待归档、已完结的不能撤销签署
if (Common.isNotNull(pre) && !CommonConstants.NINE_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.FOUR_STRING.equals(pre.getProcessStatus()) &&
......@@ -1132,10 +1134,11 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
//如果不是待确认和待发起,需要记录操作记录
if (!CommonConstants.ZERO_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.ONE_STRING.equals(pre.getProcessStatus()) &&
Common.isNotNull(pre.getContractId())) {
Common.isNotNull(contractInfo)) {
//找到最新的合同数据添加审核记录
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("撤销签署");
audit.setLinkId(pre.getContractId());
audit.setLinkId(contractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRemark(registRevokeVo.getReason());
tEmployeeContractAuditService.save(audit);
......@@ -1148,18 +1151,10 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
//更新合同续签待办提醒的办理状态为待办理
updateEmpContractAlertHandleStatus(pre.getContractId(), CommonConstants.ZERO_STRING);
}
if (Common.isNotNull(pre.getId())) {
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreNewId, pre.getId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractInfo)) {
contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
contractInfoService.updateById(contractInfo);
}
if (Common.isNotNull(contractInfo)) {
contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
contractInfoService.updateById(contractInfo);
}
}
}
......@@ -1901,4 +1896,20 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
return null;
}
@Override
public void updateByIdAndUpdateAlert(TEmployeeContractPreNew preNew) {
baseMapper.updateById(preNew);
//已完成同步更新续签待办提醒为已办理
if (preNew.getProcessStatus().equals(CommonConstants.dingleDigitStrArray[9])
&& null != preNew.getContractId()){
TEmpContractAlert alert = empContractAlertMapper.selectOne(Wrappers.<TEmpContractAlert>query().lambda()
.eq(TEmpContractAlert::getContractId,preNew.getContractId())
.last(CommonConstants.LAST_ONE_SQL));
if (null != alert){
alert.setHandleStatus(CommonConstants.dingleDigitStrArray[2]);
empContractAlertMapper.updateById(alert);
}
}
}
}
......@@ -115,7 +115,7 @@ public class DoFascTask {
tEmployeeContractInfoService.updateGzOfferStatus(contractInfo, CommonConstants.EIGHT_STRING, CommonConstants.NINETY_NINE, user.getId(), user.getNickname());
}
}
tEmployeeContractPreNewService.updateById(preNew);
tEmployeeContractPreNewService.updateByIdAndUpdateAlert(preNew);
pushLog.setReturnData("签署任务完成事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
......
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