|
@@ -1,26 +1,29 @@
|
|
|
package com.persagy.cameractl.service;
|
|
|
|
|
|
+import java.io.File;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
|
|
|
import com.hikvision.artemis.sdk.config.ArtemisConfig;
|
|
|
+import com.persagy.cameractl.conf.AllStaticConfig;
|
|
|
import com.persagy.cameractl.conf.CameraApiConfig;
|
|
|
import com.persagy.cameractl.utils.Camera;
|
|
|
import com.persagy.cameractl.utils.CmdStreamThread;
|
|
|
import com.persagy.cameractl.utils.EnumTools;
|
|
|
-import com.persagy.cameractl.utils.ResultClass;
|
|
|
import com.persagy.cameractl.utils.EnumTools.OperatingSystem;
|
|
|
import com.persagy.cameractl.utils.JsonTools;
|
|
|
import com.persagy.cameractl.utils.OtherTools;
|
|
|
-import cn.hutool.core.date.DateUtil;
|
|
|
-
|
|
|
-import java.io.File;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
+import com.persagy.cameractl.utils.ResultClass;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
@Component
|
|
@@ -170,6 +173,9 @@ public class HkCameraExecuteApi {
|
|
|
|
|
|
JSONObject jsonBody = new JSONObject();
|
|
|
jsonBody.put("cameraIndexCode", hkCamera.cameraIndexCode);
|
|
|
+ if (StrUtil.isNotBlank(AllStaticConfig.recordLocation)) {
|
|
|
+ jsonBody.put("recordLocation", AllStaticConfig.recordLocation);
|
|
|
+ }
|
|
|
jsonBody.put("protocol", hkCamera.protocol);
|
|
|
jsonBody.put("beginTime", hkCamera.startDateStr.replace(" ", "T") + ".000+08:00");
|
|
|
jsonBody.put("endTime", endString2.replace(" ", "T") + ".000+08:00");
|