|
@@ -2,7 +2,6 @@ package com.ozs.web.controller.websocket;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.ozs.common.core.controller.BaseController;
|
|
|
import com.ozs.common.core.domain.entity.SysUser;
|
|
|
import com.ozs.common.utils.AppendUtils;
|
|
@@ -11,7 +10,6 @@ import com.ozs.entity.*;
|
|
|
import com.ozs.entity.vo.MsgAlarmResp;
|
|
|
import com.ozs.service.BaseRailwayManagementService;
|
|
|
import com.ozs.service.BaseUserService;
|
|
|
-import com.ozs.service.MsgAlarmExtService;
|
|
|
import com.ozs.service.MsgWebPushService;
|
|
|
import com.ozs.system.service.ISysDictDataService;
|
|
|
import com.ozs.system.service.ISysUserService;
|
|
@@ -45,8 +43,6 @@ public class WebSocketConteoller extends BaseController {
|
|
|
private BaseUserService baseUserService;
|
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
- @Autowired
|
|
|
- private MsgAlarmExtService msgAlarmExtService;
|
|
|
|
|
|
/**
|
|
|
* 获取项目名称
|
|
@@ -118,18 +114,20 @@ public class WebSocketConteoller extends BaseController {
|
|
|
msgAlarmResp.setLineDirStr(msgAlarm.getLineDir() == 1 ? "上行" : "下行");
|
|
|
msgAlarmResp.setAlarmTime(msgAlarm.getAlarmTime() != null ? msgAlarm.getAlarmTime() : new Date());
|
|
|
// 图片
|
|
|
- List<String> stringList = new ArrayList<>();
|
|
|
- List<MsgAlarmExt> list = msgAlarmExtService.list(new LambdaQueryWrapper<MsgAlarmExt>().eq(MsgAlarmExt::getAlarmId, msgAlarm.getAlarmId()));
|
|
|
- log.info("修改前+++++++++" + list.size());
|
|
|
- if (!ObjectUtils.isEmpty(list)) {
|
|
|
- for (MsgAlarmExt imageUrl :list) {
|
|
|
+ List<String> stringList=new ArrayList<>();
|
|
|
+ log.info("修改前+++++++++"+msgAlarm.getImageUrls());
|
|
|
+ if (!ObjectUtils.isEmpty(msgAlarm.getImageUrls())) {
|
|
|
+ for (String imageUrl : msgAlarm.getImageUrls()) {
|
|
|
String oldIpAddress = "123.139.243.142";
|
|
|
String newIpAddress = "10.48.36.53";
|
|
|
- String replacedUrl = imageUrl.getAlarmAttPath().replace(oldIpAddress, newIpAddress);
|
|
|
+ String replacedUrl = imageUrl.replace(oldIpAddress, newIpAddress);
|
|
|
stringList.add(replacedUrl);
|
|
|
}
|
|
|
msgAlarmResp.setImageUrls(stringList);
|
|
|
- log.info("修改后+++++++++" + msgAlarmResp.getImageUrls().size());
|
|
|
+ log.info("修改后+++++++++"+msgAlarmResp.getImageUrls());
|
|
|
+ for (String imageUrl : msgAlarmResp.getImageUrls()) {
|
|
|
+ log.info("imageUrls+++++++++"+msgAlarmResp.getImageUrls());
|
|
|
+ }
|
|
|
}
|
|
|
if (!StringUtils.isEmptySunhh(msgAlarm.getId())) {
|
|
|
msgAlarmResp.setId(msgAlarm.getId());
|