/*
 * Author: Zev
 * 生成Service
 */
package com.tofly.gpsboot.service.paln.month;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.gpsboot.strategy.ExcelStrategy;
import com.tofly.pojo.maintain.Repairplanyear;
import com.tofly.pojo.plan.dto.PlanmouthDto;
import com.tofly.pojo.plan.vo.PlanmouthVo;
import com.tofly.pojo.plan.vo.PlanyeardetailVo;
import com.tofly.gpsboot.exception.BusinessException;
import com.tofly.pojo.plan.Planmouth;
import com.tofly.gpsboot.service.IBaseService;

import java.util.List;


/**
 * 巡检月度计划记录信息表：TF_YWPN_PLANMOUTH_W
 *
 * @author admin
 * @date Thu Mar 18 00:00:00 CST 2021
 */
public interface PlanmouthService extends IBaseService<Planmouth, PlanmouthVo> , ExcelStrategy {
    /**
     * 分页查询
     * @param page
     * @param parDto
     * @return
     */
    Page<PlanmouthVo> getInfoPage(Page page,PlanmouthDto parDto);

    Page<PlanmouthVo> getAuditList(Page page,PlanmouthDto parDto);

    Page<PlanmouthVo> getAllList(Page page,PlanmouthDto parDto);

    Page<PlanmouthVo> getNeedAuditList(Page page,PlanmouthDto parDto);
    /**
     * 新增基本和详情信息
     * @param parDto
     * @throws BusinessException 抛出新增的详情为空
     */
    Long savaMonthPlanInfo(PlanmouthDto parDto) throws BusinessException;
    /**
     * 获取基本和详情信息
     * @param id
     * @return 封装返回
     * @throws BusinessException 抛出查询当前数据不存在
     */
    PlanmouthVo getMonthPlanInfo(Long id) throws BusinessException;

    /**
     * 修改基本和详情信息
     * @param parDto
     * @throws BusinessException 抛出更新当前数据不存在
     */
    void updateMonthPlanInfo(PlanmouthDto parDto) throws BusinessException;

    /**
     * 单个删除或批量删除信息
     * @param idList
     * @throws BusinessException 抛出删除对象不存在
     */
    void deleteMonthPlanInfo(List<Long> idList)throws BusinessException;

    /**
     * 根据YYYY-MM类型字符串获取对应的年计划详情信息
     * @param yearMonth
     * @param monthId
     *
     * @return
     */
    PlanyeardetailVo getPlanYearDetail(String yearMonth,String monthId);
}
