98 lines
2.4 KiB
Plaintext
98 lines
2.4 KiB
Plaintext
|
|
package com.sercurityControl.proteam.controller;
|
||
|
|
|
||
|
|
import com.securityControl.common.core.web.controller.BaseController;
|
||
|
|
import com.securityControl.common.core.web.page.TableDataInfo;
|
||
|
|
import com.sercurityControl.proteam.domain.TEquipment;
|
||
|
|
import com.sercurityControl.proteam.service.TEquipmentService;
|
||
|
|
import com.sercurityControl.proteam.util.VideoUtil;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
import com.securityControl.common.core.web.domain.AjaxResult;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 第三方设备管理(TEquipment)表控制层
|
||
|
|
*
|
||
|
|
* @author makejava
|
||
|
|
* @since 2023-03-01 14:16:24
|
||
|
|
*/
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/tEquipment/")
|
||
|
|
public class TEquipmentController extends BaseController {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private TEquipmentService tEquipmentService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private VideoUtil videoUtil;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 分页查询
|
||
|
|
*
|
||
|
|
* @param tEquipment 筛选条件
|
||
|
|
* @return 查询结果
|
||
|
|
*/
|
||
|
|
@GetMapping("queryByPage")
|
||
|
|
public TableDataInfo queryByPage(TEquipment tEquipment) {
|
||
|
|
startPage();
|
||
|
|
return getDataTable(tEquipmentService.queryByPage(tEquipment));
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 新增数据
|
||
|
|
*
|
||
|
|
* @param tEquipment 实体
|
||
|
|
* @return 新增结果
|
||
|
|
*/
|
||
|
|
@PostMapping("add")
|
||
|
|
public AjaxResult add(TEquipment tEquipment) {
|
||
|
|
tEquipmentService.insert(tEquipment);
|
||
|
|
return success();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 编辑数据
|
||
|
|
*
|
||
|
|
* @param tEquipment 实体
|
||
|
|
* @return 编辑结果
|
||
|
|
*/
|
||
|
|
@PostMapping("edit")
|
||
|
|
public AjaxResult edit(TEquipment tEquipment) {
|
||
|
|
tEquipmentService.update(tEquipment);
|
||
|
|
return success();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 同步统一视频平台设备
|
||
|
|
*
|
||
|
|
* @return 查询结果
|
||
|
|
*/
|
||
|
|
@GetMapping("asyncDeviceList")
|
||
|
|
public AjaxResult asyncDeviceList() {
|
||
|
|
// videoUtil.asyncDeviceList();
|
||
|
|
return success();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 单次抓图
|
||
|
|
*/
|
||
|
|
@GetMapping("catchPicture")
|
||
|
|
public AjaxResult catchPicture() {
|
||
|
|
//videoUtil.catchPicture();
|
||
|
|
return success();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 下载图片并交给人工智能平台处理
|
||
|
|
*/
|
||
|
|
@GetMapping("downloadPic")
|
||
|
|
public AjaxResult downloadPic() {
|
||
|
|
// videoUtil.downloadPic();
|
||
|
|
return success();
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|