diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RouteWaypoints.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RouteWaypoints.java index 4d83b21..b2aea1b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RouteWaypoints.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RouteWaypoints.java @@ -63,6 +63,12 @@ public class RouteWaypoints extends BaseEntity @Excel(name = "盘旋参数") private String holdParams; + /** 航点标签文字大小(px),用于地图显示 */ + private Integer labelFontSize; + + /** 航点标签文字颜色(如 #333333),用于地图显示 */ + private String labelColor; + public void setId(Long id) { this.id = id; @@ -179,6 +185,22 @@ public class RouteWaypoints extends BaseEntity return holdParams; } + public void setLabelFontSize(Integer labelFontSize) { + this.labelFontSize = labelFontSize; + } + + public Integer getLabelFontSize() { + return labelFontSize; + } + + public void setLabelColor(String labelColor) { + this.labelColor = labelColor; + } + + public String getLabelColor() { + return labelColor; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -194,6 +216,8 @@ public class RouteWaypoints extends BaseEntity .append("turnAngle", getTurnAngle()) .append("pointType", getPointType()) .append("holdParams", getHoldParams()) + .append("labelFontSize", getLabelFontSize()) + .append("labelColor", getLabelColor()) .toString(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RouteWaypointsServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RouteWaypointsServiceImpl.java index 63be94c..75c5ea1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RouteWaypointsServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RouteWaypointsServiceImpl.java @@ -62,6 +62,14 @@ public class RouteWaypointsServiceImpl implements IRouteWaypointsService routeWaypoints.setSeq((long) (maxSeq + 1)); } + // 2.5 地图标签默认值:字号 14、颜色 #333333(微软雅黑、不加粗) + if (routeWaypoints.getLabelFontSize() == null) { + routeWaypoints.setLabelFontSize(14); + } + if (routeWaypoints.getLabelColor() == null || routeWaypoints.getLabelColor().isEmpty()) { + routeWaypoints.setLabelColor("#333333"); + } + // 3. 执行若依生成的原始插入方法 return routeWaypointsMapper.insertRouteWaypoints(routeWaypoints); } diff --git a/ruoyi-system/src/main/resources/mapper/system/RouteWaypointsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RouteWaypointsMapper.xml index b5d6df5..a484b4d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RouteWaypointsMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RouteWaypointsMapper.xml @@ -17,10 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select id, route_id, name, seq, lat, lng, alt, speed, start_time, turn_angle, point_type, hold_params from route_waypoints + select id, route_id, name, seq, lat, lng, alt, speed, start_time, turn_angle, point_type, hold_params, label_font_size, label_color from route_waypoints