|
@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.fdkankan.common.constant.*;
|
|
import com.fdkankan.common.constant.*;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
|
+import com.fdkankan.contro.bean.SceneJsonBean;
|
|
import com.fdkankan.contro.constant.UserEditDataType;
|
|
import com.fdkankan.contro.constant.UserEditDataType;
|
|
import com.fdkankan.contro.entity.*;
|
|
import com.fdkankan.contro.entity.*;
|
|
import com.fdkankan.contro.mq.service.IBuildSceneService;
|
|
import com.fdkankan.contro.mq.service.IBuildSceneService;
|
|
@@ -35,6 +36,7 @@ import com.fdkankan.push.utils.PushMsgUtil;
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneResultMqMessage;
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneResultMqMessage;
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
|
+import com.fdkankan.redis.constant.RedisKey;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
@@ -75,10 +77,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
@Value("${model.type:#{null}}")
|
|
@Value("${model.type:#{null}}")
|
|
private String modelType;
|
|
private String modelType;
|
|
|
|
|
|
- @Value("${build.progress.url}")
|
|
|
|
- public String buildProgressUrl;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@Value("${model.modelKind:3dtiles}")
|
|
@Value("${model.modelKind:3dtiles}")
|
|
private String modelKind;
|
|
private String modelKind;
|
|
|
|
|
|
@@ -303,12 +301,23 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
fYunFileService.uploadFile(path + File.separator + "console.log", buildLogPath + "console.log");
|
|
fYunFileService.uploadFile(path + File.separator + "console.log", buildLogPath + "console.log");
|
|
log.info("计算日志上传完成");
|
|
log.info("计算日志上传完成");
|
|
|
|
|
|
|
|
+ OrigFileUploadBatch condition = new OrigFileUploadBatch();
|
|
|
|
+ condition.setBatchId(batchId);
|
|
|
|
+ OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getByCondition(condition);
|
|
|
|
+
|
|
if (!message.getBuildSuccess()) {
|
|
if (!message.getBuildSuccess()) {
|
|
log.error("建模失败,修改状态为失败状态");
|
|
log.error("建模失败,修改状态为失败状态");
|
|
scenePlusService.update(new LambdaUpdateWrapper<ScenePlus>()
|
|
scenePlusService.update(new LambdaUpdateWrapper<ScenePlus>()
|
|
.set(ScenePlus::getSceneStatus, SceneStatus.FAILD.code())
|
|
.set(ScenePlus::getSceneStatus, SceneStatus.FAILD.code())
|
|
.eq(ScenePlus::getNum, sceneCode));
|
|
.eq(ScenePlus::getNum, sceneCode));
|
|
redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "-1");
|
|
redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "-1");
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ commonService.sendSceneStatus(sceneCode, origFileUploadBatch.getUuid(), batchId, 4);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.info("通知计算失败状态失败, num:{}", sceneCode, e);
|
|
|
|
+ }
|
|
|
|
+
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
JSONObject fdageData = getFdageData(path + File.separator + "capture" +File.separator+"data.fdage");
|
|
JSONObject fdageData = getFdageData(path + File.separator + "capture" +File.separator+"data.fdage");
|
|
@@ -432,9 +441,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
scenePlusService.updateById(scenePlus);
|
|
scenePlusService.updateById(scenePlus);
|
|
scenePlusExtService.updateById(scenePlusExt);
|
|
scenePlusExtService.updateById(scenePlusExt);
|
|
|
|
|
|
- OrigFileUploadBatch condition = new OrigFileUploadBatch();
|
|
|
|
- condition.setBatchId(batchId);
|
|
|
|
- OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getByCondition(condition);
|
|
|
|
origFileUploadBatch.setStatus(3);
|
|
origFileUploadBatch.setStatus(3);
|
|
origFileUploadBatchService.updateById(origFileUploadBatch);
|
|
origFileUploadBatchService.updateById(origFileUploadBatch);
|
|
|
|
|
|
@@ -446,18 +452,9 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "1");
|
|
redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "1");
|
|
|
|
|
|
try {
|
|
try {
|
|
- Map<String, Object> ext = message.getExt();
|
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
|
- params.put("website", scenePlusExt.getWebSite());
|
|
|
|
- params.put("title", scenePlus.getTitle());
|
|
|
|
- params.put("customUserId", ext.get("customUserId"));
|
|
|
|
- params.put("gps", ext.get("gps"));
|
|
|
|
-// params.put("totalTime", Integer.valueOf(redisUtil.get(String.format(RedisKey.SCENE_BUILD_EXPECT_TOTAL_TIME_NUM, sceneCode))));
|
|
|
|
- params.put("progress", 100);
|
|
|
|
- params.put("status", CommonSuccessStatus.SUCCESS.code());
|
|
|
|
- HttpUtil.post(buildProgressUrl, JSON.toJSONString(params), 2000);
|
|
|
|
|
|
+ commonService.sendSceneStatus(sceneCode, origFileUploadBatch.getUuid(), batchId, 4);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
- log.info("发送计算进度接口请求失败");
|
|
|
|
|
|
+ log.info("通知计算成功状态失败, num:{}", sceneCode, e);
|
|
}
|
|
}
|
|
|
|
|
|
log.info("场景计算结果处理结束,场景码:{}", sceneCode);
|
|
log.info("场景计算结果处理结束,场景码:{}", sceneCode);
|
|
@@ -913,11 +910,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
return shootCount;
|
|
return shootCount;
|
|
}
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
|
- JSONObject dataFdageObj = JSON.parseObject(null);
|
|
|
|
- System.out.println(dataFdageObj);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public boolean uploadHouseTypeJson(String num, String dataSource) {
|
|
public boolean uploadHouseTypeJson(String num, String dataSource) {
|
|
String floorPlanCardFilePath = dataSource + File.separator + "results/floorplan_cad.json";
|
|
String floorPlanCardFilePath = dataSource + File.separator + "results/floorplan_cad.json";
|
|
if (!new File(floorPlanCardFilePath).exists()) {
|
|
if (!new File(floorPlanCardFilePath).exists()) {
|