Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 081667b8
authored
May 06, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开发设备激活同步定位数据功能
1 parent
2e6e2b27
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
144 additions
and
15 deletions
src/main/java/cn/com/glsx/admin/modules/component/DeviceActiveComponent.java
src/main/java/cn/com/glsx/admin/modules/component/DeviceActiveEventHandle.java
src/main/java/cn/com/glsx/admin/modules/entity/VehicleDevice.java
src/main/java/cn/com/glsx/admin/modules/model/datasync/DeviceActiveSync.java
src/main/java/cn/com/glsx/admin/modules/model/export/DeviceActiveExprot.java
src/main/java/cn/com/glsx/admin/modules/model/param/CommonTearDownSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/DeviceActiveSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/FinalPositioningSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDailySearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDetailSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JudgmentSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/OfflineSearch.java
src/main/java/cn/com/glsx/admin/modules/service/DeviceActiveService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/resources/mapper/VehicleMapper.xml
src/test/java/cn/com/glsx/admin/modules/component/TenantDeviceSyncComponentTest.java
src/main/java/cn/com/glsx/admin/modules/component/DeviceActiveComponent.java
0 → 100644
View file @
081667b
package
cn
.
com
.
glsx
.
admin
.
modules
.
component
;
import
cn.com.glsx.admin.modules.model.datasync.DeviceActiveSync
;
import
cn.com.glsx.stdinterface.api.DeviceActiveClient
;
import
cn.com.glsx.stdinterface.dto.DeviceActiveDto
;
import
cn.hutool.json.JSONUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* 设备激活处理组件类
*
* @author yangll
*/
@Slf4j
@Component
public
class
DeviceActiveComponent
{
@Autowired
private
DeviceActiveClient
deviceActiveClient
;
/**
* 保存设备激活信息到关联表
*
* @param deviceActiveSync 设备号集合
*/
public
void
saveActiveInfo
(
DeviceActiveSync
deviceActiveSync
)
{
DeviceActiveDto
deviceActiveDto
=
new
DeviceActiveDto
();
deviceActiveDto
.
setSnList
(
deviceActiveSync
.
getSnList
());
log
.
info
(
"saveActiveInfo snList:"
+
JSONUtil
.
toJsonStr
(
deviceActiveDto
.
getSnList
()));
deviceActiveClient
.
saveActiveInfo
(
deviceActiveDto
);
}
}
src/main/java/cn/com/glsx/admin/modules/component/DeviceActiveEventHandle.java
0 → 100644
View file @
081667b
package
cn
.
com
.
glsx
.
admin
.
modules
.
component
;
import
cn.com.glsx.admin.modules.model.datasync.DeviceActiveSync
;
import
cn.hutool.json.JSONUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
/**
* 设备激活同步激活经纬度和激活地址
*
* @author yangll
*/
@Slf4j
@Component
public
class
DeviceActiveEventHandle
{
@Autowired
private
DeviceActiveComponent
deviceActiveComponent
;
@EventListener
public
void
event
(
DeviceActiveSync
deviceActiveSync
)
{
log
.
info
(
"event channel DeviceActive snList:{}"
,
JSONUtil
.
toJsonStr
(
deviceActiveSync
.
getSnList
()));
deviceActiveComponent
.
saveActiveInfo
(
deviceActiveSync
);
}
}
src/main/java/cn/com/glsx/admin/modules/entity/VehicleDevice.java
View file @
081667b
...
@@ -70,7 +70,7 @@ public class VehicleDevice extends BaseEntity {
...
@@ -70,7 +70,7 @@ public class VehicleDevice extends BaseEntity {
* 激活上点类型 0、GPS,1、基站
* 激活上点类型 0、GPS,1、基站
*/
*/
@Column
(
name
=
"active_location_type"
)
@Column
(
name
=
"active_location_type"
)
private
Byte
activeLocationType
;
private
Integer
activeLocationType
;
/**
/**
* 激活上点地址
* 激活上点地址
...
...
src/main/java/cn/com/glsx/admin/modules/model/datasync/DeviceActiveSync.java
0 → 100644
View file @
081667b
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
datasync
;
import
lombok.Data
;
import
lombok.Setter
;
import
java.util.List
;
/**
* 设备激活观察者模式类
*/
@Data
public
class
DeviceActiveSync
{
/**
* 设备列表
*/
private
List
<
String
>
snList
;
public
DeviceActiveSync
(
List
<
String
>
snList
)
{
this
.
setSnList
(
snList
);
}
}
src/main/java/cn/com/glsx/admin/modules/model/export/DeviceActiveExprot.java
View file @
081667b
...
@@ -119,4 +119,26 @@ public class DeviceActiveExprot {
...
@@ -119,4 +119,26 @@ public class DeviceActiveExprot {
* 基站首次激活地址
* 基站首次激活地址
**/
**/
private
String
firstBsAddress
;
private
String
firstBsAddress
;
/**
* 激活经纬度
**/
@ExcelProperty
(
"激活经纬度"
)
private
String
lngAndLat
;
/**
* 激活经度
**/
private
String
lng
;
/**
* 激活纬度
**/
private
String
lat
;
/**
* 激活地址
**/
@ExcelProperty
(
"激活地址"
)
private
String
activeAddress
;
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/CommonTearDownSearch.java
View file @
081667b
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -40,7 +39,8 @@ public class CommonTearDownSearch extends BasicSearch {
...
@@ -40,7 +39,8 @@ public class CommonTearDownSearch extends BasicSearch {
public
void
setAlarmEndTime
(
String
alarmEndTime
)
{
public
void
setAlarmEndTime
(
String
alarmEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
alarmEndTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
alarmEndTime
))
{
this
.
alarmEndTime
=
alarmEndTime
;
this
.
alarmEndTime
=
alarmEndTime
;
}
}
else
{
this
.
alarmEndTime
=
alarmEndTime
.
concat
(
" 23:59:59"
);
this
.
alarmEndTime
=
alarmEndTime
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/DeviceActiveSearch.java
View file @
081667b
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -42,7 +41,8 @@ public class DeviceActiveSearch extends BasicSearch {
...
@@ -42,7 +41,8 @@ public class DeviceActiveSearch extends BasicSearch {
public
void
setEndTime
(
String
endTime
)
{
public
void
setEndTime
(
String
endTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
endTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
endTime
))
{
this
.
endTime
=
endTime
;
this
.
endTime
=
endTime
;
}
}
else
{
this
.
endTime
=
endTime
.
concat
(
" 23:59:59"
);
this
.
endTime
=
endTime
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/FinalPositioningSearch.java
View file @
081667b
...
@@ -69,21 +69,24 @@ public class FinalPositioningSearch extends BasicSearch {
...
@@ -69,21 +69,24 @@ public class FinalPositioningSearch extends BasicSearch {
public
void
setActiveDateEnd
(
String
activeDateEnd
)
{
public
void
setActiveDateEnd
(
String
activeDateEnd
)
{
if
(
StringUtils
.
isNullOrEmpty
(
activeDateEnd
))
{
if
(
StringUtils
.
isNullOrEmpty
(
activeDateEnd
))
{
this
.
activeDateEnd
=
activeDateEnd
;
this
.
activeDateEnd
=
activeDateEnd
;
}
}
else
{
this
.
activeDateEnd
=
activeDateEnd
.
concat
(
" 23:59:59"
);
this
.
activeDateEnd
=
activeDateEnd
.
concat
(
" 23:59:59"
);
}
}
}
public
void
setFinalGpsTimeEnd
(
String
finalGpsTimeEnd
)
{
public
void
setFinalGpsTimeEnd
(
String
finalGpsTimeEnd
)
{
if
(
StringUtils
.
isNullOrEmpty
(
finalGpsTimeEnd
))
{
if
(
StringUtils
.
isNullOrEmpty
(
finalGpsTimeEnd
))
{
this
.
finalGpsTimeEnd
=
finalGpsTimeEnd
;
this
.
finalGpsTimeEnd
=
finalGpsTimeEnd
;
}
}
else
{
this
.
finalGpsTimeEnd
=
finalGpsTimeEnd
.
concat
(
" 23:59:59"
);
this
.
finalGpsTimeEnd
=
finalGpsTimeEnd
.
concat
(
" 23:59:59"
);
}
}
}
public
void
setFinalBsTimeEnd
(
String
finalBsTimeEnd
)
{
public
void
setFinalBsTimeEnd
(
String
finalBsTimeEnd
)
{
if
(
StringUtils
.
isNullOrEmpty
(
finalBsTimeEnd
))
{
if
(
StringUtils
.
isNullOrEmpty
(
finalBsTimeEnd
))
{
this
.
finalBsTimeEnd
=
finalBsTimeEnd
;
this
.
finalBsTimeEnd
=
finalBsTimeEnd
;
}
}
else
{
this
.
finalBsTimeEnd
=
finalBsTimeEnd
.
concat
(
" 23:59:59"
);
this
.
finalBsTimeEnd
=
finalBsTimeEnd
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDailySearch.java
View file @
081667b
...
@@ -30,7 +30,8 @@ public class JourneyDailySearch extends BasicSearch {
...
@@ -30,7 +30,8 @@ public class JourneyDailySearch extends BasicSearch {
public
void
setJourneyEndTime
(
String
journeyEndTime
)
{
public
void
setJourneyEndTime
(
String
journeyEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
journeyEndTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
journeyEndTime
))
{
this
.
journeyEndTime
=
journeyEndTime
;
this
.
journeyEndTime
=
journeyEndTime
;
}
}
else
{
this
.
journeyEndTime
=
journeyEndTime
.
concat
(
" 23:59:59"
);
this
.
journeyEndTime
=
journeyEndTime
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDetailSearch.java
View file @
081667b
...
@@ -35,7 +35,8 @@ public class JourneyDetailSearch extends BasicSearch {
...
@@ -35,7 +35,8 @@ public class JourneyDetailSearch extends BasicSearch {
public
void
setJourneyEndTime
(
String
journeyEndTime
)
{
public
void
setJourneyEndTime
(
String
journeyEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
journeyEndTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
journeyEndTime
))
{
this
.
journeyEndTime
=
journeyEndTime
;
this
.
journeyEndTime
=
journeyEndTime
;
}
}
else
{
this
.
journeyEndTime
=
journeyEndTime
.
concat
(
" 23:59:59"
);
this
.
journeyEndTime
=
journeyEndTime
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/JudgmentSearch.java
View file @
081667b
...
@@ -45,7 +45,8 @@ public class JudgmentSearch extends BasicSearch {
...
@@ -45,7 +45,8 @@ public class JudgmentSearch extends BasicSearch {
public
void
setEndTime
(
String
endTime
)
{
public
void
setEndTime
(
String
endTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
endTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
endTime
))
{
this
.
endTime
=
endTime
;
this
.
endTime
=
endTime
;
}
}
else
{
this
.
endTime
=
endTime
.
concat
(
" 23:59:59"
);
this
.
endTime
=
endTime
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/OfflineSearch.java
View file @
081667b
...
@@ -54,14 +54,17 @@ public class OfflineSearch extends BasicSearch {
...
@@ -54,14 +54,17 @@ public class OfflineSearch extends BasicSearch {
public
void
setOfflineEndTime
(
String
offlineEndTime
)
{
public
void
setOfflineEndTime
(
String
offlineEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
offlineEndTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
offlineEndTime
))
{
this
.
offlineEndTime
=
offlineEndTime
;
this
.
offlineEndTime
=
offlineEndTime
;
}
}
else
{
this
.
offlineEndTime
=
offlineEndTime
.
concat
(
" 23:59:59"
);
this
.
offlineEndTime
=
offlineEndTime
.
concat
(
" 23:59:59"
);
}
}
}
public
void
setActiveEndTime
(
String
activeEndTime
)
{
public
void
setActiveEndTime
(
String
activeEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
activeEndTime
))
{
if
(
StringUtils
.
isNullOrEmpty
(
activeEndTime
))
{
this
.
activeEndTime
=
activeEndTime
;
this
.
activeEndTime
=
activeEndTime
;
}
}
else
{
this
.
activeEndTime
=
activeEndTime
.
concat
(
" 23:59:59"
);
this
.
activeEndTime
=
activeEndTime
.
concat
(
" 23:59:59"
);
}
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/service/DeviceActiveService.java
View file @
081667b
...
@@ -13,6 +13,7 @@ import org.apache.commons.collections4.CollectionUtils;
...
@@ -13,6 +13,7 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StringUtils
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.CountDownLatch
;
...
@@ -56,6 +57,9 @@ public class DeviceActiveService {
...
@@ -56,6 +57,9 @@ public class DeviceActiveService {
deviceActiveExprot
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
deviceActiveExprot
.
getDeviceType
()));
deviceActiveExprot
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
deviceActiveExprot
.
getDeviceType
()));
deviceActiveExprot
.
setSourceStr
(
TypeConverseEunm
.
SourceEnum
.
getStrBySourceType
(
deviceActiveExprot
.
getSource
()));
deviceActiveExprot
.
setSourceStr
(
TypeConverseEunm
.
SourceEnum
.
getStrBySourceType
(
deviceActiveExprot
.
getSource
()));
deviceActiveExprot
.
setIsOnLineStr
(
TypeConverseEunm
.
OnLineEnum
.
getStrByonLineType
(
deviceActiveExprot
.
getIsOnLine
()));
deviceActiveExprot
.
setIsOnLineStr
(
TypeConverseEunm
.
OnLineEnum
.
getStrByonLineType
(
deviceActiveExprot
.
getIsOnLine
()));
if
(!
StringUtils
.
isEmpty
(
deviceActiveExprot
.
getLng
())
&&
!
StringUtils
.
isEmpty
(
deviceActiveExprot
.
getLat
()))
{
deviceActiveExprot
.
setLngAndLat
(
deviceActiveExprot
.
getLng
()
+
","
+
deviceActiveExprot
.
getLat
());
}
});
});
getDeviceActiveData
(
deviceActiveList
);
getDeviceActiveData
(
deviceActiveList
);
return
deviceActiveList
;
return
deviceActiveList
;
...
@@ -73,12 +77,14 @@ public class DeviceActiveService {
...
@@ -73,12 +77,14 @@ public class DeviceActiveService {
userApiService
.
setCheckedOrgUsers
(
search
);
userApiService
.
setCheckedOrgUsers
(
search
);
}
}
List
<
DeviceActiveExprot
>
deviceActiveList
=
vehicleMapper
.
getBaseDeviceActiveListWithAuth
(
search
);
List
<
DeviceActiveExprot
>
deviceActiveList
=
vehicleMapper
.
getBaseDeviceActiveListWithAuth
(
search
);
getDeviceActiveData
(
deviceActiveList
);
// 数字类型转换为字符串类型
// 数字类型转换为字符串类型
deviceActiveList
.
forEach
(
deviceActiveExprot
->
{
deviceActiveList
.
forEach
(
deviceActiveExprot
->
{
deviceActiveExprot
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
deviceActiveExprot
.
getDeviceType
()));
deviceActiveExprot
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
deviceActiveExprot
.
getDeviceType
()));
deviceActiveExprot
.
setSourceStr
(
TypeConverseEunm
.
SourceEnum
.
getStrBySourceType
(
deviceActiveExprot
.
getSource
()));
deviceActiveExprot
.
setSourceStr
(
TypeConverseEunm
.
SourceEnum
.
getStrBySourceType
(
deviceActiveExprot
.
getSource
()));
deviceActiveExprot
.
setIsOnLineStr
(
TypeConverseEunm
.
OnLineEnum
.
getStrByonLineType
(
deviceActiveExprot
.
getIsOnLine
()));
deviceActiveExprot
.
setIsOnLineStr
(
TypeConverseEunm
.
OnLineEnum
.
getStrByonLineType
(
deviceActiveExprot
.
getIsOnLine
()));
if
(!
StringUtils
.
isEmpty
(
deviceActiveExprot
.
getLng
())
&&
!
StringUtils
.
isEmpty
(
deviceActiveExprot
.
getLat
()))
{
deviceActiveExprot
.
setLngAndLat
(
deviceActiveExprot
.
getLng
()
+
","
+
deviceActiveExprot
.
getLat
());
}
});
});
return
deviceActiveList
;
return
deviceActiveList
;
}
}
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
081667b
...
@@ -8,6 +8,7 @@ import cn.com.glsx.admin.common.exception.AdminException;
...
@@ -8,6 +8,7 @@ import cn.com.glsx.admin.common.exception.AdminException;
import
cn.com.glsx.admin.modules.entity.*
;
import
cn.com.glsx.admin.modules.entity.*
;
import
cn.com.glsx.admin.modules.mapper.*
;
import
cn.com.glsx.admin.modules.mapper.*
;
import
cn.com.glsx.admin.modules.model.*
;
import
cn.com.glsx.admin.modules.model.*
;
import
cn.com.glsx.admin.modules.model.datasync.DeviceActiveSync
;
import
cn.com.glsx.admin.modules.model.datasync.TenantDeviceSync
;
import
cn.com.glsx.admin.modules.model.datasync.TenantDeviceSync
;
import
cn.com.glsx.admin.modules.model.export.TrialDriveVehicleExport
;
import
cn.com.glsx.admin.modules.model.export.TrialDriveVehicleExport
;
import
cn.com.glsx.admin.modules.model.export.VehicleInfoExport
;
import
cn.com.glsx.admin.modules.model.export.VehicleInfoExport
;
...
@@ -1833,6 +1834,8 @@ public class VehicleService extends AbstractCommonService {
...
@@ -1833,6 +1834,8 @@ public class VehicleService extends AbstractCommonService {
private
void
pushDeviceEvent
(
List
<
String
>
snList
,
TenantDataOperatorEnum
tenantDataOperatorEnum
)
{
private
void
pushDeviceEvent
(
List
<
String
>
snList
,
TenantDataOperatorEnum
tenantDataOperatorEnum
)
{
log
.
info
(
"update vehicle device publisher event:{}, operator:{}"
,
JSONObject
.
toJSONString
(
snList
),
tenantDataOperatorEnum
.
getMessage
());
log
.
info
(
"update vehicle device publisher event:{}, operator:{}"
,
JSONObject
.
toJSONString
(
snList
),
tenantDataOperatorEnum
.
getMessage
());
applicationEventPublisher
.
publishEvent
(
new
TenantDeviceSync
(
ShieldContextHolder
.
getTenantId
(),
snList
,
tenantDataOperatorEnum
));
applicationEventPublisher
.
publishEvent
(
new
TenantDeviceSync
(
ShieldContextHolder
.
getTenantId
(),
snList
,
tenantDataOperatorEnum
));
// 发送设备激活时间
applicationEventPublisher
.
publishEvent
(
new
DeviceActiveSync
(
snList
));
}
}
public
List
<
Vehicle
>
getAllVehicle
()
{
public
List
<
Vehicle
>
getAllVehicle
()
{
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
081667b
...
@@ -730,7 +730,10 @@
...
@@ -730,7 +730,10 @@
when tdl.last_gps_time is null and (timestampdiff(SECOND, tdl.last_bs_time, now()))
>
259200 then 2
when tdl.last_gps_time is null and (timestampdiff(SECOND, tdl.last_bs_time, now()))
>
259200 then 2
else 1 end as isOnline,
else 1 end as isOnline,
tu.username as shopName,
tu.username as shopName,
tvd.created_date as activeDate
tvd.created_date as activeDate,
tvd.active_location_lng as lng,
tvd.active_location_lat as lat,
tvd.active_location_address as activeAddress
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join t_device td on td.sn = tvd.sn
...
...
src/test/java/cn/com/glsx/admin/modules/component/TenantDeviceSyncComponentTest.java
View file @
081667b
...
@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.component;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.component;
import
cn.com.glsx.Application
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.admin.common.enums.TenantDataOperatorEnum
;
import
cn.com.glsx.admin.common.enums.TenantDataOperatorEnum
;
import
cn.com.glsx.admin.modules.model.datasync.DeviceActiveSync
;
import
cn.com.glsx.admin.modules.model.datasync.TenantDeviceSync
;
import
cn.com.glsx.admin.modules.model.datasync.TenantDeviceSync
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.glsx.plat.context.utils.PropertiesUtils
;
import
com.glsx.plat.context.utils.PropertiesUtils
;
...
@@ -51,6 +52,7 @@ public class TenantDeviceSyncComponentTest {
...
@@ -51,6 +52,7 @@ public class TenantDeviceSyncComponentTest {
snList
.
add
(
"111112"
);
snList
.
add
(
"111112"
);
snList
.
add
(
"111113"
);
snList
.
add
(
"111113"
);
applicationEventPublisher
.
publishEvent
(
new
TenantDeviceSync
(
123L
,
snList
,
TenantDataOperatorEnum
.
ADD_DEVICE
));
applicationEventPublisher
.
publishEvent
(
new
TenantDeviceSync
(
123L
,
snList
,
TenantDataOperatorEnum
.
ADD_DEVICE
));
applicationEventPublisher
.
publishEvent
(
new
DeviceActiveSync
(
snList
));
System
.
out
.
println
(
"success"
);
System
.
out
.
println
(
"success"
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment