|
|
@@ -4,6 +4,7 @@ package com.xunmei.iot.controller;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
+import com.xunmei.common.security.utils.SecurityUtils;
|
|
|
import com.xunmei.iot.dto.dvrDisk.DvrDiskAppPageDto;
|
|
|
import com.xunmei.iot.dto.videoDiagnosis.VideoDiagnosisAppPageDto;
|
|
|
import com.xunmei.iot.dto.videoDiagnosis.VideoDiagnosisWebPageDto;
|
|
|
@@ -17,6 +18,7 @@ import com.xunmei.iot.vo.videoDiagnosis.VideoDiagnosisWebVo;
|
|
|
import com.xunmei.system.api.RemoteFileService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.jaxb.SpringDataJaxb;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -54,24 +56,41 @@ public class SmartOprationController {
|
|
|
// }
|
|
|
|
|
|
@ApiOperation("智能运维页面Tab页角标数量")
|
|
|
- @GetMapping({"/app/badge/{orgId}"})
|
|
|
- AjaxResult tabBadge(@PathVariable("orgId") Long orgId) {
|
|
|
+ @PostMapping({"/app/tab/badge"})
|
|
|
+ AjaxResult tabBadge(@RequestBody VideoDiagnosisAppPageDto pageDto) {
|
|
|
AjaxResult ajaxResult = AjaxResult.success();
|
|
|
// 录像丢失
|
|
|
- Integer videoCheckBadge = this.videoDiagnosisService.appVideoLoseBadge(orgId);
|
|
|
+ Integer videoCheckBadge =0;
|
|
|
+ if(pageDto.getCheckSub())
|
|
|
+ {
|
|
|
+ videoCheckBadge= this.videoDiagnosisService.appSelectVideoLoseSelfAndSubOrgBadge(pageDto.getOrgId());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ videoCheckBadge= this.videoDiagnosisService.appVideoLoseBadge(pageDto.getOrgId());
|
|
|
+ }
|
|
|
+
|
|
|
if(ObjectUtil.isNotNull(videoCheckBadge) && videoCheckBadge>0){
|
|
|
ajaxResult.put("videoCheckBadge", videoCheckBadge);
|
|
|
}
|
|
|
|
|
|
// 视频质量
|
|
|
- Integer videoDiagnosisBadge = this.videoDiagnosisService.appVideoQualityBadge(orgId);
|
|
|
+ Integer videoDiagnosisBadge = 0;
|
|
|
+ if(pageDto.getCheckSub())
|
|
|
+ {
|
|
|
+ videoDiagnosisBadge=this.videoDiagnosisService.appSelectVideoQualitySelfAndSubOrgBadge(pageDto.getOrgId());
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ videoDiagnosisBadge=this.videoDiagnosisService.appVideoQualityBadge(pageDto.getOrgId());
|
|
|
+ }
|
|
|
+
|
|
|
if(ObjectUtil.isNotNull(videoDiagnosisBadge) && videoDiagnosisBadge>0)
|
|
|
{
|
|
|
ajaxResult.put("videoDiagnosisBadge", videoDiagnosisBadge);
|
|
|
}
|
|
|
|
|
|
// 硬盘
|
|
|
- Integer dvrDiskBadge = this.dvrDiskService.badge(orgId);
|
|
|
+ Integer dvrDiskBadge = this.dvrDiskService.badge(pageDto.getOrgId(),pageDto.getCheckSub());
|
|
|
if(ObjectUtil.isNotNull(dvrDiskBadge) && dvrDiskBadge>0)
|
|
|
{
|
|
|
ajaxResult.put("dvrDiskBadge", dvrDiskBadge);
|
|
|
@@ -84,22 +103,23 @@ public class SmartOprationController {
|
|
|
@GetMapping({"/app/page/badge/{orgId}"})
|
|
|
AjaxResult pageBadge(@PathVariable("orgId") Long orgId) {
|
|
|
AjaxResult ajaxResult = AjaxResult.success();
|
|
|
+
|
|
|
Integer totalBadge=0;
|
|
|
// 录像丢失
|
|
|
- Integer videoCheckBadge = this.videoDiagnosisService.appVideoLoseBadge(orgId);
|
|
|
+ Integer videoCheckBadge = this.videoDiagnosisService.appSelectVideoLoseSelfAndSubOrgBadge(orgId);
|
|
|
if(ObjectUtil.isNotNull(videoCheckBadge) && videoCheckBadge>0){
|
|
|
totalBadge+=videoCheckBadge;
|
|
|
}
|
|
|
|
|
|
// 视频质量
|
|
|
- Integer videoDiagnosisBadge = this.videoDiagnosisService.appVideoQualityBadge(orgId);
|
|
|
+ Integer videoDiagnosisBadge = this.videoDiagnosisService.appSelectVideoQualitySelfAndSubOrgBadge(orgId);
|
|
|
if(ObjectUtil.isNotNull(videoDiagnosisBadge) && videoDiagnosisBadge>0)
|
|
|
{
|
|
|
totalBadge+=videoDiagnosisBadge;
|
|
|
}
|
|
|
|
|
|
// 硬盘
|
|
|
- Integer dvrDiskBadge = this.dvrDiskService.badge(orgId);
|
|
|
+ Integer dvrDiskBadge = this.dvrDiskService.badge(orgId,true);
|
|
|
if(ObjectUtil.isNotNull(dvrDiskBadge) && dvrDiskBadge>0)
|
|
|
{
|
|
|
totalBadge+=dvrDiskBadge;
|