Browse Source

航线 & 一些bug处理

ChenSir 1 year ago
parent
commit
34c6333943
52 changed files with 2857 additions and 403 deletions
  1. 15 5
      aidex-admin/src/main/resources/application.yml
  2. 15 5
      aidex-admin/target/classes/application.yml
  3. 9 2
      aidex-common/pom.xml
  4. 42 0
      aidex-common/src/main/java/com/aidex/common/config/WxConfig.java
  5. 44 0
      aidex-common/src/main/java/com/aidex/common/config/WxProperties.java
  6. 21 0
      aidex-common/src/main/java/com/aidex/common/constant/Constants.java
  7. 6 2
      aidex-common/src/main/java/com/aidex/common/utils/DateUtils.java
  8. BIN
      aidex-common/target/classes/com/aidex/common/constant/Constants.class
  9. 129 0
      aidex-controller/src/main/java/com/aidex/web/controller/system/SysMiniappDailyVisitController.java
  10. 58 0
      aidex-controller/src/main/java/com/aidex/web/controller/system/SysRouteController.java
  11. 22 0
      aidex-controller/src/main/java/com/aidex/web/controller/system/SysWharfController.java
  12. 2 2
      aidex-controller/src/main/java/com/aidex/web/core/config/SwaggerConfig.java
  13. BIN
      aidex-controller/target/classes/com/aidex/web/core/config/SwaggerConfig.class
  14. 1 1
      aidex-framework/src/main/java/com/aidex/framework/config/ResourcesConfig.java
  15. 1 0
      aidex-framework/src/main/java/com/aidex/framework/config/SecurityConfig.java
  16. BIN
      aidex-framework/target/classes/com/aidex/framework/config/SecurityConfig.class
  17. 3 5
      aidex-quartz/src/main/java/com/aidex/quartz/task/GetAlarmDataByDevice.java
  18. 93 0
      aidex-quartz/src/main/java/com/aidex/quartz/task/GetMinDataByDate.java
  19. 1 1
      aidex-quartz/src/main/java/com/aidex/quartz/task/RefreshMdsTask.java
  20. 5 0
      aidex-system/pom.xml
  21. 1 1
      aidex-system/src/main/java/com/aidex/framework/cache/MyInitializer.java
  22. 187 0
      aidex-system/src/main/java/com/aidex/system/domain/SysMiniappDailyVisit.java
  23. 24 0
      aidex-system/src/main/java/com/aidex/system/mapper/SysMiniappDailyVisitMapper.java
  24. 219 0
      aidex-system/src/main/java/com/aidex/system/mapper/SysMiniappDailyVisitMapper.xml
  25. 2 0
      aidex-system/src/main/java/com/aidex/system/mapper/SysWharfMapper.java
  26. 4 0
      aidex-system/src/main/java/com/aidex/system/mapper/SysWharfMapper.xml
  27. 33 0
      aidex-system/src/main/java/com/aidex/system/service/SysMiniappDailyVisitService.java
  28. 7 0
      aidex-system/src/main/java/com/aidex/system/service/SysWharfService.java
  29. 181 0
      aidex-system/src/main/java/com/aidex/system/service/impl/SysMiniappDailyVisitServiceImpl.java
  30. 6 0
      aidex-system/src/main/java/com/aidex/system/service/impl/SysWharfServiceImpl.java
  31. 6 5
      aidex-ui/package.json
  32. 3 1
      aidex-ui/public/index.html
  33. 18 0
      aidex-ui/src/api/system/line.js
  34. 69 0
      aidex-ui/src/api/system/sysMiniappDailyVisit.js
  35. 17 0
      aidex-ui/src/api/system/sysWharf.js
  36. BIN
      aidex-ui/src/assets/images/marker.png
  37. 707 0
      aidex-ui/src/assets/scene.gltf
  38. 1 1
      aidex-ui/src/components/ProLayout/utils/dynamicTheme.js
  39. 1 1
      aidex-ui/src/components/SettingDrawer/themeColor.js
  40. 1 1
      aidex-ui/src/router/generator-routers.js
  41. 1 1
      aidex-ui/src/router/index.js
  42. 3 3
      aidex-ui/src/store/index.js
  43. 1 1
      aidex-ui/src/store/modules/permission.js
  44. 15 10
      aidex-ui/src/views/dashboard/portal/ToDo.vue
  45. 66 86
      aidex-ui/src/views/demo/chart/line-chart.vue
  46. 113 113
      aidex-ui/src/views/operation/location/index.vue
  47. 152 152
      aidex-ui/src/views/operation/location/modules/ShipTree.vue
  48. 502 0
      aidex-ui/src/views/system/line/index.vue
  49. 29 2
      aidex-ui/src/views/system/syswharf/index.vue
  50. 1 1
      aidex-ui/src/views/tool/swagger/index.vue
  51. 1 1
      aidex-ui/vue.config.js
  52. 19 0
      sql/SysMiniappDailyVisitMenu.sql

+ 15 - 5
aidex-admin/src/main/resources/application.yml

@@ -36,8 +36,8 @@ server:
 # 日志配置
 logging:
   level:
-    com.aidex: error
-    org.springframework: error
+    com.aidex: info
+    org.springframework: info
 
 # 用户配置
 user:
@@ -70,13 +70,13 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: 192.168.1.243
+    host: 127.0.0.1
     # 端口,默认为6379
-    port: 6379
+    port: 16379
     # 数据库索引
     database: 0
     # 密码
-    password: 12345678
+    # password: 12345678
     # 连接超时时间
     timeout: 10s
     lettuce:
@@ -135,3 +135,13 @@ xss:
   excludes: /system/notice
   # 匹配链接
   urlPatterns: /system/*,/monitor/*,/tool/*
+
+wx:
+  miniapp:
+    appid: wx89863f6cc3943d04 #微信小程序的appid
+    secret: 1d8a4519dd92e626e183c4c7e2dad14e  #微信小程序的Secret
+    msgDataFormat: JSON
+    token:
+    aesKey:
+
+

+ 15 - 5
aidex-admin/target/classes/application.yml

@@ -36,8 +36,8 @@ server:
 # 日志配置
 logging:
   level:
-    com.aidex: error
-    org.springframework: error
+    com.aidex: info
+    org.springframework: info
 
 # 用户配置
 user:
@@ -70,13 +70,13 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: 192.168.1.243
+    host: 127.0.0.1
     # 端口,默认为6379
-    port: 6379
+    port: 16379
     # 数据库索引
     database: 0
     # 密码
-    password: 12345678
+    # password: 12345678
     # 连接超时时间
     timeout: 10s
     lettuce:
@@ -135,3 +135,13 @@ xss:
   excludes: /system/notice
   # 匹配链接
   urlPatterns: /system/*,/monitor/*,/tool/*
+
+wx:
+  miniapp:
+    appid: wx89863f6cc3943d04 #微信小程序的appid
+    secret: 1d8a4519dd92e626e183c4c7e2dad14e  #微信小程序的Secret
+    msgDataFormat: JSON
+    token:
+    aesKey:
+
+

+ 9 - 2
aidex-common/pom.xml

@@ -58,7 +58,7 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
-  
+
         <!-- JSON工具类 -->
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
@@ -151,6 +151,13 @@
             <version>${pinyin4j.version}</version>
         </dependency>
 
+        <!--  引入微信小程序jar包  -->
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-miniapp</artifactId>
+            <version>4.6.0</version>
+        </dependency>
+
     </dependencies>
 <build>
     <resources>
@@ -169,4 +176,4 @@
         </resource>
     </resources>
 </build>
-</project>
+</project>

+ 42 - 0
aidex-common/src/main/java/com/aidex/common/config/WxConfig.java

@@ -0,0 +1,42 @@
+package com.aidex.common.config;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
+import cn.binarywang.wx.miniapp.config.WxMaConfig;
+import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
+import lombok.AllArgsConstructor;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@AllArgsConstructor
+@Configuration
+@ConditionalOnClass({WxMaService.class})
+@EnableConfigurationProperties(WxProperties.class)
+public class WxConfig {
+
+	private final WxProperties wxProperties;
+
+	/**
+	 * 小程序配置
+	 * @return
+	 */
+	@Bean
+	@ConditionalOnMissingBean
+	public WxMaConfig wxMaConfig() {
+		WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
+		config.setAppid(this.wxProperties.getAppid());
+		config.setSecret(this.wxProperties.getSecret());
+		return config;
+	}
+
+	@Bean
+	public WxMaService wxMaService(WxMaConfig maConfig) {
+		WxMaService service = new WxMaServiceImpl();
+		service.setWxMaConfig(maConfig);
+		return service;
+	}
+}
+

+ 44 - 0
aidex-common/src/main/java/com/aidex/common/config/WxProperties.java

@@ -0,0 +1,44 @@
+package com.aidex.common.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author :ChenSir
+ * @date :Created in 2024/3/18 10:45
+ * @description:读取微信小程序配置
+ */
+@Configuration
+@ConfigurationProperties(prefix = "wx.miniapp")
+public class WxProperties {
+
+	private String appid;
+
+	private String secret;
+
+	private String msgDataFormat;
+
+	public String getAppid() {
+		return appid;
+	}
+
+	public void setAppid(String appid) {
+		this.appid = appid;
+	}
+
+	public String getSecret() {
+		return secret;
+	}
+
+	public void setSecret(String secret) {
+		this.secret = secret;
+	}
+
+	public String getMsgDataFormat() {
+		return msgDataFormat;
+	}
+
+	public void setMsgDataFormat(String msgDataFormat) {
+		this.msgDataFormat = msgDataFormat;
+	}
+}

+ 21 - 0
aidex-common/src/main/java/com/aidex/common/constant/Constants.java

@@ -194,4 +194,25 @@ public class Constants {
      * GPS_token 有效期(分钟)
      */
     public static final Integer GPS_TOKEN_EXPIRATION = 5;
+
+
+    /**
+     * 统计类型 - 周
+     */
+    public static final String STATISTICS_TYPE_WEEK = "week";
+
+    /**
+     * 统计类型 - 月
+     */
+    public static final String STATISTICS_TYPE_MONTH = "month";
+
+    /**
+     * 统计类型 - 年
+     */
+    public static final String STATISTICS_TYPE_YEAR = "year";
+
+    /**
+     * 航线存储前缀
+     */
+public static final String ROUTE_STORE_PREFIX =  "route_data:";
 }

+ 6 - 2
aidex-common/src/main/java/com/aidex/common/utils/DateUtils.java

@@ -1,5 +1,7 @@
 package com.aidex.common.utils;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
+
 import java.lang.management.ManagementFactory;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -7,8 +9,6 @@ import java.time.*;
 import java.util.Calendar;
 import java.util.Date;
 
-import org.apache.commons.lang3.time.DateFormatUtils;
-
 /**
  * 时间工具类
  *
@@ -382,4 +382,8 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
         return Date.from(zdt.toInstant());
     }
+
+
+
+
 }

BIN
aidex-common/target/classes/com/aidex/common/constant/Constants.class


+ 129 - 0
aidex-controller/src/main/java/com/aidex/web/controller/system/SysMiniappDailyVisitController.java

@@ -0,0 +1,129 @@
+package com.aidex.web.controller.system;
+
+import java.util.Date;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+
+import cn.hutool.core.date.DateUtil;
+import com.aidex.common.annotation.Log;
+import com.aidex.common.constant.Constants;
+import com.aidex.common.core.domain.R;
+import com.github.pagehelper.PageInfo;
+import com.aidex.common.core.page.PageDomain;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import com.aidex.common.enums.BusinessType;
+import com.aidex.common.utils.poi.ExcelUtil;
+import com.aidex.framework.cache.DictUtils;
+import javax.validation.constraints.*;
+import org.springframework.web.bind.annotation.*;
+import com.aidex.common.core.controller.BaseController;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.aidex.system.domain.SysMiniappDailyVisit;
+import com.aidex.system.service.SysMiniappDailyVisitService;
+
+/**
+ * 小程序日数据统计Controller
+ * @author ChenSir
+ * @email 914769835
+ * @date 2024-03-18
+ */
+@RestController
+@RequestMapping("/system/sysMiniappDailyVisit")
+public class SysMiniappDailyVisitController extends BaseController {
+
+    @Autowired
+    private SysMiniappDailyVisitService sysMiniappDailyVisitService;
+
+    /**
+     * 查询小程序日数据统计列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysMiniappDailyVisit:list')")
+    @GetMapping("/list")
+    public R<PageInfo> list(SysMiniappDailyVisit sysMiniappDailyVisit, HttpServletRequest request, HttpServletResponse response) {
+        sysMiniappDailyVisit.setPage(new PageDomain(request, response));
+        return R.data(sysMiniappDailyVisitService.findPage(sysMiniappDailyVisit));
+    }
+
+    /**
+     * 获取小程序日数据统计详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysMiniappDailyVisit:query')")
+    @GetMapping(value = "/{id}")
+    public R<SysMiniappDailyVisit> detail(@PathVariable("id") String id) {
+        return R.data(sysMiniappDailyVisitService.get(id));
+    }
+
+    /**
+     * 新增小程序日数据统计
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysMiniappDailyVisit:add')")
+    @Log(title = "小程序日数据统计", businessType = BusinessType.INSERT)
+    @PostMapping
+    public R add(@RequestBody @Validated  SysMiniappDailyVisit sysMiniappDailyVisit) {
+        return R.status(sysMiniappDailyVisitService.save(sysMiniappDailyVisit));
+    }
+
+    /**
+     * 修改小程序日数据统计
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysMiniappDailyVisit:edit')")
+    @Log(title = "小程序日数据统计", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public R edit(@RequestBody @Validated SysMiniappDailyVisit sysMiniappDailyVisit) {
+        return R.status(sysMiniappDailyVisitService.save(sysMiniappDailyVisit));
+    }
+
+    /**
+     * 删除小程序日数据统计
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysMiniappDailyVisit:remove')")
+    @Log(title = "小程序日数据统计", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R remove(@PathVariable String[] ids) {
+        return R.status(sysMiniappDailyVisitService.deleteSysMiniappDailyVisitByIds(ids));
+    }
+
+
+    /**
+     * 导出小程序日数据统计列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysMiniappDailyVisit:export')")
+    @Log(title = "小程序日数据统计", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public R export(SysMiniappDailyVisit sysMiniappDailyVisit) {
+        List<SysMiniappDailyVisit> list = sysMiniappDailyVisitService.findList(sysMiniappDailyVisit);
+        ExcelUtil<SysMiniappDailyVisit> util = new ExcelUtil<SysMiniappDailyVisit>(SysMiniappDailyVisit.class);
+        return util.exportExcel(list, "小程序日数据统计数据");
+    }
+
+    /**
+     * 根据字典类型查询字典数据信息等其他自定义信息
+     */
+    @GetMapping(value = "/getInitData/{dictTypes}")
+    public R getInitData(@PathVariable String dictTypes) {
+        Map<String, Object> dataMap = new HashMap<String, Object>();
+        dataMap.putAll(DictUtils.getMultiDictList(dictTypes));
+        return R.data(dataMap);
+    }
+
+    /**
+     * 首页折线图小程序统计数据
+     */
+    @GetMapping(value = "/getSysMiniappDailyVisit/{statisticsType}")
+    public R getSysMiniappDailyVisit(@PathVariable String statisticsType) {
+        if (Constants.STATISTICS_TYPE_WEEK.equals(statisticsType)){
+            return R.data(sysMiniappDailyVisitService.getSysMiniappDailyVisit(statisticsType, DateUtil.beginOfWeek(new Date()), DateUtil.endOfWeek(new Date())));
+        } else if (Constants.STATISTICS_TYPE_MONTH.equals(statisticsType)){
+            return R.data(sysMiniappDailyVisitService.getSysMiniappDailyVisit(statisticsType, DateUtil.beginOfMonth(new Date()), DateUtil.endOfMonth(new Date())));
+        } else if (Constants.STATISTICS_TYPE_YEAR.equals(statisticsType)){
+            return R.data(sysMiniappDailyVisitService.getSysMiniappDailyVisit(statisticsType, DateUtil.beginOfYear(new Date()), DateUtil.endOfYear(new Date())));
+        }else {
+            return R.data(null,"统计类型错误!");
+        }
+    }
+
+}

+ 58 - 0
aidex-controller/src/main/java/com/aidex/web/controller/system/SysRouteController.java

@@ -0,0 +1,58 @@
+package com.aidex.web.controller.system;
+
+import com.aidex.common.annotation.Log;
+import com.aidex.common.constant.Constants;
+import com.aidex.common.core.controller.BaseController;
+import com.aidex.common.core.domain.R;
+import com.aidex.common.core.redis.RedisCache;
+import com.aidex.common.enums.BusinessType;
+import com.alibaba.fastjson2.JSONArray;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 航线保存查询-Redis
+ * @author ChenSir
+ * @email 914769835
+ * @date 2024-03-16
+ */
+@RestController
+@RequestMapping("/system/sysRouter")
+public class SysRouteController extends BaseController {
+
+    @Autowired
+    private RedisCache  redisCache;
+
+
+    /**
+     * 获取码头管理详细信息
+     */
+    @GetMapping
+    public R<JSONArray> detail() {
+        JSONArray data = new JSONArray();
+        data = redisCache.getCacheObject(Constants.ROUTE_STORE_PREFIX);
+        return R.data(data);
+    }
+
+    /**
+     * 新增码头管理
+     */
+    @Log(title = "航线管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public R add(@RequestBody @Validated  JSONArray data) {
+        redisCache.setCacheObject(Constants.ROUTE_STORE_PREFIX ,data);
+        return R.status(redisCache.hasKey(Constants.ROUTE_STORE_PREFIX));
+    }
+
+
+
+
+
+
+
+
+
+}

+ 22 - 0
aidex-controller/src/main/java/com/aidex/web/controller/system/SysWharfController.java

@@ -2,6 +2,7 @@ package com.aidex.web.controller.system;
 
 import com.aidex.common.annotation.Log;
 import com.aidex.common.core.controller.BaseController;
+import com.aidex.common.core.domain.BaseEntity;
 import com.aidex.common.core.domain.R;
 import com.aidex.common.core.page.PageDomain;
 import com.aidex.common.enums.BusinessType;
@@ -45,6 +46,17 @@ public class SysWharfController extends BaseController {
     }
 
     /**
+     * 查询码头管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysWharf:list')")
+    @GetMapping("/getAll")
+    public R<List<SysWharf>> getAll() {
+        SysWharf sysWharf = new SysWharf();
+        sysWharf.setStatus(BaseEntity.STATUS_NORMAL);
+        return R.data(sysWharfService.findList(sysWharf));
+    }
+
+    /**
      * 获取码头管理详细信息
      */
     @PreAuthorize("@ss.hasPermi('system:sysWharf:query')")
@@ -74,6 +86,16 @@ public class SysWharfController extends BaseController {
     }
 
     /**
+     * 修改码头状态
+     */
+    @PreAuthorize("@ss.hasPermi('system:sysWharf:edit')")
+    @Log(title = "码头管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/updateStatus")
+    public R updateStatus(@RequestBody @Validated SysWharf sysWharf) {
+        return R.status(sysWharfService.updateStatus(sysWharf));
+    }
+
+    /**
      * 删除码头管理
      */
     @PreAuthorize("@ss.hasPermi('system:sysWharf:remove')")

+ 2 - 2
aidex-controller/src/main/java/com/aidex/web/core/config/SwaggerConfig.java

@@ -115,9 +115,9 @@ public class SwaggerConfig
         // 用ApiInfoBuilder进行定制
         return new ApiInfoBuilder()
                 // 设置标题
-                .title("标题:若依管理系统_接口文档")
+                .title("标题:水上巴士_接口文档")
                 // 描述
-                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
+                .description("描述:水上巴士_接口文档...")
                 // 作者信息
                 .contact(new Contact(aidexConfig.getName(), null, null))
                 // 版本

BIN
aidex-controller/target/classes/com/aidex/web/core/config/SwaggerConfig.class


+ 1 - 1
aidex-framework/src/main/java/com/aidex/framework/config/ResourcesConfig.java

@@ -71,4 +71,4 @@ public class ResourcesConfig implements WebMvcConfigurer
         // 返回新的CorsFilter
         return new CorsFilter(source);
     }
-}
+}

+ 1 - 0
aidex-framework/src/main/java/com/aidex/framework/config/SecurityConfig.java

@@ -147,6 +147,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                 .antMatchers("/swagger-resources/**").anonymous()
                 .antMatchers("/webjars/**").anonymous()
                 .antMatchers("/*/api-docs").anonymous()
+                .antMatchers("/*/api-docs/**").anonymous()
                 .antMatchers("/druid/**").anonymous()
                 .antMatchers("/app/*").anonymous()
                 .antMatchers(anonymousUrls.toArray(new String[0])).anonymous()

BIN
aidex-framework/target/classes/com/aidex/framework/config/SecurityConfig.class


+ 3 - 5
aidex-quartz/src/main/java/com/aidex/quartz/task/GetAlarmDataByDevice.java

@@ -27,7 +27,7 @@ import java.util.Map;
 import static com.aidex.common.enums.AlarmType.*;
 
 /**
- * @author :XueRuiXing
+ * @author :ChenSir
  * @date :Created in 2024/3/17 20:07
  * @description:单台设备报警详单-根据起止时间和报警编号,获取告警的详细信息。
  */
@@ -74,10 +74,8 @@ public class GetAlarmDataByDevice {
 					paramMap.put("w", "AlarmDetails");
 					paramMap.put("mds", mds);
 					paramMap.put("macid", item.getShipNum());
-					/*paramMap.put("startTime", currentTimeMillis);
-					paramMap.put("endTime", startOfDay);*/
-					paramMap.put("startTime", "1709222400000");
-					paramMap.put("endTime", "1710604800000");
+					paramMap.put("startTime", startOfDay);
+					paramMap.put("endTime", currentTimeMillis);
 					paramMap.put("mapType", "QQ");
 					paramMap.put("alarmTypes", builder.toString());
 					logger.info("请求参数:{}", paramMap);

+ 93 - 0
aidex-quartz/src/main/java/com/aidex/quartz/task/GetMinDataByDate.java

@@ -0,0 +1,93 @@
+package com.aidex.quartz.task;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.bean.analysis.*;
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.date.DateRange;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.http.HttpRequest;
+import com.aidex.common.constant.Constants;
+import com.aidex.common.core.domain.BaseEntity;
+import com.aidex.common.core.redis.RedisCache;
+import com.aidex.common.utils.StringUtils;
+import com.aidex.framework.cache.ConfigUtils;
+import com.aidex.system.domain.SysAlarm;
+import com.aidex.system.domain.SysConfig;
+import com.aidex.system.domain.SysMiniappDailyVisit;
+import com.aidex.system.domain.SysShip;
+import com.aidex.system.service.SysAlarmService;
+import com.aidex.system.service.SysMiniappDailyVisitService;
+import com.aidex.system.service.SysShipService;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.google.common.collect.Lists;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static com.aidex.common.enums.AlarmType.*;
+
+/**
+ * @author :ChenSir
+ * @date :Created in 2024/3/17 20:07
+ * @description:获取小程序统计数据
+ */
+@Component("GetMinDataByDate")
+public class GetMinDataByDate {
+
+	protected static final Logger logger = LoggerFactory.getLogger(GetMinDataByDate.class);
+
+	@Resource
+	private WxMaService wxMaService;
+
+	@Autowired
+	private SysMiniappDailyVisitService miniappDailyVisitService;
+
+	/**
+	 * 刷新GPS的token
+	 * @return token
+	 */
+	public void getDataService(){
+		logger.info("获取小程序统计数据---------开始");
+		try{
+			// 获取本年度数据
+			/*Date beginOfWeek = DateUtil.beginOfYear(new Date());
+			Date endOfWeek = DateUtil.endOfWeek(new Date(), true);
+			DateRange range = DateUtil.range(beginOfWeek, endOfWeek, DateField.DAY_OF_WEEK);
+			List<DateTime> dateTimes = Lists.newArrayList(range.iterator());
+			for (DateTime mydate : dateTimes){
+
+			}*/
+
+			List<WxMaVisitTrend> dailyVisitTrend = wxMaService.getAnalysisService().getDailyVisitTrend(DateUtil.yesterday(), DateUtil.yesterday());
+			logger.info("获取用户访问小程序数据日趋势---[统计数据]----{}", dailyVisitTrend);
+			for (WxMaVisitTrend item : dailyVisitTrend){
+				SysMiniappDailyVisit sysMiniappDailyVisit = new SysMiniappDailyVisit();
+				BeanUtils.copyProperties(item, sysMiniappDailyVisit);
+				String date = DateUtil.format(DateUtil.parse(item.getRefDate(), "yyyyMMdd"), "yyyy-MM-dd");
+				sysMiniappDailyVisit.setRefDate(DateUtil.parseDate(date));
+				sysMiniappDailyVisit.setStayTimeUv(String.valueOf(item.getStayTimeUv()));
+				sysMiniappDailyVisit.setStayTimeSession(String.valueOf(item.getStayTimeSession()));
+				sysMiniappDailyVisit.setVisitDepth(String.valueOf(item.getVisitDepth()));
+				if (miniappDailyVisitService.get(sysMiniappDailyVisit) == null){
+					miniappDailyVisitService.save(sysMiniappDailyVisit);
+				}
+			}
+
+		}catch (Exception e){
+			logger.error(e.getLocalizedMessage());
+		}
+		logger.info("获取小程序统计数据----------结束");
+	}
+
+
+}

+ 1 - 1
aidex-quartz/src/main/java/com/aidex/quartz/task/RefreshMdsTask.java

@@ -17,7 +17,7 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 /**
- * @author :XueRuiXing
+ * @author :ChenSir
  * @date :Created in 2024/3/17 20:07
  * @description:由于mds令牌有时效性,某些场景(模块或页面)需要线程常驻,那么需要mds长期有效,由于接口调用可以顺延mds的时效,建议定时器每隔5分钟请求一次本接口,确保mds不会过期。
  */

+ 5 - 0
aidex-system/pom.xml

@@ -74,6 +74,11 @@
             <artifactId>guava</artifactId>
             <version>25.0-jre</version>
         </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
 
     </dependencies>
 </project>

+ 1 - 1
aidex-system/src/main/java/com/aidex/framework/cache/MyInitializer.java

@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
 
 
 /**
- * @author :XueRuiXing
+ * @author :ChenSir
  * @date :Created in 2024/3/17 13:33
  * @description:初始话获取gps平台的token,存入redis
  */

+ 187 - 0
aidex-system/src/main/java/com/aidex/system/domain/SysMiniappDailyVisit.java

@@ -0,0 +1,187 @@
+package com.aidex.system.domain;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import com.aidex.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.aidex.common.utils.log.annotation.FieldRemark;
+import com.aidex.common.utils.log.annotation.LogField;
+import com.aidex.common.annotation.Excel;
+
+/**
+ * 小程序日数据统计对象 sys_miniapp_daily_visit
+ * @author ChenSir
+ * @email 914769835
+ * @date 2024-03-18
+ */
+@Data
+public class SysMiniappDailyVisit extends BaseEntity<SysMiniappDailyVisit>
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 数据获取日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "数据获取日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @LogField
+    @FieldRemark(name = "数据获取日期",field = "refDate")
+    private Date refDate;
+
+    /** 数据获取日期开始 */
+    private String beginRefDate;
+
+    /** 数据获取日期结束 */
+    private String endRefDate;
+	
+    /** 小程序打开次数 */
+    @Excel(name = "小程序打开次数")
+    @LogField
+    @FieldRemark(name = "小程序打开次数",field = "sessionCnt")
+    private Long sessionCnt;
+
+    /** 小程序访问次数 */
+    @Excel(name = "小程序访问次数")
+    @LogField
+    @FieldRemark(name = "小程序访问次数",field = "visitPv")
+    private Long visitPv;
+
+    /** 小程序访问次数 */
+    @Excel(name = "小程序访问次数")
+    @LogField
+    @FieldRemark(name = "小程序访问次数",field = "visitUv")
+    private Long visitUv;
+
+    /** 小程序新用户数量 */
+    @Excel(name = "小程序新用户数量")
+    @LogField
+    @FieldRemark(name = "小程序新用户数量",field = "visitUvNew")
+    private Long visitUvNew;
+
+    /** 人均停留时间-秒 */
+    @Excel(name = "人均停留时间-秒")
+    @NotBlank(message = "人均停留时间-秒不允许为空")
+    @LogField
+    @FieldRemark(name = "人均停留时间-秒",field = "stayTimeUv")
+    private String stayTimeUv;
+
+    /** 次均停留时间-秒 */
+    @Excel(name = "次均停留时间-秒")
+    @NotBlank(message = "次均停留时间-秒不允许为空")
+    @LogField
+    @FieldRemark(name = "次均停留时间-秒",field = "stayTimeSession")
+    private String stayTimeSession;
+
+    /** 平均访问深度 */
+    @NotBlank(message = "平均访问深度不允许为空")
+    @LogField
+    @FieldRemark(name = "平均访问深度",field = "visitDepth")
+    private String visitDepth;
+
+    public void setRefDate(Date refDate) 
+    {
+        this.refDate = refDate;
+    }
+
+    public Date getRefDate() 
+    {
+        return refDate;
+    }
+
+    public void setSessionCnt(Long sessionCnt) 
+    {
+        this.sessionCnt = sessionCnt;
+    }
+
+    public Long getSessionCnt() 
+    {
+        return sessionCnt;
+    }
+
+    public void setVisitPv(Long visitPv) 
+    {
+        this.visitPv = visitPv;
+    }
+
+    public Long getVisitPv() 
+    {
+        return visitPv;
+    }
+
+    public void setVisitUv(Long visitUv) 
+    {
+        this.visitUv = visitUv;
+    }
+
+    public Long getVisitUv() 
+    {
+        return visitUv;
+    }
+
+    public void setVisitUvNew(Long visitUvNew) 
+    {
+        this.visitUvNew = visitUvNew;
+    }
+
+    public Long getVisitUvNew() 
+    {
+        return visitUvNew;
+    }
+
+    public void setStayTimeUv(String stayTimeUv) 
+    {
+        this.stayTimeUv = stayTimeUv;
+    }
+
+    public String getStayTimeUv() 
+    {
+        return stayTimeUv;
+    }
+
+    public void setStayTimeSession(String stayTimeSession) 
+    {
+        this.stayTimeSession = stayTimeSession;
+    }
+
+    public String getStayTimeSession() 
+    {
+        return stayTimeSession;
+    }
+
+    public void setVisitDepth(String visitDepth) 
+    {
+        this.visitDepth = visitDepth;
+    }
+
+    public String getVisitDepth() 
+    {
+        return visitDepth;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("refDate", getRefDate())
+            .append("sessionCnt", getSessionCnt())
+            .append("visitPv", getVisitPv())
+            .append("visitUv", getVisitUv())
+            .append("visitUvNew", getVisitUvNew())
+            .append("stayTimeUv", getStayTimeUv())
+            .append("stayTimeSession", getStayTimeSession())
+            .append("visitDepth", getVisitDepth())
+            .append("remark", getRemark())
+            .append("id", getId())
+            .append("createBy", getCreateBy())
+            .append("createDept", getCreateDept())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("updateIp", getUpdateIp())
+            .append("version", getVersion())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 24 - 0
aidex-system/src/main/java/com/aidex/system/mapper/SysMiniappDailyVisitMapper.java

@@ -0,0 +1,24 @@
+package com.aidex.system.mapper;
+
+import com.aidex.common.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import com.aidex.system.domain.SysMiniappDailyVisit;
+
+/**
+ * 小程序日数据统计Mapper接口
+ * @author ChenSir
+ * @email 914769835
+ * @date 2024-03-18
+ */
+public interface SysMiniappDailyVisitMapper extends BaseMapper<SysMiniappDailyVisit>
+{
+
+    /**
+     * 批量删除小程序日数据统计
+     * @param ids 需要删除的小程序日数据统计ID集合
+     * @return
+     */
+    public int deleteSysMiniappDailyVisitByIds(@Param("ids") String[] ids, @Param("DEL_FLAG_DELETE") String DEL_FLAG_DELETE);
+
+
+}

+ 219 - 0
aidex-system/src/main/java/com/aidex/system/mapper/SysMiniappDailyVisitMapper.xml

@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.aidex.system.mapper.SysMiniappDailyVisitMapper">
+
+    <sql id="sysMiniappDailyVisitColumns">
+        a.ref_date as "refDate",
+
+        a.session_cnt as "sessionCnt",
+
+        a.visit_pv as "visitPv",
+
+        a.visit_uv as "visitUv",
+
+        a.visit_uv_new as "visitUvNew",
+
+        a.stay_time_uv as "stayTimeUv",
+
+        a.stay_time_session as "stayTimeSession",
+
+        a.visit_depth as "visitDepth",
+
+        a.remark as "remark",
+
+        a.id as "id",
+
+        a.create_by as "createBy",
+
+        a.create_dept as "createDept",
+
+        a.create_time as "createTime",
+
+        a.update_by as "updateBy",
+
+        a.update_time as "updateTime",
+
+        a.update_ip as "updateIp",
+
+        a.version as "version",
+
+        a.del_flag as "delFlag"
+
+    </sql>
+
+    <sql id="sysMiniappDailyVisitJoins">
+    </sql>
+
+    <select id="get" resultType="SysMiniappDailyVisit">
+        SELECT
+            <include refid="sysMiniappDailyVisitColumns"/>
+        FROM sys_miniapp_daily_visit a
+        <include refid="sysMiniappDailyVisitJoins"/>
+        WHERE a.id = #{id}
+    </select>
+
+    <select id="findList" resultType="SysMiniappDailyVisit">
+        SELECT
+            <include refid="sysMiniappDailyVisitColumns"/>
+        FROM sys_miniapp_daily_visit a
+        <include refid="sysMiniappDailyVisitJoins"/>
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="beginRefDate != null and beginRefDate != ''"><!-- 开始时间检索 -->
+                AND date_format(a.ref_date,'%y%m%d') &gt;= date_format(#{beginRefDate},'%y%m%d')
+            </if>
+            <if test="endRefDate != null and endRefDate != ''"><!-- 结束时间检索 -->
+                AND date_format(a.ref_date,'%y%m%d')  &lt;= date_format(#{endRefDate},'%y%m%d')
+            </if>
+            <if test="sessionCnt != null ">
+                AND a.session_cnt = #{sessionCnt}
+            </if>
+            <if test="visitPv != null ">
+                AND a.visit_pv = #{visitPv}
+            </if>
+            <if test="visitUv != null ">
+                AND a.visit_uv = #{visitUv}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+            </otherwise>
+        </choose>
+    </select>
+
+    <select id="findListWithUnique" resultType="SysMiniappDailyVisit">
+        SELECT
+            a.id
+        FROM sys_miniapp_daily_visit a
+        <include refid="sysMiniappDailyVisitJoins"/>
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="notEqualId != null and notEqualId != ''">
+                AND id != #{notEqualId}
+            </if>
+        </where>
+    </select>
+
+
+    <insert id="insert">
+        INSERT INTO sys_miniapp_daily_visit(
+            ref_date,
+
+            session_cnt,
+
+            visit_pv,
+
+            visit_uv,
+
+            visit_uv_new,
+
+            stay_time_uv,
+
+            stay_time_session,
+
+            visit_depth,
+
+            remark,
+
+            id,
+
+            create_by,
+
+            create_dept,
+
+            create_time,
+
+            update_by,
+
+            update_time,
+
+            update_ip,
+
+            version,
+
+            del_flag
+
+        ) VALUES (
+            #{refDate},
+
+            #{sessionCnt},
+
+            #{visitPv},
+
+            #{visitUv},
+
+            #{visitUvNew},
+
+            #{stayTimeUv},
+
+            #{stayTimeSession},
+
+            #{visitDepth},
+
+            #{remark},
+
+            #{id},
+
+            #{createBy},
+
+            #{createDept},
+
+            #{createTime},
+
+            #{updateBy},
+
+            #{updateTime},
+
+            #{updateIp},
+
+            #{version},
+
+            #{delFlag}
+
+        )
+    </insert>
+
+    <update id="update">
+        UPDATE sys_miniapp_daily_visit SET
+            ref_date = #{refDate},
+            session_cnt = #{sessionCnt},
+            visit_pv = #{visitPv},
+            visit_uv = #{visitUv},
+            visit_uv_new = #{visitUvNew},
+            stay_time_uv = #{stayTimeUv},
+            stay_time_session = #{stayTimeSession},
+            visit_depth = #{visitDepth},
+            remark = #{remark},
+            update_by = #{updateBy},
+            update_time = #{updateTime},
+            update_ip = #{updateIp},
+            version = version + 1
+        WHERE id = #{id} and version = #{version}
+    </update>
+
+    <update id="updateStatus">
+        UPDATE sys_miniapp_daily_visit SET
+            status = #{status},
+            version = version + 1
+        WHERE id = #{id}
+    </update>
+
+    <update id="delete">
+        UPDATE sys_miniapp_daily_visit SET
+            del_flag = #{DEL_FLAG_DELETE}
+        WHERE id = #{id}
+    </update>
+
+    <delete id="deleteSysMiniappDailyVisitByIds">
+        UPDATE sys_miniapp_daily_visit SET
+            del_flag = #{DEL_FLAG_DELETE}
+        WHERE id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 2 - 0
aidex-system/src/main/java/com/aidex/system/mapper/SysWharfMapper.java

@@ -20,5 +20,7 @@ public interface SysWharfMapper extends BaseMapper<SysWharf>
      */
     public int deleteSysWharfByIds(@Param("ids") String[] ids, @Param("DEL_FLAG_DELETE") String DEL_FLAG_DELETE);
 
+    public int updateStatus(SysWharf sysWharf);
+
 
 }

+ 4 - 0
aidex-system/src/main/java/com/aidex/system/mapper/SysWharfMapper.xml

@@ -65,12 +65,16 @@
             <if test="lng != null and lng != ''">
                 and a.lng like concat('%', #{lng}, '%')
             </if>
+            <if test="status != null and status != ''">
+                and a.status = #{status}
+            </if>
         </where>
         <choose>
             <when test="page !=null and page.orderBy != null and page.orderBy != ''">
                 ORDER BY ${page.orderBy}
             </when>
             <otherwise>
+                ORDER BY a.wharf_order
             </otherwise>
         </choose>
     </select>

+ 33 - 0
aidex-system/src/main/java/com/aidex/system/service/SysMiniappDailyVisitService.java

@@ -0,0 +1,33 @@
+package com.aidex.system.service;
+
+import com.aidex.common.core.service.BaseService;
+import com.aidex.system.domain.SysMiniappDailyVisit;
+
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * 小程序日数据统计Service接口
+ * @author ChenSir
+ * @email 914769835
+ * @date 2024-03-18
+ */
+public interface SysMiniappDailyVisitService extends BaseService<SysMiniappDailyVisit> {
+
+    /**
+     * 批量删除小程序日数据统计
+     * @param ids 需要删除的小程序日数据统计ID集合
+     * @return 结果
+     */
+    public int deleteSysMiniappDailyVisitByIds(String[] ids);
+
+
+    /**
+     * @Description: 获取小程序本周、本月、本年的折线图数据
+     * @date: 2024/3/18 15:44<br/>
+     * @since JDK 1.8
+     * @return
+     */
+    public Map<String, Object> getSysMiniappDailyVisit(String statisticsType, Date startDate, Date endDate);
+
+}

+ 7 - 0
aidex-system/src/main/java/com/aidex/system/service/SysWharfService.java

@@ -18,4 +18,11 @@ public interface SysWharfService extends BaseService<SysWharf> {
      */
     public int deleteSysWharfByIds(String[] ids);
 
+    /**
+     * 修改码头状态
+     * @param sysWharf 码头
+     * @return 结果
+     */
+    public int updateStatus(SysWharf sysWharf);
+
 }

+ 181 - 0
aidex-system/src/main/java/com/aidex/system/service/impl/SysMiniappDailyVisitServiceImpl.java

@@ -0,0 +1,181 @@
+package com.aidex.system.service.impl;
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import cn.hutool.core.date.*;
+import com.aidex.common.constant.Constants;
+import com.google.common.collect.Lists;
+import org.springframework.stereotype.Service;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.github.pagehelper.PageInfo;
+import com.aidex.common.core.domain.BaseEntity;
+import com.aidex.common.core.service.BaseServiceImpl;
+import com.aidex.system.mapper.SysMiniappDailyVisitMapper;
+import com.aidex.system.domain.SysMiniappDailyVisit;
+import com.aidex.system.service.SysMiniappDailyVisitService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 小程序日数据统计Service业务层处理
+ * @author ChenSir
+ * @email 914769835
+ * @date 2024-03-18
+ */
+@Service
+@Transactional(readOnly = true)
+public class SysMiniappDailyVisitServiceImpl extends BaseServiceImpl<SysMiniappDailyVisitMapper, SysMiniappDailyVisit> implements SysMiniappDailyVisitService {
+
+    private static final Logger log = LoggerFactory.getLogger(SysMiniappDailyVisitServiceImpl.class);
+
+    /**
+     * 获取单条数据
+     * @param sysMiniappDailyVisit 小程序日数据统计
+     * @return 小程序日数据统计
+     */
+    @Override
+    public SysMiniappDailyVisit get(SysMiniappDailyVisit sysMiniappDailyVisit) {
+        SysMiniappDailyVisit dto = super.get(sysMiniappDailyVisit);
+        return dto;
+    }
+
+    /**
+     * 获取单条数据
+     * @param id 小程序日数据统计id
+     * @return 小程序日数据统计
+     */
+    @Override
+    public SysMiniappDailyVisit get(String id) {
+        SysMiniappDailyVisit dto = super.get(id);
+        return dto;
+    }
+
+    /**
+     * 查询小程序日数据统计列表
+     * @param sysMiniappDailyVisit 小程序日数据统计
+     * @return 小程序日数据统计
+     */
+    @Override
+    public List<SysMiniappDailyVisit> findList(SysMiniappDailyVisit sysMiniappDailyVisit) {
+		List<SysMiniappDailyVisit> sysMiniappDailyVisitList = super.findList(sysMiniappDailyVisit);
+        return sysMiniappDailyVisitList;
+    }
+
+    /**
+     * 分页查询小程序日数据统计列表
+     * @param sysMiniappDailyVisit 小程序日数据统计
+     * @return 小程序日数据统计
+     */
+    @Override
+    public PageInfo<SysMiniappDailyVisit> findPage(SysMiniappDailyVisit sysMiniappDailyVisit) {
+		PageInfo<SysMiniappDailyVisit> page = super.findPage(sysMiniappDailyVisit);
+        return page;
+    }
+
+    /**
+     * 保存小程序日数据统计
+     * @param sysMiniappDailyVisit
+     * @return 结果
+     */
+    @Override
+    public boolean save(SysMiniappDailyVisit sysMiniappDailyVisit) {
+        return super.save(sysMiniappDailyVisit);
+    }
+
+    /**
+     * 删除小程序日数据统计信息
+     * @param sysMiniappDailyVisit
+     * @return 结果
+     */
+    @Override
+    public boolean remove(SysMiniappDailyVisit sysMiniappDailyVisit) {
+        return super.remove(sysMiniappDailyVisit);
+    }
+
+    /**
+     * 批量删除小程序日数据统计
+     * @param ids 需要删除的小程序日数据统计ID
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    @Override
+    public int deleteSysMiniappDailyVisitByIds(String[] ids) {
+        return mapper.deleteSysMiniappDailyVisitByIds(ids, BaseEntity.DEL_FLAG_DELETE);
+    }
+
+    /**
+     * 批量删除小程序日数据统计
+     * @param statisticsType 统计类型 week、month、year
+     * @return 结果
+     */
+    @Override
+    public Map<String, Object> getSysMiniappDailyVisit(String statisticsType, Date beginDate, Date endDate) {
+        Map<String, Object> map = new HashMap<>(16);
+        if (!Constants.STATISTICS_TYPE_YEAR.equals(statisticsType)){
+            DateRange range = DateUtil.range(beginDate, endDate, DateField.DAY_OF_YEAR);
+            // 日期视图
+            SysMiniappDailyVisit sysMiniappDailyVisit = new SysMiniappDailyVisit();
+            sysMiniappDailyVisit.setBeginRefDate(DateUtil.format(beginDate, "yyyy-MM-dd"));
+            sysMiniappDailyVisit.setEndRefDate(DateUtil.format(endDate, "yyyy-MM-dd"));
+            List<SysMiniappDailyVisit> sysMiniappDailyVisitList = super.findList(sysMiniappDailyVisit);
+            List<DateTime> dateTimes = Lists.newArrayList(range.iterator());
+            List<String> dataList = dateTimes.stream().map(date -> (DateUtil.format(date, "yyyy-MM-dd"))).collect(Collectors.toList());
+            List<Long> visitUv = new ArrayList<>();
+            List<Long> visitPv = new ArrayList<>();
+            List<Long> visitUvNew = new ArrayList<>();
+            for (String item : dataList){
+                Optional<SysMiniappDailyVisit> first = sysMiniappDailyVisitList.stream().filter(miniappDailyVisit -> DateUtil.format(miniappDailyVisit.getRefDate(), "yyyy-MM-dd") .equals(item)) // 32, 34
+                        .findFirst();
+                if (first.isPresent()){
+                    visitUv.add(first.get().getVisitUv());
+                    visitPv.add(first.get().getVisitPv());
+                    visitUvNew.add(first.get().getVisitUvNew());
+                }else {
+                    visitUv.add(0L);
+                    visitPv.add(0L);
+                    visitUvNew.add(0L);
+                }
+            }
+            map.put("dataList", dataList);
+            map.put("visitUv", visitUv);
+            map.put("visitPv", visitPv);
+            map.put("visitUvNew", visitUvNew);
+        } else {
+            // 月份视图
+            DateRange range = DateUtil.range(beginDate, endDate, DateField.MONTH);
+            List<DateTime> dateTimes = Lists.newArrayList(range.iterator());
+            List<String> dataList = dateTimes.stream().map(date -> (DateUtil.format(date, "yyyy-MM"))).collect(Collectors.toList());
+            List<Long> visitUv = new ArrayList<>();
+            List<Long> visitPv = new ArrayList<>();
+            List<Long> visitUvNew = new ArrayList<>();
+            for (DateTime item : dateTimes){
+                SysMiniappDailyVisit sysMiniappDailyVisit = new SysMiniappDailyVisit();
+                sysMiniappDailyVisit.setBeginRefDate(DateUtil.format(DateUtil.beginOfMonth(item), "yyyy-MM-dd"));
+                sysMiniappDailyVisit.setEndRefDate(DateUtil.format(DateUtil.endOfMonth(item), "yyyy-MM-dd"));
+                List<SysMiniappDailyVisit> sysMiniappDailyVisitList = super.findList(sysMiniappDailyVisit);
+                if (sysMiniappDailyVisitList.size() > 0){
+                    Long visitUvSum = sysMiniappDailyVisitList.stream().mapToLong(SysMiniappDailyVisit::getVisitUv).reduce(0, Long::sum);
+                    visitUv.add(visitUvSum);
+                    Long visitPvSum = sysMiniappDailyVisitList.stream().mapToLong(SysMiniappDailyVisit::getVisitPv).reduce(0, Long::sum);
+                    visitPv.add(visitPvSum);
+                    Long visitUvNewSum = sysMiniappDailyVisitList.stream().mapToLong(SysMiniappDailyVisit::getVisitUvNew).reduce(0, Long::sum);
+                    visitUvNew.add(visitUvNewSum);
+                }else {
+                    visitUv.add(0L);
+                    visitPv.add(0L);
+                    visitUvNew.add(0L);
+                }
+            }
+            map.put("dataList", dataList);
+            map.put("visitUv", visitUv);
+            map.put("visitPv", visitPv);
+            map.put("visitUvNew", visitUvNew);
+        }
+		return map;
+    }
+
+
+
+}

+ 6 - 0
aidex-system/src/main/java/com/aidex/system/service/impl/SysWharfServiceImpl.java

@@ -99,5 +99,11 @@ public class SysWharfServiceImpl extends BaseServiceImpl<SysWharfMapper, SysWhar
     public int deleteSysWharfByIds(String[] ids) {
         return mapper.deleteSysWharfByIds(ids, BaseEntity.DEL_FLAG_DELETE);
     }
+    @Transactional(readOnly = false)
+    @Override
+    public int updateStatus(SysWharf sysWharf) {
+        sysWharf.setStatus(BaseEntity.STATUS_NORMAL.equals(sysWharf.getStatus()) ? BaseEntity.STATUS_DISABLE : BaseEntity.STATUS_NORMAL);
+        return mapper.updateStatus(sysWharf);
+    }
 
 }

+ 6 - 5
aidex-ui/package.json

@@ -24,21 +24,22 @@
     "mockjs2": "1.0.8",
     "moment": "^2.24.0",
     "nprogress": "^0.2.0",
+    "qqmap": "^1.0.1",
+    "sortablejs": "^1.10.2",
     "store": "^2.0.12",
+    "v-viewer": "^1.5.1",
     "vditor": "^3.7.3",
     "vue": "^2.6.12",
     "vue-clipboard2": "^0.2.1",
     "vue-container-query": "^0.1.0",
     "vue-copy-to-clipboard": "^1.0.3",
-    "v-viewer": "^1.5.1",
-    "vue-upload-component": "^2.8.20",
-    "sortablejs": "^1.10.2",
     "vue-cropper": "0.4.9",
+    "vue-grid-layout": "^2.3.12",
     "vue-i18n": "^8.17.4",
     "vue-router": "^3.1.2",
     "vue-svg-component-runtime": "^1.0.1",
-    "vuex": "^3.1.1",
-    "vue-grid-layout": "^2.3.12"
+    "vue-upload-component": "^2.8.20",
+    "vuex": "^3.1.1"
   },
   "devDependencies": {
     "@ant-design/colors": "^3.2.1",

File diff suppressed because it is too large
+ 3 - 1
aidex-ui/public/index.html


+ 18 - 0
aidex-ui/src/api/system/line.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 查询航线
+export function getRouteLine () {
+  return request({
+    url: '/system/sysRouter',
+    method: 'get'
+  })
+}
+
+// 新增航线
+export function addRouteLine (data) {
+  return request({
+    url: '/system/sysRouter',
+    method: 'post',
+    data: data
+  })
+}

+ 69 - 0
aidex-ui/src/api/system/sysMiniappDailyVisit.js

@@ -0,0 +1,69 @@
+import request from '@/utils/request'
+
+// 查询小程序日数据统计列表
+export function listSysMiniappDailyVisit (query) {
+  return request({
+    url: '/system/sysMiniappDailyVisit/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询小程序日数据统计详细
+export function getSysMiniappDailyVisit (id) {
+  return request({
+    url: '/system/sysMiniappDailyVisit/' + id,
+    method: 'get'
+  })
+}
+
+// 新增小程序日数据统计
+export function addSysMiniappDailyVisit (data) {
+  return request({
+    url: '/system/sysMiniappDailyVisit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改小程序日数据统计
+export function updateSysMiniappDailyVisit (data) {
+  return request({
+    url: '/system/sysMiniappDailyVisit',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除小程序日数据统计
+export function delSysMiniappDailyVisit (id) {
+  return request({
+    url: '/system/sysMiniappDailyVisit/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出小程序日数据统计
+export function exportSysMiniappDailyVisit (query) {
+  return request({
+    url: '/system/sysMiniappDailyVisit/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取初始化数据
+export function getInitData (dictTypes) {
+  return request({
+    url: '/system/sysMiniappDailyVisit/getInitData/' + dictTypes,
+    method: 'get'
+  })
+}
+
+// 首页折线图小程序统计数据
+export function getSysMiniappDailyVisitStatist (statisticsType) {
+  return request({
+    url: '/system/sysMiniappDailyVisit/getSysMiniappDailyVisit/' + statisticsType,
+    method: 'get'
+  })
+}

+ 17 - 0
aidex-ui/src/api/system/sysWharf.js

@@ -59,3 +59,20 @@ export function getInitData (dictTypes) {
     method: 'get'
   })
 }
+
+// 修改码头状态
+export function updateStatus (data) {
+  return request({
+    url: '/system/sysWharf/updateStatus',
+    method: 'put',
+    data: data
+  })
+}
+
+// 查询所有正常码头
+export function getAllSysWharf () {
+  return request({
+    url: '/system/sysWharf/getAll',
+    method: 'get'
+  })
+}

BIN
aidex-ui/src/assets/images/marker.png


File diff suppressed because it is too large
+ 707 - 0
aidex-ui/src/assets/scene.gltf


+ 1 - 1
aidex-ui/src/components/ProLayout/utils/dynamicTheme.js

@@ -17,7 +17,7 @@ export const themeColor = {
     const options = {
       newColors: this.getAntdSerials(newColor), // new colors array, one-to-one corresponde with `matchColors`
       changeUrl (cssUrl) {
-        return `/${cssUrl}` // while router is not `hash` mode, it needs absolute path
+        return `/${cssUrl}` // while line is not `hash` mode, it needs absolute path
       }
     }
     return client.changer.changeColor(options, Promise)

+ 1 - 1
aidex-ui/src/components/SettingDrawer/themeColor.js

@@ -16,7 +16,7 @@ export default {
     var options = {
       newColors: this.getAntdSerials(newColor), // new colors array, one-to-one corresponde with `matchColors`
       changeUrl (cssUrl) {
-        return `/${cssUrl}` // while router is not `hash` mode, it needs absolute path
+        return `/${cssUrl}` // while line is not `hash` mode, it needs absolute path
       }
     }
     return client.changer.changeColor(options, Promise)

+ 1 - 1
aidex-ui/src/router/generator-routers.js

@@ -70,7 +70,7 @@ export const generatorDynamicRouter = (token) => {
 }
 
 /**
- * 格式化树形结构数据 生成 vue-router 层级路由表
+ * 格式化树形结构数据 生成 vue-line 层级路由表
  *
  * @param routerMap
  * @param parent

+ 1 - 1
aidex-ui/src/router/index.js

@@ -2,7 +2,7 @@ import Vue from 'vue'
 import Router from 'vue-router'
 import { constantRouterMap } from '@/config/router.config'
 
-// hack router push callback
+// hack line push callback
 const originalPush = Router.prototype.push
 Router.prototype.push = function push (location, onResolve, onReject) {
   if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)

+ 3 - 3
aidex-ui/src/store/index.js

@@ -3,12 +3,12 @@ import Vuex from 'vuex'
 import app from './modules/app'
 import user from './modules/user'
 
-// default router permission control
+// default line permission control
 // import permission from './modules/permission'
 import permission from './modules/async-router'
 
-// dynamic router permission control (Experimental)
-// import permission from './modules/async-router'
+// dynamic line permission control (Experimental)
+// import permission from './modules/async-line'
 import getters from './getters'
 
 Vue.use(Vuex)

+ 1 - 1
aidex-ui/src/store/modules/permission.js

@@ -4,7 +4,7 @@ import { BasicLayout } from '@/layouts'
 
 const RouteView = {
   name: 'RouteView',
-  render: (h) => h('router-view')
+  render: (h) => h('line-view')
 }
 // /**
 //  * 过滤账户是否拥有某一个权限,并将菜单从加载列表移除

+ 15 - 10
aidex-ui/src/views/dashboard/portal/ToDo.vue

@@ -248,25 +248,25 @@
             <div class="module-in module-in04">
               <a-page-header
                 :ghost="false"
-                title="小程序每日访问量"
+                title="小程序访问量"
               >
                 <template slot="extra">
-                  <a-radio-group default-value="a" button-style="solid" size="small">
-                    <a-radio-button value="a">
-                      一个月
+                  <a-radio-group default-value="week" button-style="solid" size="small" @change="handleDateChange">
+                    <a-radio-button value="week">
+                      本周
                     </a-radio-button>
-                    <a-radio-button value="b">
-                      三个
+                    <a-radio-button value="month">
+                      
                     </a-radio-button>
-                    <a-radio-button value="c">
-                      六个月
+                    <a-radio-button value="year">
+                      本年
                     </a-radio-button>
                   </a-radio-group>
                 </template>
               </a-page-header>
               <div style="height:410px;padding-top:8px ;">
                 <!-- chart盒子 -->
-                <line-radar></line-radar>
+                <line-radar :statistics-type="statisticsType"></line-radar>
               </div>
             </div>
           </a-col>
@@ -809,7 +809,8 @@
         compile: false,
         heatdata,
         adddata,
-        dataList
+        dataList,
+        statisticsType: 'week'
       }
     },
     created () {
@@ -824,6 +825,10 @@
       lineRadar
     },
     methods: {
+      handleDateChange(e) {
+        this.statisticsType = e.target.value
+        console.log(e.target.value)
+      },
       getHeight () {
         return this.$refs.portaletDiv.offsetHeight
       },

+ 66 - 86
aidex-ui/src/views/demo/chart/line-chart.vue

@@ -8,11 +8,22 @@
 
 <script>
 import * as echarts from 'echarts'
+import { getSysMiniappDailyVisitStatist } from '@/api/system/sysMiniappDailyVisit'
 export default {
   name: 'Cache',
+  props: {
+    statisticsType: {
+      type: String,
+      default: 'week'
+    }
+  },
   data () {
     return {
-      commandstats: null
+      commandstats: null,
+      xAxisData: [],
+      visitPvData: [],
+      visitUvNew: [],
+      visitUv: []
     }
   },
   filters: {},
@@ -25,13 +36,30 @@ export default {
     this.$emit('setHeight', this.$refs.portaletDiv.offsetHeight)
   },
   computed: {},
-  watch: {},
+  watch: {
+    statisticsType(oldVal, newVal) {
+      console.log(oldVal)
+      console.log(newVal)
+      if (newVal) {
+        this.getFirstChart()
+      }
+    }
+  },
   methods: {
-    getFirstChart () {
+    async getFirstChart () {
+      this.xAxisData = []
+      this.visitPvData = []
+      this.visitUvNew = []
+      this.visitUv = []
       this.commandstats = echarts.init(this.$refs.commandstats, 'macarons')
+      await getSysMiniappDailyVisitStatist(this.statisticsType).then(response => {
+        this.xAxisData = response.data.dataList
+        this.visitPvData = response.data.visitPv
+        this.visitUvNew = response.data.visitUvNew
+        this.visitUv = response.data.visitUv
+      })
       this.commandstats.setOption({
         title: {
-          text: '折线图',
           textStyle: {
             fontSize: 16,
             fontWeight: '600',
@@ -57,51 +85,32 @@ export default {
           },
           itemGap: 20,
           itemWidth: 10,
-          data: ['邮件营销', '联盟广告']
+          data: ['访问人数', '访问次数', '新用户数']
         },
         toolbox: {
           feature: {}
         },
         grid: {
-          left: '1%',
-          right: '1%',
-          bottom: '2%',
+          left: '4%',
+          right: '4%',
+          bottom: '3%',
           containLabel: true
         },
         xAxis: [
           {
             type: 'category',
             boundaryGap: false,
-            data: [
-              '1',
-              '2',
-              '3',
-              '4',
-              '5',
-              '6',
-              '7',
-              '8',
-              '9',
-              '10',
-              '11',
-              '12',
-              '13',
-              '14',
-              '15',
-              '16',
-              '17',
-              '18',
-              '19',
-              '20'
-            ],
+            data: this.xAxisData,
             axisLabel: {
               // 坐标轴文本标签,详见axis.axisLabel
               show: true,
               rotate: 0,
-              margin: 8,
+              margin: 18,
               textStyle: {
                 color: '#666',
-                fontSize: '12'
+                fontSize: '12',
+                interval: 0,
+                rotate: 30
               }
             },
             axisLine: {
@@ -123,7 +132,7 @@ export default {
         ],
         series: [
           {
-            name: '邮件营销',
+            name: '访问人数',
             type: 'line',
             stack: '总量',
             itemStyle: {
@@ -142,35 +151,10 @@ export default {
                 }
               ])
             },
-            data: [
-              60,
-              132,
-              140,
-              134,
-              90,
-              230,
-              210,
-              90,
-              182,
-              191,
-              234,
-              290,
-              330,
-              310,
-              210,
-              132,
-              140,
-              134,
-              140,
-              230,
-              210,
-              90,
-              182,
-              191
-            ]
+            data: this.visitUv
           },
           {
-            name: '联盟广告',
+            name: '访问次数',
             type: 'line',
             stack: '总量',
             itemStyle: {
@@ -188,32 +172,28 @@ export default {
                 }
               ])
             },
-            data: [
-              80,
-              132,
-              160,
-              180,
-              160,
-              230,
-              210,
-              90,
-              182,
-              191,
-              234,
-              290,
-              330,
-              280,
-              240,
-              132,
-              140,
-              134,
-              120,
-              230,
-              210,
-              90,
-              182,
-              191
-            ]
+            data: this.visitPvData
+          },
+          {
+            name: '新用户数',
+            type: 'line',
+            stack: '总量',
+            itemStyle: {
+              color: 'rgba(160,214,180,1)'
+            },
+            areaStyle: {
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                {
+                  offset: 0,
+                  color: 'rgba(160,214,180,0.2)'
+                },
+                {
+                  offset: 1,
+                  color: 'rgba(160,77,180,0.01)'
+                }
+              ])
+            },
+            data: this.visitUvNew
           }
         ]
       })

+ 113 - 113
aidex-ui/src/views/operation/location/index.vue

@@ -1,114 +1,114 @@
-<template>
-  <div ref="content">
-    <a-card :bordered="false">
-      <a-page-header style="border-bottom: 1px solid rgb(235, 237, 240); padding: 8px 16px" title="" />
-      <split splitHeight="100%" leftWidth="220">
-        <template slot="paneL">
-          <!-- 部门树 -->
-          <ship-tree
-            ref="shipTree"
-            :shipOptions="shipOptions"
-            @select="clickNode"
-          />
-        </template>
-        <template slot="paneR">
-          <!-- 条件搜索 -->
-          <div class="table-page-search-wrapper">
-            <h2>{{ selShipData.shipNanme }}-实时位置</h2>
-          </div>
-          <a-divider />
-          <iframe
-            frameborder="0"
-            id="locationIframe"
-            onload="load()"
-            width="100%"
-            style="border: none; height: calc(100% - 65px)"
-            name="ha-main-window"
-            src="http://localhost//user/tracking.html?lang=cn&loginUrl=&requestSource=web&custname=BBZ-01476417&school_id=e63b1e42-172d-42d6-872c-3bc66bbc6e2f&mapType=QQ&custid=e63b1e42-172d-42d6-872c-3bc66bbc6e2f&mds=f685207ebaab46448689c92503043a3d&objectid=f9e21a32-dd6b-4c3d-89a8-227677c91104&r=-1710497635" ></iframe>
-        </template>
-      </split>
-    </a-card>
-  </div>
-</template>
+<!--<template>-->
+<!--  <div ref="content">-->
+<!--    <a-card :bordered="false">-->
+<!--      <a-page-header style="border-bottom: 1px solid rgb(235, 237, 240); padding: 8px 16px" title="" />-->
+<!--      <split splitHeight="100%" leftWidth="220">-->
+<!--        <template slot="paneL">-->
+<!--          &lt;!&ndash; 部门树 &ndash;&gt;-->
+<!--          <ship-tree-->
+<!--            ref="shipTree"-->
+<!--            :shipOptions="shipOptions"-->
+<!--            @select="clickNode"-->
+<!--          />-->
+<!--        </template>-->
+<!--        <template slot="paneR">-->
+<!--          &lt;!&ndash; 条件搜索 &ndash;&gt;-->
+<!--          <div class="table-page-search-wrapper">-->
+<!--            <h2>{{ selShipData.shipNanme }}-实时位置</h2>-->
+<!--          </div>-->
+<!--          <a-divider />-->
+<!--          <iframe-->
+<!--            frameborder="0"-->
+<!--            id="locationIframe"-->
+<!--            onload="load()"-->
+<!--            width="100%"-->
+<!--            style="border: none; height: calc(100% - 65px)"-->
+<!--            name="ha-main-window"-->
+<!--            src="http://localhost//user/tracking.html?lang=cn&loginUrl=&requestSource=web&custname=BBZ-01476417&school_id=e63b1e42-172d-42d6-872c-3bc66bbc6e2f&mapType=QQ&custid=e63b1e42-172d-42d6-872c-3bc66bbc6e2f&mds=f685207ebaab46448689c92503043a3d&objectid=f9e21a32-dd6b-4c3d-89a8-227677c91104&r=-1710497635" ></iframe>-->
+<!--        </template>-->
+<!--      </split>-->
+<!--    </a-card>-->
+<!--  </div>-->
+<!--</template>-->
 
-<script>
-import { listAllSysShip } from '@/api/system/sysShip'
-import { location } from '@/api/gps/gps'
-import ShipTree from './modules/ShipTree'
-import Split from '@/components/pt/split/Index'
-// document.domain = 'www.18gps.net'
-function load() {
-    iframe.contentWindow.postMessage('定位', 'http://localhost')
-    window.onmessage = e => {
-      console.log(e.data)
-    }
-  }
-export default {
-  name: 'User',
-  components: {
-    Split,
-    ShipTree
-  },
-  data() {
-    return {
-      selShipData: {},
-      shipOptions: [],
-      gpsLocalUrl: ''
-    }
-  },
-  filters: {},
-  created() {
-    this.getTreeselect()
-  },
-  computed: {},
-  watch: {},
-  methods: {
-    /** 查询部门下拉树结构 */
-    getTreeselect() {
-      listAllSysShip().then((response) => {
-        this.shipOptions = response.data
-        this.selShipData = this.shipOptions[0]
-        this.getLocation()
-      })
-    },
-    getLocation() {
-      location({ shipId: this.selShipData.id }).then(res => {
-        this.gpsLocalUrl = res.data
-        // const data = {
-        //   method: 'Follow',
-        //   macid: '19171476417',
-        //   mapType: 'QQ',
-        //   mds: 'f685207ebaab46448689c92503043a3d',
-        //   url: 'http://www.18gps.net/'
-        // }
-        // document.getElementById('locationIframe').contentWindow.postMessage(data, '*')
-      })
-    },
-    clickNode(node) {
-      var selectItem = node.$options.propsData.dataRef
-      if (this.selShipData.id !== selectItem.id) {
-        this.selShipData = node.$options.propsData.dataRef
-        this.getLocation()
-      }
-    }
-  }
-}
-</script>
-<style lang="less" scoped>
-.ant-divider-horizontal {
-  margin: 0;
-  background: rgb(235, 237, 240);
-}
-.demo-split {
-  height: 200px;
-}
-.demo-split-pane {
-  padding: 10px;
-}
-.ant-avatar {
-  font-size: 12px;
-  border-radius: 4px;
-  vertical-align: middle;
-  margin-right: 8px;
-}
-</style>
+<!--<script>-->
+<!--import { listAllSysShip } from '@/api/system/sysShip'-->
+<!--import { location } from '@/api/gps/gps'-->
+<!--import ShipTree from './modules/ShipTree'-->
+<!--import Split from '@/components/pt/split/Index'-->
+<!--// document.domain = 'www.18gps.net'-->
+<!--function load() {-->
+<!--    iframe.contentWindow.postMessage('定位', 'http://localhost')-->
+<!--    window.onmessage = e => {-->
+<!--      console.log(e.data)-->
+<!--    }-->
+<!--  }-->
+<!--export default {-->
+<!--  name: 'User',-->
+<!--  components: {-->
+<!--    Split,-->
+<!--    ShipTree-->
+<!--  },-->
+<!--  data() {-->
+<!--    return {-->
+<!--      selShipData: {},-->
+<!--      shipOptions: [],-->
+<!--      gpsLocalUrl: ''-->
+<!--    }-->
+<!--  },-->
+<!--  filters: {},-->
+<!--  created() {-->
+<!--    this.getTreeselect()-->
+<!--  },-->
+<!--  computed: {},-->
+<!--  watch: {},-->
+<!--  methods: {-->
+<!--    /** 查询部门下拉树结构 */-->
+<!--    getTreeselect() {-->
+<!--      listAllSysShip().then((response) => {-->
+<!--        this.shipOptions = response.data-->
+<!--        this.selShipData = this.shipOptions[0]-->
+<!--        this.getLocation()-->
+<!--      })-->
+<!--    },-->
+<!--    getLocation() {-->
+<!--      location({ shipId: this.selShipData.id }).then(res => {-->
+<!--        this.gpsLocalUrl = res.data-->
+<!--        // const data = {-->
+<!--        //   method: 'Follow',-->
+<!--        //   macid: '19171476417',-->
+<!--        //   mapType: 'QQ',-->
+<!--        //   mds: 'f685207ebaab46448689c92503043a3d',-->
+<!--        //   url: 'http://www.18gps.net/'-->
+<!--        // }-->
+<!--        // document.getElementById('locationIframe').contentWindow.postMessage(data, '*')-->
+<!--      })-->
+<!--    },-->
+<!--    clickNode(node) {-->
+<!--      var selectItem = node.$options.propsData.dataRef-->
+<!--      if (this.selShipData.id !== selectItem.id) {-->
+<!--        this.selShipData = node.$options.propsData.dataRef-->
+<!--        this.getLocation()-->
+<!--      }-->
+<!--    }-->
+<!--  }-->
+<!--}-->
+<!--</script>-->
+<!--<style lang="less" scoped>-->
+<!--.ant-divider-horizontal {-->
+<!--  margin: 0;-->
+<!--  background: rgb(235, 237, 240);-->
+<!--}-->
+<!--.demo-split {-->
+<!--  height: 200px;-->
+<!--}-->
+<!--.demo-split-pane {-->
+<!--  padding: 10px;-->
+<!--}-->
+<!--.ant-avatar {-->
+<!--  font-size: 12px;-->
+<!--  border-radius: 4px;-->
+<!--  vertical-align: middle;-->
+<!--  margin-right: 8px;-->
+<!--}-->
+<!--</style>-->

+ 152 - 152
aidex-ui/src/views/operation/location/modules/ShipTree.vue

@@ -1,152 +1,152 @@
-<template>
-  <div>
-    <!-- <a-input-search style="margin-bottom: 8px" placeholder="输入名称回车查询" @search="filterNode" /> -->
-    <a-tree
-      v-if="shipOptions.length > 0"
-      :tree-data="shipOptions"
-      :replaceFields="replaceFields"
-      :default-expanded-keys="expandedKeys"
-      :expanded-keys="expandedKeys"
-      :auto-expand-parent="autoExpandParent"
-      showIcon
-      @select="handleNodeClick"
-      @expand="onExpand"
-    >
-    </a-tree></div>
-</template>
-<script>
-  import allIcon from '@/core/icons'
-const getParentKey = (id, tree) => {
-  let parentKey
-  for (let i = 0; i < tree.length; i++) {
-    const node = tree[i]
-    if (node.children) {
-      if (node.children.some(item => item.id === id)) {
-        parentKey = node.id
-      } else if (getParentKey(id, node.children)) {
-        parentKey = getParentKey(id, node.children)
-      }
-    }
-  }
-  return parentKey
-}
-export default {
-  name: 'ShipTree',
-  props: {
-    shipOptions: {
-          type: Array,
-          required: true
-        },
-    defalutExpandedKeys: {
-          type: Array
-        }
-  },
-  components: {
-    allIcon
-  },
-  data () {
-    return {
-      expandedKeys: this.defalutExpandedKeys,
-      oldShipOptions: [], // 记录查询前数据结构
-      oldExpandedKeys: [],
-      allIcon,
-      replaceFields: { children: 'children', key: 'id', title: 'shipNanme' },
-      shipNodes: [],
-      searchValue: '',
-      autoExpandParent: true
-    }
-  },
-  filters: {
-  },
-  created () {
-  },
-  computed: {
-  },
-  watch: {
-  },
-  methods: {
-    getAllShipNode (nodes) {
-      if (!nodes || nodes.length === 0) {
-        return []
-      }
-      nodes.forEach(node => {
-        this.shipNodes.push({ id: node.id, label: node.label })
-        return this.getAllShipNode(node.children)
-      })
-    },
-    getExpandedKeys (nodes) {
-     if (!nodes || nodes.length === 0) {
-       return []
-     }
-        // 最后一层不展开
-        nodes.forEach(node => {
-        this.shipNodes.push(node.id)
-        return this.getExpandedKeys(node.children)
-        })
-    },
-    // 筛选节点
-    filterNode (value, e) {
-      if (this.oldShipOptions.length === 0) {
-       this.oldShipOptions = this.shipOptions
-       this.oldExpandedKeys = this.expandedKeys
-      }
-      if (value.trim() === '') {
-        // 触发父页面设置树数据
-          this.$emit('setDataOptionInfo', this.oldShipOptions)
-          Object.assign(this, {
-            expandedKeys: this.oldExpandedKeys,
-            searchValue: value,
-            autoExpandParent: true
-          })
-     } else {
-      //  const searchInfo = { shipName: value }
-      //  searchShip(searchInfo).then(response => {
-      //    // 触发父页面设置树数据
-      //     this.$emit('setDataOptionInfo', response.data)
-      //     // this.searchTree(value, response.data)
-      //     this.getExpandedKeys(response.data)
-      //    Object.assign(this, {
-      //      expandedKeys: this.shipNodes,
-      //      searchValue: value,
-      //      autoExpandParent: true
-      //    })
-      //    this.shipNodes = []
-      //  })
-     }
-    },
-    // 节点单击事件,
-    handleNodeClick (keys, event) {
-      this.$emit('select', event.node)
-    },
-    onExpand (expandedKeys) {
-      this.expandedKeys = expandedKeys
-      this.autoExpandParent = false
-    },
-    searchTree (value, options) {
-      this.getAllShipNode(options)
-      console.log('shipNodes', this.shipNodes)
-      const gData = options
-      const expandedKeys = this.shipNodes
-        .map(item => {
-          if (item.label.indexOf(value) > -1) {
-            return getParentKey(item.id, gData)
-          }
-          return null
-        })
-        .filter((item, i, self) => item && self.indexOf(item) === i)
-      Object.assign(this, {
-        expandedKeys: expandedKeys,
-        searchValue: value,
-        autoExpandParent: true
-      })
-      this.shipNodes = []
-    }
-  }
-}
-</script>
-<style lang="less">
-  .depIcon {
-    color: #2f54eb;
-     font-size: 20px;
-  }
-</style>
+<!--<template>-->
+<!--  <div>-->
+<!--    &lt;!&ndash; <a-input-search style="margin-bottom: 8px" placeholder="输入名称回车查询" @search="filterNode" /> &ndash;&gt;-->
+<!--    <a-tree-->
+<!--      v-if="shipOptions.length > 0"-->
+<!--      :tree-data="shipOptions"-->
+<!--      :replaceFields="replaceFields"-->
+<!--      :default-expanded-keys="expandedKeys"-->
+<!--      :expanded-keys="expandedKeys"-->
+<!--      :auto-expand-parent="autoExpandParent"-->
+<!--      showIcon-->
+<!--      @select="handleNodeClick"-->
+<!--      @expand="onExpand"-->
+<!--    >-->
+<!--    </a-tree></div>-->
+<!--</template>-->
+<!--<script>-->
+<!--  import allIcon from '@/core/icons'-->
+<!--const getParentKey = (id, tree) => {-->
+<!--  let parentKey-->
+<!--  for (let i = 0; i < tree.length; i++) {-->
+<!--    const node = tree[i]-->
+<!--    if (node.children) {-->
+<!--      if (node.children.some(item => item.id === id)) {-->
+<!--        parentKey = node.id-->
+<!--      } else if (getParentKey(id, node.children)) {-->
+<!--        parentKey = getParentKey(id, node.children)-->
+<!--      }-->
+<!--    }-->
+<!--  }-->
+<!--  return parentKey-->
+<!--}-->
+<!--export default {-->
+<!--  name: 'ShipTree',-->
+<!--  props: {-->
+<!--    shipOptions: {-->
+<!--          type: Array,-->
+<!--          required: true-->
+<!--        },-->
+<!--    defalutExpandedKeys: {-->
+<!--          type: Array-->
+<!--        }-->
+<!--  },-->
+<!--  components: {-->
+<!--    allIcon-->
+<!--  },-->
+<!--  data () {-->
+<!--    return {-->
+<!--      expandedKeys: this.defalutExpandedKeys,-->
+<!--      oldShipOptions: [], // 记录查询前数据结构-->
+<!--      oldExpandedKeys: [],-->
+<!--      allIcon,-->
+<!--      replaceFields: { children: 'children', key: 'id', title: 'shipNanme' },-->
+<!--      shipNodes: [],-->
+<!--      searchValue: '',-->
+<!--      autoExpandParent: true-->
+<!--    }-->
+<!--  },-->
+<!--  filters: {-->
+<!--  },-->
+<!--  created () {-->
+<!--  },-->
+<!--  computed: {-->
+<!--  },-->
+<!--  watch: {-->
+<!--  },-->
+<!--  methods: {-->
+<!--    getAllShipNode (nodes) {-->
+<!--      if (!nodes || nodes.length === 0) {-->
+<!--        return []-->
+<!--      }-->
+<!--      nodes.forEach(node => {-->
+<!--        this.shipNodes.push({ id: node.id, label: node.label })-->
+<!--        return this.getAllShipNode(node.children)-->
+<!--      })-->
+<!--    },-->
+<!--    getExpandedKeys (nodes) {-->
+<!--     if (!nodes || nodes.length === 0) {-->
+<!--       return []-->
+<!--     }-->
+<!--        // 最后一层不展开-->
+<!--        nodes.forEach(node => {-->
+<!--        this.shipNodes.push(node.id)-->
+<!--        return this.getExpandedKeys(node.children)-->
+<!--        })-->
+<!--    },-->
+<!--    // 筛选节点-->
+<!--    filterNode (value, e) {-->
+<!--      if (this.oldShipOptions.length === 0) {-->
+<!--       this.oldShipOptions = this.shipOptions-->
+<!--       this.oldExpandedKeys = this.expandedKeys-->
+<!--      }-->
+<!--      if (value.trim() === '') {-->
+<!--        // 触发父页面设置树数据-->
+<!--          this.$emit('setDataOptionInfo', this.oldShipOptions)-->
+<!--          Object.assign(this, {-->
+<!--            expandedKeys: this.oldExpandedKeys,-->
+<!--            searchValue: value,-->
+<!--            autoExpandParent: true-->
+<!--          })-->
+<!--     } else {-->
+<!--      //  const searchInfo = { shipName: value }-->
+<!--      //  searchShip(searchInfo).then(response => {-->
+<!--      //    // 触发父页面设置树数据-->
+<!--      //     this.$emit('setDataOptionInfo', response.data)-->
+<!--      //     // this.searchTree(value, response.data)-->
+<!--      //     this.getExpandedKeys(response.data)-->
+<!--      //    Object.assign(this, {-->
+<!--      //      expandedKeys: this.shipNodes,-->
+<!--      //      searchValue: value,-->
+<!--      //      autoExpandParent: true-->
+<!--      //    })-->
+<!--      //    this.shipNodes = []-->
+<!--      //  })-->
+<!--     }-->
+<!--    },-->
+<!--    // 节点单击事件,-->
+<!--    handleNodeClick (keys, event) {-->
+<!--      this.$emit('select', event.node)-->
+<!--    },-->
+<!--    onExpand (expandedKeys) {-->
+<!--      this.expandedKeys = expandedKeys-->
+<!--      this.autoExpandParent = false-->
+<!--    },-->
+<!--    searchTree (value, options) {-->
+<!--      this.getAllShipNode(options)-->
+<!--      console.log('shipNodes', this.shipNodes)-->
+<!--      const gData = options-->
+<!--      const expandedKeys = this.shipNodes-->
+<!--        .map(item => {-->
+<!--          if (item.label.indexOf(value) > -1) {-->
+<!--            return getParentKey(item.id, gData)-->
+<!--          }-->
+<!--          return null-->
+<!--        })-->
+<!--        .filter((item, i, self) => item && self.indexOf(item) === i)-->
+<!--      Object.assign(this, {-->
+<!--        expandedKeys: expandedKeys,-->
+<!--        searchValue: value,-->
+<!--        autoExpandParent: true-->
+<!--      })-->
+<!--      this.shipNodes = []-->
+<!--    }-->
+<!--  }-->
+<!--}-->
+<!--</script>-->
+<!--<style lang="less">-->
+<!--  .depIcon {-->
+<!--    color: #2f54eb;-->
+<!--     font-size: 20px;-->
+<!--  }-->
+<!--</style>-->

+ 502 - 0
aidex-ui/src/views/system/line/index.vue

@@ -0,0 +1,502 @@
+
+<template>
+  <div>
+    <a-card :bordered="false" style="margin-bottom: 10px;">
+      <div class="table-page-search-wrapper" style="height: 8vh; width: 100%">
+        <a-steps
+          type="navigation"
+          :current="stepArr.length"
+        >
+          <a-step v-for="(item, index) in stepArr" :key="index" :title="item.title" :status="item.status" >
+            <a-icon slot="icon" type="interation" />
+          </a-step>
+        </a-steps>
+      </div>
+    </a-card>
+    <a-card :bordered="false" class="table-card">
+      <div style="height: 80vh; width: 100%" id="container"></div>
+      <div id="toolControl">
+        <!--                <div class="toolItem" id="markers" title="开始" @click="beginMove"></div>-->
+        <div class="toolItem active" id="marker" title="点标记" @click="selectDragType('marker')"></div>
+        <div class="toolItem" id="polyline" title="折线" @click="selectDragType('polyline')"></div>
+        <div class="toolItem" id="polygon" title="多边形" @click="selectDragType('polygon')"></div>
+        <div class="toolItem" id="circle" title="圆形" @click="selectDragType('circle')"></div>
+        <div class="toolItem" id="rectangle" title="矩形" @click="selectDragType('rectangle')"></div>
+        <div class="toolItem" id="ellipse" title="椭圆" @click="selectDragType('ellipse')"></div>
+      </div>
+      <div class="control">
+        <button @click="beginMove" class="beginMove" :disabled="moved">航线模拟</button>
+        <button @click="stopMove" class="stopMove">终止模拟</button>
+        <button @click="pauseMove" class="pauseMove">暂停模拟</button>
+        <button @click="resumeMove" class="resumeMove">恢复模拟</button>
+        <button @click="resetMap" class="resumeMove">重置</button>
+      </div>
+    </a-card>
+  </div>
+</template>
+
+<script>
+/* eslint-disable */
+import {  getAllSysWharf } from '@/api/system/sysWharf'
+import { getRouteLine, addRouteLine } from '@/api/system/line'
+export default {
+  name: 'RouterLine',
+  data() {
+    return {
+      open: false,
+      model: null,
+      path: [],
+      roation: null,
+      center: null,
+      map: null,
+      editor: null,
+      activeType: 'marker',
+      sysWharfList: [],
+      stepArr: [],
+      markerLayer: null,
+      customPath:[],
+      moved: true
+    }
+  },
+  filters: {
+  },
+  mounted() {
+    // 确保腾讯地图SDK已加载
+    /*const script = document.createElement('script')
+    script.type = 'text/javascript'
+    script.src = 'https://map.qq.com/api/gljs?libraries=tools,geometry,model&v=1.exp&key=A7PBZ-WLKKC-XW52U-A5BML-XLALT-2DF2Q'
+    document.body.appendChild(script)*/
+    this.initMap()
+    // this.initMap2()
+    // this.getListSysWharf()
+  },
+  created() {
+  },
+  methods: {
+    addLine() {
+      addRouteLine(this.customPath).then((response) => {
+        this.customPath = []
+        this.getLinePath()
+      })
+    },
+    getLinePath() {
+      this.path = []
+      getRouteLine().then((response) => {
+        this.path = response.data
+        // 添加路径 开始 结束 图标
+        if (this.path.length > 1) {
+          this.markRoutePath(this.path)
+        }
+      })
+    },
+    getListSysWharf() {
+      this.sysWharfList = []
+      this.stepArr = []
+      getAllSysWharf().then((response) => {
+        this.sysWharfList = response.data
+        // 显示码头数据
+        this.stepArr = this.sysWharfList.map((item) => {
+          return {
+            title: item.wharfNanme,
+            status: 'finish'
+          }
+        })
+        // 标记码头点
+        this.markPoint(this.sysWharfList)
+      })
+    },
+    selectDragType(type) {
+      document.getElementById(this.activeType).className = 'toolItem'
+      document.getElementById(type).className = 'toolItem active'
+      this.activeType = type
+      this.editor.setActiveOverlay(type)
+      this.editor.enable()
+    },
+    beginMove() {
+      const paths = this.path.map((item) => {
+        return {
+          position: new TMap.LatLng(item.lat, item.lng)
+        }
+      })
+      this.model.moveAlong({
+        // 移动过程中每个节点的坐标
+        path: paths,
+        duration: 15000, // 完成移动所需的时间 单位毫秒
+        degreeToNorth: 180 // 把模型正方向旋转至正北方向所需的角度 默认为0
+      })
+    },
+    stopMove() {
+      if (this.model){
+        this.model.stopMove();
+      }
+    },
+    pauseMove() {
+      if (this.model){
+        this.model.pauseMove();
+      }
+    },
+    resumeMove() {
+      if (this.model){
+        this.model.resumeMove();
+      }
+    },
+    resetMap() {
+      this.$router.go(0)
+    },
+    markPoint(pointArr) {
+      const geometries = pointArr.map((item) =>{
+        return {
+          "id": item.id,   //点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
+          "position": new window.TMap.LatLng(Number(item.lat), Number(item.lng)),  //点标记坐标位置
+          styleId: 'small',
+          content: item.wharfNanme
+        }
+      })
+      this.markerLayer = new window.TMap.MultiMarker({
+        map: this.map,  //指定地图容器
+        styles: {
+          small: new window.TMap.MarkerStyle({
+            // 点标注的相关样式
+            width: 34, // 宽度
+            height: 46, // 高度
+            anchor: { x: 17, y: 23 }, // 标注点图片的锚点位置
+            color: '#333', // 标注点文本颜色
+            size: 16, // 标注点文本文字大小
+            direction: 'bottom', // 标注点文本文字相对于标注点图片的方位
+            strokeColor: '#fff', // 标注点文本描边颜色
+            strokeWidth: 2, // 标注点文本描边宽度
+          }),
+          big: new window.TMap.MarkerStyle({
+            width: 58,
+            height: 76,
+            anchor: { x: 36, y: 32 },
+            color: '#333',
+            size: 22,
+            direction: 'bottom',
+            strokeColor: '#fff',
+            offset: { x: 0, y: 10 },
+            strokeWidth: 2,
+          }),
+        },
+        //点标记数据数组
+        geometries: geometries
+      });
+    },
+    markRoutePath(pathArr) {
+      const _this = this
+      // 添加起点和终点 - 开始
+      const startPosition = new window.TMap.LatLng(pathArr[0].lat, pathArr[0].lng) // 路线规划起点
+      const endPosition = new window.TMap.LatLng(pathArr[pathArr.length -1].lat, pathArr[pathArr.length -1].lng) // 路线规划终点
+      new window.TMap.MultiMarker({
+        // 创造MultiMarker显示起终点标记
+        id: 'marker-layer',
+        map: _this.map,
+        styles: {
+          start: new TMap.MarkerStyle({
+            width: 25,
+            height: 35,
+            anchor: { x: 16, y: 32 },
+            src: 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/start.png'
+          }),
+          end: new TMap.MarkerStyle({
+            width: 25,
+            height: 35,
+            anchor: { x: 16, y: 32 },
+            src: 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/end.png'
+          })
+        },
+        geometries: [
+          {
+            id: 'start',
+            styleId: 'start',
+            position: startPosition
+          },
+          {
+            id: 'end',
+            styleId: 'end',
+            position: endPosition
+          }
+        ]
+      })
+      // 添加起点和终点 - 结束
+      // 创建 MultiPolyline显示路径折线
+      new window.TMap.MultiPolyline({
+        id: 'polyline-layer',
+        map: _this.map,
+        styles: {
+          style_blue: new TMap.PolylineStyle({
+            color: '#3777FF',
+            width: 8,
+            borderWidth: 5,
+            borderColor: '#FFF',
+            lineCap: 'butt',
+            showArrow: true
+          })
+        },
+        geometries: [
+          {
+            id: 'pl_1',
+            styleId: 'style_blue',
+            paths: _this.path
+          }
+        ]
+      })
+      // 创建 MultiPolyline显示路径折线 结束
+      this.model = new window.TMap.model.GLTFModel({
+        // url: 'http://127.0.0.1:18080/profile/upload/2024/03/16/scene.gltf',
+        url: 'https://mapapi.qq.com/web/jsapi/jsapi-gl/assets/car.gltf',
+        map: _this.map,
+        id: 'model',
+        position: startPosition, // 模型初始位置
+        rotation: [0, 130, 0], // 模型XYZ三轴上的旋转角度
+        scale: 10 // 模型在XYZ三轴上的缩放比例
+      })
+
+      // model资源加载完成回调
+      this.model.on('loaded', () => {
+        console.log('模型加载成功')
+        // 启用模型沿线移动演示
+        // MoveButton.disabled = false
+        _this.moved = false
+      })
+
+      this.model.on('moving', function (e) {
+        if (!e.passedPath) return
+        // geometry文档地址:https://lbs.qq.com/webApi/javascriptGL/glDoc/glDocGeometry
+        _this.roation = TMap.geometry.computeHeading(
+          // 计算两点之间的航向
+          e.passedPath[e.passedPath.length - 2].position,
+          e.passedPath[e.passedPath.length - 1].position
+        )
+        _this.center = TMap.geometry.computeDestination(
+          // 根据起点、朝向和距离计算终点
+          e.passedPath[e.passedPath.length - 1].position,
+          _this.roation,
+          60
+        )
+        _this.map.easeTo(
+          // 平滑过渡到指定状态
+          {
+            center: _this.center,
+            rotation: e.rotation[1] + 180,
+            zoom: 20,
+            pitch: 70
+          },
+          {
+            duration: 300
+          }
+        )
+      })
+    },
+    initMap() {
+      // 设置地图中心点
+      const center = new TMap.LatLng(36.092574, 103.728268)
+      // 定义工厂模式函数
+      const myOptions = {
+        zoom: 17, // 设置地图缩放级别
+        center: center
+      }
+      // 初始化重新定位
+      this.map = new TMap.Map('container', myOptions)
+
+      // 初始化几何图形及编辑器
+      const marker = new TMap.MultiMarker({
+        map: this.map
+      })
+      const polyline = new TMap.MultiPolyline({
+        map: this.map
+      })
+      const polygon = new TMap.MultiPolygon({
+        map: this.map
+      })
+      const circle = new TMap.MultiCircle({
+        map: this.map
+      })
+      const rectangle = new TMap.MultiRectangle({
+        map: this.map
+      })
+      const ellipse = new TMap.MultiEllipse({
+        map: this.map
+      })
+
+      this.editor = new TMap.tools.GeometryEditor({
+        // TMap.tools.GeometryEditor 文档地址:https://lbs.qq.com/webApi/javascriptGL/glDoc/glDocEditor
+        map: this.map, // 编辑器绑定的地图对象
+        overlayList: [
+          // 可编辑图层 文档地址:https://lbs.qq.com/webApi/javascriptGL/glDoc/glDocEditor#4
+          {
+            overlay: marker,
+            id: 'marker'
+          },
+          {
+            overlay: polyline,
+            id: 'polyline'
+          },
+          {
+            overlay: polygon,
+            id: 'polygon'
+          },
+          {
+            overlay: circle,
+            id: 'circle'
+          },
+          {
+            overlay: rectangle,
+            id: 'rectangle'
+          },
+          {
+            overlay: ellipse,
+            id: 'ellipse'
+          }
+        ],
+        actionMode: TMap.tools.constants.EDITOR_ACTION.DRAW, // 编辑器的工作模式
+        activeOverlayId: 'marker', // 激活图层
+        snappable: true // 开启吸附
+      })
+
+      this.editor.on('draw_complete', (geometry) => {
+        // 判断当前处于编辑状态的图层id是否是overlayList中id为rectangle(矩形)图层
+        // 判断当前处于编辑状态的图层id是否是overlayList中id为rectangle(矩形)图层
+        const id = geometry.id
+        if (this.editor.getActiveOverlay().id === 'rectangle') {
+          // 获取矩形顶点坐标
+          const geo = rectangle.geometries.filter(function (item) {
+            return item.id === id
+          })
+          console.log('绘制的矩形定位的坐标:', geo[0].paths)
+        }
+
+        if (this.editor.getActiveOverlay().id === 'polygon') {
+          // 获取多边形顶点坐标
+          const geo = polygon.geometries.filter(function (item) {
+            return item.id === id
+          })
+          console.log('绘制的多边形坐标:', geo[0].paths)
+        }
+        const _this = this
+        if (this.editor.getActiveOverlay().id === 'polyline') {
+          // 获取折线路径坐标
+          console.log('绘制的多边形坐标:', geometry.paths)
+          this.customPath.push(...geometry.paths)
+          console.log('当前路径Path:', this.customPath)
+          // 开始添加 路线规划的覆盖层
+          this.$confirm({
+            title: '是否继续设置航线?',
+            zIndex:1002,
+            onOk () {
+              _this.editor.enable()
+            },
+            onCancel () {
+              _this.editor.disable()
+              _this.$confirm({
+                title: '是否保存航线?',
+                zIndex:1003,
+                onOk () {
+                  _this.addLine()
+                },
+                onCancel () {
+                  console.log('取消保存航线')
+                }
+              })
+            }
+          })
+        }
+      })
+      this.editor.disable()
+      this.getListSysWharf()
+      this.getLinePath()
+    }
+  }
+}
+</script>
+<style scoped lang="less">
+
+#toolControl {
+  position: absolute;
+  top: 10px;
+  left: 0px;
+  right: 0px;
+  margin: auto;
+  width: 380px;
+  z-index: 1001;
+}
+
+.toolItem {
+  width: 42px;
+  height: 42px;
+  float: left;
+  margin: 1px;
+  padding: 4px;
+  border-radius: 3px;
+  background-size: 30px 30px;
+  background-position: 4px 4px;
+  background-repeat: no-repeat;
+  box-shadow: 0 1px 2px 0 #e4e7ef;
+  background-color: #ffffff;
+  border: 1px solid #ffffff;
+}
+
+.toolItem:hover {
+  border-color: #789cff;
+}
+
+.active {
+  border-color: #d5dff2;
+  background-color: #d5dff2;
+}
+
+#marker {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/marker_editor.png');
+}
+
+#polyline {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/polyline.png');
+}
+
+#polygon {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/polygon.png');
+}
+
+#circle {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/circle.png');
+}
+
+#rectangle {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/rectangle.png');
+}
+
+#ellipse {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/ellipse.png');
+}
+
+#markers {
+  background-image: url('https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/marker_editor.png');
+}
+
+.control {
+  position: absolute;
+  left: 0px;
+  top: 0px;
+  z-index: 9999;
+  padding: 10px;
+}
+.control button {
+  padding: 10px 14px;
+  box-sizing: border-box;
+  border: none;
+  background-color: #919aac;
+  border-radius: 2px;
+  color: #fff;
+  font-size: 14px;
+  line-height: 14px;
+  cursor: pointer;
+  margin-left: 6px;
+}
+
+.control .beginMove {
+  background: #3876ff;
+}
+.control .stopMove {
+  background: #ff0000;
+}
+</style>

+ 29 - 2
aidex-ui/src/views/system/syswharf/index.vue

@@ -81,9 +81,18 @@
             <a-icon type="download" />导出
           </a-button>
         </div>
+
         <span slot="status" slot-scope="{record}">
-          <a-badge :status="record.status == '0' ? 'processing' : 'error'" :text=" statusFormat(record) " />
+          <a-switch
+            :checkedValue="0"
+            :unCheckedValue="1"
+            checkedChildren="正常"
+            unCheckedChildren="停用"
+            :checked="record.status === '0'"
+            @click="handleChangeStatus(record)" />
+          <!--          <a-badge :status="record.status == '0' ? 'processing' : 'error'" :text=" statusFormat(record) " />-->
         </span>
+
         <span slot="operation" slot-scope="{text, record}">
           <a @click="handleUpdate(record)" v-hasPermi="['system:sysWharf:edit']">
             修改
@@ -98,7 +107,7 @@
   </div>
 </template>
 <script>
-import { listSysWharf, delSysWharf, exportSysWharf, getInitData } from '@/api/system/sysWharf'
+import { listSysWharf, delSysWharf, exportSysWharf, getInitData, updateStatus } from '@/api/system/sysWharf'
 import AdvanceTable from '@/components/pt/table/AdvanceTable'
 import SysWharfAddForm from '@/views/system/syswharf/modules/SysWharfAddForm'
 import SysWharfEditForm from '@/views/system/syswharf/modules/SysWharfEditForm'
@@ -328,6 +337,24 @@ export default {
         this.queryParam.isAsc = sorter.order
       }
       this.getList()
+    },
+    handleChangeStatus (record) {
+      var that = this
+      this.$confirm({
+        title: '是否确认修改状态?',
+        content: '此操作修改选择行码头的状态',
+        onOk () {
+          return updateStatus(record)
+            .then(response => {
+              that.getList()
+              that.$message.success(
+                '修改成功',
+                3
+              )
+            })
+        },
+        onCancel () {}
+      })
     }
   }
 }

+ 1 - 1
aidex-ui/src/views/tool/swagger/index.vue

@@ -14,7 +14,7 @@ export default {
   },
   data () {
     return {
-      src: process.env.VUE_APP_BASE_API + '/swagger-ui.html',
+      src: process.env.VUE_APP_BASE_API + '/swagger-ui/index.html',
       height: document.documentElement.clientHeight - 120 + 'px;',
       loading: true
     }

+ 1 - 1
aidex-ui/vue.config.js

@@ -33,7 +33,7 @@ const assetsCDN = {
   // https://unpkg.com/browse/vue@2.6.10/
   js: [
     '//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js',
-    '//cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js',
+    '//cdn.jsdelivr.net/npm/vue-line@3.1.3/dist/vue-line.min.js',
     '//cdn.jsdelivr.net/npm/vuex@3.1.1/dist/vuex.min.js',
     '//cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js'
   ]

+ 19 - 0
sql/SysMiniappDailyVisitMenu.sql

@@ -0,0 +1,19 @@
+-- 菜单 SQL
+insert into sys_menu (id, menu_code, menu_name, sort, path, component, is_frame, is_cache, menu_type, visible, perms, icon, parent_id, parent_ids, tree_sort, tree_sorts, tree_level, tree_leaf, status, create_by, create_time, update_by, update_time, create_dept, update_ip, version, remark, del_flag)
+values('1596deb4376c48f7bdb3028dfd79d089', 'sysMiniappDailyVisit', '小程序日数据统计', '50', 'sysMiniappDailyVisit', 'system/sysminiappdailyvisit/index', 1, 0, 'C', 0, 'system:sysMiniappDailyVisit:list', '#', '3', '3/1596deb4376c48f7bdb3028dfd79d089', '50', '000030/000050', '2', 'n', '0', '1', sysdate(), '1', sysdate(), '', '127.0.0.1', 0, '', '0');
+-- 按钮 SQL
+insert into sys_menu (id, menu_code, menu_name, sort, path, component, is_frame, is_cache, menu_type, visible, perms, icon, parent_id, parent_ids, tree_sort, tree_sorts, tree_level, tree_leaf, status, create_by, create_time, update_by, update_time, create_dept, update_ip, version, remark, del_flag)
+values('1323341d0d9545a986ed07518c14fe02', 'sysMiniappDailyVisitQuery', '小程序日数据统计查询', '10', '#', '', 1, 0, 'F', 0, 'system:sysMiniappDailyVisit:query', '#', '1596deb4376c48f7bdb3028dfd79d089', '3/1596deb4376c48f7bdb3028dfd79d089/1323341d0d9545a986ed07518c14fe02', '10', '000030/000050/000010', '3', 'y', '0', '1', sysdate(), '1', sysdate(), '', '127.0.0.1', 0, '', '0');
+
+insert into sys_menu (id, menu_code, menu_name, sort, path, component, is_frame, is_cache, menu_type, visible, perms, icon, parent_id, parent_ids, tree_sort, tree_sorts, tree_level, tree_leaf, status, create_by, create_time, update_by, update_time, create_dept, update_ip, version, remark, del_flag)
+values('def0c45dd186431c8220c2c69150119c', 'sysMiniappDailyVisitAdd', '小程序日数据统计新增', '20', '#', '', 1, 0, 'F', 0, 'system:sysMiniappDailyVisit:add', '#', '1596deb4376c48f7bdb3028dfd79d089', '3/1596deb4376c48f7bdb3028dfd79d089/def0c45dd186431c8220c2c69150119c', '20', '000030/000050/000020', '3', 'y', '0', '1', sysdate(), '1', sysdate(), '', '127.0.0.1', 0, '', '0');
+
+insert into sys_menu (id, menu_code, menu_name, sort, path, component, is_frame, is_cache, menu_type, visible, perms, icon, parent_id, parent_ids, tree_sort, tree_sorts, tree_level, tree_leaf, status, create_by, create_time, update_by, update_time, create_dept, update_ip, version, remark, del_flag)
+values('1c0f4a6d323a4c27a088ede2ce1be8a3', 'sysMiniappDailyVisitEdit', '小程序日数据统计修改', '30', '#', '', 1, 0, 'F', 0, 'system:sysMiniappDailyVisit:edit', '#', '1596deb4376c48f7bdb3028dfd79d089', '3/1596deb4376c48f7bdb3028dfd79d089/1c0f4a6d323a4c27a088ede2ce1be8a3', '30', '000030/000050/000030', '3', 'y', '0', '1', sysdate(), '1', sysdate(), '', '127.0.0.1', 0, '', '0');
+
+insert into sys_menu (id, menu_code, menu_name, sort, path, component, is_frame, is_cache, menu_type, visible, perms, icon, parent_id, parent_ids, tree_sort, tree_sorts, tree_level, tree_leaf, status, create_by, create_time, update_by, update_time, create_dept, update_ip, version, remark, del_flag)
+values('c3cc716868e144ee84f48cf273fdad04', 'sysMiniappDailyVisitRemove', '小程序日数据统计删除', '10', '#', '', 1, 0, 'F', 0, 'system:sysMiniappDailyVisit:remove', '#', '1596deb4376c48f7bdb3028dfd79d089', '3/1596deb4376c48f7bdb3028dfd79d089/c3cc716868e144ee84f48cf273fdad04', '40', '000030/000050/000040', '3', 'y', '0', '1', sysdate(), '1', sysdate(), '', '127.0.0.1', 0, '', '0');
+
+insert into sys_menu (id, menu_code, menu_name, sort, path, component, is_frame, is_cache, menu_type, visible, perms, icon, parent_id, parent_ids, tree_sort, tree_sorts, tree_level, tree_leaf, status, create_by, create_time, update_by, update_time, create_dept, update_ip, version, remark, del_flag)
+values('f7bef13a5e454eee93b7963c22b6f777', 'sysMiniappDailyVisitExport', '小程序日数据统计查询', '50', '#', '', 1, 0, 'F', 0, 'system:sysMiniappDailyVisit:export', '#', '1596deb4376c48f7bdb3028dfd79d089', '3/1596deb4376c48f7bdb3028dfd79d089/f7bef13a5e454eee93b7963c22b6f777', '50', '000030/000050/000050', '3', 'y', '0', '1', sysdate(), '1', sysdate(), '', '127.0.0.1', 0, '', '0');
+