package com.dcsoft.system.uniubi.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dcsoft.system.utils.HttpUtil;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/api")
public class HikController {

    @Value("${artemis.url}")
    public String url;
    @Value("${artemis.appKey}")
    public String appKey;
    @Value("${artemis.appSecret}")
    public String appSecret;

    private static final String ARTEMIS_PATH = "/artemis";


    @RequestMapping(value = "notification",method = RequestMethod.GET)
    public JSONObject notification(String AccessControllerEvent) throws Exception {
        JSONObject jsonObject = new JSONObject();

        cn.hutool.json.JSONObject jsonObject1= HttpUtil.getISAPI("115.238.133.214:12000", "admin", "Abc.1122 ", "/ISAPI/Event/notification/httpHosts/1");
        System.out.println("获取信息+++++++++++++++"+jsonObject1);

        return jsonObject;
    }

    //定时拉去打卡数据




}
