skyouc
2025-03-11 3aea803e459e7938c11e7bbc224c66595f45668f
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
@@ -146,7 +146,10 @@
        if (Objects.isNull(params.getWhAreaId())) {
            throw new CoolException("库区标识不能为空!!");
        }
        WarehouseAreasItem areasItem = warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>().eq(WarehouseAreasItem::getAreaId, params.getWhAreaId()));
        WarehouseAreas areasItem = warehouseAreasService.getOne(new LambdaQueryWrapper<WarehouseAreas>().eq(WarehouseAreas::getId, params.getWhAreaId()));
        if (Objects.isNull(areasItem)) {
            throw new CoolException("数据错误:当前库区不存在!!");
        }
        List<ReceiptDetlsDto> receipts = params.getReceipts();
        List<WarehouseAreasItem> allOrders =   new ArrayList<>();
        receipts.forEach(dto -> {
@@ -156,8 +159,8 @@
            }
            WarehouseAreasItem item = new WarehouseAreasItem();
            item.setBarcode(dto.getBarcode())
                    .setAreaName(areasItem.getAreaName())
                    .setAreaId(areasItem.getAreaId())
                    .setAreaName(areasItem.getName())
                    .setAreaId(areasItem.getId())
                    .setStockUnit(dto.getStockUnit())
                    .setBatch(SerialRuleUtils.generateRuleCode("sys_receipt_batch", dto))
                    .setAnfme(dto.getReceiptQty())
@@ -193,13 +196,9 @@
        if (Objects.isNull(params.getAsnCode())) {
            throw new CoolException("通知单不能为空!!");
        }
        if (Objects.isNull(params.getBarcode())) {
            throw new CoolException("物料编码不能为空!!");
        }
        AsnOrderItem asnOrderItem = asnOrderItemMapper.selectOne(new LambdaQueryWrapper<AsnOrderItem>()
                .eq(AsnOrderItem::getAsnCode, params.getAsnCode())
                .eq(AsnOrderItem::getBarcode, params.getBarcode()));
                .eq(!Objects.isNull(params.getBarcode()) ,AsnOrderItem::getBarcode, params.getBarcode()));
        if (Objects.isNull(asnOrderItem)) {
            throw new CoolException("单据明细不存在!!");