CzRger 1 year ago
parent
commit
ff03b30f8f

+ 35 - 10
ship-test/config/seat_tools.sql

@@ -1,23 +1,44 @@
 /*
  Navicat Premium Data Transfer
 
- Source Server         : 8.140.240.182
+ Source Server         : 74.10.28.37
  Source Server Type    : MySQL
- Source Server Version : 50743
- Source Host           : 8.140.240.182:18080
- Source Schema         : seat-tool
+ Source Server Version : 50732
+ Source Host           : 74.10.28.37:45371
+ Source Schema         : seat_tools
 
  Target Server Type    : MySQL
- Target Server Version : 50743
+ Target Server Version : 50732
  File Encoding         : 65001
 
- Date: 05/02/2024 11:09:41
+ Date: 06/02/2024 16:17:50
 */
 
 SET NAMES utf8mb4;
 SET FOREIGN_KEY_CHECKS = 0;
 
 -- ----------------------------
+-- Table structure for ship_test_hover
+-- ----------------------------
+DROP TABLE IF EXISTS `ship_test_hover`;
+CREATE TABLE `ship_test_hover`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
+  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
+  `sort` int(255) NULL DEFAULT NULL COMMENT '排序',
+  `del_flag` int(255) NULL DEFAULT 0 COMMENT '删除状态(0-正常,1-已删除)',
+  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
+  `source_id` int(11) NULL DEFAULT NULL COMMENT '数据源ID',
+  `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '取值',
+  `options` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '字典项',
+  `history_value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '历史轨迹取值',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `source_id`(`source_id`) USING BTREE,
+  CONSTRAINT `ship_test_hover_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `ship_test_source` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
+) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-轨迹详情框配置' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
 -- Table structure for ship_test_params
 -- ----------------------------
 DROP TABLE IF EXISTS `ship_test_params`;
@@ -34,7 +55,7 @@ CREATE TABLE `ship_test_params`  (
   PRIMARY KEY (`id`) USING BTREE,
   INDEX `source_id`(`source_id`) USING BTREE,
   CONSTRAINT `ship_test_params_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `ship_test_source` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-参数配置' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-参数配置' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for ship_test_params_dict
@@ -54,7 +75,7 @@ CREATE TABLE `ship_test_params_dict`  (
   PRIMARY KEY (`id`) USING BTREE,
   INDEX `source_id`(`params_id`) USING BTREE,
   CONSTRAINT `ship_test_params_dict_ibfk_1` FOREIGN KEY (`params_id`) REFERENCES `ship_test_params` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-参数配置_字典值' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-参数配置_字典值' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for ship_test_source
@@ -74,8 +95,10 @@ CREATE TABLE `ship_test_source`  (
   `ws_data_flag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'websocker返回数据标识',
   `history_ws_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹websocket地址',
   `history_ws_data_flag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹websocket返回数据标识',
+  `history_ws_other_params` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹websocket额外参数',
+  `color` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '默认颜色',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
 -- Table structure for ship_test_track
@@ -92,16 +115,18 @@ CREATE TABLE `ship_test_track`  (
   `track_speed_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '轨迹点速度标识',
   `track_course_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '轨迹点航向标识',
   `track_head_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '轨迹点船艏向标识',
+  `track_time_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '轨迹点时间标识',
   `history_track_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹唯一标识',
   `history_track_point_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹点唯一标识',
   `history_track_wkt_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹点wkt坐标标识',
   `history_track_speed_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹点速度标识',
   `history_track_course_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹点航向标识',
   `history_track_head_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹点船艏向标识',
+  `history_track_time_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史轨迹点时间标识',
   `del_flag` int(255) NULL DEFAULT 0 COMMENT '删除状态(0-正常,1-已删除)',
   PRIMARY KEY (`id`) USING BTREE,
   INDEX `source_id`(`source_id`) USING BTREE,
   CONSTRAINT `ship_test_track_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `ship_test_source` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-参数配置' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '船舶轨迹测试数据源-轨迹标识配置' ROW_FORMAT = DYNAMIC;
 
 SET FOREIGN_KEY_CHECKS = 1;

+ 71 - 0
ship-test/control/hover-control.js

@@ -0,0 +1,71 @@
+import HoverService from "../service/hover-service.js";
+import ApiResult from "../config/api.js";
+const HoverControl = {
+  list: async (req, res) => {
+    try {
+      HoverService.list(req.body).then(data => {
+        res.send(new ApiResult().success(data))
+      }).catch((e) => {
+        res.send(new ApiResult().error(null, e))
+      })
+    } catch (e) {
+      res.send(new ApiResult().error(e))
+    }
+  },
+  page: async (req, res) => {
+    try {
+      HoverService.page(req.body).then(data => {
+        res.send(new ApiResult().success(data))
+      }).catch((e) => {
+        res.send(new ApiResult().error(null, e))
+      })
+    } catch (e) {
+      res.send(new ApiResult().error(e))
+    }
+  },
+  info: async (req, res) => {
+    try {
+      HoverService.info(req.params.id).then(data => {
+        res.send(new ApiResult().success(data))
+      }).catch((e) => {
+        res.send(new ApiResult().error(null, e))
+      })
+    } catch (e) {
+      res.send(new ApiResult().error(e))
+    }
+  },
+  add: async (req, res) => {
+    try {
+      HoverService.add(req.body).then(data => {
+        res.send(new ApiResult().success(data))
+      }).catch((e) => {
+        res.send(new ApiResult().error(null, e))
+      })
+    } catch (e) {
+      res.send(new ApiResult().error(e))
+    }
+  },
+  edit: async (req, res) => {
+    try {
+      HoverService.edit(req.body).then(data => {
+        res.send(new ApiResult().success(data))
+      }).catch((e) => {
+        res.send(new ApiResult().error(null, e))
+      })
+    } catch (e) {
+      res.send(new ApiResult().error(e))
+    }
+  },
+  del: async (req, res) => {
+    try {
+      HoverService.del(req.params?.ids?.split(',')).then(data => {
+        res.send(new ApiResult().success(data))
+      }).catch((e) => {
+        res.send(new ApiResult().error(null, e))
+      })
+    } catch (e) {
+      res.send(new ApiResult().error(e))
+    }
+  },
+}
+export default HoverControl

+ 3 - 0
ship-test/control/ship-filter-control.js

@@ -3,6 +3,7 @@ import ApiResult from "../config/api.js";
 import ParamsService from "../service/params-service.js";
 import ParamsDictService from "../service/params-dict-service.js";
 import TrackService from "../service/track-service.js";
+import HoverService from "../service/hover-service.js";
 const ShipFilterControl = {
   getConfig: async (req, res) => {
     try {
@@ -10,6 +11,8 @@ const ShipFilterControl = {
       for (const source of sourceData) {
         const trackData = await TrackService.queryBy({sourceId: source.id})
         source.track = trackData?.[0] || {}
+        const hoverData = await HoverService.list({sourceId: source.id})
+        source.hover = hoverData || []
         const paramsData = await ParamsService.list({sourceId: source.id})
         for (const params of paramsData) {
           const dictData = await ParamsDictService.list({paramsId: params.id})

+ 17 - 0
ship-test/entity/hover-entity.js

@@ -0,0 +1,17 @@
+import {objToCamel, isValue, YMDHms} from "../../util/index.js";
+
+export default class ParamsEntity {
+  constructor(obj) {
+    objToCamel(obj)
+    this.sourceId = isValue(obj?.sourceId) ? obj.sourceId : null
+    this.id = isValue(obj?.id) ? obj.id : null
+    this.name = isValue(obj?.name) ? obj.name : null
+    this.sort = isValue(obj?.sort) ? obj.sort : 0
+    this.remark = isValue(obj?.remark) ? obj.remark : null
+    this.createTime = isValue(obj?.createTime) ? YMDHms(obj.createTime) : null
+    this.updateTime = isValue(obj?.updateTime) ? YMDHms(obj.updateTime) : null
+    this.value = isValue(obj?.value) ? obj.value : null
+    this.options = isValue(obj?.options) ? obj.options : []
+    this.historyValue = isValue(obj?.historyValue) ? obj.historyValue : null
+  }
+}

+ 1 - 0
ship-test/entity/source-entity.js

@@ -16,5 +16,6 @@ export default class SourceEntity {
     this.historyWsUrl = isValue(obj?.historyWsUrl) ? obj.historyWsUrl : null
     this.historyWsDataFlag = isValue(obj?.historyWsDataFlag) ? obj.historyWsDataFlag : null
     this.historyWsOtherParams = isValue(obj?.historyWsOtherParams) ? obj.historyWsOtherParams : null
+    this.color = isValue(obj?.color) ? obj.color : null
   }
 }

+ 2 - 0
ship-test/entity/track-entity.js

@@ -13,11 +13,13 @@ export default class ParamsEntity {
     this.trackSpeedKey = isValue(obj?.trackSpeedKey) ? obj.trackSpeedKey : null
     this.trackCourseKey = isValue(obj?.trackCourseKey) ? obj.trackCourseKey : null
     this.trackHeadKey = isValue(obj?.trackHeadKey) ? obj.trackHeadKey : null
+    this.trackTimeKey = isValue(obj?.trackTimeKey) ? obj.trackTimeKey : null
     this.historyTrackKey = isValue(obj?.historyTrackKey) ? obj.historyTrackKey : null
     this.historyTrackPointKey = isValue(obj?.historyTrackPointKey) ? obj.historyTrackPointKey : null
     this.historyTrackWktKey = isValue(obj?.historyTrackWktKey) ? obj.historyTrackWktKey : null
     this.historyTrackSpeedKey = isValue(obj?.historyTrackSpeedKey) ? obj.historyTrackSpeedKey : null
     this.historyTrackCourseKey = isValue(obj?.historyTrackCourseKey) ? obj.historyTrackCourseKey : null
     this.historyTrackHeadKey = isValue(obj?.historyTrackHeadKey) ? obj.historyTrackHeadKey : null
+    this.historyTrackTimeKey = isValue(obj?.historyTrackTimeKey) ? obj.historyTrackTimeKey : null
   }
 }

+ 9 - 0
ship-test/routers/index.js

@@ -3,6 +3,7 @@ import SourceControl from "../control/source-control.js";
 import ParamsControl from "../control/params-control.js";
 import ParamsDictControl from "../control/params-dict-control.js";
 import TrackControl from "../control/track-control.js";
+import HoverControl from "../control/hover-control.js";
 import ShipFilterControl from "../control/ship-filter-control.js";
 const shipTestRouter = express.Router()
 // 数据源
@@ -34,7 +35,15 @@ shipTestRouter.post('/track/page', TrackControl.page)
 shipTestRouter.get('/track/info/:id', TrackControl.info)
 shipTestRouter.post('/track/add', TrackControl.add)
 shipTestRouter.put('/track/edit', TrackControl.edit)
+shipTestRouter.delete('/track/del/:ids', TrackControl.del)
 shipTestRouter.get('/track/infoBySourceId/:sourceId', TrackControl.infoBySourceId)
+// 轨迹详情框
+shipTestRouter.post('/hover/list', HoverControl.list)
+shipTestRouter.post('/hover/page', HoverControl.page)
+shipTestRouter.get('/hover/info/:id', HoverControl.info)
+shipTestRouter.post('/hover/add', HoverControl.add)
+shipTestRouter.put('/hover/edit', HoverControl.edit)
+shipTestRouter.delete('/hover/del/:ids', HoverControl.del)
 // 船筛
 shipTestRouter.get('/ship-filter/get-config', ShipFilterControl.getConfig)
 export default shipTestRouter

+ 193 - 0
ship-test/service/hover-service.js

@@ -0,0 +1,193 @@
+import {sqlHandle} from "../config/db.js";
+import {isValue, paramToUnder} from "../../util/index.js";
+import PageResult from "../config/page.js";
+import HoverEntity from "../entity/hover-entity.js";
+const HoverService = {
+  list: ({sourceId, name, orderByColumn, isAsc}) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        let sql = 'SELECT * FROM ship_test_hover'
+        let where = ['del_flag = 0']
+        if (isValue(sourceId)) {
+          where.push(`source_id = "${sourceId}"`)
+        } else {
+          return reject('数据源ID不可为空')
+        }
+        if (isValue(name)) {
+          where.push(`name LIKE "%${name}%"`)
+        }
+        if (where.length > 0) {
+          sql += ' ' + `WHERE ${where.join(' AND ')}`
+        }
+        if (isValue(orderByColumn)) {
+          sql += ' ' + `ORDER BY ${paramToUnder(orderByColumn)} ${isAsc ? 'ASC' : 'DESC'}`
+        } else {
+          sql += ' ' + `ORDER BY sort DESC`
+        }
+        const result = await sqlHandle(sql)
+        return resolve(result.map(v => {
+          const obj = new HoverEntity(v)
+          try {
+            obj.options = JSON.parse(obj.options)
+          } catch (e) {
+          }
+          return obj
+        }))
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  },
+  page: ({sourceId, pageNum, pageSize, name, orderByColumn, isAsc}) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        let sql = 'SELECT * FROM ship_test_hover'
+        let where = ['del_flag = 0']
+        if (isValue(sourceId)) {
+          where.push(`source_id = "${sourceId}"`)
+        } else {
+          return reject('数据源ID不可为空')
+        }
+        if (isValue(name)) {
+          where.push(`name LIKE "%${name}%"`)
+        }
+        if (where.length > 0) {
+          sql += ' ' + `WHERE ${where.join(' AND ')}`
+        }
+        if (isValue(orderByColumn)) {
+          sql += ' ' + `ORDER BY ${paramToUnder(orderByColumn)} ${isAsc ? 'ASC' : 'DESC'}`
+        } else {
+          sql += ' ' + `ORDER BY sort DESC`
+        }
+        const result = await PageResult(sql, pageNum, pageSize, HoverEntity)
+        result.data.forEach(v => {
+          try {
+            v.options = JSON.parse(v.options)
+          } catch (e) {
+          }
+        })
+        return resolve(result)
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  },
+  info: (id) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        let sql = 'SELECT * FROM ship_test_hover'
+        let where = ['del_flag = 0']
+        if (!isValue(id)) {
+          return reject('id不可为空')
+        } else {
+          where.push(`id = ${id}`)
+        }
+        if (where.length > 0) {
+          sql += ' ' + `WHERE ${where.join(' AND ')}`
+        }
+        const result = await sqlHandle(sql)
+        return resolve(result.map(v => {
+          const obj = new HoverEntity(v)
+          try {
+            obj.options = JSON.parse(obj.options)
+          } catch (e) {
+          }
+          return obj
+        })?.[0])
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  },
+  queryBy: ({name}) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        let sql = 'SELECT * FROM ship_test_hover'
+        let where = ['del_flag = 0']
+        if (isValue(name)) {
+          where.push(`name = "${name}"`)
+        }
+        if (where.length > 0) {
+          sql += ' ' + `WHERE ${where.join(' AND ')}`
+        }
+        const result = await sqlHandle(sql)
+        return resolve(result.map(v => {
+          const obj = new HoverEntity(v)
+          try {
+            obj.options = JSON.parse(obj.options)
+          } catch (e) {
+          }
+          return obj
+        }))
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  },
+  add: (form) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        const hoverEntity = new HoverEntity(form)
+        const values = [
+          ['source_id', hoverEntity.sourceId],
+          ['name', hoverEntity.name],
+          ['remark', hoverEntity.remark],
+          ['sort', hoverEntity.sort],
+          ['value', hoverEntity.value],
+          ['options', JSON.stringify(hoverEntity.options)],
+          ['history_value', hoverEntity.historyValue],
+        ]
+        const sql = `INSERT INTO ship_test_hover (${values.map(v => v[0]).join(',')}) VALUES (${values.map(v => '?').join(',')})`
+        if (!isValue(hoverEntity.sourceId)) {
+          return reject('数据源ID不可为空')
+        }
+        const result = await sqlHandle(sql, values.map(v => v[1]))
+        return resolve(result.insertId)
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  },
+  edit: (form) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        const hoverEntity = new HoverEntity(form)
+        const values = [
+          ['name', hoverEntity.name],
+          ['remark', hoverEntity.remark],
+          ['sort', hoverEntity.sort],
+          ['value', hoverEntity.value],
+          ['options', JSON.stringify(hoverEntity.options)],
+          ['history_value', hoverEntity.historyValue],
+        ]
+        let sql = `UPDATE ship_test_hover SET ${values.map(v => `${v[0]} = ?`).join(',')}`
+        if (!isValue(hoverEntity.id)) {
+          return reject('id不可为空!')
+        } else {
+          sql += ' ' + `WHERE id = "${hoverEntity.id}"`
+        }
+        const result = await sqlHandle(sql, values.map(v => v[1]))
+        return resolve(hoverEntity.id)
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  },
+  del: (ids) => {
+    return new Promise(async (resolve, reject) => {
+      try {
+        let sql = 'UPDATE ship_test_hover SET del_flag = "1"'
+        if (ids?.length === 0) {
+          return reject('ids不可为空!')
+        } else {
+          sql += ' ' + 'WHERE id IN (?)'
+        }
+        const result = await sqlHandle(sql, [ids])
+        return resolve('删除成功!')
+      } catch (e) {
+        return reject(e.sqlMessage)
+      }
+    })
+  }
+}
+export default HoverService

+ 2 - 0
ship-test/service/source-service.js

@@ -102,6 +102,7 @@ const SourceService = {
           ['history_ws_url', sourceEntity.historyWsUrl],
           ['history_ws_data_flag', sourceEntity.historyWsDataFlag],
           ['history_ws_other_params', sourceEntity.historyWsOtherParams],
+          ['color', sourceEntity.color],
         ]
         const sql = `INSERT INTO ship_test_source (${values.map(v => v[0]).join(',')}) VALUES (${values.map(v => '?').join(',')})`
         const sameValid = await SourceService.queryBy({name: sourceEntity.name})
@@ -130,6 +131,7 @@ const SourceService = {
           ['history_ws_url', sourceEntity.historyWsUrl],
           ['history_ws_data_flag', sourceEntity.historyWsDataFlag],
           ['history_ws_other_params', sourceEntity.historyWsOtherParams],
+          ['color', sourceEntity.color],
         ]
         let sql = `UPDATE ship_test_source SET ${values.map(v => `${v[0]} = ?`).join(',')}`
         if (!isValue(sourceEntity.id)) {

+ 4 - 0
ship-test/service/track-service.js

@@ -112,12 +112,14 @@ const TrackService = {
           ['track_speed_key', trackEntity.trackSpeedKey],
           ['track_course_key', trackEntity.trackCourseKey],
           ['track_head_key', trackEntity.trackHeadKey],
+          ['track_time_key', trackEntity.trackTimeKey],
           ['history_track_key', trackEntity.historyTrackKey],
           ['history_track_point_key', trackEntity.historyTrackPointKey],
           ['history_track_wkt_key', trackEntity.historyTrackWktKey],
           ['history_track_speed_key', trackEntity.historyTrackSpeedKey],
           ['history_track_course_key', trackEntity.historyTrackCourseKey],
           ['history_track_head_key', trackEntity.historyTrackHeadKey],
+          ['history_track_time_key', trackEntity.historyTrackTimeKey],
         ]
         const sql = `INSERT INTO ship_test_track (${values.map(v => v[0]).join(',')}) VALUES (${values.map(v => '?').join(',')})`
         if (!isValue(trackEntity.sourceId)) {
@@ -141,12 +143,14 @@ const TrackService = {
           ['track_speed_key', trackEntity.trackSpeedKey],
           ['track_course_key', trackEntity.trackCourseKey],
           ['track_head_key', trackEntity.trackHeadKey],
+          ['track_time_key', trackEntity.trackTimeKey],
           ['history_track_key', trackEntity.historyTrackKey],
           ['history_track_point_key', trackEntity.historyTrackPointKey],
           ['history_track_wkt_key', trackEntity.historyTrackWktKey],
           ['history_track_speed_key', trackEntity.historyTrackSpeedKey],
           ['history_track_course_key', trackEntity.historyTrackCourseKey],
           ['history_track_head_key', trackEntity.historyTrackHeadKey],
+          ['history_track_time_key', trackEntity.historyTrackTimeKey],
         ]
         let sql = `UPDATE ship_test_track SET ${values.map(v => `${v[0]} = ?`).join(',')}`
         if (!isValue(trackEntity.id)) {