diff --git a/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderService.java b/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderService.java index e5b0477..d9bfb26 100644 --- a/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderService.java +++ b/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderService.java @@ -148,26 +148,26 @@ public class LpkReserveOrderService extends MybatisBaseService records = pagging.getRecords(); if (!records.isEmpty()) { records.forEach(s -> { - LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid()); - s.setGoodsName(lpkGoods.getName()); -// List orderGoods = lpkReserveOrderGoodsService.selByOrderSid(s.getSid()); -// List goodsVoList = new ArrayList<>(); -// if (!orderGoods.isEmpty()) { -// for (LpkReserveOrderGoods orderGood : orderGoods) { -// OrderGoodsVo goodsVo = new OrderGoodsVo(); -// if (StringUtils.isNotBlank(orderGood.getGoodsSid())) { -// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(orderGood.getGoodsSid()); -// if (null != lpkGoods) { -// goodsVo.setGoodName(lpkGoods.getName()); -// } -// } -// if (orderGood.getGoodsNumber() != 0) { -// goodsVo.setNum((int) orderGood.getGoodsNumber()); -// } -// goodsVoList.add(goodsVo); -// } -// } -// s.setGoodsVo(goodsVoList); +// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid()); +// s.setGoodsName(lpkGoods.getName()); + List orderGoods = lpkReserveOrderGoodsService.selByOrderSid(s.getSid()); + List goodsVoList = new ArrayList<>(); + if (!orderGoods.isEmpty()) { + for (LpkReserveOrderGoods orderGood : orderGoods) { + OrderGoodsVo goodsVo = new OrderGoodsVo(); + if (StringUtils.isNotBlank(orderGood.getGoodsSid())) { + LpkGoods lpkGoods = lpkGoodsService.fetchBySid(orderGood.getGoodsSid()); + if (null != lpkGoods) { + goodsVo.setGoodName(lpkGoods.getName()); + } + } + if (orderGood.getGoodsNumber() != 0) { + goodsVo.setNum((int) orderGood.getGoodsNumber()); + } + goodsVoList.add(goodsVo); + } + } + s.setGoodsVo(goodsVoList); }); } PagerVo p = PagerUtil.pageToVo(pagging, null);