All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.electricity.model.v202208.airConditioner.AirConditionerSearchRequest Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.electricity.model.v202208.airConditioner;

import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.electricity.constant.ElectricityConstant;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.exception.BusinessException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.oauth.model.v202010.HttpConfigInfo;
import com.dahuatech.icc.util.StringUtils;

import java.util.List;

/**
 * program:java-sdk
 *
 * @Author: 355079
 * @Date:2022-08-22 16:00
 * @Description: 根据条件查询空调信息
 */
public class AirConditionerSearchRequest extends AbstractIccRequest {
    private Integer choseMethod;
    private Integer status;
    private Integer useTimeStatus;
    private Integer temperatureStatus;
    private Integer model;
    private Integer windSpeed;
    private String sortName;
    private Boolean sortFlag;
    private Integer pageNum;
    private Integer pageSize;
    private List orgCodeList;
    private List deviceCodeList;
    private List checkChannelCodeList;

    public Integer getChoseMethod() {
        return choseMethod;
    }

    public void setChoseMethod(Integer choseMethod) {
        putBodyParameter("choseMethod",choseMethod);
        this.choseMethod = choseMethod;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        putBodyParameter("status",status);
        this.status = status;
    }

    public Integer getUseTimeStatus() {
        return useTimeStatus;
    }

    public void setUseTimeStatus(Integer useTimeStatus) {
        putBodyParameter("useTimeStatus",useTimeStatus);
        this.useTimeStatus = useTimeStatus;
    }

    public Integer getTemperatureStatus() {
        return temperatureStatus;
    }

    public void setTemperatureStatus(Integer temperatureStatus) {
        putBodyParameter("temperatureStatus",temperatureStatus);
        this.temperatureStatus = temperatureStatus;
    }

    public Integer getModel() {
        return model;
    }

    public void setModel(Integer model) {
        putBodyParameter("model",model);
        this.model = model;
    }

    public Integer getWindSpeed() {
        return windSpeed;
    }

    public void setWindSpeed(Integer windSpeed) {
        putBodyParameter("windSpeed",windSpeed);
        this.windSpeed = windSpeed;
    }

    public String getSortName() {
        return sortName;
    }

    public void setSortName(String sortName) {
        putBodyParameter("sortName",sortName);
        this.sortName = sortName;
    }

    public Boolean getSortFlag() {
        return sortFlag;
    }

    public void setSortFlag(Boolean sortFlag) {
        putBodyParameter("sortFlag",sortFlag);
        this.sortFlag = sortFlag;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        putBodyParameter("pageNum",pageNum);
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        putBodyParameter("pageSize",pageSize);
        this.pageSize = pageSize;
    }

    public List getOrgCodeList() {
        return orgCodeList;
    }

    public void setOrgCodeList(List orgCodeList) {
        putBodyParameter("orgCodeList",orgCodeList);
        this.orgCodeList = orgCodeList;
    }

    public List getDeviceCodeList() {
        return deviceCodeList;
    }

    public void setDeviceCodeList(List deviceCodeList) {
        putBodyParameter("deviceCodeList",deviceCodeList);
        this.deviceCodeList = deviceCodeList;
    }

    public List getCheckChannelCodeList() {
        return checkChannelCodeList;
    }

    public void setCheckChannelCodeList(List checkChannelCodeList) {
        putBodyParameter("checkChannelCodeList",checkChannelCodeList);
        this.checkChannelCodeList = checkChannelCodeList;
    }

    public AirConditionerSearchRequest() throws ClientException {
        super(ElectricityConstant.url(ElectricityConstant.AIR_CONDITIONER_SEARCH), Method.POST);
    }

    public AirConditionerSearchRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
        super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
    }

    @Override
    public Class getResponseClass() {
        return AirConditionerSearchResponse.class;
    }

    public void businessValid() {
        if (choseMethod==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "choseMethod");
        }
        if (status==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "status");
        }
        if (useTimeStatus==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "useTimeStatus");
        }
        if (temperatureStatus==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "temperatureStatus");
        }
        if (StringUtils.isEmpty(sortName)) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "sortName");
        }
        if (sortFlag==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "ortFlag");
        }
        if (pageNum==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageNum");
        }
        if (pageSize==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageSize");
        }
        if (orgCodeList==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "orgCodeList");
        }
        if (checkChannelCodeList==null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "checkChannelCodeList");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy