hexiao 2 роки тому
батько
коміт
876b769532

+ 4 - 1
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseCameraManagementController.java

@@ -12,6 +12,7 @@ import com.ozs.common.utils.StringUtils;
 import com.ozs.common.utils.file.FileUtils;
 import com.ozs.common.utils.http.HttpUtils;
 import com.ozs.common.utils.poi.ExcelUtil;
+import com.ozs.framework.config.ServerConfig;
 import com.ozs.service.entity.BaseCameraManagement;
 import com.ozs.service.entity.BaseDeviceDynamicManagement;
 import com.ozs.service.entity.vo.BaseCameraManagementVo;
@@ -64,6 +65,8 @@ public class BaseCameraManagementController extends BaseController {
     BaseDeviceDynamicManagementService baseDeviceDynamicManagementService;
     @Autowired
     private CaneraConfig caneraConfig;
+    @Autowired
+    private ServerConfig serverConfig;
 
     /**
      * 相机台账管理分页
@@ -230,7 +233,7 @@ public class BaseCameraManagementController extends BaseController {
         if (ObjectUtils.isEmpty(one)) {
             throw new BaseException("相机编号【" + vo.getCameraCode() + "】不存在");
         }
-        return success(CameraUtil.historyPlayList(one.getChannel(), vo.getStartTime(), vo.getEntTime()));
+        return success(serverConfig.getUrl() + CameraUtil.historyPlayList(one.getChannel(), vo.getStartTime(), vo.getEntTime()));
     }
 
 

+ 4 - 8
hazard-admin/src/main/java/com/ozs/web/core/util/CameraUtil.java

@@ -29,18 +29,15 @@ public class CameraUtil {
     private static String historyUrl;
     private static String ffmpegPath;
     private static String mappingUrl;
-    private static String surl;
     @Autowired
     private CaneraConfig caneraConfig;
-    @Autowired
-    private ServerConfig serverConfig;
+
 
     /**
      * 历史回放
      *
-     * @param channel
-     * @param startTm
-     * @param endTm
+     * @param fromVideoFileList
+     * @param ph
      * @return
      * @throws IOException
      */
@@ -48,7 +45,7 @@ public class CameraUtil {
         // 视频服务映射路径
         String NewfilePath = BaseConfig.getProfile() + ph;
         convetor(fromVideoFileList, NewfilePath);
-        return surl + "/profile" + ph;
+        return "/profile" + ph;
     }
 
     public static String getPlayFlv(String cameraCode, String channel) {
@@ -138,7 +135,6 @@ public class CameraUtil {
         mappingUrl = caneraConfig.getMappingUrl();
         historyUrl = caneraConfig.getHistoryUrl();
         ffmpegPath = caneraConfig.getFfmpegPath();
-        surl = serverConfig.getUrl();
     }
 
     /**