Compare commits
7 Commits
c1a17a839b
...
a326ac143f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a326ac143f | ||
![]() |
0a3498bc7e | ||
![]() |
22c8eca028 | ||
![]() |
8565c226cf | ||
![]() |
cd52301d5e | ||
![]() |
8b0713f653 | ||
![]() |
ffa26a1fa9 |
@ -16,7 +16,8 @@ public enum NodeTypeEnum {
|
|||||||
DEVICE(3, "设备点"),
|
DEVICE(3, "设备点"),
|
||||||
PARKING(4, "停车点"),
|
PARKING(4, "停车点"),
|
||||||
CHANGE(5, "区域变更点"),
|
CHANGE(5, "区域变更点"),
|
||||||
WAIT(6, "等待点");
|
WAIT(6, "等待点"),
|
||||||
|
TEXT(7, "文字点");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型
|
* 类型
|
||||||
|
@ -57,6 +57,12 @@ 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);
|
||||||
|
@ -33,6 +33,14 @@ public interface WebSocketSessionManager {
|
|||||||
*/
|
*/
|
||||||
WebSocketSession getSession(String id);
|
WebSocketSession getSession(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 地图 楼+"_"+区 获取session
|
||||||
|
*
|
||||||
|
* @param key
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
WebSocketSession getMapSession(String key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得指定用户类型的 Session 列表
|
* 获得指定用户类型的 Session 列表
|
||||||
*
|
*
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
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.util.ArrayList;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Collection;
|
import java.util.*;
|
||||||
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;
|
||||||
@ -23,22 +22,37 @@ 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 中参数
|
||||||
|
Map<String, String> paramMap = HttpUtil.decodeParamMap(String.valueOf(session.getUri()), StandardCharsets.UTF_8);
|
||||||
|
String type = paramMap.get("type");
|
||||||
|
// -- 如果是地图里面过来的
|
||||||
|
if ("map".equals(type)) {
|
||||||
|
mapSessions.put(paramMap.get("floor") + "_" + paramMap.get("area"), session);
|
||||||
|
} else {
|
||||||
// 添加到 idSessions 中
|
// 添加到 idSessions 中
|
||||||
idSessions.put(session.getId(), session);
|
idSessions.put(session.getId(), session);
|
||||||
// 添加到 userSessions 中
|
// 添加到 userSessions 中
|
||||||
@ -62,9 +76,17 @@ public class WebSocketSessionManagerImpl implements WebSocketSessionManager {
|
|||||||
}
|
}
|
||||||
sessions.add(session);
|
sessions.add(session);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeSession(WebSocketSession session) {
|
public void removeSession(WebSocketSession session) {
|
||||||
|
// 解析 session Url 中参数
|
||||||
|
Map<String, String> paramMap = HttpUtil.decodeParamMap(String.valueOf(session.getUri()), StandardCharsets.UTF_8);
|
||||||
|
String type = paramMap.get("type");
|
||||||
|
// -- 如果是地图里面过来的
|
||||||
|
if ("map".equals(type)) {
|
||||||
|
mapSessions.remove(paramMap.get("floor") + "_" + paramMap.get("area"), session);
|
||||||
|
} else {
|
||||||
// 移除从 idSessions 中
|
// 移除从 idSessions 中
|
||||||
idSessions.remove(session.getId());
|
idSessions.remove(session.getId());
|
||||||
// 移除从 idSessions 中
|
// 移除从 idSessions 中
|
||||||
@ -82,12 +104,18 @@ public class WebSocketSessionManagerImpl implements WebSocketSessionManager {
|
|||||||
userSessionsMap.remove(user.getId(), sessions);
|
userSessionsMap.remove(user.getId(), sessions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WebSocketSession getSession(String id) {
|
public WebSocketSession getSession(String id) {
|
||||||
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);
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.api.robot.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层区域
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FloorZoneDTO {
|
||||||
|
//地图所在楼
|
||||||
|
public String floor;
|
||||||
|
//地图所在区
|
||||||
|
public String area;
|
||||||
|
}
|
@ -9,6 +9,11 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RobotStatusDataDTO {
|
public class RobotStatusDataDTO {
|
||||||
|
/**
|
||||||
|
* 楼层区域
|
||||||
|
*/
|
||||||
|
public FloorZoneDTO floor_zone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机器人位姿
|
* 机器人位姿
|
||||||
*/
|
*/
|
||||||
|
@ -9,6 +9,7 @@ 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;
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
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,8 +54,12 @@ 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
|
||||||
*/
|
*/
|
||||||
@ -79,10 +83,15 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
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().getPose2d().getFloor());
|
robotStatusDataPoseDTO.setFloor(robotStatusDataDTO.getData().getFloor_zone().getFloor());
|
||||||
robotStatusDataPoseDTO.setArea(robotStatusDataDTO.getData().getPose2d().getArea());
|
robotStatusDataPoseDTO.setArea(robotStatusDataDTO.getData().getFloor_zone().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());
|
||||||
@ -138,5 +147,4 @@ public class RobotStatusApiImpl implements RobotStatusApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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() {
|
public CommonResult<List<HouseAreaRespVO>> getHouseAreaList(@RequestParam Long positionMapId) {
|
||||||
List<HouseAreaDO> list = houseAreaService.getHouseAreaList();
|
List<HouseAreaDO> list = houseAreaService.getHouseAreaList(positionMapId);
|
||||||
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 MapBindDeviceInfoDTO dto) {
|
public CommonResult<Boolean> mapBindDeviceInfo(@Valid @RequestBody MapBindDeviceInfoDTO dto) {
|
||||||
informationService.mapBindDeviceInfo(dto);
|
informationService.mapBindDeviceInfo(dto);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ 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;
|
||||||
@ -43,6 +44,12 @@ 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,7 +2,6 @@ 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,11 +1,12 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import lombok.*;
|
|
||||||
import java.util.*;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
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,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -27,6 +28,30 @@ 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,6 +29,38 @@ 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;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.positionmap.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -24,6 +25,30 @@ 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,32 +1,30 @@
|
|||||||
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 org.springframework.web.bind.annotation.*;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
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.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.*;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.*;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.*;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
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
|
||||||
|
@ -6,7 +6,10 @@ 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.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
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;
|
||||||
@ -30,7 +33,6 @@ 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 文档")
|
||||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -41,6 +42,38 @@ 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,6 +50,8 @@ 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();
|
List<HouseAreaDO> getHouseAreaList(Long positionMapId);
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,6 @@ 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;
|
||||||
@ -157,10 +156,10 @@ public class HouseAreaServiceImpl implements HouseAreaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HouseAreaDO> getHouseAreaList() {
|
public List<HouseAreaDO> getHouseAreaList(Long positionMapId) {
|
||||||
List<HouseAreaDO> list = houseAreaMapper.selectList(new LambdaQueryWrapper<HouseAreaDO>()
|
return houseAreaMapper.selectList(new LambdaQueryWrapper<HouseAreaDO>()
|
||||||
|
.eq(HouseAreaDO::getPositionMapId, positionMapId)
|
||||||
.orderByAsc(HouseAreaDO::getId));
|
.orderByAsc(HouseAreaDO::getId));
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,9 +72,11 @@ 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,27 +54,30 @@ 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,6 +3,8 @@ 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.*;
|
||||||
@ -19,13 +21,12 @@ 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 java.util.*;
|
import javax.annotation.Resource;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import java.util.ArrayList;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import java.util.List;
|
||||||
|
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.*;
|
||||||
@ -200,6 +201,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置状态和信息
|
* 设置状态和信息
|
||||||
|
*
|
||||||
* @param v
|
* @param v
|
||||||
*/
|
*/
|
||||||
private void setMsgAndRobotStatus(RobotInformationPageRespVO v) {
|
private void setMsgAndRobotStatus(RobotInformationPageRespVO v) {
|
||||||
@ -251,6 +253,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计车辆待命/任务中/离线
|
* 统计车辆待命/任务中/离线
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -308,7 +311,6 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -326,6 +328,7 @@ public class RobotInformationServiceImpl implements RobotInformationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据mac查询机器人编号
|
* 根据mac查询机器人编号
|
||||||
|
*
|
||||||
* @param mac
|
* @param mac
|
||||||
* @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 # 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&allowMultiQueries=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
|
url: jdbc:mysql://47.97.8.94:3306/zn_wcs?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowMultiQueries=true
|
||||||
username: root
|
username: root
|
||||||
password: yhtkj@2024!
|
password: yhtkj@2024!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user