| | |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.PrivilegeGroupRequest; |
| | | import com.doumee.core.haikang.model.param.respose.AcsDeviceInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PrivilegeGroupInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PrivilegeGroupListResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | //分页遍历循环查询所有门禁设备数据 |
| | | param = new PrivilegeGroupRequest(); |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(10000); |
| | | BaseResponse<PrivilegeGroupListResponse> response = hkService.privilegeGroup(param); |
| | | param.setPageSize(100); |
| | | BaseResponse<PrivilegeGroupListResponse> response = HKService.privilegeGroup(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,海康同步数据失败~"); |
| | | } |
| | | PrivilegeGroupListResponse r = response.getData(); |
| | | curTotal += 10000; |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |