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

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

import java.util.List;

/**
 * 公司管理DAO接口
 * @author yangfan
 * @version 2017-07-25
 */
@MyBatisDao
public interface CompanyinfoDao extends CrudDao<Useroffice> {

    /**
     * 更新流程实例ID
     * @param useroffice
     * @return
     */
    public List<Useroffice> findListByCompany(Useroffice useroffice);
    /**
     * 更新流程实例ID
     * @param useroffice
     * @return
     */
    public int updateProcessInstanceId(Useroffice useroffice);

    /**
     * 根据流程实例ID获取Leave
     * @param processInstanceId
     * @return
     */
    public Useroffice getByProcessInstanceId(String processInstanceId);

    //更新审批人
    void updateMaster(@Param("companyinfoId") String companyinfoId , @Param("masterId") String masterId);

    Useroffice getByCompanyAndUserId(@Param("userId") String userId , @Param("companyId") String companyId);

    //
    Useroffice getSimple(String id);
}