package com.yijia.station.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yijia.station.mapper.PayOrderMapper;
import com.yijia.station.domain.PayOrder;
import com.yijia.station.service.IPayOrderService;

/**
 * 订单支付Service业务层处理
 * 
 * @author yijia
 * @date 2020-12-10
 */
@Service
public class PayOrderServiceImpl implements IPayOrderService 
{
    @Autowired
    private PayOrderMapper payOrderMapper;

    /**
     * 查询订单支付
     * 
     * @param orderId 订单支付ID
     * @return 订单支付
     */
    @Override
    public PayOrder selectPayOrderById(Long orderId)
    {
        return payOrderMapper.selectPayOrderById(orderId);
    }

    /**
     * 查询订单支付列表
     * 
     * @param payOrder 订单支付
     * @return 订单支付
     */
    @Override
    public List<PayOrder> selectPayOrderList(PayOrder payOrder)
    {
        return payOrderMapper.selectPayOrderList(payOrder);
    }

    /**
     * 新增订单支付
     * 
     * @param payOrder 订单支付
     * @return 结果
     */
    @Override
    public int insertPayOrder(PayOrder payOrder)
    {
        return payOrderMapper.insertPayOrder(payOrder);
    }

    /**
     * 修改订单支付
     * 
     * @param payOrder 订单支付
     * @return 结果
     */
    @Override
    public int updatePayOrder(PayOrder payOrder)
    {
        return payOrderMapper.updatePayOrder(payOrder);
    }

    /**
     * 批量删除订单支付
     * 
     * @param orderIds 需要删除的订单支付ID
     * @return 结果
     */
    @Override
    public int deletePayOrderByIds(Long[] orderIds)
    {
        return payOrderMapper.deletePayOrderByIds(orderIds);
    }

    /**
     * 删除订单支付信息
     * 
     * @param orderId 订单支付ID
     * @return 结果
     */
    @Override
    public int deletePayOrderById(Long orderId)
    {
        return payOrderMapper.deletePayOrderById(orderId);
    }

    /**
     * 汇总今天的数据
     * @param payOrder
     * @return
     */
    @Override
    public PayOrder selectDaySources(PayOrder payOrder) {
        return payOrderMapper.selectDaySources(payOrder);
    }

    /***
     * 获取数据
     * @param payOrder
     * @return
     */
    @Override
    public  List<PayOrder>  selectOilTypeSources(PayOrder payOrder) {
        return payOrderMapper.selectOilTypeSources(payOrder);
    }

    /**
     * 数据概览，获取数据
     * @param payOrder
     * @return
     */

    @Override
    public PayOrder selectOverViewData(PayOrder payOrder) {
        return payOrderMapper.selectOverViewData(payOrder);
    }

    /**
     * 日报数据
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> selectDayReport(PayOrder payOrder) {
        return payOrderMapper.selectDayReport(payOrder);
    }
    /**
     * 日报折线图获取油品数据
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> listQydata(PayOrder payOrder) {
        return payOrderMapper.listQydata(payOrder);
    }
    /**
     * 获取x轴数据
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> listXdata(PayOrder payOrder) {
        return payOrderMapper.listXdata(payOrder);
    }

    /**
     * 查询导出信息
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> selectPayOrderExport(PayOrder payOrder) {
        return payOrderMapper.selectPayOrderExport(payOrder);
    }

    /**
     * 查询数据，根据员工汇总数据
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> selectPersonnelStructure(PayOrder payOrder) {
        return payOrderMapper.selectPersonnelStructure(payOrder);
    }

    /**
     *初始化数据班结数据，根据油品汇总
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> selectOilStructure(PayOrder payOrder) {
        return payOrderMapper.selectOilStructure(payOrder);
    }

    /**
     * 初始化数据班结数据，根据员工/支付方式汇总
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> selectPersonnelPayStructure(PayOrder payOrder) {
        return payOrderMapper.selectPersonnelPayStructure(payOrder);
    }

    /**
     * 查询本站第一笔订单
     * @param payOrder
     * @return
     */
    @Override
    public PayOrder getPayOrderInfoMin(PayOrder payOrder) {
        return payOrderMapper.getPayOrderInfoMin(payOrder);
    }


    /**
     * 日报数据汇总
     * @param payOrder
     * @return
     */
    @Override
    public List<PayOrder> dayOilTypeSources(PayOrder payOrder) {
        return payOrderMapper.dayOilTypeSources(payOrder);
    }

}
