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 7120f5dc
authored
Aug 21, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车辆监控-车辆组织树
1 parent
6b6a123c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
8 deletions
src/main/java/cn/com/glsx/admin/modules/model/OrgVehicleModel.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/resources/mapper/TenantVehicleTypeMapper.xml
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/model/OrgVehicleModel.java
View file @
7120f5d
...
...
@@ -12,7 +12,7 @@ public class OrgVehicleModel {
private
Integer
type
;
private
boolean
isRoot
;
private
String
vin
;
private
String
ownerName
;
private
String
sns
;
@JsonIgnore
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
7120f5d
...
...
@@ -12,6 +12,7 @@ import cn.com.glsx.admin.modules.mapper.VehicleDeviceMapper;
import
cn.com.glsx.admin.modules.mapper.VehicleMapper
;
import
cn.com.glsx.admin.modules.model.OrgVehicleModel
;
import
cn.com.glsx.admin.modules.model.OrgVehicleTree
;
import
cn.com.glsx.admin.modules.model.VehicleLinkSnsDTO
;
import
cn.com.glsx.admin.modules.model.export.TrackModelExport
;
import
cn.com.glsx.admin.modules.model.param.DeviceLocation
;
import
cn.com.glsx.admin.modules.model.param.DeviceLocationBo
;
...
...
@@ -27,6 +28,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.glsx.plat.context.utils.PropertiesUtils
;
import
com.glsx.plat.core.web.R
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -78,6 +80,9 @@ public class VehicleMonitorSevice {
List
<
OrgVehicleTree
>
orgTree
=
organizationApiService
.
orgTree
(
search
);
// TODO: 2021/8/21 遍历组织树,把业务数据挂载上去
return
orgTree
;
}
else
{
List
<
OrgVehicleTree
>
orgTree
=
organizationApiService
.
orgTree
(
search
);
...
...
@@ -85,6 +90,15 @@ public class VehicleMonitorSevice {
}
}
public
List
<
OrgVehicleTree
>
getVehiclesByUserId
(
Long
userId
)
{
List
<
VehicleLinkSnsDTO
>
vehicleList
=
vehicleMapper
.
selectVehicleLinkSnsByUserId
(
userId
);
//todo 转换
return
Lists
.
newArrayList
();
}
public
List
<
TrackModelExport
>
getTrackHistory
(
MonitorQueryBo
monitorQueryVo
)
{
log
.
info
(
"调用ICE接口查询历史轨迹数据"
);
List
<
TrackModelExport
>
trackModelList
=
new
ArrayList
<>();
...
...
src/main/resources/mapper/TenantVehicleTypeMapper.xml
View file @
7120f5d
...
...
@@ -33,14 +33,21 @@
</sql>
<select
id=
"search"
resultType=
"cn.com.glsx.admin.modules.model.TenantTypesDTO"
>
select tenant_id
tenantId,
tenant_name
tenantName,
name,
created_by
createdBy,
created_date
createdDate,
enable_status enableStatus
select tenant_id tenantId,
tenant_name
tenantName,
name,
created_by
createdBy,
created_date
createdDate,
enable_status enableStatus
from t_tenant_vehicle_type
where del_flag = 0
<if
test=
"term != null and term !=''"
>
and (
name like CONCAT('%',#{term},'%')
or
tenant_name like CONCAT('%',#{term},'%')
)
</if>
group by tenant_id, name
</select>
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
7120f5d
...
...
@@ -207,7 +207,10 @@
<select
id=
"selectVehicleSns"
parameterType=
"cn.com.glsx.admin.modules.model.param.VehicleTreeSearch"
resultType=
"cn.com.glsx.admin.modules.model.OrgVehicleModel"
>
select tv.id, tv.vin label, group_concat(tvd.sn) sns, 2 as type,tv.created_by creatorId
select tv.id,
tv.vin label,
tv.owner_name ownerName,
group_concat(tvd.sn) sns, 2 as type
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
where tv.del_flag = 0
...
...
@@ -219,6 +222,9 @@
<when
test=
"termType == 2"
>
and tv.vin like concat('%',#{term},'%')
</when>
<when
test=
"termType == 3"
>
and tv.owner_name like concat('%',#{term},'%')
</when>
<otherwise>
and 1=0
</otherwise>
...
...
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