|
@@ -16,6 +16,7 @@ import com.ozs.service.entity.*;
|
|
import com.ozs.service.entity.vo.*;
|
|
import com.ozs.service.entity.vo.*;
|
|
import com.ozs.service.mapper.MsgAlarmMapper;
|
|
import com.ozs.service.mapper.MsgAlarmMapper;
|
|
import com.ozs.service.service.*;
|
|
import com.ozs.service.service.*;
|
|
|
|
+import com.ozs.system.mapper.SysDictDataMapper;
|
|
import com.ozs.system.service.DataScoreUtil;
|
|
import com.ozs.system.service.DataScoreUtil;
|
|
import com.ozs.system.service.ISysDeptService;
|
|
import com.ozs.system.service.ISysDeptService;
|
|
import com.ozs.system.service.ISysDictDataService;
|
|
import com.ozs.system.service.ISysDictDataService;
|
|
@@ -73,6 +74,9 @@ public class MsgAlarmController extends BaseController {
|
|
private BaseUserService baseUserService;
|
|
private BaseUserService baseUserService;
|
|
@Autowired
|
|
@Autowired
|
|
private ISysDeptService deptService;
|
|
private ISysDeptService deptService;
|
|
|
|
+ // 字典
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysDictDataMapper dictDataMapper;
|
|
|
|
|
|
/**
|
|
/**
|
|
* web更多消息-总数,已读数
|
|
* web更多消息-总数,已读数
|
|
@@ -142,6 +146,8 @@ public class MsgAlarmController extends BaseController {
|
|
@PostMapping("/listHome")
|
|
@PostMapping("/listHome")
|
|
@Log(title = "首页", businessType = BusinessType.SELECT)
|
|
@Log(title = "首页", businessType = BusinessType.SELECT)
|
|
public AjaxResult selectMsgAlarmHome(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
public AjaxResult selectMsgAlarmHome(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
|
|
+ AtomicReference<String> dictLabel= new AtomicReference<>();
|
|
|
|
+ List<SysDictData> sysAlarmType = dictDataMapper.selectDictDataByType("sys_alarm_type");
|
|
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);
|
|
@@ -194,9 +200,14 @@ public class MsgAlarmController extends BaseController {
|
|
if (!ObjectUtils.isEmpty(o.getReleasedType())) {
|
|
if (!ObjectUtils.isEmpty(o.getReleasedType())) {
|
|
o.setReleasedTypeName(o.getReleasedType() == 1 ? "实报" : "误报");
|
|
o.setReleasedTypeName(o.getReleasedType() == 1 ? "实报" : "误报");
|
|
}
|
|
}
|
|
|
|
+ for (SysDictData sysDictData : sysAlarmType) {
|
|
|
|
+ if (sysDictData.getDictValue().equals(o.getAlarmType().toString())) {
|
|
|
|
+ dictLabel.set(sysDictData.getDictLabel());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String[] split1 = o.getAlarmAttr().split(",");
|
|
String[] split1 = o.getAlarmAttr().split(",");
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
- "泥石流范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
|
|
|
|
+ dictLabel+"范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
o.setAlarmAttr(stringBuilder);
|
|
o.setAlarmAttr(stringBuilder);
|
|
return o;
|
|
return o;
|
|
@@ -215,6 +226,8 @@ public class MsgAlarmController extends BaseController {
|
|
@PostMapping("/list")
|
|
@PostMapping("/list")
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
|
|
+ AtomicReference<String> dictLabel= new AtomicReference<>();
|
|
|
|
+ List<SysDictData> sysAlarmType = dictDataMapper.selectDictDataByType("sys_alarm_type");
|
|
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);
|
|
@@ -270,9 +283,14 @@ public class MsgAlarmController extends BaseController {
|
|
if (!ObjectUtils.isEmpty(o.getReleasedType())) {
|
|
if (!ObjectUtils.isEmpty(o.getReleasedType())) {
|
|
o.setReleasedTypeName(o.getReleasedType() == 1 ? "实报" : "误报");
|
|
o.setReleasedTypeName(o.getReleasedType() == 1 ? "实报" : "误报");
|
|
}
|
|
}
|
|
|
|
+ for (SysDictData sysDictData : sysAlarmType) {
|
|
|
|
+ if (sysDictData.getDictValue().equals(o.getAlarmType().toString())) {
|
|
|
|
+ dictLabel.set(sysDictData.getDictLabel());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String[] split1 = o.getAlarmAttr().split(",");
|
|
String[] split1 = o.getAlarmAttr().split(",");
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
- "泥石流范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
|
|
|
|
+ dictLabel+"范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
o.setAlarmAttr(stringBuilder);
|
|
o.setAlarmAttr(stringBuilder);
|
|
return o;
|
|
return o;
|
|
@@ -290,6 +308,9 @@ public class MsgAlarmController extends BaseController {
|
|
@PostMapping("/exportMsgAlarm")
|
|
@PostMapping("/exportMsgAlarm")
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
public void exportMsgAlarm(HttpServletResponse response, @RequestBody MsgAlarmVo msgAlarmVo) {
|
|
public void exportMsgAlarm(HttpServletResponse response, @RequestBody MsgAlarmVo msgAlarmVo) {
|
|
|
|
+ //获取字典数据
|
|
|
|
+ String dictLabel=null;
|
|
|
|
+ List<SysDictData> sysAlarmType = dictDataMapper.selectDictDataByType("sys_alarm_type");
|
|
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);
|
|
@@ -367,8 +388,13 @@ public class MsgAlarmController extends BaseController {
|
|
SysDictData one = dictDataService.getOne(dict);
|
|
SysDictData one = dictDataService.getOne(dict);
|
|
msgAlarm.setAlarmTypeName(one.getDictLabel());
|
|
msgAlarm.setAlarmTypeName(one.getDictLabel());
|
|
String[] split1 = msgAlarm.getAlarmAttr().split(",");
|
|
String[] split1 = msgAlarm.getAlarmAttr().split(",");
|
|
|
|
+ for (SysDictData sysDictData : sysAlarmType) {
|
|
|
|
+ if (sysDictData.getDictValue().equals(msgAlarm.getAlarmType().toString())) {
|
|
|
|
+ dictLabel=sysDictData.getDictLabel();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
- "泥石流范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
|
|
|
|
+ dictLabel+"范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
msgAlarm.setAlarmAttr(stringBuilder);
|
|
msgAlarm.setAlarmAttr(stringBuilder);
|
|
}
|
|
}
|
|
@@ -423,6 +449,8 @@ public class MsgAlarmController extends BaseController {
|
|
@GetMapping(value = "/{id}")
|
|
@GetMapping(value = "/{id}")
|
|
@Log(title = "报警信息管理", businessType = BusinessType.MESSAGE)
|
|
@Log(title = "报警信息管理", businessType = BusinessType.MESSAGE)
|
|
public AjaxResult getInfo(@PathVariable Long id) {
|
|
public AjaxResult getInfo(@PathVariable Long id) {
|
|
|
|
+ String dictLabel=null;
|
|
|
|
+ List<SysDictData> sysAlarmType = dictDataMapper.selectDictDataByType("sys_alarm_type");
|
|
MsgAlarm msgAlarm = msgAlarmService.getById(id);
|
|
MsgAlarm msgAlarm = msgAlarmService.getById(id);
|
|
if (!ObjectUtils.isEmpty(msgAlarm)) {
|
|
if (!ObjectUtils.isEmpty(msgAlarm)) {
|
|
LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
@@ -461,8 +489,13 @@ public class MsgAlarmController extends BaseController {
|
|
SysDept sysDept = deptService.selectDeptById(baseCameraManagement.getDeptId());
|
|
SysDept sysDept = deptService.selectDeptById(baseCameraManagement.getDeptId());
|
|
msgAlarmResp.setDeptName(sysDept.getDeptName());
|
|
msgAlarmResp.setDeptName(sysDept.getDeptName());
|
|
String[] split1 = msgAlarm.getAlarmAttr().split(",");
|
|
String[] split1 = msgAlarm.getAlarmAttr().split(",");
|
|
|
|
+ for (SysDictData sysDictData : sysAlarmType) {
|
|
|
|
+ if (sysDictData.getDictValue().equals(msgAlarm.getAlarmType().toString())) {
|
|
|
|
+ dictLabel=sysDictData.getDictLabel();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
String stringBuilder = "画面,大小为" + split1[0] + "×" + split1[1] + "," +
|
|
- "泥石流范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
|
|
|
|
+ dictLabel+"范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
msgAlarmResp.setAlarmAttrName(stringBuilder);
|
|
msgAlarmResp.setAlarmAttrName(stringBuilder);
|
|
msgAlarmResp.setCardNum(baseCameraManagement.getCardNum());
|
|
msgAlarmResp.setCardNum(baseCameraManagement.getCardNum());
|
|
@@ -599,6 +632,8 @@ public class MsgAlarmController extends BaseController {
|
|
@Log(title = "报警信息管理", businessType = BusinessType.OTHER)
|
|
@Log(title = "报警信息管理", businessType = BusinessType.OTHER)
|
|
@PostMapping("/dataStatistic")
|
|
@PostMapping("/dataStatistic")
|
|
public AjaxResult dataStatistic(@RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
public AjaxResult dataStatistic(@RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
|
|
+ AtomicReference<String> dictLabel= new AtomicReference<>();
|
|
|
|
+ List<SysDictData> sysAlarmType = dictDataMapper.selectDictDataByType("sys_alarm_type");
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
IPage<AlarmStatisticVo> page = msgAlarmService.list(alarmStatisticResVo);
|
|
IPage<AlarmStatisticVo> page = msgAlarmService.list(alarmStatisticResVo);
|
|
page.setTotal(page.getTotal());
|
|
page.setTotal(page.getTotal());
|
|
@@ -632,9 +667,14 @@ public class MsgAlarmController extends BaseController {
|
|
o.setIsLockName(o.getIsLock() == 1 ? "已处置" : "未处置");
|
|
o.setIsLockName(o.getIsLock() == 1 ? "已处置" : "未处置");
|
|
}
|
|
}
|
|
if (!ObjectUtils.isEmpty(o.getAlarmAttr())) {
|
|
if (!ObjectUtils.isEmpty(o.getAlarmAttr())) {
|
|
|
|
+ for (SysDictData sysDictData : sysAlarmType) {
|
|
|
|
+ if (sysDictData.getDictValue().equals(o.getAlarmType().toString())) {
|
|
|
|
+ dictLabel.set(sysDictData.getDictLabel());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String[] split1 = o.getAlarmAttr().split(",");
|
|
String[] split1 = o.getAlarmAttr().split(",");
|
|
String stringBuilder = "画面大小" + split1[0] + "×" + split1[1] + "," +
|
|
String stringBuilder = "画面大小" + split1[0] + "×" + split1[1] + "," +
|
|
- "泥石流范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
|
|
|
|
+ dictLabel+"范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
o.setAlarmAttrString(stringBuilder);
|
|
o.setAlarmAttrString(stringBuilder);
|
|
}
|
|
}
|
|
@@ -713,6 +753,8 @@ public class MsgAlarmController extends BaseController {
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/exportDataStatistic")
|
|
@PostMapping("/exportDataStatistic")
|
|
public void exportDataStatistic(HttpServletResponse response, @RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
public void exportDataStatistic(HttpServletResponse response, @RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
|
|
+ final String[] dictLabel = {null};
|
|
|
|
+ List<SysDictData> sysAlarmType = dictDataMapper.selectDictDataByType("sys_alarm_type");
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
try {
|
|
try {
|
|
List<AlarmStatisticDto> list = msgAlarmService.exportExcel(alarmStatisticResVo);
|
|
List<AlarmStatisticDto> list = msgAlarmService.exportExcel(alarmStatisticResVo);
|
|
@@ -742,9 +784,14 @@ public class MsgAlarmController extends BaseController {
|
|
l.setIsLockName(l.getIsLock() == 1 ? "已处置" : "未处置");
|
|
l.setIsLockName(l.getIsLock() == 1 ? "已处置" : "未处置");
|
|
}
|
|
}
|
|
if (!ObjectUtils.isEmpty(l.getAlarmAttr())) {
|
|
if (!ObjectUtils.isEmpty(l.getAlarmAttr())) {
|
|
|
|
+ for (SysDictData sysDictData : sysAlarmType) {
|
|
|
|
+ if (sysDictData.getDictValue().equals(l.getAlarmType().toString())) {
|
|
|
|
+ dictLabel[0] =sysDictData.getDictLabel();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String[] split1 = l.getAlarmAttr().split(",");
|
|
String[] split1 = l.getAlarmAttr().split(",");
|
|
String stringBuilder = "画面大小" + split1[0] + "×" + split1[1] + "," +
|
|
String stringBuilder = "画面大小" + split1[0] + "×" + split1[1] + "," +
|
|
- "泥石流范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
|
|
|
|
+ dictLabel[0] +"范围为左上角坐标(" + split1[2] + "," + split1[3] + ")" +
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
"大小" + split1[4] + "×" + split1[5];
|
|
l.setAlarmAttrString(stringBuilder);
|
|
l.setAlarmAttrString(stringBuilder);
|
|
}
|
|
}
|