package com.tykj.workflowcore.workflow_editer.service;

import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.entity.vo.SearchAllFlowInfoVo;
import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo;
import com.tykj.workflowcore.workflow_editer.entity.vo.FlowsInfoVo;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * ClassName:    FlowInfoService
 * Package:    com.tykj.service
 * Description: 流程
 * Datetime:    2021/2/24   10:02
 *
 * @Author: zsp
 */
public interface FlowInfoService {

    /**
     * 根据id查询出一个flowsInfo对象
     * @param id flowInfo Id
     * @return FlowInfo对象
     */

    FlowsInfo findById(Integer id);
    /**
     * 根据流程主键修改
     * @param flowsInfoVo flowsInfo
     * @return flowsInfoVo
     */
    FlowsInfo findByFlowName(@RequestBody FlowsInfoVo flowsInfoVo);

    /**
     * 根据流程描述修改
     * @param flowsInfoVo flowsInfo
     * @return flowsInfoVo
     */
    FlowsInfo findByDesc(@RequestBody FlowsInfoVo flowsInfoVo);

    /**
     * 根据流程部署id查询
     * @param deployId 部署id
     * @return flowsInfo
     */
    FlowsInfo findByDeployId(String deployId);

    /**
     * 根据流程主键查询
     * @param flowKey 流程主键
     * @return flowsInfo 对象
     */
    FlowsInfo findByFlowKey(String flowKey);

    /**
     * 停用流程
     * @param flowInfoId
     * @return
     */
    FlowsInfo disableFlow(Integer flowInfoId);

    /**
     * 有条件的查询flowInfo
     * @param searchAllFlowInfoVo
     * @return
     */
    Page<FlowsInfo> searchAllFlowInfo(SearchAllFlowInfoVo searchAllFlowInfoVo);

    /**
     * 有条件的查询flowInfo
     * @param searchFlowInfoVo
     * @return
     */
    Page<FlowsInfo> searchFlowInfo(SearchFlowInfoVo searchFlowInfoVo);

    /**
     * 编辑流程
     * @param id 流程id
     * @return
     */
    FlowsInfo editFlow(Integer id);


}
