huminmin
3 天以前 ec10fcd5ef6425aded311d8413c99a3c78d2e30d
删除销售报价记录后,对应报价审批记录也删除
已修改1个文件
11 ■■■■■ 文件已修改
src/main/java/com/ruoyi/sales/service/impl/SalesQuotationServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/service/impl/SalesQuotationServiceImpl.java
@@ -194,7 +194,16 @@
        if(salesQuotation==null) return false;
        salesQuotationMapper.deleteById(id);
        salesQuotationProductMapper.delete(new LambdaQueryWrapper<SalesQuotationProduct>().eq(SalesQuotationProduct::getSalesQuotationId, id));
        // 删除报价审批
        // 删除报价审批实例(ApprovalInstance)
        ApprovalInstance approvalInstance = approvalInstanceService.getOne(new LambdaQueryWrapper<ApprovalInstance>()
                .eq(ApprovalInstance::getBusinessId, id)
                .eq(ApprovalInstance::getBusinessType, 6L)
                .eq(ApprovalInstance::getDeleted, 0)
                .last("LIMIT 1"));
        if(approvalInstance != null){
            approvalInstanceService.delete(Collections.singletonList(approvalInstance.getId()));
        }
        // 删除报价审批流程(ApproveProcess)
        ApproveProcess one = approveProcessService.getOne(new LambdaQueryWrapper<ApproveProcess>()
                .eq(ApproveProcess::getApproveType, 6)
                .eq(ApproveProcess::getApproveDelete, IsDeleteEnum.NOT_DELETED)