cl
2024-07-31 50974469c6b442e20ca2ae365996a1237ff6fc65
修改采集参数
已修改1个文件
14 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -230,11 +230,11 @@
                    String paramValue = "";
                    if (ObjectUtil.isNotNull(readWriteEntityList.get(i).getValue())){
                        paramValue = readWriteEntityList.get(i).getValue().toString();//参数值
                        if("DATE".equals(list.get(i).getCollectParameterType()) && !paramValue.isEmpty()){
                        /*if("DATE".equals(list.get(i).getCollectParameterType()) && !paramValue.isEmpty()){
                            paramValue = format.parse(TimeUtil.test(TimeUtil.stringProcessing(paramValue))).toString();
                        }else if("MODEL".equals(list.get(i).getCollectParameterType()) && !paramValue.isEmpty()){
                            paramValue = Constants.materialMap.get(paramValue);
                        }
                        }*/
                    }
                    daParamCollection.setParamValue(paramValue);//参数值
                    daParamCollection.setLocationCode(device);//工位
@@ -252,7 +252,7 @@
                    mesList.add(childVO);
                }
                /*CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                    //插入参数采集表
                    daParamCollectionService.insertBatch(collectionList);
                    //上传到工厂mes
@@ -262,8 +262,6 @@
                    parentVO.setRecordId(UUID.randomUUID().toString());
                    if("2".equals(stationStatus)){//工站状态
                        parentVO.setTotalResult("0");
                    }else {
                        parentVO.setTotalResult("1");
                    }
                    parentVO.setProductNum(snCode);
                    parentVO.setCheckList(mesList);
@@ -271,7 +269,7 @@
                    HttpResponse execute = HttpRequest.post(Constants.FACTORY_EMS_UAT_GET_RUL+"deviceResultFeedback").body(JSONUtil.toJsonStr(parentVO)).execute();
                    log.info("执行工厂MES方法end,工位号{} 返回数据:{}",device,execute.body());
                });*/
                });
            }
        }catch (Exception e) {
            throw new RuntimeException(e);
@@ -299,14 +297,14 @@
                    .eq(OmProductionOrdeInfo::getProductCode,materialCode));//产品类型
            if (CollUtil.isNotEmpty(orderList)){
                Long id = orderList.get(0).getId();
                productNum = orderList.get(0).getProductNum();//模组码
                productNum = orderList.get(0).getProductNum();//产品码
                orderNum = orderList.get(0).getWorkOrderNo();
            }else{
                // 查询最新的工单信息
                OmProductionOrdeInfo lastOrder = omProductionOrdeInfoService.getLastOrder();
                log.info("请求工厂MES工单:入参device{},materialCode:{}", device, materialCode);
                String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "M1OP100",materialCode);
                String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "OP010",materialCode);
                log.info("请求工厂MES工单:出参pack:{}", orderJsonString);
                JSONObject jsonObject = new JSONObject(orderJsonString);