| | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | import cn.exrick.xboot.your.vo.FindHistoryGpsRequest; |
| | | import cn.exrick.xboot.your.vo.PlaybackURLsVo; |
| | | import cn.exrick.xboot.your.vo.PreviewURLsVo; |
| | | import cn.exrick.xboot.your.vo.TalkURLsVo; |
| | | import cn.exrick.xboot.your.vo.*; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.hikvision.artemis.sdk.Client; |
| | |
| | | * STEP2:设置OpenAPI接口的上下文 |
| | | */ |
| | | private static final String ARTEMIS_PATH = "/artemis"; |
| | | private static final String HOST = "111.63.178.115:1443"; |
| | | //private static final String HOST = "111.63.178.115:1443"; |
| | | private static final String HOST = "10.10.101.1:1443"; |
| | | private static final String APP_KEY = "28156526"; |
| | | private static final String APP_SECRET = "MNkyjHuids4XxFONSOaL"; |
| | | |
| | |
| | | }; |
| | | String body= JSONUtil.toJsonStr(previewURLsVo); |
| | | String result = doPostStringArtemis(path,body,null,null,"application/json"); |
| | | System.out.println(result); |
| | | return result; |
| | | } |
| | | |
| | |
| | | } |
| | | }; |
| | | String body= JSONUtil.toJsonStr(playbackURLsVo); |
| | | String result = doPostStringArtemis(path,body,null,null,"application/json"); |
| | | return result; |
| | | } |
| | | |
| | | //根据报警ID获取关联图片信息 |
| | | public String findPicturesByAlarmId(AlarmVo alarmVo){ |
| | | String findHistoryGpsDataApi = ARTEMIS_PATH +"/api/rtsm/v1/multimedia/findPicturesByAlarmId"; |
| | | Map<String,String> path = new HashMap<String,String>(2){ |
| | | { |
| | | put("https://",findHistoryGpsDataApi); |
| | | } |
| | | }; |
| | | String body= JSONUtil.toJsonStr(alarmVo); |
| | | String result = doPostStringArtemis(path,body,null,null,"application/json"); |
| | | return result; |
| | | } |
| | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | //getTopicInfo(); |
| | | |
| | | FindHistoryGpsRequest findHistoryGpsRequest = new FindHistoryGpsRequest(); |
| | | findHistoryGpsRequest.setVehicleIndexCode("b279d865eabe497db465eb2f4d2cc87d"); |
| | | findHistoryGpsRequest.setPageNo(1); |
| | | findHistoryGpsRequest.setPageSize(20); |
| | | findHistoryGpsRequest.setBeginTime("2021-11-25T03:10:01.000+08:00"); |
| | | findHistoryGpsRequest.setEndTime("2021-11-25T12:10:01.000+08:00"); |
| | | HaiKangPost haiKangPost = new HaiKangPost(); |
| | | System.out.println(haiKangPost.findHistoryGps(findHistoryGpsRequest)); |
| | | // haiKangPost.getTopicInfo(); |
| | | |
| | | // FindHistoryGpsRequest findHistoryGpsRequest = new FindHistoryGpsRequest(); |
| | | // findHistoryGpsRequest.setVehicleIndexCode("b279d865eabe497db465eb2f4d2cc87d"); |
| | | // findHistoryGpsRequest.setPageNo(1); |
| | | // findHistoryGpsRequest.setPageSize(20); |
| | | // findHistoryGpsRequest.setBeginTime("2021-11-25T03:10:01.000+08:00"); |
| | | // findHistoryGpsRequest.setEndTime("2021-11-25T12:10:01.000+08:00"); |
| | | // HaiKangPost haiKangPost = new HaiKangPost(); |
| | | // System.out.println(haiKangPost.findHistoryGps(findHistoryGpsRequest)); |
| | | |
| | | // String code[] = {"b279d865eabe497db465eb2f4d2cc87d"}; |
| | | // System.out.println(findLatestGps(code)); |
| | | // System.out.println(haiKangPost.findLatestGps(code)); |
| | | |
| | | // PreviewURLsVo previewURLsVo = new PreviewURLsVo(); |
| | | // previewURLsVo.setCameraIndexCode("b279d865eabe497db465eb2f4d2cc87d"); |
| | | // previewURLs(previewURLsVo); |
| | | PreviewURLsVo previewURLsVo = new PreviewURLsVo(); |
| | | previewURLsVo.setCameraIndexCode("27760424aa8b486e84db8d6720b2a9bf"); |
| | | previewURLsVo.setProtocol("rtsp"); |
| | | haiKangPost.previewURLs(previewURLsVo); |
| | | |
| | | } |
| | | } |