소스 검색

修复bug

ChenSir 1 년 전
부모
커밋
86c425f1d7

+ 6 - 6
aidex-admin/src/main/resources/application-druid.yml

@@ -6,12 +6,12 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://152.136.217.148:3306/water_bus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&&allowMultiQueries=true
-                username: site
-                password: admin@2022.cn
-#                url: jdbc:mysql://192.168.0.116:3306/water_bus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&&allowMultiQueries=true
-#                username: root
-#                password: Gshk@ssbs@8551398
+#                url: jdbc:mysql://152.136.217.148:3306/water_bus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&&allowMultiQueries=true
+#                username: site
+#                password: admin@2022.cn
+                url: jdbc:mysql://192.168.0.116:3306/water_bus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&&allowMultiQueries=true
+                username: root
+                password: Gshk@ssbs@8551398
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 2 - 2
aidex-admin/src/main/resources/application.yml

@@ -9,7 +9,7 @@ aidex:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/aidex/uploadPath,Linux配置 /home/aidex/uploadPath)
-  profile: D:/aidex/uploadPath
+  profile: /home/aidex/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证
@@ -72,7 +72,7 @@ spring:
     # 地址
     host: 127.0.0.1
     # 端口,默认为6379
-    port: 16379
+    port: 6379
     # 数据库索引
     database: 0
     # 密码

+ 6 - 3
aidex-controller/src/main/java/com/aidex/web/controller/system/SysAlarmController.java

@@ -109,9 +109,12 @@ public class SysAlarmController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:sysAlarm:export')")
     @Log(title = "报警信息", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public R export(SysAlarm sysAlarm) {
-        List<SysAlarm> list = sysAlarmService.findList(sysAlarm);
-        ExcelUtil<SysAlarm> util = new ExcelUtil<SysAlarm>(SysAlarm.class);
+    public R export(SysAlarmPlush sysAlarmPlush) {
+        List<SysAlarmPlush> list = gistPlushService.findList(sysAlarmPlush);
+        list.stream().forEach(item -> {
+            item.setDescribe("超速报警实时速度:" + item.getSpeed() + "km/h");
+        });
+        ExcelUtil<SysAlarmPlush> util = new ExcelUtil<SysAlarmPlush>(SysAlarmPlush.class);
         return util.exportExcel(list, "报警信息数据");
     }
 

+ 25 - 9
aidex-system/src/main/java/com/aidex/system/domain/SysAlarmPlush.java

@@ -1,5 +1,6 @@
 package com.aidex.system.domain;
 
+import com.aidex.common.annotation.Excel;
 import com.aidex.common.core.page.PageDomain;
 import com.alibaba.fastjson2.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -23,6 +24,14 @@ public class SysAlarmPlush implements Serializable {
 
 	private static final long serialVersionUID = 9151139885836328101L;
 
+	/** 起止时间-用于查询 **/
+	@Excel(name = "船只名称", width = 30)
+	private String shipName;
+
+	/** 报警类型[参照报警字段对应表] 只取类型为6的 **/
+	@Excel(name = "报警类型", dictType = "sys_alarm_type")
+	private String classify;
+
 	/** 主键 **/
 	private long id;
 
@@ -37,17 +46,13 @@ public class SysAlarmPlush implements Serializable {
 
 	/** 报警时间(utc) 毫秒数时间戳 **/
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
 	private Date pTime;
 
 	/** 添加时间(utc) 毫秒数时间戳 **/
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date addTime;
 
-	/** 纬度 **/
-	private String lat;
-
-	/** 经度 **/
-	private String lon;
 
 	/** 地图纬度,默认百度纬度 **/
 	private String mapLat;
@@ -56,21 +61,33 @@ public class SysAlarmPlush implements Serializable {
 	private String mapLon;
 
 	/** 速度 **/
+	@Excel(name = "船只速度", width = 30)
 	private String speed;
 
+	/** 纬度 **/
+	@Excel(name = "纬度", width = 30)
+	private String lat;
+
+	/** 经度 **/
+	@Excel(name = "经度", width = 30)
+	private String lon;
+
+
 	/** 方向 **/
+	@Excel(name = "方向", width = 30)
 	private String dir;
 
-	/** 报警类型[参照报警字段对应表] 只取类型为6的 **/
-	private String classify;
+
 
 	/** 报警类型[扩展] **/
+	@Excel(name = "描述", width = 30)
 	private String describe;
 
 	/** 描述信息 **/
 	private String notea;
 
 	/** 状态(0未处理 1已处理) **/
+	@Excel(name = "状态", dictType = "sys_alarm_status")
 	private String status;
 
 	/** 起止时间-用于查询 **/
@@ -79,8 +96,7 @@ public class SysAlarmPlush implements Serializable {
 	/** 起止时间-用于查询 **/
 	private String endTime;
 
-	/** 起止时间-用于查询 **/
-	private String shipName;
+
 
 	/**
 	 * 当前实体分页对象

+ 2 - 2
aidex-system/src/main/java/com/aidex/system/mapper/SysAlarmPlushMapper.xml

@@ -7,8 +7,8 @@
         a.user_name as "userName",
         a.macid as "macid",
         a.full_name as "fullName",
-        DATE(FROM_UNIXTIME(a.add_time))  as "addTime",
-        DATE(FROM_UNIXTIME(a.p_time))  as "pTime",
+        DATE_FORMAT(FROM_UNIXTIME(a.add_time/1000), '%Y-%m-%d %H:%i:%s') AS "addTime",
+        DATE_FORMAT(FROM_UNIXTIME(a.p_time/1000), '%Y-%m-%d %H:%i:%s') AS "pTime",
         a.speed as "speed",
         a.lat as "lat",
         a.lon as "lon",

+ 4 - 0
aidex-system/src/main/java/com/aidex/system/service/GpsAlarmPlushService.java

@@ -3,6 +3,8 @@ package com.aidex.system.service;
 import com.aidex.system.domain.SysAlarmPlush;
 import com.github.pagehelper.PageInfo;
 
+import java.util.List;
+
 /**
  * 报警信息Service接口
  * @author ChenSir
@@ -18,5 +20,7 @@ public interface GpsAlarmPlushService {
 
     public int getCount();
 
+    public List<SysAlarmPlush> findList(SysAlarmPlush sysAlarmPlush);
+
 
 }

+ 5 - 0
aidex-system/src/main/java/com/aidex/system/service/impl/GpsAlarmPlushImpl.java

@@ -54,4 +54,9 @@ public class GpsAlarmPlushImpl  implements GpsAlarmPlushService {
     public int getCount() {
         return gistPlushMapper.getNumByStatus(BaseEntity.STATUS_NORMAL);
     }
+
+    @Override
+    public List<SysAlarmPlush> findList(SysAlarmPlush sysAlarmPlush) {
+        return gistPlushMapper.list(sysAlarmPlush);
+    }
 }

+ 7 - 7
aidex-ui/src/views/dashboard/portal/About.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="padding-card monitor-box" style="margin-top: 12px;padding-bottom: 12px;" ref="portaletDiv">
     <a-row class="columns-list-ul" :gutter="24">
-      <a-col :span="5">
+      <a-col :span="6">
         <a-card :bordered="false">
           <div class="text-number">{{ statisticsData.onlineShip }}</div>
           <div class="title-text">在线船只数量</div>
         </a-card>
       </a-col>
-      <a-col :span="5">
+      <a-col :span="6">
         <a-card :bordered="false">
           <div class="text-number">{{ statisticsData.todayAlarmNum }}</div>
           <div class="title-text">
@@ -15,7 +15,7 @@
           </div>
         </a-card>
       </a-col>
-      <a-col :span="5">
+      <a-col :span="6">
         <a-card :bordered="false">
           <div class="text-number">{{ statisticsData.uv_active_num }}</div>
           <div class="title-text">
@@ -24,7 +24,7 @@
           </div>
         </a-card>
       </a-col>
-      <a-col :span="5">
+      <a-col :span="6">
         <a-card :bordered="false">
           <div class="text-number">{{ statisticsData.uv_all_num }}</div>
           <div class="title-text">
@@ -33,15 +33,15 @@
           </div>
         </a-card>
       </a-col>
-      <a-col :span="4">
+<!--      <a-col :span="4">
         <a-card :bordered="false">
           <div class="text-number">100</div>
           <div class="title-text">
             累计里程数
-            <!-- 比昨日 <em class="rise">+ 1.25%</em> -->
+            &lt;!&ndash; 比昨日 <em class="rise">+ 1.25%</em> &ndash;&gt;
           </div>
         </a-card>
-      </a-col>
+      </a-col>-->
     </a-row>
   </div>
 </template>

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

@@ -32,7 +32,7 @@
             </div>
           </a-col>
           <!-- 趋势图 -->
-          <a-col :span="24">
+<!--          <a-col :span="24">
             <div class="module-in module-in04">
               <a-page-header
                 :ghost="false"
@@ -53,11 +53,11 @@
                 </template>
               </a-page-header>
               <div style="height:410px;padding-top:8px ;">
-                <!-- chart盒子 -->
+                &lt;!&ndash; chart盒子 &ndash;&gt;
                 <line-radar></line-radar>
               </div>
             </div>
-          </a-col>
+          </a-col>-->
 
         </a-row>
       </a-col>

+ 12 - 2
aidex-ui/src/views/system/line/index.vue

@@ -142,9 +142,10 @@ export default {
       if (this.map && this.startAndEndMarkerLayer && this.polyLine) {
         this.map.removeLayer("polyline-layer")
         this.map.removeLayer("marker-layer")
+        this.polyLine.remove("pl_1")
       }
       if (this.path.length > 0){
-        this.path = this.path.reverse()
+        this.path.reverse()
         this.markRoutePath(this.path)
       }
     },
@@ -328,7 +329,8 @@ export default {
       });
     },
     markRoutePath(pathArr) {
-      const paths = pathArr.map((item) => {
+      console.log(pathArr)
+      let paths = pathArr.map((item) => {
         return new window.TMap.LatLng(item.lat, item.lng)
       })
       const _this = this
@@ -394,6 +396,14 @@ export default {
           }
         ]
       })
+
+      this.polyLine.add({//新的折线添加到图层中
+        'id': 'pl_2',
+        'styleId': 'style_blue',
+        'paths': paths
+      })
+
+      console.log(this.polyLine)
       // 创建 MultiPolyline显示路径折线 结束
       /*this.model = new window.TMap.model.GLTFModel({
         // url: 'http://127.0.0.1:18080/profile/upload/2024/03/16/scene.gltf',

+ 2 - 19
aidex-ui/src/views/system/sysalarm/index.vue

@@ -80,12 +80,12 @@
         :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
       >
         <div class="table-operations" slot="button">
-          <a-button type="primary" @click="handleAdd" v-hasPermi="['system:sysAlarm:add']">
+<!--          <a-button type="primary" @click="handleAdd" v-hasPermi="['system:sysAlarm:add']">
             <a-icon type="plus" />新增
           </a-button>
           <a-button type="danger" v-if="!multiple" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:sysAlarm:remove']">
             <a-icon type="delete" />删除
-          </a-button>
+          </a-button>-->
           <a-button type="" @click="handleExport" v-hasPermi="['system:sysAlarm:export']">
             <a-icon type="download" />导出
           </a-button>
@@ -111,16 +111,6 @@
             {{ typeFormat(record) + '实时速度:' + record.speed + 'km/h' }}
           </a-tag>
         </span>
-
-<!--        <span slot="operation" slot-scope="{text, record}">
-          <a @click="handleUpdate(record)" v-hasPermi="['system:sysAlarm:edit']">
-            修改
-          </a>
-          <a-divider type="vertical" v-hasPermi="['system:sysAlarm:remove']"/>
-          <a @click="handleDelete(record)" v-hasPermi="['system:sysAlarm:remove']">
-            删除
-          </a>
-        </span>-->
       </advance-table>
     </a-card>
   </div>
@@ -240,13 +230,6 @@ export default {
           scopedSlots: { customRender: 'status' },
           align: 'center',
           width: '9%'
-        },
-        {
-          title: '操作',
-          dataIndex: 'operation',
-          align: 'center',
-          width: '10%',
-          scopedSlots: { customRender: 'operation' }
         }
       ]
     }

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

@@ -110,8 +110,8 @@
           <a @click="handleBindCamera(record)">
             摄像头绑定
           </a>
-          <a-divider type="vertical"/>
-          <a @click="handleCamera(record)">
+          <a-divider type="vertical" v-if="record.status !== '0'"/>
+          <a @click="handleCamera(record)" v-if="record.status !== '0'">
             视频查看
           </a>
         </span>