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

com.dahuatech.icc.brm.model.v202010.person.BrmPersonPageRequest Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.brm.model.v202010.person;

import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.brm.constant.BrmConstant;
import com.dahuatech.icc.brm.constant.ParamConstant;
import com.dahuatech.icc.brm.exception.BusinessException;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.util.CollectionUtil;

import java.util.List;

/**
 * 人员全量数据同步,默认maxRangeId=1000L
 *
 * @author 232676
 * @since 1.0.0 2020/11/5 11:27
 */
public class BrmPersonPageRequest extends AbstractIccRequest {

  private int pageSize;
  private int pageNum;
  private Integer departmentId;
  private boolean isContain;
  private String searchKey;
  /** 证件类型筛选 */
  private List paperTypeList;
  /** 人员类型筛选 */
  private List personTypeList;
  /** 民族筛选 */
  private List nationList;
  /** 状态筛选 : 0-删除 ,1-正常 ,2-冻结 */
  private List statusList;
  /** 性别筛选: 0-未知, 1-男, 2-女 */
  private List sexList;
  /** 人员身份 */
  private List personIdentityId;
  /** 1-指纹 2-红外/9421d人脸/人脸特征值 无此参数只显示人脸照片 选择多项时用逗号连接 eg. 1,2 */
  private List biometricType;
  /** 人员ID列表 */
  private List personIdList;
  /** 人员姓名列表(精确匹配) */
  private List nameList;
  /** 证件号码(精确匹配) */
  private List paperNumberList;

  private BrmPersonPageRequest(Builder builder) {
    super(BrmConstant.url(BrmConstant.BRM_URL_PERSON_PAGE_POST), Method.POST);
    this.statusList = builder.statusList;
    this.personIdList = builder.personIdList;
    putBodyParameter("statusList", statusList);
    putBodyParameter("personIdList", personIdList);
    putBodyParameter("pageNum", 1);
    putBodyParameter("pageSize", 10);
  }

  public BrmPersonPageRequest(){
      super(BrmConstant.url(BrmConstant.BRM_URL_PERSON_PAGE_POST), Method.POST);
  }

  public static Builder builder() {
    return new Builder();
  }

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

  public int getPageSize() {
    return pageSize;
  }

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

  public int getPageNum() {
    return pageNum;
  }

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

  public Integer getDepartmentId() {
    return departmentId;
  }

  public void setDepartmentId(Integer departmentId) {
    this.departmentId = departmentId;
    putBodyParameter("departmentId", departmentId);
  }

  public boolean isContain() {
    return isContain;
  }

  public void setContain(boolean contain) {
    isContain = contain;
    putBodyParameter("contain", contain);
  }

  public String getSearchKey() {
    return searchKey;
  }

  public void setSearchKey(String searchKey) {
    this.searchKey = searchKey;
    putBodyParameter("searchKey", searchKey);
  }

  public List getPaperTypeList() {
    return paperTypeList;
  }

  public void setPaperTypeList(List paperTypeList) {
    this.paperTypeList = paperTypeList;
    putBodyParameter("paperTypeList", paperTypeList);
  }

  public List getPersonTypeList() {
    return personTypeList;
  }

  public void setPersonTypeList(List personTypeList) {
    this.personTypeList = personTypeList;
    putBodyParameter("personTypeList", personTypeList);
  }

  public List getNationList() {
    return nationList;
  }

  public void setNationList(List nationList) {
    this.nationList = nationList;
    putBodyParameter("nationList", nationList);
  }

  public List getStatusList() {
    return statusList;
  }

  public void setStatusList(List statusList) {
    this.statusList = statusList;
    putBodyParameter("statusList", statusList);
  }

  public List getSexList() {
    return sexList;
  }

  public void setSexList(List sexList) {
    this.sexList = sexList;
    putBodyParameter("sexList", sexList);
  }

  public List getPersonIdentityId() {
    return personIdentityId;
  }

  public void setPersonIdentityId(List personIdentityId) {
    this.personIdentityId = personIdentityId;
    putBodyParameter("personIdentityId", personIdentityId);
  }

  public List getBiometricType() {
    return biometricType;
  }

  public void setBiometricType(List biometricType) {
    this.biometricType = biometricType;
    putBodyParameter("biometricType", biometricType);
  }

  public List getPersonIdList() {
    return personIdList;
  }

  public void setPersonIdList(List personIdList) {
    this.personIdList = personIdList;
    putBodyParameter("personIdList", personIdList);
  }

  public List getNameList() {
    return nameList;
  }

  public void setNameList(List nameList) {
    this.nameList = nameList;
    putBodyParameter("nameList", nameList);
  }

  public List getPaperNumberList() {
    return paperNumberList;
  }

  public void setPaperNumberList(List paperNumberList) {
    this.paperNumberList = paperNumberList;
    putBodyParameter("paperNumberList", paperNumberList);
  }

  public static class Builder {
    private List statusList;
    private List personIdList;

    public Builder statusList(List statusList) {
      this.statusList = statusList;
      return this;
    }

    public Builder personIdList(List personIdList) {
        this.personIdList = personIdList;
        return this;
    }

    public BrmPersonPageRequest build() throws ClientException {
      return new BrmPersonPageRequest(this);
    }
  }
    public void businessValid() {

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy