2023-11-07 09:32:12 +08:00
|
|
|
|
package com.zcloud.controller.keyProjects;
|
|
|
|
|
|
|
|
|
|
import com.zcloud.controller.base.BaseController;
|
|
|
|
|
import com.zcloud.entity.Page;
|
|
|
|
|
import com.zcloud.entity.PageData;
|
|
|
|
|
import com.zcloud.service.keyProjects.PlatformvideomanagementService;
|
|
|
|
|
import com.zcloud.util.Tools;
|
|
|
|
|
import com.zcloud.util.hk.HKUtil;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
2023-12-27 11:12:51 +08:00
|
|
|
|
import org.springframework.util.ObjectUtils;
|
2023-11-07 09:32:12 +08:00
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 说明:平台视频管理
|
|
|
|
|
* 作者:luoxiaobao
|
|
|
|
|
* 时间:2023-07-21
|
|
|
|
|
* 官网:www.zcloudchina.com
|
|
|
|
|
*/
|
|
|
|
|
@Controller
|
|
|
|
|
@RequestMapping("/platformvideomanagement")
|
|
|
|
|
public class PlatformvideomanagementController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private PlatformvideomanagementService platformvideomanagementService;
|
|
|
|
|
|
|
|
|
|
/**新增
|
|
|
|
|
* @param
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/add")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object add() throws Exception{
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
String errInfo = "success";
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
pd.put("PLATFORMVIDEOMANAGEMENT_ID", this.get32UUID()); //主键
|
|
|
|
|
platformvideomanagementService.save(pd);
|
|
|
|
|
map.put("result", errInfo);
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**列表
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/getHlsPath")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object getHlsPath() throws Exception{
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
PageData pd =this.getPageData();
|
|
|
|
|
map = HKUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"hls");
|
2023-12-27 11:12:51 +08:00
|
|
|
|
if(!ObjectUtils.isEmpty(map)){
|
|
|
|
|
map = new HashMap<String,Object>();
|
|
|
|
|
}
|
2023-11-07 09:32:12 +08:00
|
|
|
|
map.put("result", "success");
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**列表
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/getRtspPath")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object getRtspPath() throws Exception{
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
PageData pd =this.getPageData();
|
|
|
|
|
map = HKUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"rtsp");
|
2023-12-27 11:12:51 +08:00
|
|
|
|
if(!ObjectUtils.isEmpty(map)){
|
|
|
|
|
map = new HashMap<String,Object>();
|
|
|
|
|
}
|
2023-11-07 09:32:12 +08:00
|
|
|
|
map.put("result", "success");
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**列表
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/platformList")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object platformList() throws Exception{
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
PageData pd =this.getPageData();
|
|
|
|
|
map = HKUtil.cameraSearch(pd);
|
2023-12-27 11:12:51 +08:00
|
|
|
|
if(!ObjectUtils.isEmpty(map)){
|
|
|
|
|
map = new HashMap<String,Object>();
|
|
|
|
|
}
|
2023-11-07 09:32:12 +08:00
|
|
|
|
map.put("result", "success");
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**列表
|
|
|
|
|
* @param page
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/list")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object list(Page page) throws Exception{
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
String errInfo = "success";
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
|
|
|
|
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
|
|
|
|
page.setPd(pd);
|
|
|
|
|
List<PageData> varList = platformvideomanagementService.list(page); //列出Platformvideomanagement列表
|
|
|
|
|
map.put("varList", varList);
|
|
|
|
|
map.put("page", page);
|
|
|
|
|
map.put("result", errInfo);
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**列表
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/listAll")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object listAll() throws Exception{
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
String errInfo = "success";
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
List<PageData> varList = platformvideomanagementService.listAll(pd); //列出Platformvideomanagement列表
|
|
|
|
|
map.put("varList", varList);
|
|
|
|
|
map.put("result", errInfo);
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|