|
@@ -103,6 +103,8 @@ public class BuildObjServiceImpl implements IBuildSceneService {
|
|
|
private ICameraDetailService cameraDetailService;
|
|
|
@Autowired
|
|
|
private ICompanyService companyService;
|
|
|
+ @Autowired
|
|
|
+ private IJmgaService jmgaService;
|
|
|
|
|
|
@Override
|
|
|
public void buildScenePre(BuildSceneCallMessage message) throws Exception{
|
|
@@ -144,6 +146,18 @@ public class BuildObjServiceImpl implements IBuildSceneService {
|
|
|
message.setPath(laserObjFilePath);
|
|
|
message.setResultReceiverMqName(queueObjModelingPost);
|
|
|
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ try {
|
|
|
+ param.put("event_type", "排队中");
|
|
|
+ param.put("event_content", "排队中");
|
|
|
+ param.put("scene_num", num);
|
|
|
+ param.put("event_time", new Date());
|
|
|
+ param.put("ryid", scenePlusService.getRyIdByNum(num));
|
|
|
+ jmgaService.sendStatus(param);
|
|
|
+ }catch (Exception ex){
|
|
|
+ log.info("推送事件失败,param:{}", param);
|
|
|
+ }
|
|
|
+
|
|
|
//发送mq,就进行计算
|
|
|
mqProducer.sendByWorkQueue(queueModelingCall, message);
|
|
|
|
|
@@ -153,6 +167,19 @@ public class BuildObjServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
}catch (Exception e){
|
|
|
log.error("生成OBJ场景资源准备异常,num=" + num, e);
|
|
|
+
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ try {
|
|
|
+ param.put("event_type", "计算失败");
|
|
|
+ param.put("event_content", "计算资源准备失败");
|
|
|
+ param.put("scene_num", num);
|
|
|
+ param.put("event_time", new Date());
|
|
|
+ param.put("ryid", scenePlusService.getRyIdByNum(num));
|
|
|
+ jmgaService.sendStatus(param);
|
|
|
+ }catch (Exception ex){
|
|
|
+ log.info("推送事件失败,param:{}", param);
|
|
|
+ }
|
|
|
+
|
|
|
// buildSceneDTService.handBaseFail("生成OBJ场景资源准备异常", message.getPath(), message.getSceneNum(), "计算控制服务器");
|
|
|
throw e;
|
|
|
}finally {
|
|
@@ -190,6 +217,19 @@ public class BuildObjServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
if (!message.getBuildSuccess()) {
|
|
|
log.error("生成OBJ场景计算失败!");
|
|
|
+
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ try {
|
|
|
+ param.put("event_type", "计算失败");
|
|
|
+ param.put("event_content", "算法报错");
|
|
|
+ param.put("scene_num", projectNum);
|
|
|
+ param.put("event_time", new Date());
|
|
|
+ param.put("ryid", scenePlusService.getRyIdByNum(projectNum));
|
|
|
+ jmgaService.sendStatus(param);
|
|
|
+ }catch (Exception ex){
|
|
|
+ log.info("推送事件失败,param:{}", param);
|
|
|
+ }
|
|
|
+
|
|
|
// 发送钉钉消息,计算失败
|
|
|
// buildSceneDTService.handModelFail("生成OBJ场景计算失败!", message.getPath(), message.getBuildContext().get("sceneNum").toString(), message.getHostName());
|
|
|
return;
|
|
@@ -309,6 +349,18 @@ public class BuildObjServiceImpl implements IBuildSceneService {
|
|
|
//重置异步操作记录
|
|
|
commonService.removeSceneAsynOperLog(projectNum);
|
|
|
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ try {
|
|
|
+ param.put("event_type", "计算成功");
|
|
|
+ param.put("event_content", "计算成功");
|
|
|
+ param.put("scene_num", projectNum);
|
|
|
+ param.put("event_time", new Date());
|
|
|
+ param.put("ryid", scenePlusService.getRyIdByNum(projectNum));
|
|
|
+ jmgaService.sendStatus(param);
|
|
|
+ }catch (Exception ex){
|
|
|
+ log.info("推送事件失败,param:{}", param);
|
|
|
+ }
|
|
|
+
|
|
|
// 如果未升级V4,则升级V4
|
|
|
if("v3".equals(version)){
|
|
|
fdkkV4Service.upgradeToV4(projectNum);
|
|
@@ -324,6 +376,19 @@ public class BuildObjServiceImpl implements IBuildSceneService {
|
|
|
}catch (Exception e){
|
|
|
log.error("生成OBJ场景计算结果处理异常,num=" + projectNum, e);
|
|
|
// buildSceneDTService.handBaseFail("生成OBJ场景计算结果处理异常", message.getPath(), projectNum, "计算控制服务器");
|
|
|
+
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ try {
|
|
|
+ param.put("event_type", "计算失败");
|
|
|
+ param.put("event_content", "计算结果处理失败");
|
|
|
+ param.put("scene_num", projectNum);
|
|
|
+ param.put("event_time", new Date());
|
|
|
+ param.put("ryid", scenePlusService.getRyIdByNum(projectNum));
|
|
|
+ jmgaService.sendStatus(param);
|
|
|
+ }catch (Exception ex){
|
|
|
+ log.info("推送事件失败,param:{}", param);
|
|
|
+ }
|
|
|
+
|
|
|
throw e;
|
|
|
}finally {
|
|
|
fdkkLaserService.pushBuildStatusToLaserSystem(projectNum, laserObjFilePath + "/laserData/mesh", success ? CommonOperStatus.SUCCESS.code() : CommonOperStatus.FAILD.code());
|