liujie
4 天以前 3c9fc40e620ce844c28416a9e195a786034d164f
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java
@@ -411,6 +411,14 @@
                tErpGoodsUnits.stream().filter(t -> t.getId().equals(tErpGoods.getPackingUnitId())).findFirst().ifPresent(t -> tErpGoods.setPackingUnitName(t.getUnitName()));
            }
        }
        List<String> typeIds = records.stream().map(TErpGoods::getTypeId).collect(Collectors.toList());
        if(!typeIds.isEmpty()){
            List<TErpGoodsType> tErpGoodsTypes = erpGoodsTypeMapper.selectBatchIds(typeIds);
            for (TErpGoods tErpGoods : records) {
                tErpGoodsTypes.stream().filter(t -> t.getId().equals(tErpGoods.getTypeId())).findFirst().ifPresent(t -> tErpGoods.setTypeName(t.getTypeName()));
            }
        }
        page.setRecords( records);
        return page;
    }