yaowanxin
18 小时以前 7394e975daa20bd14a5b1620f578604770b53011
删除关联的采购台账的来票登记
已修改1个文件
3 ■■■■ 文件已修改
src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java
@@ -426,6 +426,7 @@
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int deletePurchaseLedgerByIds(Long[] ids) {
        if (ids == null || ids.length == 0) {
           throw new BaseException("请选中至少一条数据");
@@ -437,7 +438,7 @@
        salesLedgerProductMapper.delete(queryWrapper);
        // 批量删除关联的采购台账的来票登记
        LambdaQueryWrapper<TicketRegistration> ticketRegistrationLambdaQueryWrapper = new LambdaQueryWrapper<>();
        ticketRegistrationLambdaQueryWrapper.in(TicketRegistration::getSalesLedgerId,ids);
        ticketRegistrationLambdaQueryWrapper.in(TicketRegistration::getPurchaseLedgerId,ids);
        ticketRegistrationMapper.delete(ticketRegistrationLambdaQueryWrapper);
        // 批量删除关联的采购台账的来票登记记录
        LambdaQueryWrapper<ProductRecord> productRecordLambdaQueryWrapper = new LambdaQueryWrapper<>();