|
@@ -573,13 +573,14 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
queryWrapper.lambda().eq(InsPlyFollowInvoiceLink::getIsDelete, 0);
|
|
queryWrapper.lambda().eq(InsPlyFollowInvoiceLink::getIsDelete, 0);
|
|
|
List<InsPlyFollowInvoiceLink> insPlyFollowInvoiceLinks = insPlyFollowInvoiceLinkMapper.selectList(queryWrapper);
|
|
List<InsPlyFollowInvoiceLink> insPlyFollowInvoiceLinks = insPlyFollowInvoiceLinkMapper.selectList(queryWrapper);
|
|
|
|
|
|
|
|
- if (CollUtil.isNotEmpty(insPlyFollowInvoiceLinks)){
|
|
|
|
|
- List<String> ids = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getId).toList();
|
|
|
|
|
- List<String> followIds = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getFollowId).toList();
|
|
|
|
|
- insPlyFollowInvoiceLinkMapper.deleteByIds(ids);
|
|
|
|
|
- return insFeeFollowOrderMapper.deleteByIds(followIds) > 0;
|
|
|
|
|
|
|
+ if (CollUtil.isEmpty(insPlyFollowInvoiceLinks)){
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
- return Boolean.FALSE;
|
|
|
|
|
|
|
+ List<String> ids = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getId).toList();
|
|
|
|
|
+ List<String> followIds = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getFollowId).toList();
|
|
|
|
|
+ insPlyFollowInvoiceLinkMapper.deleteByIds(ids);
|
|
|
|
|
+ insFeeFollowOrderMapper.deleteByIds(followIds);
|
|
|
|
|
+ return insPlyIncomeInvoiceMapper.deleteById(invoiceId) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -1631,20 +1632,20 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
.set(InsPlyIncomeInvoice::getStatus,"0").eq(InsPlyIncomeInvoice::getId,invoiceId));
|
|
.set(InsPlyIncomeInvoice::getStatus,"0").eq(InsPlyIncomeInvoice::getId,invoiceId));
|
|
|
|
|
|
|
|
// 查询中间表:使用 QueryWrapper,增加逻辑删除过滤
|
|
// 查询中间表:使用 QueryWrapper,增加逻辑删除过滤
|
|
|
- LambdaQueryWrapper<InsPlyFollowInvoiceLink> linkQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
- linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getInvoiceId, invoiceId);
|
|
|
|
|
- linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getIsDelete, SETTLE_STATUS_RESET);
|
|
|
|
|
- List<InsPlyFollowInvoiceLink> linkList = insPlyFollowInvoiceLinkMapper.selectList(linkQueryWrapper);
|
|
|
|
|
-
|
|
|
|
|
- if (CollUtil.isNotEmpty(linkList)){
|
|
|
|
|
- // 删除中间表
|
|
|
|
|
- List<String> followLinkIds = linkList.stream().map(InsPlyFollowInvoiceLink::getId).collect(Collectors.toList());
|
|
|
|
|
- insPlyFollowInvoiceLinkMapper.deleteByIds(followLinkIds);
|
|
|
|
|
-
|
|
|
|
|
- // 删除跟单表
|
|
|
|
|
- List<String> followIds = linkList.stream().map(InsPlyFollowInvoiceLink::getFollowId).collect(Collectors.toList());
|
|
|
|
|
- insFeeFollowOrderMapper.deleteByIds(followIds);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// LambdaQueryWrapper<InsPlyFollowInvoiceLink> linkQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+// linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getInvoiceId, invoiceId);
|
|
|
|
|
+// linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getIsDelete, SETTLE_STATUS_RESET);
|
|
|
|
|
+// List<InsPlyFollowInvoiceLink> linkList = insPlyFollowInvoiceLinkMapper.selectList(linkQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+// if (CollUtil.isNotEmpty(linkList)){
|
|
|
|
|
+// // 删除中间表
|
|
|
|
|
+// List<String> followLinkIds = linkList.stream().map(InsPlyFollowInvoiceLink::getId).collect(Collectors.toList());
|
|
|
|
|
+// insPlyFollowInvoiceLinkMapper.deleteByIds(followLinkIds);
|
|
|
|
|
+//
|
|
|
|
|
+// // 删除跟单表
|
|
|
|
|
+// List<String> followIds = linkList.stream().map(InsPlyFollowInvoiceLink::getFollowId).collect(Collectors.toList());
|
|
|
|
|
+// insFeeFollowOrderMapper.deleteByIds(followIds);
|
|
|
|
|
+// }
|
|
|
return insPlyIncomeInvoiceSettlementMapper.deleteById(id) > 0;
|
|
return insPlyIncomeInvoiceSettlementMapper.deleteById(id) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
|