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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.tofly.pojo.plan.Plan;
import com.tofly.pojo.plan.vo.PlanYearReportVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

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

    /**
     * 获取满足范围的计划id列表
     * @param startTime
     * @param endTime
     * @return
     */
    Set<Long> getPlanIdList(@Param("startTime")Date startTime, @Param("endTime")Date endTime);

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

    PlanYearReportVo getReportPlanMonth();

    Map<String, Object> getPlanPipeReportStatement(@Param("yearAndMonth")String yearAndMonth);

    List<Map<String, Object>> getPlanDeviceReportStatement(@Param("month")Integer month);

    List<Map<String, Object>> getPlanReginReportStatement(@Param("reginIds")String reginIds);

    Map<String,Object> getPlanRecordCount(@Param("startDate")Date startDate,@Param("userId")Long userId);
}
