gongchunyi
2 天以前 f81364e8bfbede8de723c708eee8060cb2c63b83
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -173,6 +173,14 @@
            product.setTempNoInvoiceNum(product.getNoInvoiceNum());
            product.setRegister(SecurityUtils.getLoginUser().getUser().getNickName());
            product.setRegisterDate(LocalDateTime.now());
            // 发货信息
            ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>()
                    .eq(ShippingInfo::getSalesLedgerProductId, product.getId())
                    .orderByDesc(ShippingInfo::getCreateTime)
                    .last("limit 1"));
            if(shippingInfo != null){
                product.setShippingStatus(shippingInfo.getStatus());
            }
        }
        // 3.查询上传文件
@@ -542,7 +550,7 @@
        }
        // 删除发货台账记录
        List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>()
                .eq(ShippingInfo::getSalesLedgerId, idList));
                .in(ShippingInfo::getSalesLedgerId, idList));
        if(CollectionUtils.isNotEmpty(shippingInfos)){
            shippingInfoServiceImpl.delete(shippingInfos.stream().map(ShippingInfo::getId).collect(Collectors.toList()));
        }