package com.cf.imes.module.executor.dal.mysql.order;

import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderStatisticsAreaRespVO;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderStatisticsIsLapseRespVO;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderStatisticsReqVO;
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderSupStatisticsMapper extends BaseMapperX<OrderDO> {

    /**
     * 当日生产单板件平方数
     */
    Double selectOrderSquareProduceToday(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    /**
     * 生产单按时间统计失效数量
     */
    List<OrderStatisticsIsLapseRespVO> selectOrderCountLapseByOrderDate(@Param("req") OrderStatisticsReqVO reqVO);

    /**
     * 生产单按时间分组统计未失效数量
     */
    List<OrderStatisticsIsLapseRespVO> selectOrderCountNotLapseByOrderDate(@Param("req") OrderStatisticsReqVO reqVO);

    /**
     * 生产单按时间统计无效板件平方数
     */
    List<OrderStatisticsAreaRespVO> selectPlateAreaLapseByOrderDate(@Param("req") OrderStatisticsReqVO reqVO);

    /**
     * 生产单按时间分组统计有效板件平方数
     */
    List<OrderStatisticsAreaRespVO> selectPlateAreaNotLapseByOrderDate(@Param("req") OrderStatisticsReqVO reqVO);
}
