package com.ho.business.mapper;

import com.ho.business.entity.DeviceTypeCol;
import com.ho.business.entity.ForwardCol;
import com.ho.business.vo.req.ForwardColTemplateReq;
import com.ho.business.vo.resp.ForwardColTemplateResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ForwardColTemplateMapper {

    /**
     * 查询模板列表接口
     *
     * @param template
     * @return
     */
//    List<Map<String,Object>> getPlanningCurveTemplates(PlanningCurveTemplate template);

    /**
     * 新增模板
     *
     * @param template
     * @return
     */
    int addForwardColTemplate(ForwardColTemplateReq template);

    /**
     * 新增测点
     *
     * @param list
     * @return
     */
    int addForwardCol(@Param("list") List<ForwardCol> list, @Param("planningTemplateId") Integer planningTemplateId);

    /**
     * 编辑模板
     *
     * @param template
     * @return
     */
    int modifyForwardColTemplate(ForwardColTemplateReq template);

    /**
     * 删除测点数据
     *
     * @param id
     * @return
     */
    int deleteForwardCol(@Param("id") Integer id);

    /**
     * 根据模板id删除
     *
     * @param ids
     * @return
     */
    int deleteForwardColTemplates(@Param("ids") List<Integer> ids);

    int deleteForwardCols(@Param("ids") List<Integer> ids);

    int checkName(@Param("templateName")String templateName,@Param("temId")Integer temId);

    List<ForwardColTemplateResp> getForwardColTemplateDetail(ForwardColTemplateReq template);

    /**
     * 获取转发点
     * @param typeList
     * @param tempId
     * @return
     */
    List<DeviceTypeCol> getForwardCol(List<String> typeList,Integer tempId);
}
