/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.security.trans.flow.service;

import org.security.trans.flow.dto.FlowStartDTO;
import org.security.trans.flow.entity.FlowHistory;
import org.security.trans.flow.vo.FlowHistoryVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.security.trans.flow.vo.FlowNodeDataVO;
import org.springblade.core.tool.api.R;

import java.text.ParseException;
import java.util.List;

/**
 * 流程-流程历史记录表 服务类
 *
 * @author BladeX
 * @since 2022-03-29
 */
public interface IFlowHistoryService extends IService<FlowHistory> {


	/**
	 * 发起流程
	 * @param flowStartDTO 标识数据
	 * @return
	 * @throws ParseException
	 */
	boolean startFlow(FlowStartDTO flowStartDTO);


	/**
	 * 审批通过
	 * @param flowStartDTO 业务数据
	 * @return
	 */
	R approvalPassData(FlowStartDTO flowStartDTO);

	/**
	 *提报
	 * @param flowStartDTO
	 * @return
	 */
	boolean passData(FlowStartDTO flowStartDTO);


	/**
	 *列表页获取数据id(模块流程标识符为空获取的是代办页的数据)
	 * @param flowBusinessCodes 模块流程标识符
	 * @param roleId 角色id
	 * @return
	 */
	FlowNodeDataVO getRoleId(List<String> flowBusinessCodes,String roleId);



	/**
	 * 驳回
	 * @param flowStartDTO 业务数据
	 * @return
	 */
	R rejectData(FlowStartDTO flowStartDTO);

	/**
	 * 获取审批流程历史
	 * @param flowStartDTO 业务模块信息
	 * @return
	 */
	List<FlowHistoryVO> getFlowHistory(FlowStartDTO flowStartDTO);
}
