feat(): 一键操作
parent
3a0310d943
commit
7514a2e528
Binary file not shown.
|
@ -62,6 +62,16 @@ public class LocalContainer {
|
||||||
public static List<VehicleInstance> getOnlineVehicleInstance(){
|
public static List<VehicleInstance> getOnlineVehicleInstance(){
|
||||||
return vehicleDataMap.values().stream().filter(VehicleInstance::isOnline).toList();
|
return vehicleDataMap.values().stream().filter(VehicleInstance::isOnline).toList();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取在线车辆
|
||||||
|
* @return 在线车辆VIN集合
|
||||||
|
*/
|
||||||
|
public static List<String> getOnlineVehicleVin(){
|
||||||
|
return getOnlineVehicleInstance()
|
||||||
|
.stream()
|
||||||
|
.map(VehicleInstance::getVin)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取离线车辆
|
* 获取离线车辆
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
package com.muyu.web.config;
|
package com.muyu.web.config;
|
||||||
|
|
||||||
import com.muyu.web.config.properties.ServiceConfigProperties;
|
import com.muyu.web.config.properties.ServiceConfigProperties;
|
||||||
import com.muyu.web.domain.ServerConfig;
|
|
||||||
import com.muyu.web.domain.model.ServerConfigModel;
|
import com.muyu.web.domain.model.ServerConfigModel;
|
||||||
import com.muyu.web.service.ServerConfigService;
|
import com.muyu.web.service.ServerConfigService;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
|
@ -79,12 +80,28 @@ public class TaskModel {
|
||||||
private AtomicInteger taskErrorSum = new AtomicInteger();
|
private AtomicInteger taskErrorSum = new AtomicInteger();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否有下个任务
|
||||||
|
* @return true 下一个任务可执行
|
||||||
|
*/
|
||||||
|
public boolean hashNext(){
|
||||||
|
return !vehicleTaskQueue.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取下一个任务节点
|
||||||
|
* @return 任务VIN
|
||||||
|
*/
|
||||||
|
public String next(){
|
||||||
|
return vehicleTaskQueue.poll();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交当前线程任务
|
* 提交当前线程任务
|
||||||
* @param taskName 任务名称
|
* @param taskName 任务名称
|
||||||
* @param vehicleVinList 提交车辆VIN集合
|
* @param vehicleVinList 提交车辆VIN集合
|
||||||
*/
|
*/
|
||||||
public void submit(String taskName, List<String> vehicleVinList){
|
public void submit(String taskName, List<String> vehicleVinList, Consumer<String> consumer){
|
||||||
if (!this.isExecution()){
|
if (!this.isExecution()){
|
||||||
throw new RuntimeException("["+this.taskName+"]的任务正在进行中,请等待任务执行完成再次发布一键任务");
|
throw new RuntimeException("["+this.taskName+"]的任务正在进行中,请等待任务执行完成再次发布一键任务");
|
||||||
}
|
}
|
||||||
|
@ -99,6 +116,25 @@ public class TaskModel {
|
||||||
this.taskSuccessSum = new AtomicInteger();
|
this.taskSuccessSum = new AtomicInteger();
|
||||||
this.taskErrorSum = new AtomicInteger();
|
this.taskErrorSum = new AtomicInteger();
|
||||||
this.taskStartTime = System.currentTimeMillis();
|
this.taskStartTime = System.currentTimeMillis();
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
while (hashNext()){
|
||||||
|
Thread.sleep(100);
|
||||||
|
String vin = next();
|
||||||
|
try {
|
||||||
|
consumer.accept(vin);
|
||||||
|
incrementSuccess();
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("任务:[{}] vin:[{}] 异常:[{}]",taskName,vin,e.getMessage(),e);
|
||||||
|
incrementError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("任务:[{}] 异常:[{}]",taskName,e.getMessage(),e);
|
||||||
|
}finally {
|
||||||
|
down();
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
log.info("[{}]任务执行开始", this.taskName);
|
log.info("[{}]任务执行开始", this.taskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
package com.muyu.web.service.impl;
|
package com.muyu.web.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.muyu.vehicle.VehicleInstance;
|
||||||
|
import com.muyu.vehicle.core.LocalContainer;
|
||||||
|
import com.muyu.web.domain.PositionRouteInfo;
|
||||||
|
import com.muyu.web.domain.model.PositionModel;
|
||||||
import com.muyu.web.domain.model.TaskModel;
|
import com.muyu.web.domain.model.TaskModel;
|
||||||
|
import com.muyu.web.domain.req.MsgReq;
|
||||||
import com.muyu.web.domain.resp.UnifiedTaskResp;
|
import com.muyu.web.domain.resp.UnifiedTaskResp;
|
||||||
import com.muyu.web.service.PositionRouteService;
|
import com.muyu.web.service.PositionRouteService;
|
||||||
import com.muyu.web.service.VehicleInstanceService;
|
import com.muyu.web.service.VehicleInstanceService;
|
||||||
|
@ -9,6 +15,9 @@ import lombok.extern.log4j.Log4j2;
|
||||||
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 java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
|
@ -36,7 +45,14 @@ public class VehicleUnifiedServiceImpl implements VehicleUnifiedService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void unifiedOnline () {
|
public void unifiedOnline () {
|
||||||
|
// 获取离线车辆VIN
|
||||||
|
List<String> vinList = LocalContainer.getOfflineVehicleInstance()
|
||||||
|
.stream()
|
||||||
|
.map(VehicleInstance::getVin)
|
||||||
|
.toList();
|
||||||
|
taskModel.submit("一键上线", vinList, (vin) -> {
|
||||||
|
vehicleInstanceService.vehicleClientInit(vin);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,7 +60,11 @@ public class VehicleUnifiedServiceImpl implements VehicleUnifiedService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void unifiedOffline () {
|
public void unifiedOffline () {
|
||||||
|
// 获取在线车辆VIN
|
||||||
|
List<String> vinList = LocalContainer.getOnlineVehicleVin();
|
||||||
|
taskModel.submit("一键离线", vinList, (vin) -> {
|
||||||
|
vehicleInstanceService.vehicleClientClose(vin);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +72,37 @@ public class VehicleUnifiedServiceImpl implements VehicleUnifiedService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void unifiedSend () {
|
public void unifiedSend () {
|
||||||
|
// 获取在线车辆VIN
|
||||||
|
List<String> vinList = LocalContainer.getOnlineVehicleVin();
|
||||||
|
// 获取到所有路径
|
||||||
|
List<PositionRouteInfo> positionRouteInfoList = positionRouteService.list();
|
||||||
|
// 路径长度
|
||||||
|
int positionSize = positionRouteInfoList.size();
|
||||||
|
// 随机数
|
||||||
|
Random random = new Random();
|
||||||
|
|
||||||
|
taskModel.submit("一键上报", vinList, (vin) -> {
|
||||||
|
// 随机一个路径结果
|
||||||
|
int positionIndex = random.nextInt(0, positionSize);
|
||||||
|
PositionRouteInfo positionRouteInfo = positionRouteInfoList.get(positionIndex);
|
||||||
|
String positionCode = positionRouteInfo.getName();
|
||||||
|
List<PositionModel> positionModelList = JSONArray.parseArray(positionRouteInfo.getRouteData(), String.class)
|
||||||
|
.stream()
|
||||||
|
.map(PositionModel::strBuild)
|
||||||
|
.toList();
|
||||||
|
VehicleInstance vehicleInstance = LocalContainer.getVehicleInstance(vin);
|
||||||
|
// 设置车辆路径
|
||||||
|
vehicleInstance.settingPosition(positionModelList);
|
||||||
|
vehicleInstance.setPositionCode(positionCode);
|
||||||
|
// 设置车辆档位
|
||||||
|
vehicleInstance.setGear("D");
|
||||||
|
vehicleInstanceService.msg(
|
||||||
|
MsgReq.builder()
|
||||||
|
.vin(vin)
|
||||||
|
.msgCode("上报")
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +110,29 @@ public class VehicleUnifiedServiceImpl implements VehicleUnifiedService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void unifiedPosition () {
|
public void unifiedPosition () {
|
||||||
|
// 获取在线车辆VIN
|
||||||
|
List<String> vinList = LocalContainer.getOnlineVehicleVin();
|
||||||
|
// 获取到所有路径
|
||||||
|
List<PositionRouteInfo> positionRouteInfoList = positionRouteService.list();
|
||||||
|
// 路径长度
|
||||||
|
int positionSize = positionRouteInfoList.size();
|
||||||
|
// 随机数
|
||||||
|
Random random = new Random();
|
||||||
|
|
||||||
|
taskModel.submit("一键重置路径", vinList, (vin) -> {
|
||||||
|
// 随机一个路径结果
|
||||||
|
int positionIndex = random.nextInt(0, positionSize);
|
||||||
|
PositionRouteInfo positionRouteInfo = positionRouteInfoList.get(positionIndex);
|
||||||
|
String positionCode = positionRouteInfo.getName();
|
||||||
|
List<PositionModel> positionModelList = JSONArray.parseArray(positionRouteInfo.getRouteData(), String.class)
|
||||||
|
.stream()
|
||||||
|
.map(PositionModel::strBuild)
|
||||||
|
.toList();
|
||||||
|
VehicleInstance vehicleInstance = LocalContainer.getVehicleInstance(vin);
|
||||||
|
// 设置车辆路径
|
||||||
|
vehicleInstance.settingPosition(positionModelList);
|
||||||
|
vehicleInstance.setPositionCode(positionCode);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +140,16 @@ public class VehicleUnifiedServiceImpl implements VehicleUnifiedService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void unifiedStop () {
|
public void unifiedStop () {
|
||||||
|
// 获取在线车辆VIN
|
||||||
|
List<String> vinList = LocalContainer.getOnlineVehicleVin();
|
||||||
|
taskModel.submit("一键取消上报", vinList, (vin) -> {
|
||||||
|
vehicleInstanceService.msg(
|
||||||
|
MsgReq.builder()
|
||||||
|
.vin(vin)
|
||||||
|
.msgCode("停止")
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
.app-container[data-v-5503ff78]{padding:10px 5px 0 10px;background-color:#f4f4f5}.el-row[data-v-5503ff78]{&:last-child{margin-bottom:0}}.bg-purple[data-v-5503ff78]{background:#f4f4f5}.grid-content[data-v-5503ff78]{border-radius:4px;overflow-x:hidden;overflow-y:auto}.grid-content[data-v-5503ff78]::-webkit-scrollbar{width:4px}.grid-content[data-v-5503ff78]::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2)}.grid-content[data-v-5503ff78]::-webkit-scrollbar-track{border-radius:0;background:rgba(0,0,0,.1)}.vehicleDiv[data-v-5503ff78]{height:50px;margin:0 0 10px 0}.contentMain[data-v-5503ff78]{margin-top:10px}.vehicleDataTab[data-v-5503ff78]{width:100%;overflow-y:auto;overflow-x:hidden}.vehicleDataTab[data-v-5503ff78]::-webkit-scrollbar{width:4px}.vehicleDataTab[data-v-5503ff78]::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2)}.vehicleDataTab[data-v-5503ff78]::-webkit-scrollbar-track{border-radius:0;background:rgba(0,0,0,.1)}.el-form-item__label[data-v-5503ff78]{padding:0}.el-form-item[data-v-5503ff78]{margin-bottom:5px}
|
|
|
@ -1 +1 @@
|
||||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=/favicon.ico><title>车辆</title><link href=/static/css/app.63269458.css rel=preload as=style><link href=/static/css/chunk-elementUI.c1c3b808.css rel=preload as=style><link href=/static/css/chunk-libs.3dfb7769.css rel=preload as=style><link href=/static/js/app.a7bceb97.js rel=preload as=script><link href=/static/js/chunk-elementUI.2491fb2f.js rel=preload as=script><link href=/static/js/chunk-libs.2ec7c235.js rel=preload as=script><link href=/static/css/chunk-elementUI.c1c3b808.css rel=stylesheet><link href=/static/css/chunk-libs.3dfb7769.css rel=stylesheet><link href=/static/css/app.63269458.css rel=stylesheet></head><body><noscript><strong>We're sorry but 车辆 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script>(function(e){function t(t){for(var r,o,u=t[0],i=t[1],f=t[2],l=0,s=[];l<u.length;l++)o=u[l],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&s.push(a[o][0]),a[o]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);d&&d(t);while(s.length)s.shift()();return c.push.apply(c,f||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,o=1;o<n.length;o++){var u=n[o];0!==a[u]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={runtime:0},a={runtime:0},c=[];function u(e){return i.p+"static/js/"+({}[e]||e)+"."+{"chunk-019c66da":"ded8571e","chunk-6f60c8f1":"f16bf298","chunk-4a014042":"2fe4ac72","chunk-cd3ab578":"ba31bb9e","chunk-e4980b30":"83907799","chunk-22cea610":"fd8494c8","chunk-510f32e7":"792568de"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-4a014042":1,"chunk-cd3ab578":1,"chunk-e4980b30":1,"chunk-22cea610":1,"chunk-510f32e7":1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=new Promise((function(t,n){for(var r="static/css/"+({}[e]||e)+"."+{"chunk-019c66da":"31d6cfe0","chunk-6f60c8f1":"31d6cfe0","chunk-4a014042":"3328abfd","chunk-cd3ab578":"5a7a63c7","chunk-e4980b30":"27dfab27","chunk-22cea610":"3c7f5ad9","chunk-510f32e7":"1510e3c5"}[e]+".css",a=i.p+r,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var f=c[u],l=f.getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===r||l===a))return t()}var s=document.getElementsByTagName("style");for(u=0;u<s.length;u++){f=s[u],l=f.getAttribute("data-href");if(l===r||l===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var r=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=r,delete o[e],d.parentNode.removeChild(d),n(c)},d.href=a;var h=document.getElementsByTagName("head")[0];h.appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var c=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=c);var f,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=u(e);var s=new Error;f=function(t){l.onerror=l.onload=null,clearTimeout(d);var n=a[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",s.name="ChunkLoadError",s.type=r,s.request=o,n[1](s)}a[e]=void 0}};var d=setTimeout((function(){f({type:"timeout",target:l})}),12e4);l.onerror=l.onload=f,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var f=window["webpackJsonp"]=window["webpackJsonp"]||[],l=f.push.bind(f);f.push=t,f=f.slice();for(var s=0;s<f.length;s++)t(f[s]);var d=l;n()})([]);</script><script src=/static/js/chunk-elementUI.2491fb2f.js></script><script src=/static/js/chunk-libs.2ec7c235.js></script><script src=/static/js/app.a7bceb97.js></script></body></html>
|
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=/favicon.ico><title>车辆</title><link href=/static/css/app.63269458.css rel=preload as=style><link href=/static/css/chunk-elementUI.c1c3b808.css rel=preload as=style><link href=/static/css/chunk-libs.3dfb7769.css rel=preload as=style><link href=/static/js/app.aa5f6632.js rel=preload as=script><link href=/static/js/chunk-elementUI.2491fb2f.js rel=preload as=script><link href=/static/js/chunk-libs.2ec7c235.js rel=preload as=script><link href=/static/css/chunk-elementUI.c1c3b808.css rel=stylesheet><link href=/static/css/chunk-libs.3dfb7769.css rel=stylesheet><link href=/static/css/app.63269458.css rel=stylesheet></head><body><noscript><strong>We're sorry but 车辆 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script>(function(e){function t(t){for(var r,o,u=t[0],i=t[1],f=t[2],l=0,s=[];l<u.length;l++)o=u[l],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&s.push(c[o][0]),c[o]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);d&&d(t);while(s.length)s.shift()();return a.push.apply(a,f||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,o=1;o<n.length;o++){var u=n[o];0!==c[u]&&(r=!1)}r&&(a.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={runtime:0},c={runtime:0},a=[];function u(e){return i.p+"static/js/"+({}[e]||e)+"."+{"chunk-019c66da":"ded8571e","chunk-123c65a8":"078492c0","chunk-6f60c8f1":"f16bf298","chunk-4a014042":"2fe4ac72","chunk-6fb69ae7":"8ca4dbc6","chunk-e4980b30":"83907799","chunk-22cea610":"fd8494c8","chunk-510f32e7":"792568de"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-123c65a8":1,"chunk-4a014042":1,"chunk-e4980b30":1,"chunk-22cea610":1,"chunk-510f32e7":1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=new Promise((function(t,n){for(var r="static/css/"+({}[e]||e)+"."+{"chunk-019c66da":"31d6cfe0","chunk-123c65a8":"887652d5","chunk-6f60c8f1":"31d6cfe0","chunk-4a014042":"3328abfd","chunk-6fb69ae7":"31d6cfe0","chunk-e4980b30":"27dfab27","chunk-22cea610":"3c7f5ad9","chunk-510f32e7":"1510e3c5"}[e]+".css",c=i.p+r,a=document.getElementsByTagName("link"),u=0;u<a.length;u++){var f=a[u],l=f.getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===r||l===c))return t()}var s=document.getElementsByTagName("style");for(u=0;u<s.length;u++){f=s[u],l=f.getAttribute("data-href");if(l===r||l===c)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var r=t&&t.target&&t.target.src||c,a=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=r,delete o[e],d.parentNode.removeChild(d),n(a)},d.href=c;var h=document.getElementsByTagName("head")[0];h.appendChild(d)})).then((function(){o[e]=0})));var r=c[e];if(0!==r)if(r)t.push(r[2]);else{var a=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=a);var f,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=u(e);var s=new Error;f=function(t){l.onerror=l.onload=null,clearTimeout(d);var n=c[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",s.name="ChunkLoadError",s.type=r,s.request=o,n[1](s)}c[e]=void 0}};var d=setTimeout((function(){f({type:"timeout",target:l})}),12e4);l.onerror=l.onload=f,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var f=window["webpackJsonp"]=window["webpackJsonp"]||[],l=f.push.bind(f);f.push=t,f=f.slice();for(var s=0;s<f.length;s++)t(f[s]);var d=l;n()})([]);</script><script src=/static/js/chunk-elementUI.2491fb2f.js></script><script src=/static/js/chunk-libs.2ec7c235.js></script><script src=/static/js/app.aa5f6632.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,34 +0,0 @@
|
||||||
package com;
|
|
||||||
|
|
||||||
import com.muyu.VehicleSimulationApplication;
|
|
||||||
import com.muyu.web.common.Result;
|
|
||||||
import com.muyu.vehicle.api.ClientAdmin;
|
|
||||||
import com.muyu.vehicle.api.req.VehicleConnectionReq;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author DongZl
|
|
||||||
* @description:
|
|
||||||
* @Date 2023-11-28 上午 10:36
|
|
||||||
*/
|
|
||||||
@SpringBootTest(classes = VehicleSimulationApplication.class)
|
|
||||||
public class AdminTest {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ClientAdmin clientAdmin;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void vehicleConnTest(){
|
|
||||||
Result<String> result = clientAdmin.getVehicleLoadAddr(
|
|
||||||
serviceConfigProperties, VehicleConnectionReq.builder()
|
|
||||||
.vin("VIN1234567894")
|
|
||||||
.timestamp(String.valueOf(System.currentTimeMillis()))
|
|
||||||
.userName("156841600")
|
|
||||||
.nonce("134812")
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
System.out.println(result);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue