From d8e6c0629e17de5a3ab080eb77fc3eeacb21b21e Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期五, 07 三月 2025 18:37:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 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 59fd854..ac409b5 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 @@ -159,15 +159,15 @@ //OP020 鐢佃姱鎸′綅鏍¢獙 if (Constants.OP020.equals(device)){ Integer result = 11; - Object cellGearObjcet = miloService.readFromOpcUa(thoroughfare + "." + device + ".CellGear").getValue(); + /*Object cellGearObjcet = miloService.readFromOpcUa(thoroughfare + "." + device + ".CellGear").getValue(); if (ObjectUtil.isNull(cellGearObjcet)){ - result = 16;//鐢佃姱鎸′綅涓虹┖ + result = 11;//濡傛灉鐢佃姱鎸′綅涓虹┖锛屼笉杩涜鎸′綅鏍¢獙 }else{ String cellGear = cellGearObjcet.toString(); List<String> cellCodeList = readCellCodeList(thoroughfare, device); result = checkCellGear(thoroughfare, device,cellCodeList,cellGear);//鏍¢獙鐢佃姱鎸′綅鍜岀粍鍒� Constants.OLD_CELL_GEAR = cellGear;//鎸′綅璧嬪�� - } + }*/ miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); }else if (Constants.OP030.equals(device)){ @@ -244,7 +244,7 @@ return; } - result = savePassingStation(thoroughfare, device,cellCodeList);//淇濆瓨杩囩珯 + //result = savePassingStation(thoroughfare, device,cellCodeList);//淇濆瓨杩囩珯 if(result == 21) { if(Constants.OP020.contains(device)){ if(!cellCode1.isEmpty()){ @@ -293,7 +293,7 @@ Object stationStatusObjcet = miloService.readFromOpcUa(thoroughfare + "." + device + ".StationStatus").getValue();//绔欑姸鎬佸湴鍧� if (ObjectUtil.isNotNull(stationStatusObjcet)){ String stationStatus = stationStatusObjcet.toString(); - result = savePassingStation(thoroughfare, device,moduleCode,stationStatus);//淇濆瓨杩囩珯 + //result = savePassingStation(thoroughfare, device,moduleCode,stationStatus);//淇濆瓨杩囩珯 if(result == 21) { result = saveParamCollection(device,moduleCode,stationStatus);//淇濆瓨鍙傛暟锛屽彂閫佸伐鍘侻ES } @@ -1056,14 +1056,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); 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