Compare commits
No commits in common. "3c8b8a5ce601213b2c0c9aac65aa1fe77876bb8f" and "6334c44e356a743c7f505087a8c8e9408e99772e" have entirely different histories.
3c8b8a5ce6
...
6334c44e35
|
|
@ -2,7 +2,6 @@ package com.hivekion.common.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Profile;
|
|
||||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15,7 +14,6 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
* @since 2025/7/22
|
* @since 2025/7/22
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|
||||||
public class WsEndpointConfig {
|
public class WsEndpointConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public ServerEndpointExporter serverEndpointExporter() {
|
public ServerEndpointExporter serverEndpointExporter() {
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ public class Room implements AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 暂停
|
* 暂停
|
||||||
*/
|
*/
|
||||||
|
|
@ -171,12 +172,8 @@ public class Room implements AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
long curTime = duringTime.addAndGet(this.mag);
|
long curTime = duringTime.addAndGet(this.mag);
|
||||||
if (totalTime.get() - curTime > 0) {
|
|
||||||
sendRemainTime((totalTime.get() - curTime));
|
sendRemainTime((totalTime.get() - curTime));
|
||||||
} else {
|
|
||||||
future.cancel(true);
|
|
||||||
scheduler.shutdownNow();
|
|
||||||
}
|
|
||||||
|
|
||||||
NavigableMap<Long, Map<String, TaskAction>> actions = actionMap.headMap(curTime, true);
|
NavigableMap<Long, Map<String, TaskAction>> actions = actionMap.headMap(curTime, true);
|
||||||
if (!actions.isEmpty()) {
|
if (!actions.isEmpty()) {
|
||||||
|
|
@ -288,11 +285,9 @@ public class Room implements AutoCloseable {
|
||||||
public Map<String, Object> getPathMap() {
|
public Map<String, Object> getPathMap() {
|
||||||
return resourcePathMap;
|
return resourcePathMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, ScenarioResource> getScenarioResourceMap() {
|
public Map<String, ScenarioResource> getScenarioResourceMap() {
|
||||||
return scenarioResourceMap;
|
return scenarioResourceMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pushRoomInfo(){
|
private void pushRoomInfo(){
|
||||||
ResponseCmdInfo<Object> respObj = new ResponseCmdInfo<>();
|
ResponseCmdInfo<Object> respObj = new ResponseCmdInfo<>();
|
||||||
Map<String, Object> dataMap = new HashMap<>();
|
Map<String, Object> dataMap = new HashMap<>();
|
||||||
|
|
@ -313,8 +308,7 @@ public class Room implements AutoCloseable {
|
||||||
redisUtil = SpringUtil.getBean(RedisUtil.class);
|
redisUtil = SpringUtil.getBean(RedisUtil.class);
|
||||||
}
|
}
|
||||||
for (ScenarioResource scenarioResource : this.scenario.getResourceList()) {
|
for (ScenarioResource scenarioResource : this.scenario.getResourceList()) {
|
||||||
ScenarioInfo scenarioInfo = scenarioService.listScenarioInfo(
|
ScenarioInfo scenarioInfo = scenarioService.listScenarioInfo(scenarioResource.getScenarioId(),
|
||||||
scenarioResource.getScenarioId(),
|
|
||||||
roomId, scenarioResource.getId());
|
roomId, scenarioResource.getId());
|
||||||
EditScenarioInfo updScenarioInfo = scenarioService.listEditScenarioInfo(
|
EditScenarioInfo updScenarioInfo = scenarioService.listEditScenarioInfo(
|
||||||
scenarioResource.getScenarioId(), roomId, scenarioResource.getId());
|
scenarioResource.getScenarioId(), roomId, scenarioResource.getId());
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ spring.datasource.dynamic.primary=dm
|
||||||
spring.datasource.dynamic.strict=false
|
spring.datasource.dynamic.strict=false
|
||||||
spring.datasource.dynamic.datasource.dm.url=jdbc:dm://192.168.0.53:5236/SIMULATION
|
spring.datasource.dynamic.datasource.dm.url=jdbc:dm://192.168.0.53:5236/SIMULATION
|
||||||
spring.datasource.dynamic.datasource.dm.driver-class-name=dm.jdbc.driver.DmDriver
|
spring.datasource.dynamic.datasource.dm.driver-class-name=dm.jdbc.driver.DmDriver
|
||||||
spring.datasource.dynamic.datasource.dm.username=SYSDBA
|
spring.datasource.dynamic.datasource.dm.username=simulation
|
||||||
spring.datasource.dynamic.datasource.dm.password=Admin123
|
spring.datasource.dynamic.datasource.dm.password=Simulation001
|
||||||
|
|
||||||
spring.redis.database=0
|
spring.redis.database=0
|
||||||
spring.redis.host=127.0.0.1
|
spring.redis.host=192.168.0.225
|
||||||
spring.redis.port=6379
|
spring.redis.port=6379
|
||||||
#spring.redis.password=123
|
#spring.redis.password=123
|
||||||
spring.redis.timeout=5000
|
spring.redis.timeout=5000
|
||||||
|
|
@ -51,4 +51,5 @@ get.all.user = http://127.0.0.1/oauth2Server/api/outside/syncUserAll
|
||||||
#get.all.dept=http://127.0.0.1/oatuh2Server/api/outside/synDeptAll
|
#get.all.dept=http://127.0.0.1/oatuh2Server/api/outside/synDeptAll
|
||||||
logout.url=http://127.0.0.1:99/oauth2Server/oauth2/logout
|
logout.url=http://127.0.0.1:99/oauth2Server/oauth2/logout
|
||||||
|
|
||||||
path.planning.url=http://127.0.0.1:8989/route
|
path.planning.url=http://192.168.0.53:8989/route
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration>
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 文件输出,按天滚动 -->
|
|
||||||
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>/home/admin/app/logs/app.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 每天一个日志文件,保留30天 -->
|
|
||||||
<fileNamePattern>logs/app-%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 日志级别 -->
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
<appender-ref ref="file" />
|
|
||||||
</root>
|
|
||||||
|
|
||||||
|
|
||||||
</configuration>
|
|
||||||
|
|
@ -2,13 +2,6 @@ package com.hivekion;
|
||||||
|
|
||||||
import com.hivekion.baseData.entity.ModuleStatus;
|
import com.hivekion.baseData.entity.ModuleStatus;
|
||||||
import com.hivekion.baseData.service.ModuleStatusService;
|
import com.hivekion.baseData.service.ModuleStatusService;
|
||||||
import com.hivekion.common.uuid.IdUtils;
|
|
||||||
import com.hivekion.scenario.entity.ScenarioResource;
|
|
||||||
import com.hivekion.scenario.service.ScenarioResourceService;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -28,16 +21,11 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||||
*/
|
*/
|
||||||
@SpringBootTest(classes = DemoApplication.class)
|
@SpringBootTest(classes = DemoApplication.class)
|
||||||
@AutoConfigureMockMvc
|
@AutoConfigureMockMvc
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
public class ApplicationTest {
|
public class ApplicationTest {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ModuleStatusService moduleStatusService;
|
private ModuleStatusService moduleStatusService;
|
||||||
@Resource
|
|
||||||
private ScenarioResourceService scenarioResourceService;
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void modStatus(){
|
public void modStatus(){
|
||||||
ModuleStatus status = new ModuleStatus();
|
ModuleStatus status = new ModuleStatus();
|
||||||
|
|
@ -49,5 +37,4 @@ public class ApplicationTest {
|
||||||
moduleStatusService.save(status);
|
moduleStatusService.save(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user