|
@@ -6,6 +6,7 @@ import api.common.util.SshUtil;
|
|
import api.common.util.StringUtil;
|
|
import api.common.util.StringUtil;
|
|
import api.common.util.TimeUtil;
|
|
import api.common.util.TimeUtil;
|
|
import com.css.simulation.resource.monitor.manager.SystemServerManager;
|
|
import com.css.simulation.resource.monitor.manager.SystemServerManager;
|
|
|
|
+import com.css.simulation.resource.monitor.mappper.ScenePackageSublistMapper;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.sshd.client.SshClient;
|
|
import org.apache.sshd.client.SshClient;
|
|
@@ -18,6 +19,7 @@ import org.springframework.stereotype.Component;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@Component
|
|
@Component
|
|
@@ -31,7 +33,9 @@ public class MyScheduler {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
- SystemServerManager systemServerManager;
|
|
|
|
|
|
+ private SystemServerManager systemServerManager;
|
|
|
|
+ @Resource
|
|
|
|
+ private ScenePackageSublistMapper scenePackageSublistMapper;
|
|
|
|
|
|
|
|
|
|
@Scheduled(fixedDelay = 60 * 1000)
|
|
@Scheduled(fixedDelay = 60 * 1000)
|
|
@@ -95,8 +99,16 @@ public class MyScheduler {
|
|
@Scheduled(fixedDelay = 60 * 1000)
|
|
@Scheduled(fixedDelay = 60 * 1000)
|
|
public void deleteGeneral() {
|
|
public void deleteGeneral() {
|
|
try {
|
|
try {
|
|
- //1 查询泛化场景表所有id
|
|
|
|
- //2 查询泛化文件表
|
|
|
|
|
|
+ //1 查询泛化场景测试包包括的所有泛化场景id序列(保留已删除的测试包)
|
|
|
|
+ List<String> sceneGeneralizationIdsList = scenePackageSublistMapper.selectSceneGeneralizationIds();
|
|
|
|
+ //2 将所有序列拆开
|
|
|
|
+ List<String> sceneGeneralizationIdList = new ArrayList<>();
|
|
|
|
+ sceneGeneralizationIdsList.forEach(ids -> {
|
|
|
|
+ String[] split = ids.split(",");
|
|
|
|
+ sceneGeneralizationIdList.addAll(Arrays.asList(split));
|
|
|
|
+ });
|
|
|
|
+ //3 查询不在id列表中的所有泛化数据
|
|
|
|
+// scenePackageSublistMapper.selectGeneralDataNotIn(sceneGeneralizationIdList);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|