From 73d19affacfe22aa0a8c1b92bbf588c7240ed746 Mon Sep 17 00:00:00 2001 From: cl <418351270@qq.com> Date: 星期五, 06 九月 2024 09:39:57 +0800 Subject: [PATCH] 添加报工失败二次报工 --- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java index 7e08480..76fd161 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java @@ -1059,14 +1059,21 @@ public static String getWorkReportResultFeedback(String productNum,String stationCode,String confirmTime) { String result = ""; + String url = Constants.FACTORY_EMS_UAT_GET_RUL + "workReportResultFeedback?siteCode="+Constants.FACTORY_EMS_SITE_CODE+"&stationCode="+stationCode+"&productNum="+productNum+"&confirmTime="+confirmTime; try { - String url = Constants.FACTORY_EMS_UAT_GET_RUL + "workReportResultFeedback?siteCode="+Constants.FACTORY_EMS_SITE_CODE+"&stationCode="+stationCode+"&productNum="+productNum+"&confirmTime="+confirmTime; + log.info("鎵ц宸ュ巶MES鎶ュ伐鏂规硶start锛屽簭鍒楀彿{}宸ヤ綅鍙穥}url{}",productNum,stationCode ,url); HttpResponse response = HttpRequest.get(url).execute(); - /* HttpRequest httpRequest = HttpRequest.get(url);*/ + //HttpRequest httpRequest = HttpRequest.get(url); result = response.body(); + log.info("鎵ц宸ュ巶MES鎶ュ伐鏂规硶绗竴娆nd锛屽簭鍒楀彿{}宸ヤ綅鍙穥}杩斿洖鏁版嵁{}",productNum,stationCode ,result); }catch (Exception e){ throw new RuntimeException(e); }finally { + if(result.isEmpty()){ + HttpResponse response = HttpRequest.get(url).execute(); + result = response.body(); + log.info("鎵ц宸ュ巶MES鎶ュ伐鏂规硶绗簩娆nd锛屽簭鍒楀彿{}宸ヤ綅鍙穥}杩斿洖鏁版嵁{}",productNum,stationCode ,result); + } return result; } } -- Gitblit v1.9.3