package com.willalp.canteen.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.willalp.canteen.domain.HsCanteenOrder;
import com.willalp.canteen.domain.resp.CustomGetOrderResp;
import com.willalp.canteen.domain.vo.CustomGetOrderVo;
import com.willalp.canteen.domain.vo.LiveUseMoneyMonthStatExcel;
import com.willalp.canteen.domain.vo.MenuCountVo;
import com.willalp.common.core.domain.AjaxResult;

import java.util.List;
import java.util.Map;

/**
 * 食堂订单Service接口
 *
 * @author songyu
 * @date 2021-12-03
 */
public interface IHsCanteenOrderService extends IService<HsCanteenOrder> {

    /**
     * 后台下单
     *
     * @param order
     * @return
     */
    boolean payMiwp(HsCanteenOrder order);

    /**
     *
     * @return
     * @param menuCode
     */
    Object jcdStat(String menuCode);

    /**
     * 月度就餐地统计
     *
     * @return
     * @param year
     * @param month
     */
    Object jcdMonthStat(int year,int month);

    /**
     * 月度现场消费统计
     *
     * @return
     * @param year
     * @param month
     */
    List<LiveUseMoneyMonthStatExcel> liveUseMoneyMonthStat(int year, int month);

    /**
     * 获取该菜单每人菜品和数量
     *
     * @param menuCode
     * @return
     */
    List<MenuCountVo> getTheMenuItemsAndQuantitiesPerPerson(String menuCode);

    /**
     * 查询食堂订单
     *
     * @param orderId 食堂订单主键
     * @return 食堂订单
     */
    public HsCanteenOrder selectHsCanteenOrderByOrderId(String orderId);

    /**
     * 查询食堂订单列表
     *
     * @param hsCanteenOrder 食堂订单
     * @return 食堂订单集合
     */
    public List<HsCanteenOrder> selectHsCanteenOrderList(HsCanteenOrder hsCanteenOrder);


    /**
     * 作废食堂订单
     *
     * @param hsCanteenOrder
     * @return
     */
    public AjaxResult getBack(HsCanteenOrder hsCanteenOrder);

    /**
     * 待取餐订单
     *
     * @param customGetOrderVo
     * @return
     */
    public List<CustomGetOrderResp> getOrderNow(CustomGetOrderVo customGetOrderVo);

    /**
     * 获取当前时间可取订单
     * @param customGetOrderVo
     * @return
     */
    CustomGetOrderResp getMenuNow(CustomGetOrderVo customGetOrderVo);

    /**
     * 近一月订单
     *
     * @param hsCanteenOrder
     * @return
     */
    public List<HsCanteenOrder> selectHsCanteenOrderLists(HsCanteenOrder hsCanteenOrder);

    /**
     * 首页金额总额
     *
     * @param hsCanteenOrder
     * @return
     */
    public String getSumpay(HsCanteenOrder hsCanteenOrder);

    /**
     * 首页订单总数
     *
     * @param hsCanteenOrder
     * @return
     */
    public String getSumOrderNum(HsCanteenOrder hsCanteenOrder);

    public void checkOrderTotal(HsCanteenOrder hsCanteenOrder);

    /**
     * 消费记录打印
     *
     * @param params
     * @return
     */
    public List<Map<String, Object>> getConsumeReport(Map<String, Object> params);

    /**
     * 今日未下单用户
     *
     * @return
     */
    List<HsCanteenOrder> todayNotOrderUser();
}
