|
@@ -24,24 +24,11 @@ import com.ozs.service.service.*;
|
|
|
import com.ozs.system.service.DataScoreUtil;
|
|
|
import com.ozs.system.service.ISysDeptService;
|
|
|
import com.ozs.system.service.ISysDictDataService;
|
|
|
-import com.ozs.system.service.ISysDictTypeService;
|
|
|
import com.ozs.web.core.util.CameraUtil;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-
|
|
|
-import org.apache.poi.hssf.usermodel.HSSFCell;
|
|
|
-import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
|
-import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
|
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
-import org.apache.poi.ss.usermodel.*;
|
|
|
-import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.http.MediaType;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
@@ -52,15 +39,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.io.File;
|
|
|
-import java.io.FileOutputStream;
|
|
|
-import java.io.InputStream;
|
|
|
-import java.io.OutputStream;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -103,7 +83,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* web更多消息-总数,已读数
|
|
|
*/
|
|
|
@PostMapping("/messageMoreNum")
|
|
|
- @ApiOperation("更多消息--总数,已读数")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult messageMoreNum(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
|
// MsgAlarmVo msgAlarmVo1 = (MsgAlarmVo) dataScoreUtil.setDataScore(getUserId(), msgAlarmVo);
|
|
@@ -115,7 +94,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* web更多消息
|
|
|
*/
|
|
|
@PostMapping("/messageMore")
|
|
|
- @ApiOperation("更多消息")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult messageMore(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
|
// MsgAlarmVo msgAlarmVo1 = (MsgAlarmVo) dataScoreUtil.setDataScore(getUserId(), msgAlarmVo);
|
|
@@ -131,7 +109,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* web报警未读消息个数+未读消息列表
|
|
|
*/
|
|
|
@GetMapping("/webAlarm")
|
|
|
- @ApiOperation("app报警推送次数")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult webAlarmNum() {
|
|
|
// MsgAlarmVo msgAlarm = (MsgAlarmVo) dataScoreUtil.setDataScore(getUserId(), new MsgAlarmVo());
|
|
@@ -143,7 +120,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* web消息全部已读
|
|
|
*/
|
|
|
@PostMapping("/readAll")
|
|
|
- @ApiOperation(value = "web消息全部已读")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult readAll() {
|
|
|
return toAjax(msgWebPushService.readAll(getUserId()));
|
|
@@ -153,7 +129,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* web消息已读
|
|
|
*/
|
|
|
@PostMapping("/read")
|
|
|
- @ApiOperation(value = "web消息已读")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult read(@RequestBody MsgWebPush msgWebPush) {
|
|
|
// if (StringUtils.isEmpty(msgWebPush) || ObjectUtils.isEmpty(msgWebPush.getPushId())) {
|
|
@@ -169,7 +144,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* @param msgAlarmVo
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation(value = "首页报警信息列表")
|
|
|
@PostMapping("/listHome")
|
|
|
@Log(title = "首页", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult selectMsgAlarmHome(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
@@ -243,7 +217,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
* @param msgAlarmVo
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation(value = "报警信息分页")
|
|
|
@PostMapping("/list")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
@@ -317,7 +290,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
*
|
|
|
* @param response
|
|
|
*/
|
|
|
- @ApiOperation("导出报警消息")
|
|
|
@PostMapping("/exportMsgAlarm")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
|
public void exportMsgAlarm(HttpServletResponse response, @RequestBody MsgAlarmVo msgAlarmVo) {
|
|
@@ -387,7 +359,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/getByAlarmId/{alarmId}")
|
|
|
- @ApiOperation("根据报警信息ID获取详细信息-app")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.MESSAGE)
|
|
|
public AjaxResult getByAlarmId(@PathVariable String alarmId) {
|
|
|
MsgAlarm msgAlarm = msgAlarmService.getByAlarmId(alarmId);
|
|
@@ -432,7 +403,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
- @ApiOperation("根据报警信息ID获取详细信息")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.MESSAGE)
|
|
|
public AjaxResult getInfo(@PathVariable Long id) {
|
|
|
MsgAlarm msgAlarm = msgAlarmService.getById(id);
|
|
@@ -487,7 +457,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
|
|
|
// todo 需要测试 验证 是否合成视频
|
|
|
@RequestMapping(value = "/updateIsLock")
|
|
|
- @ApiOperation("根据报警信息ID解除报警")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.UPDATE)
|
|
|
@Transactional
|
|
|
public AjaxResult updateIsLock(@RequestParam(value = "id") Long id,
|
|
@@ -543,7 +512,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/alarmHistoricalAlarm/{alarmId}")
|
|
|
- @ApiOperation("报警消息详情历史报警次数信息")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult alarmHistoricalAlarm(@PathVariable String alarmId) {
|
|
|
QueryWrapper<MsgAlarm> queryWrapper = new QueryWrapper<>();
|
|
@@ -577,7 +545,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/videoHistoricalAlarm/{cameraCode}")
|
|
|
- @ApiOperation("视频服务历史报警信息")
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult videoHistoricalAlarm(@PathVariable String cameraCode) {
|
|
|
QueryWrapper<MsgAlarm> wrapper = new QueryWrapper<>();
|
|
@@ -601,13 +568,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
*/
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.OTHER)
|
|
|
@PostMapping("/dataStatistic")
|
|
|
- @ApiOperation(value = "web数据统计 报警数据详情")
|
|
|
- @ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(paramType = "query", name = "railwayCode", value = "线路编码"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentYear", value = "当前年份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentMonth", value = "当前月份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "alarmType", value = "灾害类型"),
|
|
|
- })
|
|
|
public AjaxResult dataStatistic(@RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
|
IPage<AlarmStatisticVo> page = msgAlarmService.list(alarmStatisticResVo);
|
|
@@ -657,13 +617,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
*/
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.OTHER)
|
|
|
@PostMapping("/alarmMonthStatistic")
|
|
|
- @ApiOperation(value = "web数据统计 报警月统计数据")
|
|
|
- @ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(paramType = "query", name = "railwayCode", value = "线路编码"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentYear", value = "当前年份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentMonth", value = "当前月份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "alarmType", value = "灾害类型"),
|
|
|
- })
|
|
|
public AjaxResult alarmMonthStatistic(@RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
|
List<Integer> numbs = new ArrayList<>();
|
|
@@ -723,13 +676,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
*/
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/exportDataStatistic")
|
|
|
- @ApiOperation(value = "web数据统计-数据导出")
|
|
|
- @ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(paramType = "query", name = "railwayCode", value = "线路编码"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentYear", value = "当前年份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentMonth", value = "当前月份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "alarmType", value = "灾害类型"),
|
|
|
- })
|
|
|
public void exportDataStatistic(HttpServletResponse response, @RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
|
try {
|
|
@@ -785,13 +731,6 @@ public class MsgAlarmController extends BaseController {
|
|
|
*/
|
|
|
@Log(title = "报警信息管理", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/exportDataStatisticMonth")
|
|
|
- @ApiOperation(value = "报警月统计数据导出")
|
|
|
- @ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(paramType = "query", name = "railwayCode", value = "线路编码"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentYear", value = "当前年份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "currentMonth", value = "当前月份"),
|
|
|
- @ApiImplicitParam(paramType = "query", name = "alarmType", value = "灾害类型"),
|
|
|
- })
|
|
|
public void exportDataStatisticMonth(HttpServletResponse response, @RequestBody AlarmStatisticResVo alarmStatisticResVo) {
|
|
|
alarmStatisticResVo = (AlarmStatisticResVo) dataScoreUtil.setDataScore(getUserId(), alarmStatisticResVo);
|
|
|
String sheetName = "报警年统计数据";
|