|
@@ -40,7 +40,7 @@ import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
- * 台账管理表 前端控制器
|
|
|
|
|
|
+ * 相机台账管理表 前端控制器
|
|
* </p>
|
|
* </p>
|
|
*
|
|
*
|
|
* @author ozs
|
|
* @author ozs
|
|
@@ -54,8 +54,6 @@ public class BaseCameraManagementController extends BaseController {
|
|
BaseCameraManagementService baseCameraManagementService;
|
|
BaseCameraManagementService baseCameraManagementService;
|
|
@Resource
|
|
@Resource
|
|
BaseDeviceDynamicManagementService baseDeviceDynamicManagementService;
|
|
BaseDeviceDynamicManagementService baseDeviceDynamicManagementService;
|
|
- @Resource
|
|
|
|
- BaseRailwayManagementService baseLineManagementService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 相机台账管理分页
|
|
* 相机台账管理分页
|
|
@@ -87,13 +85,13 @@ public class BaseCameraManagementController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 删除相机信息
|
|
|
|
|
|
+ * 删除相机台账管理信息
|
|
*
|
|
*
|
|
* @param accountManagementIds
|
|
* @param accountManagementIds
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@DeleteMapping("/{accountManagementIds}")
|
|
@DeleteMapping("/{accountManagementIds}")
|
|
- @ApiOperation("删除相机信息")
|
|
|
|
|
|
+ @ApiOperation("删除相机台账管理信息")
|
|
public AjaxResult removeAccountManagement(@PathVariable List<Long> accountManagementIds) {
|
|
public AjaxResult removeAccountManagement(@PathVariable List<Long> accountManagementIds) {
|
|
if (baseCameraManagementService.removeByIds(accountManagementIds)) {
|
|
if (baseCameraManagementService.removeByIds(accountManagementIds)) {
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
@@ -102,13 +100,13 @@ public class BaseCameraManagementController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 新增相机信息
|
|
|
|
|
|
+ * 新增相机台账管理信息
|
|
*
|
|
*
|
|
* @param baseCameraManagement
|
|
* @param baseCameraManagement
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("/saveAccountManagement")
|
|
@PostMapping("/saveAccountManagement")
|
|
- @ApiOperation("新增相机信息")
|
|
|
|
|
|
+ @ApiOperation("新增相机台账管理信息")
|
|
public AjaxResult saveDistributionModule(@RequestBody BaseCameraManagement baseCameraManagement) {
|
|
public AjaxResult saveDistributionModule(@RequestBody BaseCameraManagement baseCameraManagement) {
|
|
baseCameraManagement.setCreateBy(getUsername());
|
|
baseCameraManagement.setCreateBy(getUsername());
|
|
BaseDeviceDynamicManagement baseDynamicManagement = new BaseDeviceDynamicManagement();
|
|
BaseDeviceDynamicManagement baseDynamicManagement = new BaseDeviceDynamicManagement();
|
|
@@ -120,13 +118,13 @@ public class BaseCameraManagementController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 修改相机信息
|
|
|
|
|
|
+ * 修改相机台账管理信息
|
|
*
|
|
*
|
|
* @param baseCameraManagement
|
|
* @param baseCameraManagement
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PutMapping("/editAccountManagement")
|
|
@PutMapping("/editAccountManagement")
|
|
- @ApiOperation("修改相机信息")
|
|
|
|
|
|
+ @ApiOperation("修改相机台账管理信息")
|
|
public AjaxResult editAccountManagement(@RequestBody BaseCameraManagement baseCameraManagement) {
|
|
public AjaxResult editAccountManagement(@RequestBody BaseCameraManagement baseCameraManagement) {
|
|
baseCameraManagement.setUpdateBy(getUsername());
|
|
baseCameraManagement.setUpdateBy(getUsername());
|
|
if (baseCameraManagementService.updateById(baseCameraManagement)) {
|
|
if (baseCameraManagementService.updateById(baseCameraManagement)) {
|
|
@@ -135,10 +133,10 @@ public class BaseCameraManagementController extends BaseController {
|
|
return AjaxResult.error();
|
|
return AjaxResult.error();
|
|
}
|
|
}
|
|
|
|
|
|
- @GetMapping(value = "/{accountManagementId}")
|
|
|
|
- @ApiOperation("根据相机ID获取详细信息")
|
|
|
|
- public AjaxResult getInfo(@PathVariable Long accountManagementId) {
|
|
|
|
- return AjaxResult.success(baseCameraManagementService.getById(accountManagementId));
|
|
|
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
|
+ @ApiOperation("根据相机ID获取相机台账管理信息")
|
|
|
|
+ public AjaxResult getInfo(@PathVariable Long id) {
|
|
|
|
+ return AjaxResult.success(baseCameraManagementService.getById(id));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -149,7 +147,7 @@ public class BaseCameraManagementController extends BaseController {
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
- @ApiOperation("台账管理导入")
|
|
|
|
|
|
+ @ApiOperation("相机台账管理信息导入")
|
|
@PostMapping("/importBaseAccountManagement")
|
|
@PostMapping("/importBaseAccountManagement")
|
|
public AjaxResult importBaseAccountManagement(MultipartFile file, boolean updateSupport) throws Exception {
|
|
public AjaxResult importBaseAccountManagement(MultipartFile file, boolean updateSupport) throws Exception {
|
|
ExcelUtil<BaseCameraManagement> util = new ExcelUtil<BaseCameraManagement>(BaseCameraManagement.class);
|
|
ExcelUtil<BaseCameraManagement> util = new ExcelUtil<BaseCameraManagement>(BaseCameraManagement.class);
|
|
@@ -163,7 +161,7 @@ public class BaseCameraManagementController extends BaseController {
|
|
*
|
|
*
|
|
* @param response
|
|
* @param response
|
|
*/
|
|
*/
|
|
- @ApiOperation("导出台账管理")
|
|
|
|
|
|
+ @ApiOperation("导出相机台账管理信息")
|
|
@PostMapping("/exportBaseAccountManagement")
|
|
@PostMapping("/exportBaseAccountManagement")
|
|
public void exportBaseAccountManagement(HttpServletResponse response, @RequestBody BaseCameraManagementVo baseAccountManagementVo) {
|
|
public void exportBaseAccountManagement(HttpServletResponse response, @RequestBody BaseCameraManagementVo baseAccountManagementVo) {
|
|
LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
@@ -188,13 +186,13 @@ public class BaseCameraManagementController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- @ApiOperation("模板下载")
|
|
|
|
|
|
+ @ApiOperation("相机台账管理信息模板下载")
|
|
@GetMapping("/downloaExcel")
|
|
@GetMapping("/downloaExcel")
|
|
public void downloadZip(HttpServletResponse response) {
|
|
public void downloadZip(HttpServletResponse response) {
|
|
try {
|
|
try {
|
|
InputStream resourceAsStream = this.getClass().getResourceAsStream("/template/provisionalPlan.xlsx");
|
|
InputStream resourceAsStream = this.getClass().getResourceAsStream("/template/provisionalPlan.xlsx");
|
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
- FileUtils.setAttachmentResponseHeader(response, "临时计划导入模板.xlsx");
|
|
|
|
|
|
+ FileUtils.setAttachmentResponseHeader(response, "相机台账管理信息模板.xlsx");
|
|
FileUtils.writeBytesByInput(resourceAsStream, response.getOutputStream());
|
|
FileUtils.writeBytesByInput(resourceAsStream, response.getOutputStream());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("下载文件失败", e);
|
|
log.error("下载文件失败", e);
|
|
@@ -202,18 +200,18 @@ public class BaseCameraManagementController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("查询录像")
|
|
@ApiOperation("查询录像")
|
|
- @GetMapping("/api/records")
|
|
|
|
- public AjaxResult apiRecords() {
|
|
|
|
- String param = "id=34020000001320000002&channel=34020000001320000002";
|
|
|
|
|
|
+ @GetMapping("/api/records/{cameraCode}/{channel}")
|
|
|
|
+ public AjaxResult apiRecords(@PathVariable String cameraCode,@PathVariable String channel) {
|
|
|
|
+ String param = "id="+cameraCode+"&channel="+channel;
|
|
String s = HttpUtils.sendGet("http://47.106.159.135:8554/gb28181/api/records", param);
|
|
String s = HttpUtils.sendGet("http://47.106.159.135:8554/gb28181/api/records", param);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
return success(HttpUtils.sendGet("http://47.106.159.135:8554/gb28181/api/records", param));
|
|
return success(HttpUtils.sendGet("http://47.106.159.135:8554/gb28181/api/records", param));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("播放回放")
|
|
@ApiOperation("播放回放")
|
|
- @GetMapping("/api/invite")
|
|
|
|
- public AjaxResult apiInvite() {
|
|
|
|
- String param = "id=34020000001320000002&channel=34020000001320000002&startTime=1677230469&endTime=1677230513";
|
|
|
|
|
|
+ @GetMapping("/api/invite/{cameraCode}/{channel}/{startTime}/{endTime}")
|
|
|
|
+ public AjaxResult apiInvite(@PathVariable String cameraCode,@PathVariable String channel,@PathVariable String startTime,@PathVariable String endTime) {
|
|
|
|
+ String param = "id="+cameraCode+"&channel="+channel+"&startTime="+startTime+"&endTime="+endTime;
|
|
return success(HttpUtils.sendGet("http://47.106.159.135:8554/gb28181/api/invite/", param));
|
|
return success(HttpUtils.sendGet("http://47.106.159.135:8554/gb28181/api/invite/", param));
|
|
}
|
|
}
|
|
|
|
|