| | |
| | | AuthItemListRequest param = new AuthItemListRequest(); |
| | | param.setPageNo(1); |
| | | param.setPageSize(100); |
| | | param.setPersonIds(new ArrayList<>()); |
| | | AuthItemListPersonRequest p = new AuthItemListPersonRequest(); |
| | | p.setPersonIds(c.getMemberHkId()); |
| | | param.getPersonIds().add(p); |
| | | // param.setPersonIds(new ArrayList<>()); |
| | | // AuthItemListPersonRequest p = new AuthItemListPersonRequest(); |
| | | // p.setPersonIds(c.getMemberHkId()); |
| | | param.setPersonIds(new String[]{c.getMemberHkId()}); |
| | | param.setQueryType(c.getDeviceType()); |
| | | TaskDataAdditionResourceRequest rec = new TaskDataAdditionResourceRequest(); |
| | | rec.setResourceIndexCode(c.getDeviceIndexCode()); |
| | | rec.setResourceType(c.getDeviceType()); |
| | | rec.setChannelNos(c.getDeviceChannelNo().split(",")); |
| | | param.setResourceInfos(rec); |
| | | List<TaskDataAdditionResourceRequest> resourceRequests = new ArrayList<>(); |
| | | |
| | | resourceRequests.add(rec); |
| | | // param.setResourceInfos(resourceRequests); |
| | | //查询已下载 |
| | | param.setPersonStatus(new Integer[]{3}); |
| | | // param.setPersonStatus(new Integer[]{3}); |
| | | //查询下发状态 |
| | | BaseResponse<AuthItemListResponse> response = HKService.authItemList(param); |
| | | if(response!=null |
| | |
| | | update.setSendDate(date); |
| | | update.setEditDate(date); |
| | | update.setHkId(taskId); |
| | | update.setRemark(status?"下发任务成功":"下发任务失败"); |
| | | update.setRemark(status?"下发任务执行成功":"下发任务执行失败"); |
| | | //下发中 |
| | | update.setSendStatus(status?Constants.EmpowerStatus.ing:Constants.EmpowerStatus.fail); |
| | | empowerMapper.updateById(update); |
| | | } |
| | | } |
| | | for(Empower model : errorList){ |
| | |
| | | update.setEditDate(date); |
| | | update.setHkId(taskId); |
| | | update.setSendStatus(Constants.EmpowerStatus.fail); |
| | | update.setRemark( "添加下发任务数据刪除授权失败"); |
| | | // update.setRemark( "添加下发任务数据刪除授权失败"); |
| | | empowerMapper.updateById(update); |
| | | } |
| | | } |
| | |
| | | ||StringUtils.isBlank(c.getDeviceType()) |
| | | ||StringUtils.isBlank(c.getDeviceIndexCode())){ |
| | | //必填参数校验 |
| | | c.setRemark("设备信息不支持授权下发,检查人员是否已下发海康或者设备是否【设备类型、通道号】是否完善"); |
| | | return false; |
| | | } |
| | | TaskDataAdditionRequest param = new TaskDataAdditionRequest(); |
| | |
| | | pinfo.setStartTime(DateUtil.getISO8601Timestamp(c.getStartTime())); |
| | | pinfo.setOperatorType(type); |
| | | pinfo.setPersonId(c.getMemberHkId()); |
| | | personInfos.add(pinfo);// |
| | | param.setResourceInfos(resourceInfos); |
| | | param.setPersonInfos(personInfos); |
| | | BaseResponse response = HKService.taskDataAddition(param); |
| | |
| | | && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | return true; |
| | | }else{ |
| | | c.setRemark("添加人员、设备通道权限下发数据失败"+(response!=null?response.getMsg():"")); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | queryWrapper.selectAs(Member::getHkId,Empower::getMemberHkId); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,Empower::getMemberId); |
| | | queryWrapper.selectAs(Device::getHkId,Empower::getDeviceIndexCode); |
| | | queryWrapper.selectAs(Device::getDevTypeCode,Empower::getDeviceType); |
| | | queryWrapper.selectAs(Device::getResourceType,Empower::getDeviceType); |
| | | queryWrapper.leftJoin(Device.class,Device::getId,Empower::getDeviceId); |
| | | queryWrapper.eq(Empower::getSendStatus,Constants.EmpowerStatus.downloaded); |
| | | List<Empower> list = empowerMapper.selectJoinList(Empower.class,queryWrapper); |