|
@@ -5,11 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.ozs.common.core.domain.entity.SysUser;
|
|
|
import com.ozs.common.utils.AppendUtils;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
+import com.ozs.entity.BaseCameraManagement;
|
|
|
import com.ozs.entity.MsgAlarm;
|
|
|
+import com.ozs.entity.MsgAlarmExt;
|
|
|
import com.ozs.entity.MsgWebPush;
|
|
|
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;
|
|
@@ -42,6 +45,8 @@ public class WebSocketCommon {
|
|
|
private BaseUserService baseUserService;
|
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
+ @Autowired
|
|
|
+ private MsgAlarmExtService msgAlarmExtService;
|
|
|
|
|
|
public Map publish(@RequestBody MsgAlarm msgAlarm) {
|
|
|
String endMile = null;
|
|
@@ -73,8 +78,18 @@ public class WebSocketCommon {
|
|
|
msgAlarmResp.setLineDirStr(msgAlarm.getLineDir() == 1 ? "上行" : "下行");
|
|
|
msgAlarmResp.setAlarmTime(msgAlarm.getAlarmTime() != null ? msgAlarm.getAlarmTime() : new Date());
|
|
|
// 图片
|
|
|
- if (!StringUtils.isEmptySunhh(msgAlarm.getImageUrls())) {
|
|
|
- msgAlarmResp.setImageUrls(msgAlarm.getImageUrls());
|
|
|
+ LambdaQueryWrapper<MsgAlarmExt> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ if (!ObjectUtils.isEmpty(msgAlarm.getAlarmId())) {
|
|
|
+ wrapper.eq(MsgAlarmExt::getAlarmId, msgAlarm.getAlarmId());
|
|
|
+ }
|
|
|
+ MsgAlarmExt msgAlarmExt = msgAlarmExtService.getOne(wrapper);
|
|
|
+ if (!StringUtils.isEmptySunhh(msgAlarmExt) && !StringUtils.isEmptySunhh(msgAlarmExt.getAlarmAttType())
|
|
|
+ && !StringUtils.isEmptySunhh(msgAlarmExt.getAlarmAttPath())) {
|
|
|
+ String[] split = msgAlarmExt.getAlarmAttPath().split(";");
|
|
|
+ ArrayList<String> objects = new ArrayList<>(Arrays.asList(split));
|
|
|
+ log.info("publish--------" + objects);
|
|
|
+ msgAlarmResp.setImageUrls(objects);
|
|
|
+ msgAlarmResp.setAlarmAttType(msgAlarmExt.getAlarmAttType());
|
|
|
}
|
|
|
if (!StringUtils.isEmptySunhh(msgAlarm.getId())) {
|
|
|
msgAlarmResp.setId(msgAlarm.getId());
|