Commit 7120f5dc by 刘宇峰

车辆监控-车辆组织树

1 parent 6b6a123c
......@@ -12,7 +12,7 @@ public class OrgVehicleModel {
private Integer type;
private boolean isRoot;
private String vin;
private String ownerName;
private String sns;
@JsonIgnore
......
......@@ -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<>();
......
......@@ -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>
......
......@@ -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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!