|
|
@@ -4,12 +4,11 @@ import cn.hutool.core.io.FileUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.manage_jp.config.ManageConfig;
|
|
|
-import com.fdkankan.manage_jp.entity.Project;
|
|
|
-import com.fdkankan.manage_jp.entity.ProjectSceneGps;
|
|
|
-import com.fdkankan.manage_jp.entity.ScenePlus;
|
|
|
-import com.fdkankan.manage_jp.entity.ScenePro;
|
|
|
+import com.fdkankan.manage_jp.entity.*;
|
|
|
import com.fdkankan.manage_jp.httpClient.service.LaserService;
|
|
|
import com.fdkankan.manage_jp.service.IProjectSceneGpsService;
|
|
|
+import com.fdkankan.manage_jp.service.IScenePlusExtService;
|
|
|
+import com.fdkankan.manage_jp.service.IScenePlusService;
|
|
|
import com.fdkankan.manage_jp.service.ISceneProService;
|
|
|
import com.fdkankan.manage_jp.vo.response.SceneGpsDb;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -31,6 +30,10 @@ public class TaskService {
|
|
|
LaserService laserService;
|
|
|
@Autowired
|
|
|
ISceneProService sceneProService;
|
|
|
+ @Autowired
|
|
|
+ IScenePlusService scenePlusService;
|
|
|
+ @Autowired
|
|
|
+ IScenePlusExtService scenePlusExtService;
|
|
|
|
|
|
|
|
|
@Scheduled(initialDelay = 2000, fixedDelay = 1000 * 60 )
|
|
|
@@ -156,6 +159,14 @@ public class TaskService {
|
|
|
);
|
|
|
private void delSource(String num,String dataSource){
|
|
|
try {
|
|
|
+ if(StringUtils.isBlank(num)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ScenePro scenePro = sceneProService.getByNum(num);
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
+ if(scenePro != null || scenePlus != null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
String active = manageConfig.getActive();
|
|
|
String laserOssPath = "laser_u_data/"+ num;
|
|
|
if(active.contains("prod")){
|
|
|
@@ -183,6 +194,11 @@ public class TaskService {
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotBlank(dataSource)){
|
|
|
+ List<ScenePro> scenePros = sceneProService.getDataSource(dataSource);
|
|
|
+ List<ScenePlusExt> scenePlusExts = scenePlusExtService.getDataSource(dataSource);
|
|
|
+ if(!scenePros.isEmpty() || !scenePlusExts.isEmpty()){
|
|
|
+ return;
|
|
|
+ }
|
|
|
log.info("del-scene:{},nas-path:{}",num,dataSource);
|
|
|
FileUtil.del(dataSource);
|
|
|
for (String meshPath : meshNasDataSourcePath) {
|