From 14ce5d2ccfae554497763da846ffb9eb39cd6d34 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 23 九月 2019 12:55:26 +0800
Subject: [PATCH] 1. 修改实时数据各项的转换逻辑

---
 src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt b/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt
index 592810c..afe9da7 100644
--- a/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt
+++ b/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt
@@ -1,8 +1,8 @@
 package com.flightfeather.obd.lightshare.service.impl
 
-import com.flightfeather.obd.lightshare.bean.ObdDataVo
+import com.flightfeather.obd.lightshare.bean.*
 import com.flightfeather.obd.lightshare.service.ObdDataService
-import com.flightfeather.obd.repository.ObdDataRepository
+import com.flightfeather.obd.repository.*
 import org.springframework.stereotype.Service
 
 /**
@@ -10,10 +10,29 @@
  * Date: 2019/8/27
  */
 @Service
-class ObdDataServiceImpl(val obdDataRepository: ObdDataRepository) : ObdDataService {
+class ObdDataServiceImpl(
+        val obdDataRepository: ObdDataRepository,
+        val carLoginRepository: CarLoginRepository,
+        val carLogoutRepository: CarLogoutRepository,
+        val obdInfoRepository: ObdInfoRepository,
+        val dataStreamRepository: DataStreamRepository
+) : ObdDataService {
 
-    override fun getDataByVinCode(vinCode: String, pageNum: Int?, pageSize: Int?): MutableList<ObdDataVo> {
-        return obdDataRepository.getDataByVinCode(vinCode, pageNum, pageSize)
-    }
+    override fun getDataByVinCode(vinCode: String, pageNum: Int?, pageSize: Int?): MutableList<ObdDataVo>
+            = obdDataRepository.getDataByVinCode(vinCode, pageNum, pageSize)
 
+    override fun getLoginData(deviceCode: String, pageNum: Int?, pageSize: Int?, startTime: String?, endTime: String?): List<CarLoginVo>
+            = carLoginRepository.getLoginData(deviceCode, pageNum, pageSize, startTime, endTime)
+
+    override fun getLogoutData(deviceCode: String, pageNum: Int?, pageSize: Int?, startTime: String?, endTime: String?): List<CarLogoutVo>
+            = carLogoutRepository.getLogoutData(deviceCode, pageNum, pageSize, startTime, endTime)
+
+    override fun getObdInfo(deviceCode: String, pageNum: Int?, pageSize: Int?): List<ObdInfoVo>
+            = obdInfoRepository.getObdInfo(deviceCode, pageNum, pageSize)
+
+    override fun getDataStream(deviceCode: String, pageNum: Int?, pageSize: Int?, startTime: String?, endTime: String?): List<DataStreamVo>
+            = dataStreamRepository.getDataStream(deviceCode, pageNum, pageSize, startTime, endTime)
+
+    override fun getCoordinate(deviceCode: String): LatLngVo
+            = dataStreamRepository.getCoordinate(deviceCode)
 }
\ No newline at end of file

--
Gitblit v1.9.3