|
|
@@ -12,6 +12,7 @@ import com.fdkankan.contro.entity.ScenePlus;
|
|
|
import com.fdkankan.contro.entity.ScenePlusExt;
|
|
|
import com.fdkankan.contro.mq.service.IBuildSceneService;
|
|
|
import com.fdkankan.contro.service.*;
|
|
|
+import com.fdkankan.fyun.config.FYunFileConfig;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.model.constants.ConstantFileName;
|
|
|
import com.fdkankan.model.constants.ConstantFilePath;
|
|
|
@@ -51,6 +52,8 @@ import java.util.stream.Collectors;
|
|
|
@RefreshScope
|
|
|
public class BuildSxRelocationServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
+ public static final String logUrlFormat = "**algorithm-log**: [%sbuild_log/%s/e57/console.log](%sbuild_log/%s/relocation/console.log)";
|
|
|
+
|
|
|
@Value("${queue.modeling.sx-relocation-post:sx-relocation-post}")
|
|
|
private String queueModelingPost;
|
|
|
@Value("${model.type:#{null}}")
|
|
|
@@ -75,6 +78,8 @@ public class BuildSxRelocationServiceImpl implements IBuildSceneService {
|
|
|
private IRelocationBatchDetailService relocationBatchDetailService;
|
|
|
@Autowired
|
|
|
private IRelocationBatchService relocationBatchService;
|
|
|
+ @Resource
|
|
|
+ private FYunFileConfig fYunFileConfig;
|
|
|
|
|
|
@Override
|
|
|
public void buildScenePre(BuildSceneCallMessage message) throws Exception{
|
|
|
@@ -153,7 +158,7 @@ public class BuildSxRelocationServiceImpl implements IBuildSceneService {
|
|
|
// 上传计算日志
|
|
|
//如果是重复计算,没有走到计算逻辑,不需要上传日志文件
|
|
|
log.info("开始上传计算日志");
|
|
|
- String buildLogPath = String.format(UploadFilePath.BUILD_LOG_PATH, sceneCode);
|
|
|
+ String buildLogPath = String.format(UploadFilePath.BUILD_LOG_PATH, sceneCode) + "relocation/";
|
|
|
fYunFileService.uploadFile(path + File.separator + "console.log", buildLogPath + "console.log");
|
|
|
log.info("计算日志上传完成");
|
|
|
|
|
|
@@ -164,7 +169,8 @@ public class BuildSxRelocationServiceImpl implements IBuildSceneService {
|
|
|
.eq(ScenePlus::getNum, sceneCode));
|
|
|
|
|
|
// 发送钉钉消息,计算失败
|
|
|
- buildSceneDTService.handModelFail("深巡场景重定向计算失败", message.getPath(), sceneCode, message.getHostName());
|
|
|
+ String logUrl = String.format(logUrlFormat,fYunFileConfig.getHost(),sceneCode,fYunFileConfig.getHost(),sceneCode);
|
|
|
+ buildSceneDTService.handModelFail("深巡场景重定向计算失败", message.getPath(), sceneCode, message.getHostName(), logUrl);
|
|
|
return;
|
|
|
}
|
|
|
ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
|