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

import com.persagy.dmp.basic.dto.RequestData;
import com.persagy.dmp.common.model.response.CommonResult;
import com.persagy.dmp.digital.entity.ObjectRelation;

import java.util.List;

/***
 * Description: 处理关系计算逻辑的接口
 * @author : lijie
 * @date :2021/9/2 21:10
 * Update By lijie 2021/9/2 21:10
 */
public interface RelationCalService {
    /***
     * Description: 根据id,localId,name,localName,CADID及关系类型信息,对象分类信息创建关系
     * @param requestData : 请求参数
     * @return : com.persagy.dmp.common.model.response.CommonResult<java.util.List<com.persagy.dmp.digital.entity.ObjectRelation>>  
     * @author : lijie
     * @date :2021/9/2 21:24
     * Update By lijie 2021/9/2 21:24
     */
    CommonResult<List<ObjectRelation>> createObjRelationsByKeywordAndObjType(RequestData requestData);
    /***
     * Description: 根据fromId,toId,relType,graphCode删除关系
     * @param objectRelation : 请求参数
     * @return : com.persagy.dmp.common.model.response.CommonResult<java.util.List<com.persagy.dmp.digital.entity.ObjectRelation>>
     * @author : lijie
     * @date :2021/9/2 20:20
     * Update By lijie 2021/9/2 20:20
     */
    CommonResult<List<ObjectRelation>> deleteObjRelationsByRelId(ObjectRelation objectRelation);
    /***
     * Description: 关系计算
     * @param requestData : 请求参数
     * @return : com.persagy.dmp.common.model.response.CommonResult<java.util.List<com.persagy.dmp.digital.entity.ObjectRelation>>
     * @author : lijie
     * @date :2021/9/7 14:36
     * Update By lijie 2021/9/7 14:36
     */
    CommonResult<List<ObjectRelation>> calculatingObjRelation(RequestData requestData);
    /***
     * Description: 根据项目id和图类型编码及关系类型编码更新计算时间
     * @param graphCode : 图类型编码
     * @param relCode : 关系类型编码
     * @return : void
     * @author : lijie
     * @date :2021/9/4 23:14
     * Update By lijie 2021/9/4 23:14
     */
    void updateComputeTimeByProjectAndGraphCodeAndRelCode(String graphCode, String relCode, Integer computationalState);
    /***
     * Description: 查询当前计算状态
     * @param graphCode : 集团编码
     * @param relCode : 关系编码
     * @return : java.lang.Boolean
     * @author : lijie
     * @date :2021/12/7 12:01
     * Update By lijie 2021/12/7 12:01
     */
    Boolean hasComputingState(String graphCode, String relCode);
}
