package com.zcxk.task.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zcxk.task.dto.PlanManageDto;
import com.zcxk.task.dto.TaskChangeTendDto;
import com.zcxk.task.entity.PlanManage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface PlanManageMapper {

    int deleteByPrimaryKey(Integer id);

    int insertSelective(PlanManage record);

    PlanManage selectByPrimaryKey(Integer id);

    PlanManage selectByPlanId(String planId);

    int updateByPrimaryKeySelective(PlanManage record);

    int updateByPrimaryKey(PlanManage record);

    Integer batchDelete(@Param("ids") List<Integer> ids);

    Page<PlanManageDto> findPage(IPage<PlanManageDto> page, @Param("plan") PlanManageDto planManageDto);

    PlanManageDto selectPlanDetail(Integer id);

    int selectPendingPower(Map<String,Object> map);

    List<Map<String,Object>> selectTaskName(Map<String,Object> map);

    List<PlanManageDto> selectTaskFinished(PlanManageDto planManageDto);

    List<PlanManageDto> selectTaskFinishedByDate(PlanManageDto planManageDto);

    PlanManageDto selectTaskCondition(PlanManageDto planManageDto);

    List<TaskChangeTendDto> selectTaskChangeTrend(PlanManageDto planManageDto);

    List<PlanManageDto> selectTaskDuration(PlanManageDto planManageDto);

    PlanManageDto selectWorkFlowById(Integer id);
}