Ver Fonte

保存停靠点

shiwn há 3 meses atrás
pai
commit
b20ef8b333

+ 5 - 5
src/main/java/com/sw/patroleditor/domain/dto/PointDTO.java

@@ -9,12 +9,12 @@ import java.io.Serializable;
 
 /**
  * 点参数表。
-地图信息,点的种类和位置信息。
+ * 地图信息,点的种类和位置信息。
  * point
  */
 @Data
 @TableName("point")
-public class PointDTO{
+public class PointDTO {
     /**
      * 编号
      */
@@ -44,17 +44,17 @@ public class PointDTO{
     /**
      * 地图相对位置X坐标 unit:pix
      */
-    private Integer relativePosX;
+    private Integer relativePosX = 0;
 
     /**
      * 地图相对位置Y坐标 unit:pix
      */
-    private Integer relativePosY;
+    private Integer relativePosY = 0;
 
     /**
      * 机器人朝向
      */
-    private Double yaw;
+    private Double yaw = 0.00;
 
     private String note;
 

+ 1 - 1
src/main/java/com/sw/patroleditor/service/impl/LocationServiceImpl.java

@@ -32,7 +32,7 @@ public class LocationServiceImpl implements LocationService {
     public int savePoint(PointVO vo) {
         RobotDataModel robotDataModel = robotDataCallBack.getRobotDataModel();
         PointDTO dto = new PointDTO();
-        dto.setUuid(UUID.randomUUID().toString());
+        dto.setUuid(UUID.randomUUID().toString().replaceAll("-", ""));
         dto.setType(vo.getType());
         dto.setNote(vo.getNote());
         dto.setAbsolutePosX(robotDataModel.getPosX());