From c7c8554e2b9809bc90ac4a43fdaa39dfe16f4ab0 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期五, 09 五月 2025 14:09:32 +0800 Subject: [PATCH] “远程测控”功能返回数据中增加protocol和protocolVersion属性,以备前端做多协议兼容。 --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java index e9e1581..a066651 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java @@ -66,10 +66,6 @@ protected String commandTypeOuter = CommandType.outerCommand; - // 瀛樺偍瀹炰緥鍖栫殑 CompletableFuture<Data> 瀵硅薄 - protected static Map<Long, Object> features = new HashMap<>(); - //protected static Boolean setuped = false; - @Autowired private RestTemplate restTemplate; @@ -212,19 +208,19 @@ */ protected BaseResponse<Data> dealWithCallBack(Long comId, Command com) { CompletableFuture<JSONObject> feature = new CompletableFuture<>(); - features.put(comId, feature); + ComResultWait.put(comId, feature); try { // 鍙戦�佸懡浠� JSONObject response_SendCom = (JSONObject) JSON.toJSON(sendCom2Mw(com)); if (response_SendCom == null || !response_SendCom.getString("code").equals("0001")) { // 璇锋眰澶辫触锛孯TU鏈笂绾匡紝娓呴櫎feature - features.remove(comId); + ComResultWait.remove(comId); JSONObject job_param = response_SendCom.getJSONObject("content").getJSONObject("param"); return BaseResponseUtils.buildErrorMsg(job_param.getString("message")); } JSONObject resultData = feature.get(180, TimeUnit.SECONDS); - features.remove(comId); + ComResultWait.remove(comId); Long commandId = resultData.getLong("commandId"); if (commandId.equals(comId)) { @@ -401,7 +397,7 @@ rmCommandHistory.setResult((byte) 1); rmCommandHistoryMapper.updateByPrimaryKeySelective(rmCommandHistory); - if(openType == 1) { + if(openType != null && openType == 1) { irIntakeOperateMapper.updateByCommandId(comId, (byte)1, null); } -- Gitblit v1.8.0