package com.palmnest.service.estateserve;

import com.palmnest.application.bean.AppResultDto;
import com.palmnest.application.bean.Page;
import com.palmnest.application.dto.VirInfoDto;
import com.palmnest.application.dto.input.MeetingPushDto;
import com.palmnest.application.dto.input.MetingCompanyDto;
import com.palmnest.application.dto.output.VirUserOutputDto;
import com.palmnest.application.dto.output.returnCompanyDto;
import com.palmnest.model.User;
import com.palmnest.model.estateserve.AppUser;
import com.palmnest.model.estateserve.VirUser;
import com.palmnest.model.property.TbOrganization;
import com.palmnest.model.property.VirtualArchitecture;
import com.palmnest.service.GenericManager;

import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface VirtualArchManager extends GenericManager<VirtualArchitecture, Integer> {

	public Page queryVirtualArchList(String orgId, String floorId, String roomId, String isZuStatus, String virName, int pageNo, int pageSize) throws Exception;

	public List<AppUser> getAppUserByVirAndIsRes(int virId) throws Exception;

	public List<VirtualArchitecture> getVirByParamt(String floorId, String roomId, String isZuStatus, String virName, int pageNo, int pageSize) throws Exception;

	public Map<String, Object> saveImportVirtualData(InputStream ins) throws Exception;

	public List<TbOrganization> getBuild() throws Exception;

	public List<VirtualArchitecture> getVirByName(String name) throws Exception;

	public Page queryVirList(int pageNo, int pageSize, String virIds) throws Exception;

	public List<VirtualArchitecture> getVirByCode(String code) throws Exception;

	public List<String> getBandRoomId() throws Exception;

	public void saveImportVir(List<Object> list, User userLi, TbOrganization tb) throws Exception;

	public AppResultDto saveVirUser(VirUser virUser, TbOrganization tb, User user, List<AppUser> userList, List<AppUser> list, VirtualArchitecture virtualArchitecture, List<VirtualArchitecture> virList) throws Exception;

	public String saveVirUserList(Integer virId, List<VirUserOutputDto> virUserList) throws Exception;


	//得到流程公司数据 供选择
	public List<Map<String, Object>> getFloorCompanyAndSettleMonth(int organizationId, String companyName, boolean isAir) throws Exception;

	//得到流程公司数据 供选择
	public Map<String, Set<returnCompanyDto>> getFloorCompany(int organizationId) throws Exception;

	public List<VirtualArchitecture> getVirByRoomId(String roomIds) throws Exception;

	public String updateVirInfo(String virId, String remainderTime, String freeLenTime) throws Exception;

	public String sendPushMessage(MeetingPushDto mePushDto) throws Exception;

	public Map<String, Object> getOpenIdByCompanyId(String virId) throws Exception;

	public String updateVirInfoByUseTime(String virId, String useTime) throws Exception;

	public AppResultDto getVirListByBuildId(String buildId, String virName);

	public List<MetingCompanyDto> getVirByStartTime(String startTime, String endTime) throws Exception;

	/**
	 * 获取该项目下所有有效的企业
	 *
	 * @param orgIds
	 * @return
	 */
	public List<VirInfoDto> getVirInfoDtoByOrgId(String orgIds, String virtName) throws Exception;

	/**
	 * 根据项目id和企业名称获取企业列表
	 *
	 * @param orgId
	 * @param virName
	 * @return
	 */
	List<Map<String, String>> getVirByOrgIdAndVirName(Integer virtualId, Integer level, int orgId, String virName);


	/**
	 * 根据项目id获取普通未关联企业
	 *
	 * @param orgId
	 * @param virName
	 * @return
	 */
	List<Map<String, String>> getVirByOrgIdAndNoAgant(Integer id, int orgId, String virName);

	/**
	 * 获取企业统计数据
	 *
	 * @param orgId
	 * @param dateType
	 * @param date
	 * @param endDate
	 * @return
	 */
	List<Map<String, Object>> getVirtualDataByInfo(String orgId, int dateType, String date, String endDate);

	/**
	 * 根据房间号获取企业
	 *
	 * @param roomId
	 * @return
	 */
	List<Map<String, Object>> getVirtualByRoomId(String roomId);

	/**
	 * 获取代理企业统计数据
	 *
	 * @return
	 */
	List<Map<String, Object>> getVirtualArchAgent();
}
