From 6a53e63fa18c97232420ab58163a9b79fbb5a228 Mon Sep 17 00:00:00 2001 From: cl <418351270@qq.com> Date: 星期四, 25 七月 2024 18:27:05 +0800 Subject: [PATCH] 1、100工位报工前,先将工单状态改为3执行中 2、手动接收工单,修改为先查表中是否有剩余工单, 3、OP030电芯检测放开 4、接收工单时,将两个工位区分开存工单 --- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 66 ++++++++++++++++----------------- 1 files changed, 32 insertions(+), 34 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 d5288ca..5899843 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 @@ -130,13 +130,13 @@ String cellCode = value1.toString(); scanResult = 11; //鍙嶉鐢佃姱ocv妫�娴嬬粨鏋�,杩欓噷涓嶇敤鍐嶈繘琛屾娴嬶紝鍙鐮佹病闂灏卞彲浠ヤ簡 - /*boolean b = OCVResultFeedBack(thoroughfare, device,cellCode);//瀵规浛鎹㈢數鑺牎楠� + boolean b = OCVResultFeedBack(thoroughfare, device,cellCode);//瀵规浛鎹㈢數鑺牎楠� //鍥涗釜鐢佃姱鐨勭姸鎬� if (b){ scanResult = 11; }else { scanResult = 12; - }*/ + } }else { scanResult = 12; } @@ -181,7 +181,7 @@ if (ObjectUtil.isNotNull(productTypeObjcet)){ String productType = productTypeObjcet.toString();//浜у搧绫诲瀷 String materialCode = Constants.materialMap.get(productType); - //璋冪敤宸ュ巶MES锛屼繚瀛樺埌鏁版嵁搴�,骞朵笖灏嗗伐鍗曚紶缁橮LC + //鎺ユ敹宸ュ崟锛屼繚瀛樺埌鏁版嵁搴�,骞朵笖灏嗗伐鍗曚紶缁橮LC CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { receivingWorkOrders(thoroughfare, device,materialCode); }); @@ -326,7 +326,7 @@ OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo(); omProductionOrdeInfo.setWorkOrderNo(dataObject.getStr("productionOrderNum")); omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum")); - omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode")); + omProductionOrdeInfo.setStationCode(device); omProductionOrdeInfo.setProductCode(dataObject.getStr("materialCode")); omProductionOrdeInfo.setPlanQty(Long.valueOf(dataObject.getStr("plannedQuantity"))); omProductionOrdeInfo.setOnlineCompletionMark("0"); @@ -830,36 +830,6 @@ } /** - * 030宸ヤ綅杩斿洖ocv娴嬭瘯缁撴灉 - * @param thoroughfare - * @param device - * @param cellCode - * @throws Exception - */ - private boolean OCVResultFeedBack(String thoroughfare, String device,String cellCode) throws Exception { - boolean flag = true; - - List<DaTestDeviceInterfaceTemp> list = daTestDeviceInterfaceTempService.list(new LambdaQueryWrapper<DaTestDeviceInterfaceTemp>() - .eq(DaTestDeviceInterfaceTemp::getStationCode, "M1OP020") - .eq(DaTestDeviceInterfaceTemp::getProductNum,cellCode) - .orderByDesc(DaTestDeviceInterfaceTemp::getCreateTime) - ); - if (CollUtil.isNotEmpty(list)){ - DaTestDeviceInterfaceTemp daTestDeviceInterfaceTemp = list.get(0); - if (Constants.ONE.equals(daTestDeviceInterfaceTemp.getTotalResult())){ - flag = true; - }else { - flag = false; - } - daTestDeviceInterfaceTempService.deleteDaTestDeviceInterfaceTempByProductNum(cellCode); - }else { - flag = false; - log.info("璇诲彇鍒板伐浣峽},娴嬭瘯璁惧杩斿洖鐨勬暟鎹煡璇笉鍒帮紝鐢佃姱鐮佷负锛歿}",device,cellCode); - } - return flag; - } - - /** * OP020鏍¢獙鐢佃姱鎸′綅 * @param thoroughfare * @param device @@ -898,6 +868,34 @@ * 030宸ヤ綅杩斿洖ocv娴嬭瘯缁撴灉 * @param thoroughfare * @param device + * @param cellCode + * @throws Exception + */ + private boolean OCVResultFeedBack(String thoroughfare, String device,String cellCode) throws Exception { + boolean flag = true; + List<DaTestDeviceInterfaceTemp> list = daTestDeviceInterfaceTempService.list(new LambdaQueryWrapper<DaTestDeviceInterfaceTemp>() + //.eq(DaTestDeviceInterfaceTemp::getStationCode, "M1OP020") + .eq(DaTestDeviceInterfaceTemp::getProductNum,cellCode) + .orderByDesc(DaTestDeviceInterfaceTemp::getCreateTime) + ); + if (CollUtil.isNotEmpty(list)){ + DaTestDeviceInterfaceTemp daTestDeviceInterfaceTemp = list.get(0); + if (Constants.ONE.equals(daTestDeviceInterfaceTemp.getTotalResult())){ + flag = true; + }else { + flag = false; + } + //daTestDeviceInterfaceTempService.deleteDaTestDeviceInterfaceTempByProductNum(cellCode); + }else { + flag = false; + log.info("璇诲彇鍒板伐浣峽},娴嬭瘯璁惧杩斿洖鐨勬暟鎹煡璇笉鍒帮紝鐢佃姱鐮佷负锛歿}",device,cellCode); + } + return flag; + } + /** + * 030宸ヤ綅杩斿洖ocv娴嬭瘯缁撴灉 + * @param thoroughfare + * @param device * @throws Exception */ private boolean OCVResultFeedBack(String thoroughfare, String device) throws Exception { -- Gitblit v1.9.3