| | |
| | | private void getUpdateModelByResponse( Visits c,Date date,String type,List<DeviceRole> roleList,String path ) { |
| | | String code = null; |
| | | String id = null; |
| | | String qrcode = null; |
| | | //发起海康预约接口 |
| | | if(StringUtils.equals(type,"0")){ |
| | | //(需要登记) |
| | |
| | | } |
| | | BaseResponse<VisitAppointmentResponse> response = HKService.visitAppiontment(request); |
| | | code =response!=null ?response.getCode():null; |
| | | id = (response!=null && response.getData()!=null |
| | | if((response!=null && response.getData()!=null |
| | | && response.getData().getAppointmentInfoList() !=null |
| | | && response.getData().getAppointmentInfoList().size()>0)?response.getData().getAppointmentInfoList().get(0).getOrderId():null; |
| | | && response.getData().getAppointmentInfoList().size()>0)){ |
| | | id =response.getData().getAppointmentInfoList().get(0).getOrderId(); |
| | | qrcode =response.getData().getAppointmentInfoList().get(0).getQRCode(); |
| | | } |
| | | }else{ |
| | | //免登记 |
| | | VisitAppointmentMDJRequest request =getHkMDJRequestPara(c,roleList,path); |
| | |
| | | } |
| | | BaseResponse<VisitAppointmentMDJResponse> response = HKService.visitAppiontmentMDJ(request ); |
| | | code =response!=null ?response.getCode():null; |
| | | id = (response!=null && response.getData()!=null)?response.getData().getOrderId():null; |
| | | if(response!=null && response.getData()!=null){ |
| | | id = response.getData().getOrderId(); |
| | | qrcode =response.getData().getQRCode(); |
| | | } |
| | | } |
| | | |
| | | if (code!= null && id!=null) { |
| | | //海康下发成功 |
| | | c.setHkId( id);//预约标识 |
| | | c.setQrcode(qrcode); |
| | | c.setRemark("下发海康成功!【"+type+"】"); |
| | | c.setStatus(Constants.VisitStatus.xfSuccess);//下发海康成功 |
| | | } else { |
| | | //海康下发成功 |
| | | //海康下发失败 |
| | | c.setRemark("下发海康失败!【"+type+"】"); |
| | | c.setStatus(Constants.VisitStatus.xfFail);//下发海康失败 |
| | | } |