Compare commits
No commits in common. "570852382fc047a09c5e78b62a54e96f97a2b174" and "ed17f85c802156e5b4b6a6c02ed27248b115351c" have entirely different histories.
570852382f
...
ed17f85c80
@ -16,8 +16,7 @@ public enum NodeTypeEnum {
|
|||||||
DEVICE(3, "设备点"),
|
DEVICE(3, "设备点"),
|
||||||
PARKING(4, "停车点"),
|
PARKING(4, "停车点"),
|
||||||
CHANGE(5, "区域变更点"),
|
CHANGE(5, "区域变更点"),
|
||||||
WAIT(6, "等待点"),
|
WAIT(6, "等待点");
|
||||||
TEXT(7, "文字点");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型
|
* 类型
|
||||||
|
@ -44,10 +44,10 @@ public abstract class AbstractWebSocketMessageSender implements WebSocketMessage
|
|||||||
/**
|
/**
|
||||||
* 发送消息
|
* 发送消息
|
||||||
*
|
*
|
||||||
* @param sessionId Session 编号
|
* @param sessionId Session 编号
|
||||||
* @param userType 用户类型
|
* @param userType 用户类型
|
||||||
* @param userId 用户编号
|
* @param userId 用户编号
|
||||||
* @param messageType 消息类型
|
* @param messageType 消息类型
|
||||||
* @param messageContent 消息内容
|
* @param messageContent 消息内容
|
||||||
*/
|
*/
|
||||||
public void send(String sessionId, Integer userType, Long userId, String messageType, String messageContent) {
|
public void send(String sessionId, Integer userType, Long userId, String messageType, String messageContent) {
|
||||||
@ -57,12 +57,6 @@ public abstract class AbstractWebSocketMessageSender implements WebSocketMessage
|
|||||||
WebSocketSession session = sessionManager.getSession(sessionId);
|
WebSocketSession session = sessionManager.getSession(sessionId);
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
sessions = Collections.singletonList(session);
|
sessions = Collections.singletonList(session);
|
||||||
} else {
|
|
||||||
// -- 这里用于获取地图的webSocket
|
|
||||||
session = sessionManager.getMapSession(sessionId);
|
|
||||||
if (session != null){
|
|
||||||
sessions = Collections.singletonList(session);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (userType != null && userId != null) {
|
} else if (userType != null && userId != null) {
|
||||||
sessions = (List<WebSocketSession>) sessionManager.getSessionList(userType, userId);
|
sessions = (List<WebSocketSession>) sessionManager.getSessionList(userType, userId);
|
||||||
@ -80,8 +74,8 @@ public abstract class AbstractWebSocketMessageSender implements WebSocketMessage
|
|||||||
/**
|
/**
|
||||||
* 发送消息的具体实现
|
* 发送消息的具体实现
|
||||||
*
|
*
|
||||||
* @param sessions Session 列表
|
* @param sessions Session 列表
|
||||||
* @param messageType 消息类型
|
* @param messageType 消息类型
|
||||||
* @param messageContent 消息内容
|
* @param messageContent 消息内容
|
||||||
*/
|
*/
|
||||||
public void doSend(Collection<WebSocketSession> sessions, String messageType, String messageContent) {
|
public void doSend(Collection<WebSocketSession> sessions, String messageType, String messageContent) {
|
||||||
|
@ -33,14 +33,6 @@ public interface WebSocketSessionManager {
|
|||||||
*/
|
*/
|
||||||
WebSocketSession getSession(String id);
|
WebSocketSession getSession(String id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 地图 楼+"_"+区 获取session
|
|
||||||
*
|
|
||||||
* @param key
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
WebSocketSession getMapSession(String key);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得指定用户类型的 Session 列表
|
* 获得指定用户类型的 Session 列表
|
||||||
*
|
*
|
||||||
@ -53,9 +45,9 @@ public interface WebSocketSessionManager {
|
|||||||
* 获得指定用户编号的 Session 列表
|
* 获得指定用户编号的 Session 列表
|
||||||
*
|
*
|
||||||
* @param userType 用户类型
|
* @param userType 用户类型
|
||||||
* @param userId 用户编号
|
* @param userId 用户编号
|
||||||
* @return Session 列表
|
* @return Session 列表
|
||||||
*/
|
*/
|
||||||
Collection<WebSocketSession> getSessionList(Integer userType, Long userId);
|
Collection<WebSocketSession> getSessionList(Integer userType, Long userId);
|
||||||
|
|
||||||
}
|
}
|
@ -1,14 +1,15 @@
|
|||||||
package cn.iocoder.yudao.framework.websocket.core.session;
|
package cn.iocoder.yudao.framework.websocket.core.session;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
|
||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.framework.websocket.core.util.WebSocketFrameworkUtils;
|
import cn.iocoder.yudao.framework.websocket.core.util.WebSocketFrameworkUtils;
|
||||||
import org.springframework.web.socket.WebSocketSession;
|
import org.springframework.web.socket.WebSocketSession;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.util.ArrayList;
|
||||||
import java.util.*;
|
import java.util.Collection;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
@ -22,87 +23,63 @@ public class WebSocketSessionManagerImpl implements WebSocketSessionManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* id 与 WebSocketSession 映射
|
* id 与 WebSocketSession 映射
|
||||||
* <p>
|
*
|
||||||
* key:Session 编号
|
* key:Session 编号
|
||||||
*/
|
*/
|
||||||
private final ConcurrentMap<String, WebSocketSession> idSessions = new ConcurrentHashMap<>();
|
private final ConcurrentMap<String, WebSocketSession> idSessions = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* user 与 WebSocketSession 映射
|
* user 与 WebSocketSession 映射
|
||||||
* <p>
|
*
|
||||||
* key1:用户类型
|
* key1:用户类型
|
||||||
* key2:用户编号
|
* key2:用户编号
|
||||||
*/
|
*/
|
||||||
private final ConcurrentMap<Integer, ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>>> userSessions
|
private final ConcurrentMap<Integer, ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>>> userSessions
|
||||||
= new ConcurrentHashMap<>();
|
= new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 地图 与 WebSocketSession 映射
|
|
||||||
* <p>
|
|
||||||
* key:地图地址 楼+'_'+区
|
|
||||||
*/
|
|
||||||
private final ConcurrentMap<String, WebSocketSession> mapSessions = new ConcurrentHashMap<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addSession(WebSocketSession session) {
|
public void addSession(WebSocketSession session) {
|
||||||
// 解析 session Url 中参数
|
// 添加到 idSessions 中
|
||||||
Map<String, String> paramMap = HttpUtil.decodeParamMap(String.valueOf(session.getUri()), StandardCharsets.UTF_8);
|
idSessions.put(session.getId(), session);
|
||||||
String type = paramMap.get("type");
|
// 添加到 userSessions 中
|
||||||
// -- 如果是地图里面过来的
|
LoginUser user = WebSocketFrameworkUtils.getLoginUser(session);
|
||||||
if ("map".equals(type)) {
|
if (user == null) {
|
||||||
mapSessions.put(paramMap.get("floor") + "_" + paramMap.get("area"), session);
|
return;
|
||||||
} else {
|
|
||||||
// 添加到 idSessions 中
|
|
||||||
idSessions.put(session.getId(), session);
|
|
||||||
// 添加到 userSessions 中
|
|
||||||
LoginUser user = WebSocketFrameworkUtils.getLoginUser(session);
|
|
||||||
if (user == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>> userSessionsMap = userSessions.get(user.getUserType());
|
|
||||||
if (userSessionsMap == null) {
|
|
||||||
userSessionsMap = new ConcurrentHashMap<>();
|
|
||||||
if (userSessions.putIfAbsent(user.getUserType(), userSessionsMap) != null) {
|
|
||||||
userSessionsMap = userSessions.get(user.getUserType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CopyOnWriteArrayList<WebSocketSession> sessions = userSessionsMap.get(user.getId());
|
|
||||||
if (sessions == null) {
|
|
||||||
sessions = new CopyOnWriteArrayList<>();
|
|
||||||
if (userSessionsMap.putIfAbsent(user.getId(), sessions) != null) {
|
|
||||||
sessions = userSessionsMap.get(user.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sessions.add(session);
|
|
||||||
}
|
}
|
||||||
|
ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>> userSessionsMap = userSessions.get(user.getUserType());
|
||||||
|
if (userSessionsMap == null) {
|
||||||
|
userSessionsMap = new ConcurrentHashMap<>();
|
||||||
|
if (userSessions.putIfAbsent(user.getUserType(), userSessionsMap) != null) {
|
||||||
|
userSessionsMap = userSessions.get(user.getUserType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CopyOnWriteArrayList<WebSocketSession> sessions = userSessionsMap.get(user.getId());
|
||||||
|
if (sessions == null) {
|
||||||
|
sessions = new CopyOnWriteArrayList<>();
|
||||||
|
if (userSessionsMap.putIfAbsent(user.getId(), sessions) != null) {
|
||||||
|
sessions = userSessionsMap.get(user.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sessions.add(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeSession(WebSocketSession session) {
|
public void removeSession(WebSocketSession session) {
|
||||||
// 解析 session Url 中参数
|
// 移除从 idSessions 中
|
||||||
Map<String, String> paramMap = HttpUtil.decodeParamMap(String.valueOf(session.getUri()), StandardCharsets.UTF_8);
|
idSessions.remove(session.getId());
|
||||||
String type = paramMap.get("type");
|
// 移除从 idSessions 中
|
||||||
// -- 如果是地图里面过来的
|
LoginUser user = WebSocketFrameworkUtils.getLoginUser(session);
|
||||||
if ("map".equals(type)) {
|
if (user == null) {
|
||||||
mapSessions.remove(paramMap.get("floor") + "_" + paramMap.get("area"), session);
|
return;
|
||||||
} else {
|
}
|
||||||
// 移除从 idSessions 中
|
ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>> userSessionsMap = userSessions.get(user.getUserType());
|
||||||
idSessions.remove(session.getId());
|
if (userSessionsMap == null) {
|
||||||
// 移除从 idSessions 中
|
return;
|
||||||
LoginUser user = WebSocketFrameworkUtils.getLoginUser(session);
|
}
|
||||||
if (user == null) {
|
CopyOnWriteArrayList<WebSocketSession> sessions = userSessionsMap.get(user.getId());
|
||||||
return;
|
sessions.removeIf(session0 -> session0.getId().equals(session.getId()));
|
||||||
}
|
if (CollUtil.isEmpty(sessions)) {
|
||||||
ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>> userSessionsMap = userSessions.get(user.getUserType());
|
userSessionsMap.remove(user.getId(), sessions);
|
||||||
if (userSessionsMap == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CopyOnWriteArrayList<WebSocketSession> sessions = userSessionsMap.get(user.getId());
|
|
||||||
sessions.removeIf(session0 -> session0.getId().equals(session.getId()));
|
|
||||||
if (CollUtil.isEmpty(sessions)) {
|
|
||||||
userSessionsMap.remove(user.getId(), sessions);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,11 +88,6 @@ public class WebSocketSessionManagerImpl implements WebSocketSessionManager {
|
|||||||
return idSessions.get(id);
|
return idSessions.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public WebSocketSession getMapSession(String key) {
|
|
||||||
return mapSessions.get(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<WebSocketSession> getSessionList(Integer userType) {
|
public Collection<WebSocketSession> getSessionList(Integer userType) {
|
||||||
ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>> userSessionsMap = userSessions.get(userType);
|
ConcurrentMap<Long, CopyOnWriteArrayList<WebSocketSession>> userSessionsMap = userSessions.get(userType);
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.system.api.robot.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 楼层区域
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class FloorZoneDTO {
|
|
||||||
//地图所在楼
|
|
||||||
public String floor;
|
|
||||||
//地图所在区
|
|
||||||
public String area;
|
|
||||||
}
|
|
@ -9,11 +9,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RobotStatusDataDTO {
|
public class RobotStatusDataDTO {
|
||||||
/**
|
|
||||||
* 楼层区域
|
|
||||||
*/
|
|
||||||
public FloorZoneDTO floor_zone;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机器人位姿
|
* 机器人位姿
|
||||||
*/
|
*/
|
||||||
|
@ -9,7 +9,6 @@ import lombok.Data;
|
|||||||
public class RobotStatusDataPoseDTO {
|
public class RobotStatusDataPoseDTO {
|
||||||
public String y;
|
public String y;
|
||||||
public String x;
|
public String x;
|
||||||
//弧度
|
|
||||||
public String yaw;
|
public String yaw;
|
||||||
//楼层
|
//楼层
|
||||||
public String floor;
|
public String floor;
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.system.api.robot;
|
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
|
||||||
import cn.iocoder.yudao.module.infra.api.websocket.WebSocketSenderApi;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.PreDestroy;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Slf4j
|
|
||||||
public class RequestProcessor {
|
|
||||||
private final ConcurrentHashMap<String, ConcurrentHashMap<String, String>> cache = new ConcurrentHashMap<>();
|
|
||||||
private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
public WebSocketSenderApi webSocketSenderApi;
|
|
||||||
|
|
||||||
public RequestProcessor() {
|
|
||||||
// 每秒执行一次 - 处理并发送数据 - 避免数据丢失
|
|
||||||
scheduler.scheduleAtFixedRate(this::processAndSend, 1, 1, TimeUnit.SECONDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void handleRequest(String map, String mac, String data) {
|
|
||||||
cache.computeIfAbsent(map, k -> new ConcurrentHashMap<>()).put(mac, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void processAndSend() {
|
|
||||||
Map<String, ConcurrentHashMap<String, String>> snapshot = new ConcurrentHashMap<>(cache); // 创建快照
|
|
||||||
cache.clear(); // 先清理缓存
|
|
||||||
for (Map.Entry<String, ConcurrentHashMap<String, String>> entry : snapshot.entrySet()) {
|
|
||||||
if (!MapUtil.isEmpty(entry.getValue())) {
|
|
||||||
sendData(entry.getKey(), entry.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void sendData(String map, Map<String, String> data) {
|
|
||||||
// -- 发送给对应的websocket
|
|
||||||
// System.out.println("key:" + map + "发送数据:" + data);
|
|
||||||
log.info("key:" + map + "发送数据:" + data);
|
|
||||||
webSocketSenderApi.sendObject(map, "map_push", data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void shutdown() {
|
|
||||||
scheduler.shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
@PreDestroy
|
|
||||||
public void destroy() {
|
|
||||||
// 在Bean销毁前关闭去啊
|
|
||||||
shutdown();
|
|
||||||
}
|
|
||||||
}
|
|
@ -54,12 +54,8 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
@Value("${zn.robot_error_level_time:30}")
|
@Value("${zn.robot_error_level_time:30}")
|
||||||
private Long robotErrorLevelTime;
|
private Long robotErrorLevelTime;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RequestProcessor processor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新机器人点位/异常/能否做任务
|
* 更新机器人点位/异常/能否做任务
|
||||||
*
|
|
||||||
* @param robotStatusDataDTO
|
* @param robotStatusDataDTO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -72,31 +68,26 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String taskStatusKey = RobotTaskChcheConstant.ROBOT_TASK_STATUS + robotStatusDataDTO.getMac();
|
String taskStatusKey = RobotTaskChcheConstant.ROBOT_TASK_STATUS +robotStatusDataDTO.getMac();
|
||||||
String cargoDetectedKey = RobotTaskChcheConstant.ROBOT_CARGO_DETECTED + robotStatusDataDTO.getMac();
|
String cargoDetectedKey = RobotTaskChcheConstant.ROBOT_CARGO_DETECTED +robotStatusDataDTO.getMac();
|
||||||
String pose2dKey = RobotTaskChcheConstant.ROBOT_INFORMATION_POSE_BAT_SOC + robotStatusDataDTO.getMac();
|
String pose2dKey = RobotTaskChcheConstant.ROBOT_INFORMATION_POSE_BAT_SOC +robotStatusDataDTO.getMac();
|
||||||
redisUtil.set(taskStatusKey, robotStatusDataDTO.getData().getTask_status(), robotPositionCacheTime);
|
redisUtil.set(taskStatusKey, robotStatusDataDTO.getData().getTask_status(),robotPositionCacheTime);
|
||||||
redisUtil.set(cargoDetectedKey, robotStatusDataDTO.getData().getCargo_detected(), robotPositionCacheTime);
|
redisUtil.set(cargoDetectedKey,robotStatusDataDTO.getData().getCargo_detected(),robotPositionCacheTime);
|
||||||
|
|
||||||
Object object = redisUtil.get(pose2dKey);
|
Object object = redisUtil.get(pose2dKey);
|
||||||
RobotStatusDataPoseDTO robotStatusDataPoseDTO = JSONUtil.toBean((String) object, RobotStatusDataPoseDTO.class);
|
RobotStatusDataPoseDTO robotStatusDataPoseDTO= JSONUtil.toBean((String)object, RobotStatusDataPoseDTO.class);
|
||||||
robotStatusDataPoseDTO.setX(robotStatusDataDTO.getData().getPose2d().getX());
|
robotStatusDataPoseDTO.setX(robotStatusDataDTO.getData().getPose2d().getX());
|
||||||
robotStatusDataPoseDTO.setY(robotStatusDataDTO.getData().getPose2d().getY());
|
robotStatusDataPoseDTO.setY(robotStatusDataDTO.getData().getPose2d().getY());
|
||||||
robotStatusDataPoseDTO.setYaw(robotStatusDataDTO.getData().getPose2d().getYaw());
|
robotStatusDataPoseDTO.setYaw(robotStatusDataDTO.getData().getPose2d().getYaw());
|
||||||
robotStatusDataPoseDTO.setFloor(robotStatusDataDTO.getData().getFloor_zone().getFloor());
|
robotStatusDataPoseDTO.setFloor(robotStatusDataDTO.getData().getPose2d().getFloor());
|
||||||
robotStatusDataPoseDTO.setArea(robotStatusDataDTO.getData().getFloor_zone().getArea());
|
robotStatusDataPoseDTO.setArea(robotStatusDataDTO.getData().getPose2d().getArea());
|
||||||
redisUtil.set(pose2dKey, JSON.toJSONString(robotStatusDataPoseDTO), robotPositionCacheTime);
|
redisUtil.set(pose2dKey,JSON.toJSONString(robotStatusDataPoseDTO),robotPositionCacheTime);
|
||||||
|
|
||||||
// 合并请求 - 这里接受到的数据都丢给 RequestProcessor - 再整合数据通过WebSocket丢给前端
|
|
||||||
processor.handleRequest(robotStatusDataPoseDTO.getFloor() + "_" + robotStatusDataPoseDTO.getArea(),
|
|
||||||
robotStatusDataDTO.getMac(), JSONUtil.toJsonStr(robotStatusDataDTO.getData().getPose2d()));
|
|
||||||
|
|
||||||
|
|
||||||
if (ObjectUtil.isNotNull(robotStatusDataDTO.getData().getErr_code())) {
|
if (ObjectUtil.isNotNull(robotStatusDataDTO.getData().getErr_code())) {
|
||||||
List<RobotStatusDataErrorDTO> errCode = robotStatusDataDTO.getData().getErr_code();
|
List<RobotStatusDataErrorDTO> errCode = robotStatusDataDTO.getData().getErr_code();
|
||||||
String robotNo = robotInformationService.getRobotNoByMac(robotStatusDataDTO.getMac());
|
String robotNo = robotInformationService.getRobotNoByMac(robotStatusDataDTO.getMac());
|
||||||
if (ObjectUtil.isNull(robotNo)) {
|
if (ObjectUtil.isNull(robotNo)) {
|
||||||
log.info("查不到机器人编号 :{}", robotStatusDataDTO.getMac());
|
log.info("查不到机器人编号 :{}",robotStatusDataDTO.getMac());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +95,7 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
errCode.stream().map(RobotStatusDataErrorDTO::getError_code).collect(Collectors.toList());
|
errCode.stream().map(RobotStatusDataErrorDTO::getError_code).collect(Collectors.toList());
|
||||||
List<RobotWarnCodeMappingDO> robotWarnCodeMappingDOS =
|
List<RobotWarnCodeMappingDO> robotWarnCodeMappingDOS =
|
||||||
warnCodeMappingMapper.selectList(new LambdaQueryWrapper<RobotWarnCodeMappingDO>()
|
warnCodeMappingMapper.selectList(new LambdaQueryWrapper<RobotWarnCodeMappingDO>()
|
||||||
.in(RobotWarnCodeMappingDO::getWarnCode, warnCodes));
|
.in(RobotWarnCodeMappingDO::getWarnCode, warnCodes));
|
||||||
if (ObjectUtil.isEmpty(robotWarnCodeMappingDOS)) {
|
if (ObjectUtil.isEmpty(robotWarnCodeMappingDOS)) {
|
||||||
log.info("查不对应编号的告警信息 :{}", JSON.toJSONString(warnCodes));
|
log.info("查不对应编号的告警信息 :{}", JSON.toJSONString(warnCodes));
|
||||||
return;
|
return;
|
||||||
@ -116,7 +107,7 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
List<RobotWarnMsgDO> warnMsgDOS = new ArrayList<>();
|
List<RobotWarnMsgDO> warnMsgDOS = new ArrayList<>();
|
||||||
|
|
||||||
//机器人异常等级
|
//机器人异常等级
|
||||||
String errorLevelKey = RobotTaskChcheConstant.ROBOT_ERROR_LEVEL + robotStatusDataDTO.getMac();
|
String errorLevelKey = RobotTaskChcheConstant.ROBOT_ERROR_LEVEL +robotStatusDataDTO.getMac();
|
||||||
Object errorLevel = redisUtil.get(errorLevelKey);
|
Object errorLevel = redisUtil.get(errorLevelKey);
|
||||||
|
|
||||||
Integer level = ObjectUtil.isEmpty(errorLevel) ? 0 : Integer.valueOf(errorLevel.toString());
|
Integer level = ObjectUtil.isEmpty(errorLevel) ? 0 : Integer.valueOf(errorLevel.toString());
|
||||||
@ -128,7 +119,7 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
|
|
||||||
List<RobotWarnCodeMappingDO> mappingDOS = warnCodeMapping.get(robotStatusData.getError_code());
|
List<RobotWarnCodeMappingDO> mappingDOS = warnCodeMapping.get(robotStatusData.getError_code());
|
||||||
if (ObjectUtil.isEmpty(mappingDOS)) {
|
if (ObjectUtil.isEmpty(mappingDOS)) {
|
||||||
log.info("当前告警类型查不到对应的告警信息 :{}", robotStatusData.getError_code());
|
log.info("当前告警类型查不到对应的告警信息 :{}",robotStatusData.getError_code());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
RobotWarnMsgDO warnMsg = RobotWarnMsgDO.builder().warnLevel(Integer.valueOf(robotStatusData.getCode_level()))
|
RobotWarnMsgDO warnMsg = RobotWarnMsgDO.builder().warnLevel(Integer.valueOf(robotStatusData.getCode_level()))
|
||||||
@ -140,11 +131,12 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
.build();
|
.build();
|
||||||
warnMsgDOS.add(warnMsg);
|
warnMsgDOS.add(warnMsg);
|
||||||
}
|
}
|
||||||
redisUtil.set(errorLevelKey, level, robotErrorLevelTime);
|
redisUtil.set(errorLevelKey,level,robotErrorLevelTime);
|
||||||
|
|
||||||
warnMsgMapper.insertBatch(warnMsgDOS);
|
warnMsgMapper.insertBatch(warnMsgDOS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -82,8 +82,8 @@ public class HouseAreaController {
|
|||||||
@GetMapping("/getHouseAreaList")
|
@GetMapping("/getHouseAreaList")
|
||||||
@Operation(summary = "获得全部库区")
|
@Operation(summary = "获得全部库区")
|
||||||
@PreAuthorize("@ss.hasPermission('ware:house-area:query')")
|
@PreAuthorize("@ss.hasPermission('ware:house-area:query')")
|
||||||
public CommonResult<List<HouseAreaRespVO>> getHouseAreaList(@RequestParam Long positionMapId) {
|
public CommonResult<List<HouseAreaRespVO>> getHouseAreaList() {
|
||||||
List<HouseAreaDO> list = houseAreaService.getHouseAreaList(positionMapId);
|
List<HouseAreaDO> list = houseAreaService.getHouseAreaList();
|
||||||
return success(BeanUtils.toBean(list, HouseAreaRespVO.class));
|
return success(BeanUtils.toBean(list, HouseAreaRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ public class DeviceInformationController {
|
|||||||
|
|
||||||
@PostMapping("/mapBindDeviceInfo")
|
@PostMapping("/mapBindDeviceInfo")
|
||||||
@Operation(summary = "地图绑定设备")
|
@Operation(summary = "地图绑定设备")
|
||||||
public CommonResult<Boolean> mapBindDeviceInfo(@Valid @RequestBody MapBindDeviceInfoDTO dto) {
|
public CommonResult<Boolean> mapBindDeviceInfo(@Valid MapBindDeviceInfoDTO dto) {
|
||||||
informationService.mapBindDeviceInfo(dto);
|
informationService.mapBindDeviceInfo(dto);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ import cn.iocoder.yudao.module.system.controller.admin.positionmap.vo.PositionMa
|
|||||||
import cn.iocoder.yudao.module.system.dal.dataobject.positionmap.PositionMapItemDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.positionmap.PositionMapItemDO;
|
||||||
import cn.iocoder.yudao.module.system.handler.mapnode.NodeProcessingContext;
|
import cn.iocoder.yudao.module.system.handler.mapnode.NodeProcessingContext;
|
||||||
import cn.iocoder.yudao.module.system.service.positionmap.PositionMapItemService;
|
import cn.iocoder.yudao.module.system.service.positionmap.PositionMapItemService;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -44,12 +43,6 @@ public class PositionMapItemController {
|
|||||||
@Resource
|
@Resource
|
||||||
private NodeProcessingContext nodeProcessingContext;
|
private NodeProcessingContext nodeProcessingContext;
|
||||||
|
|
||||||
@GetMapping("/getMapItemId")
|
|
||||||
@Operation(summary = "获取节点id")
|
|
||||||
public CommonResult<String> getMapItemId() {
|
|
||||||
return success(String.valueOf(IdWorker.getId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- 前端给所有的节点信息 -
|
// -- 前端给所有的节点信息 -
|
||||||
@PostMapping("/batchSaveOrEditOrDel")
|
@PostMapping("/batchSaveOrEditOrDel")
|
||||||
@Operation(summary = "批量新增编辑删除节点")
|
@Operation(summary = "批量新增编辑删除节点")
|
||||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.positionmap;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.positionmap.vo.PositionMapLineRespVO;
|
import cn.iocoder.yudao.module.system.controller.admin.positionmap.vo.PositionMapLineRespVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.positionmap.vo.PositionMapLineSaveReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.positionmap.vo.PositionMapLineSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.positionmap.PositionMapLineDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.positionmap.PositionMapLineDO;
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -28,30 +27,6 @@ public class PositionMapLinePageReqVO extends PageParam {
|
|||||||
@Schema(description = "结束点id(点位子表id)", example = "15890")
|
@Schema(description = "结束点id(点位子表id)", example = "15890")
|
||||||
private Long endPointId;
|
private Long endPointId;
|
||||||
|
|
||||||
@Schema(description = "开始控制点x轴", example = "15890")
|
|
||||||
private String beginControlX;
|
|
||||||
|
|
||||||
@Schema(description = "开始控制点y轴", example = "15890")
|
|
||||||
private String beginControlY;
|
|
||||||
|
|
||||||
@Schema(description = "结束控制点x轴", example = "15890")
|
|
||||||
private String endControlX;
|
|
||||||
|
|
||||||
@Schema(description = "结束控制点y轴", example = "15890")
|
|
||||||
private String endControlY;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域前", example = "15890")
|
|
||||||
private BigDecimal expansionZoneFront;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域后", example = "15890")
|
|
||||||
private BigDecimal expansionZoneAfter;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域左", example = "15890")
|
|
||||||
private BigDecimal expansionZoneLeft;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域右", example = "15890")
|
|
||||||
private BigDecimal expansionZoneRight;
|
|
||||||
|
|
||||||
@Schema(description = "行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
@Schema(description = "行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
||||||
private Integer method;
|
private Integer method;
|
||||||
|
|
||||||
|
@ -29,38 +29,6 @@ public class PositionMapLineRespVO {
|
|||||||
@ExcelProperty("结束点id(点位子表id)")
|
@ExcelProperty("结束点id(点位子表id)")
|
||||||
private Long endPointId;
|
private Long endPointId;
|
||||||
|
|
||||||
@Schema(description = "开始控制点x轴", example = "15890")
|
|
||||||
@ExcelProperty("开始控制点x轴")
|
|
||||||
private String beginControlX;
|
|
||||||
|
|
||||||
@Schema(description = "开始控制点y轴", example = "15890")
|
|
||||||
@ExcelProperty("开始控制点y轴")
|
|
||||||
private String beginControlY;
|
|
||||||
|
|
||||||
@Schema(description = "结束控制点x轴", example = "15890")
|
|
||||||
@ExcelProperty("结束控制点x轴")
|
|
||||||
private String endControlX;
|
|
||||||
|
|
||||||
@Schema(description = "结束控制点y轴", example = "15890")
|
|
||||||
@ExcelProperty("结束控制点y轴")
|
|
||||||
private String endControlY;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域前", example = "15890")
|
|
||||||
@ExcelProperty("膨胀区域前")
|
|
||||||
private BigDecimal expansionZoneFront;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域后", example = "15890")
|
|
||||||
@ExcelProperty("膨胀区域后")
|
|
||||||
private BigDecimal expansionZoneAfter;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域左", example = "15890")
|
|
||||||
@ExcelProperty("膨胀区域左")
|
|
||||||
private BigDecimal expansionZoneLeft;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域右", example = "15890")
|
|
||||||
@ExcelProperty("膨胀区域右")
|
|
||||||
private BigDecimal expansionZoneRight;
|
|
||||||
|
|
||||||
@Schema(description = "行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
@Schema(description = "行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
||||||
@ExcelProperty("行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
@ExcelProperty("行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
||||||
private Integer method;
|
private Integer method;
|
||||||
|
@ -25,30 +25,6 @@ public class PositionMapLineSaveReqVO {
|
|||||||
@Schema(description = "结束点id(点位子表id)", example = "15890")
|
@Schema(description = "结束点id(点位子表id)", example = "15890")
|
||||||
private Long endPointId;
|
private Long endPointId;
|
||||||
|
|
||||||
@Schema(description = "开始控制点x轴", example = "15890")
|
|
||||||
private String beginControlX;
|
|
||||||
|
|
||||||
@Schema(description = "开始控制点y轴", example = "15890")
|
|
||||||
private String beginControlY;
|
|
||||||
|
|
||||||
@Schema(description = "结束控制点x轴", example = "15890")
|
|
||||||
private String endControlX;
|
|
||||||
|
|
||||||
@Schema(description = "结束控制点y轴", example = "15890")
|
|
||||||
private String endControlY;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域前", example = "15890")
|
|
||||||
private BigDecimal expansionZoneFront;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域后", example = "15890")
|
|
||||||
private BigDecimal expansionZoneAfter;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域左", example = "15890")
|
|
||||||
private BigDecimal expansionZoneLeft;
|
|
||||||
|
|
||||||
@Schema(description = "膨胀区域右", example = "15890")
|
|
||||||
private BigDecimal expansionZoneRight;
|
|
||||||
|
|
||||||
@Schema(description = "行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
@Schema(description = "行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线")
|
||||||
private Integer method;
|
private Integer method;
|
||||||
|
|
||||||
|
@ -1,30 +1,32 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.robot;
|
package cn.iocoder.yudao.module.system.controller.admin.robot;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.robot.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.robot.vo.*;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.robot.RobotInformationDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.robot.RobotInformationDO;
|
||||||
import cn.iocoder.yudao.module.system.service.robot.RobotInformationService;
|
import cn.iocoder.yudao.module.system.service.robot.RobotInformationService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import javax.validation.Valid;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import java.io.IOException;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import java.util.List;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 车辆信息")
|
@Tag(name = "管理后台 - 车辆信息")
|
||||||
@RestController
|
@RestController
|
||||||
@ -81,12 +83,12 @@ public class RobotInformationController {
|
|||||||
@PreAuthorize("@ss.hasPermission('robot:information:export')")
|
@PreAuthorize("@ss.hasPermission('robot:information:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportInformationExcel(@Valid RobotInformationPageReqVO pageReqVO,
|
public void exportInformationExcel(@Valid RobotInformationPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<RobotInformationPageRespVO> list = informationService.getInformationPage(pageReqVO).getList();
|
List<RobotInformationPageRespVO> list = informationService.getInformationPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "车辆信息.xls", "数据", RobotInformationPageRespVO.class,
|
ExcelUtils.write(response, "车辆信息.xls", "数据", RobotInformationPageRespVO.class,
|
||||||
BeanUtils.toBean(list, RobotInformationPageRespVO.class));
|
BeanUtils.toBean(list, RobotInformationPageRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/statistics")
|
@PostMapping("/statistics")
|
||||||
@ -120,4 +122,4 @@ public class RobotInformationController {
|
|||||||
PageResult<RobotInformationPageRespVO> pageResult = informationService.getInformationPage(pageReqVO);
|
PageResult<RobotInformationPageRespVO> pageResult = informationService.getInformationPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, RobotInformationPageRespVO.class));
|
return success(BeanUtils.toBean(pageResult, RobotInformationPageRespVO.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,10 +6,7 @@ import cn.iocoder.yudao.module.system.framework.sms.core.enums.SmsChannelEnum;
|
|||||||
import cn.iocoder.yudao.module.system.service.sms.SmsSendService;
|
import cn.iocoder.yudao.module.system.service.sms.SmsSendService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.annotation.security.PermitAll;
|
import javax.annotation.security.PermitAll;
|
||||||
@ -33,6 +30,7 @@ public class SmsCallbackController {
|
|||||||
smsSendService.receiveSmsStatus(SmsChannelEnum.ALIYUN.getCode(), text);
|
smsSendService.receiveSmsStatus(SmsChannelEnum.ALIYUN.getCode(), text);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/tencent")
|
@PostMapping("/tencent")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
@Operation(summary = "腾讯云短信的回调", description = "参见 https://cloud.tencent.com/document/product/382/52077 文档")
|
@Operation(summary = "腾讯云短信的回调", description = "参见 https://cloud.tencent.com/document/product/382/52077 文档")
|
||||||
@ -59,4 +57,4 @@ public class SmsCallbackController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -42,38 +42,6 @@ public class PositionMapLineDO extends BaseDO {
|
|||||||
* 结束点id(点位子表id)
|
* 结束点id(点位子表id)
|
||||||
*/
|
*/
|
||||||
private Long endPointId;
|
private Long endPointId;
|
||||||
/**
|
|
||||||
* 开始控制点x轴
|
|
||||||
*/
|
|
||||||
private String beginControlX;
|
|
||||||
/**
|
|
||||||
* 开始控制点y轴
|
|
||||||
*/
|
|
||||||
private String beginControlY;
|
|
||||||
/**
|
|
||||||
* 结束控制点x轴
|
|
||||||
*/
|
|
||||||
private String endControlX;
|
|
||||||
/**
|
|
||||||
* 结束控制点y轴
|
|
||||||
*/
|
|
||||||
private String endControlY;
|
|
||||||
/**
|
|
||||||
* 膨胀区域前
|
|
||||||
*/
|
|
||||||
private BigDecimal expansionZoneFront;
|
|
||||||
/**
|
|
||||||
* 膨胀区域后
|
|
||||||
*/
|
|
||||||
private BigDecimal expansionZoneAfter;
|
|
||||||
/**
|
|
||||||
* 膨胀区域左
|
|
||||||
*/
|
|
||||||
private BigDecimal expansionZoneLeft;
|
|
||||||
/**
|
|
||||||
* 膨胀区域右
|
|
||||||
*/
|
|
||||||
private BigDecimal expansionZoneRight;
|
|
||||||
/**
|
/**
|
||||||
* 行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线
|
* 行走方法 0.直线 1.上左曲线2.上右曲线3.下左曲线 4.下右曲线
|
||||||
*/
|
*/
|
||||||
|
@ -50,8 +50,6 @@ public class NodeProcessingContext {
|
|||||||
strategyMap.put(NodeTypeEnum.CHANGE.getType(), mapNodeStrategyImpl);
|
strategyMap.put(NodeTypeEnum.CHANGE.getType(), mapNodeStrategyImpl);
|
||||||
// 等待点
|
// 等待点
|
||||||
strategyMap.put(NodeTypeEnum.WAIT.getType(), mapNodeStrategyImpl);
|
strategyMap.put(NodeTypeEnum.WAIT.getType(), mapNodeStrategyImpl);
|
||||||
// 文字点
|
|
||||||
strategyMap.put(NodeTypeEnum.TEXT.getType(), mapNodeStrategyImpl);
|
|
||||||
// todo 可以继续添加更多的策略 - 新增实现即可
|
// todo 可以继续添加更多的策略 - 新增实现即可
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,5 +64,5 @@ public interface HouseAreaService {
|
|||||||
* 获得全部库区
|
* 获得全部库区
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<HouseAreaDO> getHouseAreaList(Long positionMapId);
|
List<HouseAreaDO> getHouseAreaList();
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.system.controller.admin.positionmap.dto.PositionM
|
|||||||
import cn.iocoder.yudao.module.system.dal.dataobject.housearea.HouseAreaDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.housearea.HouseAreaDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.houselocation.WareHouseLocationDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.houselocation.WareHouseLocationDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.positionmap.PositionMapItemDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.positionmap.PositionMapItemDO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.robot.RobotModelDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.housearea.HouseAreaMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.housearea.HouseAreaMapper;
|
||||||
import cn.iocoder.yudao.module.system.service.houselocation.HouseLocationService;
|
import cn.iocoder.yudao.module.system.service.houselocation.HouseLocationService;
|
||||||
import cn.iocoder.yudao.module.system.service.positionmap.PositionMapItemService;
|
import cn.iocoder.yudao.module.system.service.positionmap.PositionMapItemService;
|
||||||
@ -156,10 +157,10 @@ public class HouseAreaServiceImpl implements HouseAreaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HouseAreaDO> getHouseAreaList(Long positionMapId) {
|
public List<HouseAreaDO> getHouseAreaList() {
|
||||||
return houseAreaMapper.selectList(new LambdaQueryWrapper<HouseAreaDO>()
|
List<HouseAreaDO> list = houseAreaMapper.selectList(new LambdaQueryWrapper<HouseAreaDO>()
|
||||||
.eq(HouseAreaDO::getPositionMapId, positionMapId)
|
|
||||||
.orderByAsc(HouseAreaDO::getId));
|
.orderByAsc(HouseAreaDO::getId));
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,11 +72,9 @@ public class PositionMapItemServiceImpl extends ServiceImpl<PositionMapItemMappe
|
|||||||
public void batchSaveOrEditOrDel(Long positionMapId, List<List<PositionMapItemDO>> list) {
|
public void batchSaveOrEditOrDel(Long positionMapId, List<List<PositionMapItemDO>> list) {
|
||||||
//批量添加、修改、删除
|
//批量添加、修改、删除
|
||||||
if (isNotEmpty(list.get(0))) {
|
if (isNotEmpty(list.get(0))) {
|
||||||
list.get(0).forEach(a -> a.setPositionMapId(positionMapId));
|
|
||||||
positionMapItemMapper.insertBatch(list.get(0));
|
positionMapItemMapper.insertBatch(list.get(0));
|
||||||
}
|
}
|
||||||
if (isNotEmpty(list.get(1))) {
|
if (isNotEmpty(list.get(1))) {
|
||||||
list.get(1).forEach(a -> a.setPositionMapId(positionMapId));
|
|
||||||
positionMapItemMapper.updateBatch(list.get(1));
|
positionMapItemMapper.updateBatch(list.get(1));
|
||||||
}
|
}
|
||||||
if (isNotEmpty(list.get(2))) {
|
if (isNotEmpty(list.get(2))) {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.robot;
|
package cn.iocoder.yudao.module.system.service.robot;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.*;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.robot.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.robot.vo.*;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.robot.RobotInformationDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.robot.RobotInformationDO;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆信息 Service 接口
|
* 车辆信息 Service 接口
|
||||||
*
|
*
|
||||||
@ -54,30 +54,27 @@ public interface RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计车辆待命/任务中/离线
|
* 统计车辆待命/任务中/离线
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
RobotInformationStatisticsVO statisticsInformation();
|
RobotInformationStatisticsVO statisticsInformation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询能正常使用的车辆
|
* 查询能正常使用的车辆
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RobotInformationDO> getCanUseRobot();
|
List<RobotInformationDO> getCanUseRobot();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有车辆
|
* 查询所有车辆
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RobotInformationDO> getAllRobot();
|
List<RobotInformationDO> getAllRobot();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询机器人编号
|
* 查询机器人编号
|
||||||
*
|
|
||||||
* @param mac
|
* @param mac
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getRobotNoByMac(String mac);
|
String getRobotNoByMac(String mac);
|
||||||
}
|
|
||||||
|
}
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.system.service.robot;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import cn.iocoder.yudao.module.system.api.robot.dto.RobotStatusDataPoseDTO;
|
import cn.iocoder.yudao.module.system.api.robot.dto.RobotStatusDataPoseDTO;
|
||||||
import cn.iocoder.yudao.module.system.constant.robot.RobotTaskChcheConstant;
|
import cn.iocoder.yudao.module.system.constant.robot.RobotTaskChcheConstant;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.robot.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.robot.vo.*;
|
||||||
@ -21,12 +19,13 @@ import cn.iocoder.yudao.module.system.enums.robot.information.RobotStatisticsTyp
|
|||||||
import cn.iocoder.yudao.module.system.util.redis.RedisUtil;
|
import cn.iocoder.yudao.module.system.util.redis.RedisUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import java.util.*;
|
||||||
import java.util.ArrayList;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import java.util.List;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||||
@ -107,7 +106,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
// 更新
|
// 更新
|
||||||
RobotInformationDO updateObj = BeanUtils.toBean(updateReqVO, RobotInformationDO.class);
|
RobotInformationDO updateObj = BeanUtils.toBean(updateReqVO, RobotInformationDO.class);
|
||||||
informationMapper.updateById(updateObj);
|
informationMapper.updateById(updateObj);
|
||||||
redisUtil.set(RobotTaskChcheConstant.ROBOT_GET_ROBOTNO_BY_MAC + updateObj.getMacAddress(), updateObj.getRobotNo());
|
redisUtil.set(RobotTaskChcheConstant.ROBOT_GET_ROBOTNO_BY_MAC + updateObj.getMacAddress(),updateObj.getRobotNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -157,7 +156,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
List<RobotInformationPageRespVO> resultList = new ArrayList<>();
|
List<RobotInformationPageRespVO> resultList = new ArrayList<>();
|
||||||
for (RobotInformationPageRespVO v : targetList) {
|
for (RobotInformationPageRespVO v : targetList) {
|
||||||
if (RobotStatisticsTypeEnum.STANDBY.getType().equals(pageReqVO.getRobotStatisticsType())
|
if (RobotStatisticsTypeEnum.STANDBY.getType().equals(pageReqVO.getRobotStatisticsType())
|
||||||
&& v.getRobotTaskStatus().equals(0)) {
|
&& v.getRobotTaskStatus().equals(0)) {
|
||||||
resultList.add(v);
|
resultList.add(v);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -192,7 +191,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dataPage.setList(resultList);
|
dataPage.setList(resultList);
|
||||||
} else {
|
}else {
|
||||||
dataPage.setList(targetList);
|
dataPage.setList(targetList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,15 +200,14 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置状态和信息
|
* 设置状态和信息
|
||||||
*
|
|
||||||
* @param v
|
* @param v
|
||||||
*/
|
*/
|
||||||
private void setMsgAndRobotStatus(RobotInformationPageRespVO v) {
|
private void setMsgAndRobotStatus(RobotInformationPageRespVO v) {
|
||||||
String pose2dKey = RobotTaskChcheConstant.ROBOT_INFORMATION_POSE_BAT_SOC + v.getMacAddress();
|
String pose2dKey = RobotTaskChcheConstant.ROBOT_INFORMATION_POSE_BAT_SOC +v.getMacAddress();
|
||||||
Object object = redisUtil.get(pose2dKey);
|
Object object = redisUtil.get(pose2dKey);
|
||||||
RobotStatusDataPoseDTO robotStatusDataPoseDTO = JSONUtil.toBean((String) object, RobotStatusDataPoseDTO.class);
|
RobotStatusDataPoseDTO robotStatusDataPoseDTO= JSONUtil.toBean((String)object, RobotStatusDataPoseDTO.class);
|
||||||
|
|
||||||
String robotDoingActionKey = RobotTaskChcheConstant.ROBOT_QUERY_DOING_ACTION + v.getMacAddress();
|
String robotDoingActionKey = RobotTaskChcheConstant.ROBOT_QUERY_DOING_ACTION +v.getMacAddress();
|
||||||
Object action = redisUtil.get(robotDoingActionKey);
|
Object action = redisUtil.get(robotDoingActionKey);
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(object) && ObjectUtil.isNotEmpty(robotStatusDataPoseDTO)) {
|
if (ObjectUtil.isNotEmpty(object) && ObjectUtil.isNotEmpty(robotStatusDataPoseDTO)) {
|
||||||
@ -221,7 +219,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
v.setRobotEssenceStatus(v.getRobotTaskModel());
|
v.setRobotEssenceStatus(v.getRobotTaskModel());
|
||||||
//设置异常
|
//设置异常
|
||||||
String errorLevelKey = RobotTaskChcheConstant.ROBOT_ERROR_LEVEL + v.getMacAddress();
|
String errorLevelKey = RobotTaskChcheConstant.ROBOT_ERROR_LEVEL +v.getMacAddress();
|
||||||
Object errorLevel = redisUtil.get(errorLevelKey);
|
Object errorLevel = redisUtil.get(errorLevelKey);
|
||||||
if (ObjectUtil.isNotEmpty(errorLevel) && Integer.valueOf(errorLevel.toString()).intValue() >= 3) {
|
if (ObjectUtil.isNotEmpty(errorLevel) && Integer.valueOf(errorLevel.toString()).intValue() >= 3) {
|
||||||
v.setRobotEssenceStatus(2);
|
v.setRobotEssenceStatus(2);
|
||||||
@ -231,18 +229,18 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
//待命中
|
//待命中
|
||||||
v.setRobotTaskStatus(0);
|
v.setRobotTaskStatus(0);
|
||||||
v.setMsg("车辆正在待命中");
|
v.setMsg("车辆正在待命中");
|
||||||
} else if (RobotStatusEnum.CHARGE.getType().equals(v.getRobotStatus())) {
|
}else if (RobotStatusEnum.CHARGE.getType().equals(v.getRobotStatus())) {
|
||||||
//充电中
|
//充电中
|
||||||
v.setRobotTaskStatus(2);
|
v.setRobotTaskStatus(2);
|
||||||
v.setMsg("车辆正在充电");
|
v.setMsg("车辆正在充电");
|
||||||
} else {
|
}else {
|
||||||
//任务中
|
//任务中
|
||||||
v.setRobotTaskStatus(1);
|
v.setRobotTaskStatus(1);
|
||||||
if (RobotStatusEnum.DOING.getType().equals(v.getRobotStatus()) && ObjectUtil.isNotEmpty(action)) {
|
if (RobotStatusEnum.DOING.getType().equals(v.getRobotStatus()) && ObjectUtil.isNotEmpty(action)) {
|
||||||
v.setRobotStatus(1);
|
v.setRobotStatus(1);
|
||||||
CommandTypeEnum commandType = CommandTypeEnum.getCommandType(String.valueOf(action));
|
CommandTypeEnum commandType = CommandTypeEnum.getCommandType(String.valueOf(action));
|
||||||
if (ObjectUtil.isNotEmpty(commandType)) {
|
if (ObjectUtil.isNotEmpty(commandType)) {
|
||||||
v.setMsg("车辆正在" + commandType.getMsg());
|
v.setMsg("车辆正在"+commandType.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,7 +249,6 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计车辆待命/任务中/离线
|
* 统计车辆待命/任务中/离线
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -313,6 +310,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -330,7 +328,6 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据mac查询机器人编号
|
* 根据mac查询机器人编号
|
||||||
*
|
|
||||||
* @param mac
|
* @param mac
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -349,10 +346,10 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
.eq(RobotInformationDO::getMacAddress, mac)
|
.eq(RobotInformationDO::getMacAddress, mac)
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
if (ObjectUtil.isNotEmpty(robotInformationDO)) {
|
if (ObjectUtil.isNotEmpty(robotInformationDO)) {
|
||||||
redisUtil.set(RobotTaskChcheConstant.ROBOT_GET_ROBOTNO_BY_MAC + mac, robotInformationDO.getRobotNo());
|
redisUtil.set(RobotTaskChcheConstant.ROBOT_GET_ROBOTNO_BY_MAC + mac,robotInformationDO.getRobotNo());
|
||||||
return robotInformationDO.getRobotNo();
|
return robotInformationDO.getRobotNo();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -58,7 +58,7 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://47.97.8.94:3306/zn_wcs?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowMultiQueries=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://47.97.8.94:3306/zn_wcs?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||||
@ -72,7 +72,7 @@ spring:
|
|||||||
# password: SYSDBA # DM 连接的示例
|
# password: SYSDBA # DM 连接的示例
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://47.97.8.94:3306/zn_wcs?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowMultiQueries=true
|
url: jdbc:mysql://47.97.8.94:3306/zn_wcs?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
||||||
username: root
|
username: root
|
||||||
password: yhtkj@2024!
|
password: yhtkj@2024!
|
||||||
|
|
||||||
@ -230,4 +230,4 @@ zn:
|
|||||||
robot_position_cache_time: 10 #机器人上报点位存储时间(秒)
|
robot_position_cache_time: 10 #机器人上报点位存储时间(秒)
|
||||||
cycle_do_auto_move: true #存在循环的任务,是否开启自动移库. true:存在循环任务,开启自动移库; false:有循环任务不自动移库
|
cycle_do_auto_move: true #存在循环的任务,是否开启自动移库. true:存在循环任务,开启自动移库; false:有循环任务不自动移库
|
||||||
full_electricity: 100 #机器人充满电的电量
|
full_electricity: 100 #机器人充满电的电量
|
||||||
robot_error_level_time: 30 #机器人异常存储时间(秒)
|
robot_error_level_time: 30 #机器人异常存储时间(秒)
|
Loading…
Reference in New Issue
Block a user