Sfoglia il codice sorgente

激光系统下载e57

lyhzzz 1 anno fa
parent
commit
cf4d5368b5

+ 1 - 0
src/main/java/com/fdkankan/manage/common/ResultCode.java

@@ -99,6 +99,7 @@ public enum ResultCode  {
     SGRTK_SN_EXIST(50078, "深光插件sn已存在"),
 
     RTK_ACCOUNT_NOT_EXIT(50079, "rtk账号库存不足"),
+    SCENE_NOT_EXIST_E57(50080, "场景不存在e57文件"),
 
 
     ;

+ 14 - 4
src/main/java/com/fdkankan/manage/httpClient/service/LaserService.java

@@ -401,14 +401,19 @@ public class LaserService {
             param.setSceneCode(num);
             Result responseEntity = laserClient.downE57Status(param);
             if( responseEntity.getCode() != HttpStatus.OK.value()){
-                log.error("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败:{}",responseEntity);
+                log.error("downE57Status-根据场景码获取激光转台下载状态失败:{}",responseEntity);
                 return null;
             }
+            if(responseEntity.getCode() == 407){
+                throw new BusinessException(ResultCode.SCENE_NOT_EXIST_E57);
+            }
             vo = JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getData()), SSDownSceneVo.class);
             return vo;
 
+        }catch (BusinessException e){
+            throw new BusinessException(ResultCode.SCENE_NOT_EXIST_E57);
         }catch (Exception e){
-            log.error("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败!",e);
+            log.error("downE57Status-根据场景码获取激光转台下载状态失败!",e);
         }
         return null ;
     }
@@ -420,13 +425,18 @@ public class LaserService {
             param.setSceneCode(num);
             Result responseEntity = laserClient.downE57(param);
             if( responseEntity.getCode() != HttpStatus.OK.value()){
-                log.error("downOfflineScene-根据场景码获取激光转台下载失败:{}",responseEntity);
+                log.error("downE57-根据场景码获取激光转台下载失败:{}",responseEntity);
                 return null;
             }
+            if(responseEntity.getCode() == 407){
+                throw new BusinessException(ResultCode.SCENE_NOT_EXIST_E57);
+            }
             vo = JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getData()), SSDownSceneVo.class);
             return vo ;
+        }catch (BusinessException e){
+            throw new BusinessException(ResultCode.SCENE_NOT_EXIST_E57);
         }catch (Exception e){
-            log.error("downOfflineScene-根据场景码获取激光转台下载状态失败!",e);
+            log.error("downE57-根据场景码获取激光转台下载状态失败!",e);
         }
         return null ;
     }