package com.jpsoft.shinestar.modules.workflow.service;

import java.util.List;
import java.util.Map;
import com.jpsoft.shinestar.modules.workflow.entity.ProcessActivity;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface ProcessActivityService {
	ProcessActivity get(String id);
	boolean exist(String id);
	int insert(ProcessActivity model);
	int insertAndActUser(ProcessActivity model);
	int update(ProcessActivity model);
	int updateAndActUser(ProcessActivity model);
	int updateMove(ProcessActivity model,ProcessActivity swapProcessActivity);
	int delete(String id);
	List<ProcessActivity> list();
	List<ProcessActivity> findByTemplate(String templateId);
	List<ProcessActivity> findByTemplateId(String templateId,String personRoleId);
	Page<ProcessActivity> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
	ProcessActivity findByActivityOrder(int activityOrder);
    List<ProcessActivity> findByActivityOrderProcessTemplateId(String personRoleId,int activityOrder, String processTemplateId);

    List<ProcessActivity> findByTemplateIdAndRoleId(String processTemplateId, String personRoleId);

    List<ProcessActivity> findByTemplateIdAndRoleIdAndCondition(String processTemplateId, String personRoleId, String condition);
}