bug: (no ticket tracked) start a created job, the backend won't check whether sar is on or off
This commit is contained in:
parent
1ee4a59f7d
commit
1031ac1578
@ -10,9 +10,11 @@ import com.zhangy.skyeye.jm.event.JmJobStatusEvent;
|
||||
import com.zhangy.skyeye.jm.event.JmPayloadStatusEvent;
|
||||
import com.zhangy.skyeye.jm.service.JmJobStatusService;
|
||||
import com.zhangy.skyeye.jm.service.JmStatusLogService;
|
||||
import com.zhangy.skyeye.publics.consts.CacheKey;
|
||||
import com.zhangy.skyeye.publics.consts.ExecStatusEnum;
|
||||
import com.zhangy.skyeye.publics.consts.WebSocketKey;
|
||||
import com.zhangy.skyeye.publics.utils.CoordUtil;
|
||||
import com.zhangy.skyeye.redis.utils.RedisUtil;
|
||||
import com.zhangy.skyeye.sar.listen.SarImageUdpProcessor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -43,6 +45,9 @@ public class JmJobStatusServiceImpl implements JmJobStatusService {
|
||||
@Autowired
|
||||
private SarImageUdpProcessor imageProcessService;
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
// @Autowired
|
||||
// private ISmpSubscriptService subscriptService;
|
||||
|
||||
@ -177,6 +182,11 @@ public class JmJobStatusServiceImpl implements JmJobStatusService {
|
||||
throw ServiceException.warnLog(MessageUtils.message("sar.control.turnon.euavinexec"));
|
||||
}
|
||||
for (JmJobPayload payload : newUav.getPayloadList()) {
|
||||
// 校验雷达连接状态
|
||||
if (!redisUtil.hasKey(CacheKey.getSarConnect(payload.getIp()))) {
|
||||
throw ServiceException.warnLog(MessageUtils.message("device.sar.offline", payload.getPayloadName()));
|
||||
}
|
||||
|
||||
if (runningPayloadIds.contains(payload.getPayloadId())) {
|
||||
throw ServiceException.warnLog(MessageUtils.message("sar.control.turnon.esarinexec"));
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
# device management
|
||||
device.uav.remove.success=Remove success
|
||||
device.uav.remove.fail=Remove failed
|
||||
device.uav.offline=UAV [{0}] disconnected
|
||||
device.sar.offline=SAR [{0}] disconnected
|
||||
|
||||
# SAR图片管理
|
||||
sar.image.remove.success=Remove success
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
# 设备管理
|
||||
device.uav.remove.success=操作成功
|
||||
device.uav.remove.fail=操作失败
|
||||
device.uav.offline=无人机[{0}]未连接
|
||||
device.sar.offline=雷达[{0}]未连接
|
||||
|
||||
# SAR图片管理
|
||||
sar.image.remove.success=操作完成
|
||||
|
||||
Loading…
Reference in New Issue
Block a user