package com.palmnest.service.estateserve.airconditioner.impl;

import com.palmnest.application.bean.Page;
import com.palmnest.dao.airconditioner.AirRuleDao;
import com.palmnest.model.airconditioner.AirRule;
import com.palmnest.service.estateserve.airconditioner.AirRuleManager;
import com.palmnest.service.impl.GenericManagerImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("AirRuleManager")
public class AirRuleManagerImpl extends GenericManagerImpl<AirRule, Long> implements AirRuleManager {

	private AirRuleDao airRuleDao;

	@Autowired
	public void setConditionerAddTimeDao(AirRuleDao airRuleDao) {
		this.airRuleDao = airRuleDao;
		this.dao = airRuleDao;
	}

	@Override
	public Page findPageBy(Map<String, Object> params, int pageSize, int pageNo) {
		return airRuleDao.findPageBy(params, pageSize, pageNo);
	}

	@Override
	public List<AirRule> getAirRule(Integer organizationId, Integer applicationType, Integer meetingOrAirAddTime, Integer dataType,
									String startTime, String endTime) {


		return airRuleDao.getAirRule(organizationId, applicationType, meetingOrAirAddTime, dataType, startTime, endTime);
	}

	@Override
	public AirRule getRuleByOrgId(Long orgId) {
		return airRuleDao.getRuleByOrgId(orgId);
	}

}
