diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java index 3906023..ee5b813 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java @@ -580,8 +580,12 @@ public class CookRecipeServiceImpl implements ICookRecipeService { BeanUtils.copyProperties(dishesDTO, newRecipeDishes); newRecipeDishes.setCreateBy("JOB"); newRecipeDishes.setCreateTime(DateUtils.getNowDate()); - long supplyNum = Objects.isNull(newRecipeDishes.getSupplyNum()) ? 0 : newRecipeDishes.getSupplyNum(); + long supplyNum = Objects.isNull(newRecipeDishes.getSupplyNum()) ? 9999 : newRecipeDishes.getSupplyNum(); + long limitNum = Objects.isNull(newRecipeDishes.getLimitNum()) ? 9999 : newRecipeDishes.getLimitNum(); long saleNum = Objects.isNull(newRecipeDishes.getSaleNum()) ? 0 : newRecipeDishes.getSaleNum(); + newRecipeDishes.setSupplyNum(supplyNum); + newRecipeDishes.setLimitNum(limitNum); + newRecipeDishes.setSaleNum(saleNum); newRecipeDishes.setRemanentNum((int) (supplyNum - saleNum)); newRecipeDishes.setRecipeDetailId(newDetailId); cookRecipeDishesMapper.insertCookRecipeDishes(newRecipeDishes); //插入菜谱之菜品详情