|
@@ -625,9 +625,11 @@ public class HouseController extends BaseController {
|
|
|
|
|
|
log.warn("savePath: {}", savePath);
|
|
|
String sourcePath = savePath + "/extras/";
|
|
|
+ String resultSourcePath = savePath + "/results/";
|
|
|
try {
|
|
|
|
|
|
FileUtils.createDir(sourcePath);
|
|
|
+ FileUtils.createDirIfExistThenDel(resultSourcePath);
|
|
|
/**
|
|
|
* 以下字段为给算法部传递的参数(data.json),用于生成模型和
|
|
|
* 照片,提供前端使用,完整的参数如下:
|
|
@@ -681,8 +683,9 @@ public class HouseController extends BaseController {
|
|
|
// json写入服务器
|
|
|
FileUtils.fileWriter(floorPlan, sourcePath + "floorplan.json");
|
|
|
FileUtils.fileWriter(vision, sourcePath + "vision.txt");
|
|
|
+ FileUtils.fileWriter(vision, resultSourcePath + "vision.txt");
|
|
|
log.info("floorplan.json生成完成");
|
|
|
- log.info("vision.txt生成完成");
|
|
|
+ log.info("/extras/vision.txt,/results/vision.txt生成完成");
|
|
|
// 复制垂直校验图片到指定目录
|
|
|
String verticalImagePath = OUTPATH + sceneCode+"/output_img";
|
|
|
String panoImagePath = sourcePath + "images/";
|
|
@@ -741,16 +744,18 @@ public class HouseController extends BaseController {
|
|
|
log.info("更新SceneProEditEntity数据完成");
|
|
|
|
|
|
//发消息到mq
|
|
|
- Map<String, Object> mqMap = formatMqReq(house , sceneProEntity , savePath);
|
|
|
- rabbitTemplate.convertAndSend(RabbitConfig.PANO_EXCHANGE, RabbitConfig.PANO_QUEUE_ROUTING, mqMap);
|
|
|
- log.info("入队成功");
|
|
|
+ Map<String, Object> mqMap = formatMqReq(house , sceneProEntity , savePath , RabbitConfig.PANO_CALLBACK_QUEUE);
|
|
|
+ String mqMapStr = JSON.toJSONString(mqMap);
|
|
|
+ log.info("发送mq消息给四维看看建模:{}", mqMapStr);
|
|
|
+ rabbitTemplate.convertAndSend(RabbitConfig.PANO_EXCHANGE, RabbitConfig.PANO_QUEUE_ROUTING, mqMapStr);
|
|
|
+ log.info("Mq入队成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
return new R(MsgCode.SUCCESS_CODE, house);
|
|
|
}
|
|
|
|
|
|
- private Map<String, Object> formatMqReq(HouseEntity house , SceneProEntity sceneProEntity , String path){
|
|
|
+ private Map<String, Object> formatMqReq(HouseEntity house , SceneProEntity sceneProEntity , String path, String callbackQueue){
|
|
|
Map<String ,Object> result = new HashMap<>();
|
|
|
if(null == house){
|
|
|
return result;
|
|
@@ -760,6 +765,7 @@ public class HouseController extends BaseController {
|
|
|
result.put("sceneScheme" , sceneProEntity.getSceneScheme());
|
|
|
result.put("userId" , house.getUserId());
|
|
|
result.put("dataSource" , path);
|
|
|
+ result.put("callbackQueue" , callbackQueue);
|
|
|
return result;
|
|
|
}
|
|
|
|