package com.persagy.dmp.rwd.digital.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.persagy.dmp.basic.dto.RelationCalDTO;
import com.persagy.dmp.digital.entity.ObjectDigital;
import com.persagy.dmp.digital.entity.ObjectRelation;
import com.persagy.dmp.rwd.digital.domain.CalculatingDTO;
import com.persagy.dmp.rwd.digital.domain.SpaceCalDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 关系数据 DAO
 * @author Charlie Yu
 * @date 2021-07-08
 */
public interface ObjectRelationMapper extends BaseMapper<ObjectRelation> {
    /***
     * Description: 根据对象id查询关系
     * @param objIds : 对象id
     * @param relCode : 关系code
     * @return : java.util.List<com.persagy.dmp.digital.entity.ObjectDigital>
     * @author : lijie
     * @date :2021/8/26 12:07
     * Update By lijie 2021/8/26 12:07
     */
    List<ObjectDigital> selectRelCodesByObjToIdsAndRelCode(@Param("objIds") Set<String> objIds,@Param("relCode") String relCode);
    /***
     * Description: 根据对象id查询关系
     * @param objIds : 对象id
     * @param relCodes : 关系code集合
     * @return : java.util.List<com.persagy.dmp.digital.entity.ObjectDigital>
     * @author : lijie
     * @date :2021/8/26 12:07
     * Update By lijie 2021/8/26 12:07
     */
    List<ObjectDigital> selectRelCodesByObjIdsAndRelCodes(@Param("objIds") Set<String> objIds,@Param("relCodes") Set<String> relCodes);
    /***
     * Description: 根据关系链新增对象关系
     * @param calculating : 请求参数
     * @return : void
     * @author : lijie
     * @date :2021/9/9 10:09
     * Update By lijie 2021/9/9 10:09
     */
    void insertObjectRelationByRelChain(@Param("param") CalculatingDTO calculating);
    /***
     * Description: 新增楼层贯通对象关系
     * @param calculating : 请求参数
     * @return : void
     * @author : lijie
     * @date :2021/9/9 10:09
     * Update By lijie 2021/9/9 10:09
     */
    void insertObjectRelationForFlThroughFl(@Param("param") CalculatingDTO calculating);
    /***
     * Description: 根据竖井下的空间查询空间对象
     * @param calculatingDTO : 请求参数
     * @return : java.util.List<com.persagy.dmp.digital.entity.ObjectRelation>
     * @author : lijie
     * @date :2021/10/11 10:54
     * Update By lijie 2021/10/11 10:54
     */
    List<ObjectRelation> queryArchSubsetShToSp(@Param("param") CalculatingDTO calculatingDTO);
    /***
     * Description: 根据项目id查询项目下的所有空间及关联的楼层及楼层模型id
     * @param calculatingDTO : 请求参数
     * @return : java.util.List<com.persagy.dmp.digital.entity.ObjectDigital>
     * @author : lijie
     * @date :2021/10/11 15:32
     * Update By lijie 2021/10/11 15:32
     */
    List<SpaceCalDTO> querySpacesByProjectId(@Param("param") CalculatingDTO calculatingDTO);
}
