package com.bonus.canteen.core.menu.service;

import java.time.LocalDate;
import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bonus.canteen.core.menu.domain.MenuRecipe;
import com.bonus.canteen.core.menu.dto.*;
import com.bonus.canteen.core.menu.vo.AllocRecipeStallVO;
import com.bonus.canteen.core.menu.vo.MenuRecipeVO;
import com.bonus.canteen.core.menu.vo.MenuDishesTypeAllVO;
import com.bonus.canteen.core.menu.vo.MenuRecipeDetailDateVO;
import com.bonus.canteen.core.menu.dto.MenuRecipeBindDTO;
import com.bonus.canteen.core.menu.vo.*;
import com.bonus.canteen.core.menu.dto.MenuRecipeAddDTO;
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
import com.bonus.canteen.core.menu.dto.MenuTypeDishesDTO;
import com.bonus.common.core.web.domain.AjaxResult;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;

/**
 * 菜品计划信息Service接口
 *
 * @author xsheng
 * @date 2025-04-03
 */
public interface IMenuRecipeService extends IService<MenuRecipe> {
    /**
     * 查询菜品计划信息
     *
     * @param id 菜品计划信息主键
     * @return 菜品计划信息
     */
    public MenuRecipe selectMenuRecipeById(Long id);

    /**
     * 查询菜品计划信息列表
     *
     * @param menuRecipe 菜品计划信息
     * @return 菜品计划信息集合
     * 菜谱列表-获取菜品列表
     * @param menuRecipe
     * @return
     */
    public List<MenuRecipeVO> selectMenuRecipeList(MenuRecipe menuRecipe);
    AjaxResult getDishesList(MenuRecipeParamDTO dto);

    AjaxResult getDishesListV2(MenuRecipeV2PageDTO dto);


    /**
     * 新增菜品计划信息
     *
     * @param menuRecipe 菜品计划信息
     * @return 结果
     */
    public int insertMenuRecipe(MenuRecipe menuRecipe);

    /**
     * 修改菜品计划信息
     *
     * @param menuRecipe 菜品计划信息
     * @return 结果
     */
    public int updateMenuRecipe(MenuRecipe menuRecipe);

    /**
     * 批量删除菜品计划信息
     *
     * @param ids 需要删除的菜品计划信息主键集合
     * @return 结果
     */
    public int deleteMenuRecipeByIds(Long[] ids);

    /**
     * 删除菜品计划信息信息
     *
     * @param id 菜品计划信息主键
     * @return 结果
     */
    public int deleteMenuRecipeById(Long id);
    Long add(@Valid MenuRecipeAddDTO dto);

    List<MenuRecipeDetailDateVO> getDetail(MenuRecipeParamDTO dto);

    void deleteRecipeById(Long id);

    AjaxResult getDishesCategoryList(@Valid MenuTypeDishesDTO dto);

    List<MenuDishesTypeAllVO> getAllDishCategories();

    List<MenuRecipeDetailDateVO> getDetailByDate(MenuRecipeParamDTO dto);

    void generateRecipe(Long recipeId, LocalDate applyDate);

    void generateRecipe();

    void bindAppRecipe(MenuRecipeBindDTO dto);
    /**
     * 根据sn获取菜谱菜品信息
     * @param machineSn
     * @return
     */
    IssueRecipeCompressVO getMenuInfoBySn(String machineSn);

    DviceTimeIntervalVO intervalConfig(String machineSn);

    List<AllocRecipeStallVO> selectMenuRecipeListV2(AllocRecipeStallDTO dto);


    Set<String> recipeImportDishes(MultipartFile excel, Long recipeId);
}
