潘志宝
2024-11-14 afa8fc57084c423218c6816b710dfb2f0b87ea89
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCapturePictureClient.java
@@ -1,7 +1,6 @@
package com.iailab.module.data.video.dahua;
import com.alibaba.fastjson.JSON;
import com.iailab.module.data.common.utils.HttpRequest;
import com.iailab.module.data.video.config.VideoConfiguration;
import com.iailab.module.data.video.dahua.frame.DHCapturePictureFrame;
import com.iailab.netsdk.common.Res;
import com.iailab.netsdk.demo.module.LoginModule;
@@ -13,7 +12,6 @@
import com.sun.jna.ptr.IntByReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import java.awt.*;
import java.io.File;
@@ -26,10 +24,6 @@
 */
public class DHCapturePictureClient {
    private Logger logger = LoggerFactory.getLogger(getClass());
//    private String url = "http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback";
//    @Value("${video.dahua.callback.url}")
//    public String url;
    // 登陆句柄
    public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE;
@@ -299,11 +293,12 @@
                return false;
            } else {
                System.out.println("CLIENT_CapturePicture success");
                // 回调处理图片
                // 处理图片
                Map<String, String> params = new HashMap<>();
                params.put("strFileName", strFileName);
                params.put("cmdSerial", cmdSerial);
                HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", "");
                params.put("brand", "DH");
                VideoConfiguration.staticCameraService.dealCapture(params);
            }
            return true;
        } catch (Exception ex) {