/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workactivity.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工作流审批信息DAO接口
 * @author 杨帆
 * @version 2018-01-30
 */
@MyBatisDao
public interface WorkActivityProcessDao extends CrudDao<WorkActivityProcess> {

    List<WorkActivityProcess> findByKeyAndCount(WorkActivityProcess workActivityProcess);
    List<WorkActivityProcess> findByProcInsId(WorkActivityProcess workActivityProcess);
    List<WorkActivityProcess> findByProcInsIdAudit(WorkActivityProcess workActivityProcess);
    List<WorkActivityProcess> findByProcInsIdAndIsApproval(WorkActivityProcess workActivityProcess);
    int delFlag(WorkActivityProcess workActivityProcess);
    int deleteByAudit(WorkActivityProcess workActivityProcess);
    int deleteProcessIdAuditUsers(@Param("processInstanceId")String processInstanceId);
    int updateProcessInstanceId(@Param("processInstanceId")String processInstanceId,@Param("processId")String processId);
    int deleteProcessInstanceId(@Param("processId")String processId);
    int deleteProcessInstanceById(@Param("processId")String processId);
    int deleteAudits(@Param("processId")String processId,@Param("count")int count);
    int insertAudits(WorkActivityProcess workActivityProcess);
    int updateDelFlagAndIsApproval(WorkActivityProcess p);
    void deleteyProcess(String id);
    int updateType(@Param("processInstanceId")String processInstanceId,@Param("type")String type);
}