Commit 505ffb5c by 刘宇峰

车辆监控

1 parent 296375cf
......@@ -11,5 +11,6 @@ public class OrgVehicleModel {
private String ownerName;
private String sns;
private Long creatorId;
private Integer source;
}
......@@ -189,10 +189,10 @@ public class VehicleMonitorSevice {
ovt.setLabel(model.getSns());
ovt.setParentId(model.getCreatorId());
ovt.setVid(model.getVid());
ovt.setLabel1(model.getOwnerName());
ovt.setLabel1(StringUtils.isNotEmpty(model.getOwnerName()) ? model.getOwnerName() : "--");
ovt.setLabel2(model.getVin());
ovt.setSource(model.getId() % 2 == 0 ? "有线" : "无线");
ovt.setOnline(model.getId() % 3 == 0);
ovt.setSource(model.getSource() == null ? "未知" : (model.getSource() == 1 ? "有线" : "无线"));
//ovt.setOnline(model.getId() % 3 == 0);
vehicleList.add(ovt);
});
return vehicleList;
......
......@@ -250,9 +250,11 @@
tv.vin,
tv.owner_name ownerName,
tvd.sn sns,
tv.created_by creatorId
tv.created_by creatorId,
td.source
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
where tv.del_flag = 0
and tvd.bind_status = 1
and tv.created_by is not null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!