/*
 * Author: Zev
 * 生成mapper
 */
package com.tofly.gpsboot.mapper.plan;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.pojo.User;
import com.tofly.pojo.plan.Plan;
import com.tofly.pojo.plan.dto.PlanDto;
import com.tofly.pojo.plan.vo.PlanYearReportVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * 巡检计划详细信息表：TF_YWPN__PLAN_W
 *
 * @author admin
 * @date Thu Mar 18 00:00:00 CST 2021
 */
public interface PlanMapper extends BaseMapper<Plan> {

    Page<Plan> getPlanPage(Page page, @Param("dto") PlanDto dto);

    /**
     * 获取用户下的巡检个数
     * @param startDate
     * @param endDate
     * @param userId
     * @return
     */
    Long getUserPlanNum(@Param("startDate")Date startDate,@Param("endDate")Date endDate,@Param("userId")Long userId);

    PlanYearReportVo getReportPlanYear(@Param("year")Integer year);

    PlanYearReportVo getReportPlanMonth();

    List<User> getUserAll();
}
