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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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;

/**
 * 关系数据 DAO
 * @author Charlie Yu
 * @date 2021-07-08
 */
public interface ObjectRelationMapper extends BaseMapper<ObjectRelation> {

    /**
     * 保存
     * @param vos
     * @return
     */
    void save(@Param("vos") List<ObjectRelation> vos);
    /***
     * 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> queryRelatedObjects(Iterable<String> objIds, Iterable<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);
}
