package com.ruoyi.worktecket.mapper;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.worktecket.domain.WorkTicketBasicData;
import com.ruoyi.worktecket.dto.WorkTicketAreaWorkStatisticsPCDTO;
import com.ruoyi.worktecket.dto.WorkTicketBasicDataDTO;
import com.ruoyi.worktecket.dto.WorkTicketStatisticsPCDTO;
import com.ruoyi.worktecket.dto.res.WorkTicketBasicDataResultDTO;
import org.apache.ibatis.annotations.Param;

/**
 * 作业票基础信息Mapper接口
 *
 * @author ruoyi
 * @date 2023-08-04
 */
public interface WorkTicketBasicDataMapper extends BaseMapper<WorkTicketBasicData> {

    /**
     * 查询作业票基础信息列表
     *
     * @param workTicketBasicData 作业票基础信息
     * @return 作业票基础信息集合
     */
    public List<WorkTicketBasicDataResultDTO> selectWorkTicketBasicDataList(WorkTicketBasicDataDTO workTicketBasicData);
    /**
     * PC首页统计-作业票统计
     *
     * @param companyCode
     * @return
     */
    List<WorkTicketStatisticsPCDTO> workTicketTypeStatistics(@Param("companyCode") String companyCode);

    /**
     * PC首页查询作业票列表
     *
     * @param workTicketBasicData
     * @return
     */
    List<WorkTicketBasicDataResultDTO> selectWorkTicketList(WorkTicketBasicDataDTO workTicketBasicData);

    /**
     * PC首页-企业信息-生产区域-统计区域下作业分布列表
     * @param startTiem
     * @param endTime
     * @param companyCode
     * @return
     */
    List<WorkTicketAreaWorkStatisticsPCDTO> workTicketAreaWorkStatistics(@Param("startTiem") Date startTiem, @Param("endTime")Date endTime, @Param("companyCode")String companyCode);

    /**
     * PC首页-企业信息-生产区域计数
     * @param startTiem
     * @param endTime
     * @param companyCode
     * @return
     */
    Integer workTicketAreaWorkCountStatistics(@Param("startTiem") Date startTiem, @Param("endTime")Date endTime, @Param("companyCode")String companyCode);
}
