package com.zd.laboratory.service;

import java.util.List;

import com.zd.common.core.enums.HazardTypeEnum;
import com.zd.laboratory.domain.LabHazardSubjectRelation;
import com.zd.laboratory.domain.dto.LabHazardDTO;
import com.zd.laboratory.domain.dto.LabHazardJoinSubDTO;
import com.zd.laboratory.domain.vo.LabHazardSubVO;

/**
 * 危险源和实验室关联Service接口
 *
 * @author zd
 * @date 2021-09-01
 */
public interface ILabHazardSubjectRelationService {
    /**
     * 查询危险源和实验室关联
     *
     * @param id 危险源和实验室关联主键
     * @return 危险源和实验室关联
     */
    public LabHazardSubjectRelation selectLabHazardSubjectRelationById(Long id);

    /**
     * 查询危险源位置-指定实验室(不包含压力容器)
     *
     * @param subId 实验室ID
     * @return 危险源和实验室关联
     */
    public List<LabHazardSubjectRelation> queryHazardSubList(Long subId);

    /**
     * 查询危险源VO(包含坐标数据)-指定实验室(不包含压力容器)
     *
     * @param subId 实验室ID
     * @return 危险源和实验室关联
     */
    public List<LabHazardSubVO> queryHazardSubListVO(Long subId);

    /**
     * 查询危险源和实验室关联列表
     *
     * @param labHazardSubjectRelation 危险源和实验室关联
     * @return 危险源和实验室关联集合
     */
    public List<LabHazardSubjectRelation> selectLabHazardSubjectRelationList(LabHazardSubjectRelation labHazardSubjectRelation);

    /**
     * 新增危险源和实验室关联
     *
     * @param labHazardSubjectRelation 危险源和实验室关联
     * @return 结果
     */
    public int insertLabHazardSubjectRelation(LabHazardSubjectRelation labHazardSubjectRelation);

    /**
     * 修改危险源和实验室关联
     *
     * @param labHazardSubjectRelation 危险源和实验室关联
     * @return 结果
     */
    public int updateLabHazardSubjectRelation(LabHazardSubjectRelation labHazardSubjectRelation);

    /**
     * 批量删除危险源和实验室关联
     *
     * @param ids 需要删除的危险源和实验室关联主键集合
     * @return 结果
     */
    public int deleteLabHazardSubjectRelationByIds(Long[] ids);

    /**
     * 删除危险源和实验室关联信息
     *
     * @param id 危险源和实验室关联主键
     * @return 结果
     */
    public int deleteLabHazardSubjectRelationById(Long id);

    List<LabHazardSubjectRelation> queryLabByHazardId(LabHazardDTO labHazard);

    /**
     * 更新危险源与实验室关系
     *
     * @param hazardJoinSubDTO
     */
    void updateSubHazardsRelation(LabHazardJoinSubDTO hazardJoinSubDTO, HazardTypeEnum hazardTypeEnum);

    /**
     * 第一版删除
     *
     * @param labHazard
     */
    @Deprecated
    void addRelation(LabHazardDTO labHazard);

    int updateBySubId(List<LabHazardSubjectRelation> hazardRelations, Long subId);
}
