/**
 * Copyright &copy; 2013-2017 <a href="http://www.rhcncpa.com/">瑞华会计师事务所</a> All rights reserved.
 */
package com.jeeplus.modules.sys.dao;

import com.jeeplus.common.persistence.TreeDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.sys.entity.Office;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 机构DAO接口
 * @author jeeplus
 * @version 2014-05-16
 */
@MyBatisDao
public interface OfficeDao extends TreeDao<Office> {
	
	public Office getByCode(String code);
	public void saveBranchOffice(Office office);
	public void updateUseable(Office office);

	public Office getByOfficeInfo(Office office);

	public List<Office> findByGroupId(String groupId);

	public List<Office> findListByCompanyName(Office office);

	//微信界面
	public List<Office> findByNameWx(String officeName);

	//根据微信管理id查找部门信息
	public List<Office> findListByWxName(Office office);
	//微信获取最大
	public String findWxOfficeId();
	//根据id获取微信的wxofficeId
	public String findWxOfficeIdByParentId(String id);
	//根据id获取微信
    public String findWxOfficeIdById(String id);

	public List<Office> findByParentIdsCompany(Office office);
	public List<Office> findByCompany(Office office);
	public List<Office> findByUserId(@Param("userId") String userId);

	public List<Office> findListByCompanyNamee(Office office);
    List<Office> getAllDepts(String id);
	List<Office> getAllBranch(String id);
	List<Office> getAllBranchOffice(String id);

	public List<Office> findByParentIdsLikee(Office entity);

	public List<Office> findAllListByParentIds(Office entity);

	public List<Office> findListByParentId(Office entity);
	public Integer findListByParentIdCount(Office entity);

	public List<Office> findByType(Office entity);

	public List<Office> getInfo(Office entity);

    List<Office> findByName(Office o);

	public List<Office> findByCompanyTemplate(Office office);

	public List<Office> treeDataAllOffice(Office office);
	public List<Office> findCompanyList();

    void logicDelete(Office office);

    List<Office> findByTopCompany(Office office);
	public List<Office> findMangeList(Office office);

    List<String> findBranchOfficeId(@Param("branchOffice")String branchOffice,@Param("companyId")String companyId);

    List<String> findChildOfficeId(String parentId);

    List<Office> findAllList1(String comId);
}
