From 1e39c55183c1f54d1587bf3a86b4c2210bcd592e Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期四, 28 三月 2024 15:23:19 +0800 Subject: [PATCH] chenge plan --- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 26 ++++++++++---------------- 1 files changed, 10 insertions(+), 16 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 f178415..c4683f6 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 @@ -24,7 +24,7 @@ public class OPCUaSubscription implements SubscriptionCallback { //鑷姩宸ヤ綅 - public List<String> automaticList = Arrays.asList("OP230","OP300","OP280", "OP320", "OP340", "OP350", "OP360","OP370", "OP390", "OP470", "OP530", "OP540"); + public List<String> automaticList = Arrays.asList("OP300","OP280", "OP320", "OP340", "OP350", "OP360","OP370", "OP390", "OP470", "OP530", "OP540"); public static MiloService miloService; @@ -32,9 +32,9 @@ public IDaPassingStationCollectionService daPassingStationCollectionService; - public IDaCollectionParamConfService collectionParamConfService; + public static IDaCollectionParamConfService collectionParamConfService; - public IDaParamCollectionService daParamCollectionService; + public static IDaParamCollectionService daParamCollectionService; public OPCUaSubscription(MiloService miloService, IDaPassingStationCollectionService daPassingStationCollectionService, @@ -110,15 +110,6 @@ //淇濆瓨鎷х揣鏁版嵁 else if (("AngleResult").equals(tab)) { if("1".equals(tabVlaue)||"2".equals(tabVlaue)){ -// String Torque = thoroughfare + "." + device + ".Torque"; -// String Angle = thoroughfare + "." + device + ".Angle"; -// String Result = thoroughfare + "." + device + ".Result"; -// String Result1 = thoroughfare + "." + device + ".Result1"; -// List<String> list = new ArrayList(); -// list.add(Torque); -// list.add(Angle); -// list.add(Result); -// list.add(Result1); List<String> list = new ArrayList<>(); String[] suffixes = {"Torque", "Angle", "Result", "Result1"}; @@ -167,7 +158,7 @@ //2銆佷繚瀛樿繃绔欓噰闆嗘暟鎹� saveStationInfo(PACKCodeParam,thoroughfare,device); //3銆佷繚瀛樺弬鏁伴噰闆嗘暟鎹� - SaveParamData(PACKCodeParam,thoroughfare,device); + SaveParamData(PACKCodeParam,thoroughfare,device,"",""); result = "21"; @@ -198,7 +189,7 @@ daPassingStationCollectionService.insertDaPassingStationCollection(daPassingStationCollection); } - public void SaveParamData(String packCode,String thoroughfare,String device) throws Exception { + public static void SaveParamData(String packCode,String thoroughfare,String device,String workOrderNo,String productType) throws Exception { List<DaCollectionParamConf> list; DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf(); daCollectionParamConf.setGatherAddress(thoroughfare+ "." + device); @@ -227,10 +218,13 @@ //ParamCollection.setState("鍚堟牸"); ParamCollection.setType(list.get(i).getCollectParameterType()); ParamCollection.setCollectionTime(new Date()); - daParamCollectionService.insertDaParamCollection(ParamCollection); + ParamCollection.setWorkOrderNo(workOrderNo); + ParamCollection.setProductCode(productType); + daParamCollectionlist.add(ParamCollection); +// daParamCollectionService.insertDaParamCollection(ParamCollection); } } - // daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist); + daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist); } } -- Gitblit v1.9.3