合同管理-去掉审核流程,添加作废功能

This commit is contained in:
liangqitao
2021-12-14 18:47:25 +08:00
parent 090e553660
commit eb040dbe44
2 changed files with 9 additions and 3 deletions
@@ -1030,6 +1030,9 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
payIncomeContractAssociatedCancellation.setId(null);
payIncomeContractAssociatedCancellation.setAssociatedId(p.getId());
list.add(payIncomeContractAssociatedCancellation);
});
payIncomeContractAssociatedCancellationService.saveBatch(list);
}
@@ -1098,9 +1101,9 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
if(!Objects.equals(payIncomeContractStatus.getStatus(),PayIncomeContractCommon.STATUS3)){
throw new JeroBootException("收入合同不可归档!");
}
if(Objects.isNull(payIncomeContractAudit.getContractStatus())
|| !Objects.equals(payIncomeContractAudit.getContractStatus(),PayIncomeContractCommon.STATUS5)
|| !Objects.equals(payIncomeContractAudit.getContractStatus(),PayIncomeContractCommon.STATUS6)){
if(Objects.equals(payIncomeContractStatus.getStatus(),PayIncomeContractCommon.STATUS5)
|| Objects.equals(payIncomeContractStatus.getStatus(),PayIncomeContractCommon.STATUS6)
|| !Objects.equals(payIncomeContractAudit.getContractStatus(),PayIncomeContractCommon.STATUS5)){
throw new JeroBootException("收入合同状态不正确!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -307,6 +307,9 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
if(!sysUser.getRoleCode().contains(RoleCommon.CWRY) && !Objects.equals(sysUser.getId(),paySpendingContractStatus.getPrincipalId())){
throw new JeroBootException("数据权限不足!");
}
if(!Objects.equals(paySpendingContractStatus.getStatus(),PayIncomeContractCommon.STATUS6)){
throw new JeroBootException(paySpendingContractStatus.getContractName() + "支出合同不可删除!");
}
paySpendingContractService.removeById(id);
LambdaUpdateWrapper<PaySpendingContractInstallment> updatePaySpendingContractInstallment = new LambdaUpdateWrapper<>();
updatePaySpendingContractInstallment.eq(PaySpendingContractInstallment::getContractId,id);