|
@@ -169,13 +169,13 @@ public class MsgAlarmController extends BaseController {
|
|
public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
msgAlarmVo = (MsgAlarmVo) dataScoreUtil.setDataScore(getUserId(), msgAlarmVo);
|
|
msgAlarmVo = (MsgAlarmVo) dataScoreUtil.setDataScore(getUserId(), msgAlarmVo);
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getAlarmMile())) {
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getAlarmMile())) {
|
|
- msgAlarmVo.setAlarmMile(msgAlarmVo.getAlarmMile() * 1000);
|
|
|
|
|
|
+ msgAlarmVo.setAlarmMile(msgAlarmVo.getAlarmMile() * 1000);
|
|
}
|
|
}
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getBeginMile())) {
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getBeginMile())) {
|
|
- msgAlarmVo.setBeginMile(msgAlarmVo.getBeginMile() * 1000);
|
|
|
|
|
|
+ msgAlarmVo.setBeginMile(msgAlarmVo.getBeginMile() * 1000);
|
|
}
|
|
}
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getEndMile())) {
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getEndMile())) {
|
|
- msgAlarmVo.setEndMile(msgAlarmVo.getEndMile() * 1000);
|
|
|
|
|
|
+ msgAlarmVo.setEndMile(msgAlarmVo.getEndMile() * 1000);
|
|
}
|
|
}
|
|
IPage<MsgAlarm> page = msgAlarmService.queryPage(msgAlarmVo);
|
|
IPage<MsgAlarm> page = msgAlarmService.queryPage(msgAlarmVo);
|
|
page.setTotal(page.getTotal());
|
|
page.setTotal(page.getTotal());
|
|
@@ -222,7 +222,7 @@ public class MsgAlarmController extends BaseController {
|
|
}
|
|
}
|
|
return AjaxResult.success(page);
|
|
return AjaxResult.success(page);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 导出报警消息
|
|
* 导出报警消息
|
|
*
|
|
*
|
|
@@ -317,6 +317,9 @@ public class MsgAlarmController extends BaseController {
|
|
msgAlarmResp.setBeginMile(endMile);
|
|
msgAlarmResp.setBeginMile(endMile);
|
|
String mile = AppendUtils.stringAppend(baseCameraManagement.getInstallMile());
|
|
String mile = AppendUtils.stringAppend(baseCameraManagement.getInstallMile());
|
|
msgAlarmResp.setAlarmMile(mile);
|
|
msgAlarmResp.setAlarmMile(mile);
|
|
|
|
+ if (!ObjectUtils.isEmpty(msgAlarm.getReleasedType())) {
|
|
|
|
+ msgAlarmResp.setReleasedTypeName(msgAlarmResp.getReleasedType() == 1 ? "真实报警" : "误报警");
|
|
|
|
+ }
|
|
msgAlarmResp.setInstallLongitude(baseCameraManagement.getInstallLongitude() + "," + baseCameraManagement.getInstallLatitude());
|
|
msgAlarmResp.setInstallLongitude(baseCameraManagement.getInstallLongitude() + "," + baseCameraManagement.getInstallLatitude());
|
|
return AjaxResult.success(msgAlarmResp);
|
|
return AjaxResult.success(msgAlarmResp);
|
|
} else {
|
|
} else {
|
|
@@ -373,8 +376,8 @@ public class MsgAlarmController extends BaseController {
|
|
@ApiOperation("根据报警信息ID解除报警")
|
|
@ApiOperation("根据报警信息ID解除报警")
|
|
@Log(title = "报警信息管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "报警信息管理", businessType = BusinessType.UPDATE)
|
|
public AjaxResult updateIsLock(@RequestParam(value = "id") Long id,
|
|
public AjaxResult updateIsLock(@RequestParam(value = "id") Long id,
|
|
- @RequestParam(value = "releasedType",required = false) Integer releasedType,
|
|
|
|
- @RequestParam(value = "releasedReason",required = false) String releasedReason) {
|
|
|
|
|
|
+ @RequestParam(value = "releasedType", required = false) Integer releasedType,
|
|
|
|
+ @RequestParam(value = "releasedReason", required = false) String releasedReason) {
|
|
MsgAlarm msgAlarm = msgAlarmService.getById(id);
|
|
MsgAlarm msgAlarm = msgAlarmService.getById(id);
|
|
msgAlarm.setIsLock(1);
|
|
msgAlarm.setIsLock(1);
|
|
msgAlarm.setUpdateBy(getUserId());
|
|
msgAlarm.setUpdateBy(getUserId());
|
|
@@ -509,30 +512,30 @@ public class MsgAlarmController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
List<Integer> list1 = new ArrayList<>();
|
|
List<Integer> list1 = new ArrayList<>();
|
|
- if (!CollectionUtils.isEmpty(list) && Objects.nonNull(list.get(0))) {
|
|
|
|
- list.forEach(l -> {
|
|
|
|
- list1.add(l.getMonthsta());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- AlarmStatisticMonthDto dto;
|
|
|
|
- for (int i = 0; i < numbs.size(); i++) {
|
|
|
|
- if (!list1.contains(numbs.get(i))) {
|
|
|
|
- dto = new AlarmStatisticMonthDto();
|
|
|
|
- dto.setMonthsta(numbs.get(i));
|
|
|
|
- dto.setFrequency(0);
|
|
|
|
- list.add(dto);
|
|
|
|
- }
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(list) && Objects.nonNull(list.get(0))) {
|
|
|
|
+ list.forEach(l -> {
|
|
|
|
+ list1.add(l.getMonthsta());
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ AlarmStatisticMonthDto dto;
|
|
|
|
+ for (int i = 0; i < numbs.size(); i++) {
|
|
|
|
+ if (!list1.contains(numbs.get(i))) {
|
|
|
|
+ dto = new AlarmStatisticMonthDto();
|
|
|
|
+ dto.setMonthsta(numbs.get(i));
|
|
|
|
+ dto.setFrequency(0);
|
|
|
|
+ list.add(dto);
|
|
}
|
|
}
|
|
- if (!CollectionUtils.isEmpty(list) && Objects.nonNull(list.get(0))) {
|
|
|
|
- Collections.sort(list, new Comparator<AlarmStatisticMonthDto>() {
|
|
|
|
- @Override
|
|
|
|
- public int compare(AlarmStatisticMonthDto o1, AlarmStatisticMonthDto o2) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!CollectionUtils.isEmpty(list) && Objects.nonNull(list.get(0))) {
|
|
|
|
+ Collections.sort(list, new Comparator<AlarmStatisticMonthDto>() {
|
|
|
|
+ @Override
|
|
|
|
+ public int compare(AlarmStatisticMonthDto o1, AlarmStatisticMonthDto o2) {
|
|
|
|
|
|
- return o1.getMonthsta().compareTo(o2.getMonthsta());
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- return AjaxResult.success(list);
|
|
|
|
|
|
+ return o1.getMonthsta().compareTo(o2.getMonthsta());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|