From 09dec78835ac5d573f56377ae22d9306459b08d4 Mon Sep 17 00:00:00 2001 From: cl <418351270@qq.com> Date: 星期三, 17 七月 2024 11:09:17 +0800 Subject: [PATCH] 修改OP020 --- jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java index 9da4f4a..f32e812 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java @@ -302,28 +302,29 @@ boolean save = daPassingStationCollectionService.save(daPassingStationCollection); //娣诲姞鍩虹鍙傛暟 - this.manualWorkstationsAddBasicParameters(daParamCollection); +// this.manualWorkstationsAddBasicParameters(daParamCollection); //鍗婅嚜鍔ㄥ伐浣嶏紝鍏堝皢鑷姩鏁版嵁淇濆瓨鍒版暟鎹簱 this.saveParameters(daParamCollection); //缁檕pc鍙�21 miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("MOZU1."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build()); - if(daParamCollection.getLocationCode().equals("OP240")){ + if(daParamCollection.getLocationCode().equals("M1OP100-1") || daParamCollection.getLocationCode().equals("M1OP100-2") ){ try{ CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { - logger.info("OP230鎶ュ伐寮�濮�-宸ュ巶MES寮傛鏂规硶"); - String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), "OP230", format.format(new Date())); + logger.info("OP100鎶ュ伐寮�濮�-宸ュ巶MES寮傛鏂规硶"); + String stationCode = "M1OP100"; + String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), stationCode, format.format(new Date())); JSONObject jsonObject = new JSONObject(reportResult); String code = jsonObject.getStr("code"); if("success".equals(code)){ //濡傛灉鎴愬姛锛屾墽琛屾姤宸ユ垚鍔熸柟娉曪紝淇敼鏄惁鎶ュ伐涓�1锛屾坊鍔犳姤宸ユ椂闂� - omProductionOrdeInfoService.updateOrderByProductNum("1",daParamCollection.getProductBarcode(),"OP230"); + omProductionOrdeInfoService.updateOrderByProductNum("1",daParamCollection.getProductBarcode(),daParamCollection.getLocationCode()); }else{ //瑙f瀽宸ュ巶mes杩斿洖缁撴灉锛屽鏋滃け璐ワ紝鎵ц鎶ュ伐澶辫触鏂规硶锛屼慨鏀规槸鍚︽姤宸ヤ负2锛屾坊鍔犳姤宸ユ椂闂� - omProductionOrdeInfoService.updateOrderByProductNum("2",daParamCollection.getProductBarcode(),"OP230"); + omProductionOrdeInfoService.updateOrderByProductNum("2",daParamCollection.getProductBarcode(),daParamCollection.getLocationCode()); } - logger.info("OP230鎶ュ伐缁撴潫-宸ュ巶MES寮傛鏂规硶{}"+reportResult); + logger.info("OP100鎶ュ伐缁撴潫-宸ュ巶MES寮傛鏂规硶{}"+reportResult); }); }catch (Exception e){ System.out.println(e.getMessage()); @@ -536,8 +537,6 @@ public void pushGeelycvMesFeedback(String packID, String stationCode) { logger.info("杩涘叆浜哄伐宸ヤ綅鎺ㄩ�佸伐鍘侻ES鏁版嵁鏂规硶-pushGeelycvMesFeedback-宸ヤ綅{}-pack鐮亄}",stationCode,packID); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; -// String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String totalResult = "0"; List<DaParamCollectionTemp> paramList = daParamCollectionTempService.list(new LambdaQueryWrapper<DaParamCollectionTemp>().eq(DaParamCollectionTemp::getSfcCode, packID).eq(DaParamCollectionTemp::getLocationCode, stationCode)); if(paramList.size() > 0){ @@ -592,7 +591,7 @@ try{ CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { logger.info("寮�濮嬫墽琛屽紓姝ユ柟娉�"); - HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); + HttpResponse execute = HttpRequest.post(Constants.FACTORY_EMS_UAT_GET_RUL+"deviceResultFeedback").body(JSONUtil.toJsonStr(parentVO)).execute(); logger.info("寮傛鏂规硶鎵ц缁撴潫"); logger.info("鎵嬪姩宸ヤ綅浼犲伐鍘侻ES寮傛鏂规硶{}"+execute.body()); @@ -622,8 +621,6 @@ public void automaticWorkstationPushGeelycvMesFeedback(String packID, String stationCode,List<DaParamCollection> paramList) { logger.info("杩涘叆宸ヤ綅{}-宸ュ巶MES鎺ㄩ�佹暟鎹柟娉昦utomaticWorkstationPushGeelycvMesFeedback",stationCode); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); -// String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; - String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String totalResult = "0"; if(paramList.size() > 0){ logger.info("杩涘叆宸ヤ綅{}-鎷兼暟鎹�",stationCode); @@ -679,7 +676,7 @@ try{ CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { logger.info("寮�濮嬫墽琛屽紓姝ユ柟娉�"); - HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); + HttpResponse execute = HttpRequest.post(Constants.FACTORY_EMS_UAT_GET_RUL+"deviceResultFeedback").body(JSONUtil.toJsonStr(parentVO)).execute(); System.out.println(execute.body()); logger.info("寮傛鏂规硶鎵ц缁撴潫"); logger.info("鑷姩宸ヤ綅浼犲伐鍘侻ES寮傛鏂规硶{}"+execute.body()); -- Gitblit v1.9.3