| | |
| | | boolean save = daPassingStationCollectionService.save(daPassingStationCollection); |
| | | |
| | | //添加基础参数 |
| | | this.manualWorkstationsAddBasicParameters(daParamCollection); |
| | | // this.manualWorkstationsAddBasicParameters(daParamCollection); |
| | | |
| | | //半自动工位,先将自动数据保存到数据库 |
| | | this.saveParameters(daParamCollection); |
| | |
| | | try{ |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | logger.info("OP100报工开始-工厂MES异步方法"); |
| | | String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), daParamCollection.getLocationCode(), format.format(new Date())); |
| | | String stationCode = "M1P100";//因为上层系统只支持6为,所有报工工位为M1P100 |
| | | 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)){ |
| | |
| | | public void pushGeelycvMesFeedback(String packID, String stationCode) { |
| | | logger.info("进入人工工位推送工厂MES数据方法-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){ |
| | |
| | | // childVO.setItemType("3"); |
| | | // } |
| | | if(paramConfOne!=null){ |
| | | childVO.setItemType(paramConfOne.getSpareField1()); |
| | | childVO.setItemType(paramConfOne.getItemType()); |
| | | childVO.setItemText(paramConfOne.getCollectParameterName()); |
| | | }else { |
| | | childVO.setItemType("3"); |
| | |
| | | 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("手动工位传工厂MES异步方法{}"+execute.body()); |
| | | |
| | |
| | | public void automaticWorkstationPushGeelycvMesFeedback(String packID, String stationCode,List<DaParamCollection> paramList) { |
| | | logger.info("进入工位{}-工厂MES推送数据方法automaticWorkstationPushGeelycvMesFeedback",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); |
| | |
| | | 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("自动工位传工厂MES异步方法{}"+execute.body()); |