package com.yuchen.saas.park.service.service.door;


import com.baomidou.mybatisplus.extension.service.IService;
import com.yuchen.saas.park.api.dto.door.DoorHolidayPlanDTO;
import com.yuchen.saas.park.api.dto.door.DoorPlanTemplateDTO;
import com.yuchen.saas.park.api.entity.door.DoorHolidayGroupSet;
import com.yuchen.saas.park.api.entity.door.DoorPlanTemplate;
import com.yuchen.saas.park.api.vo.door.DoorPlanTemplateVO;

import java.util.List;

/**
 * <p>
 * 计划模板 服务类
 * </p>
 *
 * @author miaoqs
 * @since 2023-12-15
 */
public interface DoorPlanTemplateService extends IService<DoorPlanTemplate> {

    /**
     * 新增或修改
     * @param doorPlanTemplateDTO
     * @return
     */
    Boolean saveOrUpdate(DoorPlanTemplateDTO doorPlanTemplateDTO) throws Exception;

    /**
     * 根据id获取详情
     * @param id
     * @return
     */
    DoorPlanTemplateVO detail(Long id);

    /**
     * 根据主键移除
     * @param id
     */
    String deleteById(Long id);

    /**
     * 获取列表
     * @return
     */
    List<DoorPlanTemplate> getList();

    /**
     * 获取默认模板
     * @return
     */
    DoorPlanTemplateVO getDefault();

    /**
     * 批量删除
     * @param idList
     */
    String batchRemoveId(List<Long> idList);

    /**
     * 根据假日组idList查询假日组设置列表
     * @param id
     * @return
     */
    List<DoorHolidayGroupSet> getHolidayGroupSetListById(Long id);

    /**
     * 调用iot接口 配置人员权限周计划
     * @param doorHolidayPlanDTO
     * @return
     */
    boolean setIotWeekPlan(DoorHolidayPlanDTO doorHolidayPlanDTO) throws Exception;

    /**
     * 调用iot接口 配置人员权限计划模板
     * @param doorHolidayPlanDTO
     * @return
     */
    boolean setIotUserRightPlanTemplate(DoorHolidayPlanDTO doorHolidayPlanDTO) throws Exception;

    /**
     * 获取人员权限周计划
     * @param doorHolidayPlanDTO
     * @return
     */
    boolean getIotWeekPlan(DoorHolidayPlanDTO doorHolidayPlanDTO) throws Exception;

    /**
     * 调用iot接口 获取人员权限计划模板
     * @param doorHolidayPlanDTO
     * @return
     */
    boolean getIotUserRightPlanTemplate(DoorHolidayPlanDTO doorHolidayPlanDTO) throws Exception;
}
