package com.palmnest.service.estateserve.airconditioner;


import com.palmnest.application.bean.AppResultDto;
import com.palmnest.application.bean.Page;
import com.palmnest.application.dto.ConditionerAddTimeOrderFeeVO;
import com.palmnest.application.dto.input.*;
import com.palmnest.application.dto.output.AirConditionerAddTimeOutDto;
import com.palmnest.application.dto.output.AirConditionerAddTimeOutWebVO;
import com.palmnest.model.RoomInfo;
import com.palmnest.model.User;
import com.palmnest.model.airconditioner.AirConditionerAddTime;
import com.palmnest.model.airconditioner.AirRule;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface ConditionerAddTimeService {


	/**
	 * 空调加时申请
	 */
	public AppResultDto apply(AirConditionerAddTimeInputDto dto, HttpServletRequest request);


	/**
	 * 会议室模块加时申请
	 */
	//public AppResultDto meetingApply(AirConditionerAddTimeMeetingInputDto dto, HttpServletRequest request);

	/**
	 * 空调加时确认提交
	 */
	public AppResultDto applyConfirm(HttpServletRequest request);

	/**
	 * 会议室申请成功后 确认加时订单
	 */
	public AppResultDto meetingApplyConfirm(HttpServletRequest request);


	/**
	 * 会议室模块加时申请
	 */
	public AppResultDto getIsShowSelectBox(AirConditionerAddTimeMeetingInputDto dto, HttpServletRequest request);


	public AirConditionerAddTimeOutDto convert(AirConditionerAddTime airBill) throws Exception;

	public Page findPageBy(Map<String, Object> params, int pageSize, int pageNo);

	public Page reportFindPageBy(Map<String, Object> params, int pageSize, int pageNo);

	public Page reportDetailFindPageBy(Map<String, Object> params, int pageSize, int pageNo);


	public AppResultDto audit(AirConditionerAddTimeInputDto Dto, HttpServletRequest request);

	public AppResultDto cancel(AirConditionerAddTimeInputDto dto, HttpServletRequest request);

	//会议室取消
	public AppResultDto meetingCancel(HttpServletRequest request);

	public AirConditionerAddTimeOutDto findById(Long id);
	
	public AirRule getRuleByOrgId(Long orgId);

	/**
	 * 根据企业账号获得房号、面积信息
	 * @throws Exception 
	 */
	public AppResultDto getRoomsAndAreaByVirtualId(AirConditionerAddTimeInputDto Dto, HttpServletRequest request) throws Exception;

	/**
	 * 空调开员人员
	 */
	public AppResultDto getAirSwitchUser(HttpServletRequest request);

	//得到流程公司数据 供选择
	public AppResultDto selectCompany(AirSelectCompanyInputDto dto, HttpServletRequest request);

	public void push(String id) throws Exception;

	/**
	 * 加时单 申请时间大于当前时间  把状态改为已完成
	 * 条件:待使用状态
	 */
	public void airAddTimeDoTimerTask();

	/**
	 * #加时审批过时间
	 * #当前时间>空调申请开始时间
	 * #且状态为21 22 23状态
	 * #将状态 改为:35(无效
	 * #且
	 * #cancelReason='管理员审批超时'
	 * #cancelUser='系统自动'
	 * #cancelTime=NOW()
	 */
	public void airAddTimeAuditOverTimeTask();

	public AppResultDto exportReportList(Map<String, Object> params);
	
	public AppResultDto exportDetailList(Map<String, Object> params);

	public void airConditioningOrder();
	
	//得到流程公司数据 供选择
	public AppResultDto getBusinessData(AirAddTimeBusinessInputDto dto);


	List<RoomInfo> getAddTimeOrderHistoryRooms(String orderNo);

	ConditionerAddTimeOrderFeeVO calcAddTimeOrderFee(ConditionerAddTimeOrderUpdateParam order);

	void updateAddTimeOrder(ConditionerAddTimeOrderUpdateParam order, User user);

	AirConditionerAddTimeOutWebVO assembleOrderHistory(AirConditionerAddTimeOutDto dto);
}
