diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java index 2f800d9..4a59622 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java @@ -60,4 +60,6 @@ public interface AlarmConstants { Integer STOP = 61; List START_STOP_ALARAM = Arrays.asList(START,STOP); String VIDEO_SCHEDULED_TASK= "VideoScheduledTask"; + + List HZ3000_TYPES = Arrays.asList("0","1","2","3","4","5","6","7","8","9","10","11","12"); } diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java index 80f0106..925293b 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java @@ -30,5 +30,5 @@ public class TabulateLevelVo { private Integer soeType; @ApiModelProperty(value = "告警类型") - private List types; + private String types; } \ No newline at end of file diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java index 2893717..7e924b5 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java @@ -45,14 +45,14 @@ public class AlarmTabulateController extends BladeController { } @GetMapping("/video") - @ApiOperationSupport(order = 2) + @ApiOperationSupport(order = 3) @ApiOperation(value = "视频告警(海康)", notes = "视频告警(海康)") public R> video(TabulateLevelVo param, Query query) { return R.data(tabulateService.video(Condition.getPage(query), param)); } @GetMapping("/hz3000") - @ApiOperationSupport(order = 2) + @ApiOperationSupport(order = 4) @ApiOperation(value = "hz3000告警", notes = "hz3000告警") public R> hz3000(TabulateLevelVo param, Query query) { return R.data(tabulateService.hz3000(Condition.getPage(query), param)); diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java index 3d33f69..8a1df91 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java @@ -1,6 +1,7 @@ package com.hnac.hzims.alarm.tabulate.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.alarm.config.constants.AlarmConstants; import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; @@ -16,17 +17,12 @@ import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; -import org.springblade.core.tool.utils.CollectionUtil; -import org.springblade.core.tool.utils.DateUtil; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.core.tool.utils.StringUtil; +import org.springblade.core.tool.utils.*; import org.springframework.stereotype.Service; +import java.lang.reflect.Array; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author ysj @@ -122,8 +118,10 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService { query.setPage((int) page.getCurrent()); query.setLimit((int) page.getSize()); query.setStationIds(Collections.singletonList(param.getProjectId())); - if(CollectionUtil.isNotEmpty(param.getTypes())){ - query.setTypes(param.getTypes()); + if(StringUtil.isNotBlank(param.getTypes())){ + query.setTypes(Func.toStrList(",",param.getTypes())); + }else { + query.setTypes(AlarmConstants.HZ3000_TYPES); } if(StringUtil.isNotBlank(param.getStartTime())){ query.setBeginTime(LocalDateTime.parse(param.getStartTime(),DateUtil.DATETIME_FORMATTER));