riku
2019-09-23 14ce5d2ccfae554497763da846ffb9eb39cd6d34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.flightfeather.obd.lightshare.service.impl
 
import com.flightfeather.obd.lightshare.bean.*
import com.flightfeather.obd.lightshare.service.ObdDataService
import com.flightfeather.obd.repository.*
import org.springframework.stereotype.Service
 
/**
 * @author riku
 * Date: 2019/8/27
 */
@Service
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>
            = 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)
}