| 
					
				 | 
			
			
				@@ -4,12 +4,14 @@ package com.ozs.web.controller.accountmanagment; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.metadata.IPage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.common.annotation.Log; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.config.BaseConfig; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.controller.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.AjaxResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.entity.SysDept; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.entity.SysUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.model.LoginUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.common.enums.BusinessType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.exception.base.BaseException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.utils.ApiTokenUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.utils.AppendUtils; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -103,6 +105,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "相机台账管理") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/selectCameraAll") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.SELECT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult selectCameraAll() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BaseCameraManagementVo baseCameraManagementVo = (BaseCameraManagementVo) dataScoreUtil.setDataScore(getUserId(), new BaseCameraManagementVo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<BaseCameraManagementHomeVo> baseCameraManagements = baseCameraManagementService.selectCameraAll(baseCameraManagementVo); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -111,6 +114,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping(value = "/homeGetInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("根据相机ID、是否解除 获取相机信息、未解除信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.SELECT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult homeGetInfo(@RequestBody BaseCameraManagementHomeVo baseCameraManagementHomeVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Integer isLock = baseCameraManagementHomeVo.getIsLock(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Long id = baseCameraManagementHomeVo.getId(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -172,6 +176,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "相机台账管理分页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/list") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.SELECT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult selectBaseAccountManagement(@RequestBody BaseCameraManagementVo baseCameraManagementVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         baseCameraManagementVo = (BaseCameraManagementVo) dataScoreUtil.setDataScore(getUserId(), baseCameraManagementVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         IPage<BaseCameraManagement> page = baseCameraManagementService.queryPage(baseCameraManagementVo); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -209,6 +214,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @DeleteMapping("/{accountManagementIds}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("删除相机台账管理信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.DELETE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult removeAccountManagement(@PathVariable List<Long> accountManagementIds) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseDeviceDynamicManagement> queryWrapper = new LambdaQueryWrapper<BaseDeviceDynamicManagement>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -232,6 +238,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/saveAccountManagement") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("新增相机台账管理信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.INSERT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult saveAccountManagement(@RequestBody BaseCameraManagement baseCameraManagement) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String idempotence = idempotenceUtils.getIdempotence(baseCameraManagement.getCameraCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (StringUtils.isNotEmpty(idempotence)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -303,6 +310,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PutMapping("/editAccountManagement") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("修改相机台账管理信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.UPDATE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult editAccountManagement(@RequestBody BaseCameraManagement baseCameraManagement) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!ObjectUtils.isEmpty(baseCameraManagement.getCameraCode())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -345,6 +353,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping(value = "/{id}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("根据相机ID获取相机台账管理信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.MESSAGE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult getInfo(@PathVariable Long id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BaseCameraManagement baseCameraManagement = baseCameraManagementService.getById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseRailwayManagement> queryWrapper = new LambdaQueryWrapper<BaseRailwayManagement>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -366,6 +375,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/getDate/{cameraCode}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("视频上方显示的数据") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult getDate(@PathVariable String cameraCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!ObjectUtils.isEmpty(cameraCode)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -419,6 +429,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("相机台账管理信息导入") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/importBaseAccountManagement") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.IMPORT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult importBaseAccountManagement(MultipartFile file, boolean updateSupport) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ExcelUtil<BaseCameraManagementVos> util = new ExcelUtil<BaseCameraManagementVos>(BaseCameraManagementVos.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<BaseCameraManagementVos> accountManageList = util.importExcel(file.getInputStream()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -433,6 +444,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("导出相机台账管理信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/exportBaseAccountManagement") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.EXPORT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void exportBaseAccountManagement(HttpServletResponse response, @RequestBody BaseCameraManagementVo baseAccountManagementVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!ObjectUtils.isEmpty(baseAccountManagementVo.getLineDir())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -474,6 +486,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("相机台账管理信息模板下载") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/downloaExcel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void downloadZip(HttpServletResponse response) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             InputStream resourceAsStream = this.getClass().getResourceAsStream("/template/baseCameraManagement.xlsx"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -487,6 +500,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("查询录像") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/api/records/{cameraCode}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult apiRecords(@PathVariable @NotNull(message = "相机编码不能为空") String cameraCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         lw.eq(BaseCameraManagement::getCameraCode, cameraCode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -499,6 +513,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("查询录像") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/api/records/{cameraCode}/{flay}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult apiRecords(@PathVariable @NotNull(message = "相机编码不能为空") String cameraCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @PathVariable @NotNull(message = "条件不能为空") boolean flay) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -512,6 +527,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("批量查询录像") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/api/recordsList") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult apiRecordsList(@RequestBody 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @NotNull(message = "相机编码不能为空") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              List<String> cameraCodes) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -551,6 +567,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("播放回放") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/api/play") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult play(@Validated @RequestBody BaseCameraResVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         lw.eq(BaseCameraManagement::getCameraCode, vo.getCameraCode()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -568,6 +585,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("视频服务设备数量") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/totalNumberOfDevices") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult totalNumberOfDevices() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         long count = baseCameraManagementService.count(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return success(count); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -583,6 +601,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("视频服务树形结构") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/cameraTree") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult cameraTree(@RequestParam(value = "name", required = false) String name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "lineDir", required = false) Integer lineDir, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "beginMile", required = false) String mils) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -635,6 +654,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("关闭视频录制") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/endRecording/{id}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult endRecording(@PathVariable Long id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BaseCameraManagement baseCameraManagement = baseCameraManagementService.getById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         log.info("endRecording------------" + baseCameraManagement.getTaskId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -654,6 +674,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("开启视频录制") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/startRecording/{id}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.OTHER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult startRecording(@PathVariable Long id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BaseCameraManagement baseCameraManagement = baseCameraManagementService.getById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         log.info("startRecording------CameraCode------" + baseCameraManagement.getCameraCode()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -677,6 +698,7 @@ public class BaseCameraManagementController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping(value = "/getAlarm/{cameraCode}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("根据视频ID获取详细信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "相机台账管理", businessType = BusinessType.MESSAGE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult getAlarm(@PathVariable String cameraCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LambdaQueryWrapper<MsgAlarm> queryWrapper = new LambdaQueryWrapper<MsgAlarm>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!ObjectUtils.isEmpty(cameraCode)) { 
			 |