From 9d006c9c8355370a7500e01e00ea133c99bf8c4b Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 29 十月 2024 18:26:25 +0800 Subject: [PATCH] 修改 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDataGeneratorServiceImpl.java | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDataGeneratorServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDataGeneratorServiceImpl.java index db5de50..1d09a6c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDataGeneratorServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDataGeneratorServiceImpl.java @@ -49,6 +49,8 @@ @Autowired private TFoundationConfigService foundationConfigService; @Autowired + private TFoundationPersonService foundationPersonService; + @Autowired private TGoodsService goodsService; @Autowired private TOrderMealService orderMealService; @@ -92,10 +94,10 @@ dataGenerator.setOtherPay(dto.getOtherProportion()); this.save(dataGenerator); long start = System.currentTimeMillis(); - // 查询所有的人数用餐标准 - List<TFoundationConfigVO> foundationConfigs = foundationConfigService.getList(dto.getShopId()); + TShop shop = shopService.getById(dto.getShopId()); + List<TFoundationConfigVO> foundationConfigs = foundationConfigService.getList(shop.getMealType()); if(CollectionUtils.isEmpty(foundationConfigs)){ - throw new ServiceException("请先添加该店铺用餐标准"); + throw new ServiceException("请先添加中餐或火锅用餐标准"); } // 查询所有桌子 List<TBoard> boards = boardService.list(Wrappers.lambdaQuery(TBoard.class) @@ -152,7 +154,7 @@ if (good.getGoodsNum().equals(typeGood.getGoodsNum())) { count+=1; good.setGoodsCount(good.getGoodsCount() + 1); - good.setGoodsSalePrice(good.getGoodsSalePrice().add(typeGood.getSalePrice())); +// good.setGoodsSalePrice(good.getGoodsSalePrice().add(typeGood.getSalePrice())); break; // 找到后直接跳出循环 } } -- Gitblit v1.7.1