From b9df2fc5c64a1d989991655a9e42e4d1f2ec4075 Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期四, 06 三月 2025 18:18:11 +0800 Subject: [PATCH] 修改 --- billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java | 219 ++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 161 insertions(+), 58 deletions(-) diff --git a/billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java b/billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java index 6d08b39..69cf86b 100644 --- a/billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java +++ b/billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java @@ -2,11 +2,14 @@ import com.billion.main.bs.service.IBsBomChildInfoService; import com.billion.main.constant.Constants; +import com.billion.main.da.service.IDaCollectionParamConfService; +import com.billion.main.da.service.IDaMaterialCollectionService; import com.billion.main.da.service.IDaParamCollectionService; import com.billion.main.da.service.IDaStationCollectionService; import com.billion.main.om.service.IOmOrderSchedulingService; import com.billion.main.om.service.IOmProductionOrderInfoService; import com.billion.main.plcServer.sub.OPCUaSubscription; +import com.billion.main.sys.service.ISysCountService; import com.kangaroohy.milo.service.MiloService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; @@ -31,70 +34,100 @@ @Autowired public IOmOrderSchedulingService omOrderSchedulingService; @Autowired - public IBsBomChildInfoService bomChildInfoService; + public IBsBomChildInfoService bsBomChildInfoService; + @Autowired + public IDaCollectionParamConfService daCollectionParamConfService; + @Autowired + public IDaMaterialCollectionService daMaterialCollectionService; + @Autowired + public ISysCountService sysCountService; @Override public void run(ApplicationArguments args) throws Exception { - //绗笁鏂硅澶� - Constants.PLC.add(Constants.C040); - Constants.PLC.add(Constants.OP030); - Constants.PLC.add(Constants.OP050); - Constants.PLC.add(Constants.OP070); - Constants.PLC.add(Constants.OP110); - Constants.PLC.add(Constants.OP140); - //PLC1璁惧 - Constants.PLC.add(Constants.C010); - Constants.PLC.add(Constants.C020); - Constants.PLC.add(Constants.C030); - Constants.PLC.add(Constants.C060); - Constants.PLC.add(Constants.C070); - //PLC2璁惧 - Constants.PLC.add(Constants.P010); - Constants.PLC.add(Constants.P020); - Constants.PLC.add(Constants.P030); - Constants.PLC.add(Constants.OP005); - Constants.PLC.add(Constants.OP010); - Constants.PLC.add(Constants.OP020); - Constants.PLC.add(Constants.OP040); - Constants.PLC.add(Constants.OP045); - Constants.PLC.add(Constants.OP060); - Constants.PLC.add(Constants.OP075); - Constants.PLC.add(Constants.OP080); - Constants.PLC.add(Constants.OP090); - Constants.PLC.add(Constants.OP095); - Constants.PLC.add(Constants.OP100); - Constants.PLC.add(Constants.OP120); - //PLC3璁惧 - Constants.PLC.add(Constants.OP130); - Constants.PLC.add(Constants.OP145); - Constants.PLC.add(Constants.OP150); - Constants.PLC.add(Constants.OP160); - Constants.PLC.add(Constants.OP165); - Constants.PLC.add(Constants.OP170); - Constants.PLC.add(Constants.OP180); - Constants.PLC.add(Constants.OP190); - Constants.PLC.add(Constants.OP200); - Constants.PLC.add(Constants.OP210); - Constants.PLC.add(Constants.OP220); - Constants.PLC.add(Constants.OP230); - Constants.PLC.add(Constants.OP240); - Constants.PLC.add(Constants.OP250); - Constants.PLC.add(Constants.OP260); - Constants.PLC.add(Constants.OP270); - Constants.PLC.add(Constants.OP275); - Constants.PLC.add(Constants.OP280); - Constants.PLC.add(Constants.OP290); - Constants.PLC.add(Constants.OP295); - Constants.PLC.add(Constants.OP300); - // + //PLC1璁惧//鎺掓煡涓婁笅绾� + Constants.PLC1.add(Constants.C010); + Constants.PLC1.add(Constants.C020); + Constants.PLC1.add(Constants.C030); + Constants.PLC1.add(Constants.C050); + Constants.PLC1.add(Constants.C060); + //PLC2璁惧//鎺掓煡涓婁笅绾� + Constants.PLC2.add(Constants.OP005); + Constants.PLC2.add(Constants.OP010); + Constants.PLC2.add(Constants.OP020); + Constants.PLC2.add(Constants.OP040); + Constants.PLC2.add(Constants.OP045); + Constants.PLC2.add(Constants.OP060); + Constants.PLC2.add(Constants.OP070); + Constants.PLC2.add(Constants.OP075); + Constants.PLC2.add(Constants.OP080); + Constants.PLC2.add(Constants.OP090); + Constants.PLC2.add(Constants.OP095_1); + Constants.PLC2.add(Constants.OP095_2); + Constants.PLC2.add(Constants.OP100_1); + Constants.PLC2.add(Constants.OP100_2); + Constants.PLC2.add(Constants.OP120); + //PLC3璁惧//鎺掓煡涓婁笅绾� + Constants.PLC3.add(Constants.OP130); + Constants.PLC3.add(Constants.OP145_1); + Constants.PLC3.add(Constants.OP145_2); + Constants.PLC3.add(Constants.OP150_1); + Constants.PLC3.add(Constants.OP150_2); + Constants.PLC3.add(Constants.OP160); + Constants.PLC3.add(Constants.OP165_1); + Constants.PLC3.add(Constants.OP165_2); + Constants.PLC3.add(Constants.OP170_1); + Constants.PLC3.add(Constants.OP170_2); + Constants.PLC3.add(Constants.OP180); + Constants.PLC3.add(Constants.OP190_1); + Constants.PLC3.add(Constants.OP190_2); + Constants.PLC3.add(Constants.OP200_1); + Constants.PLC3.add(Constants.OP200_2); + Constants.PLC3.add(Constants.OP210_1); + Constants.PLC3.add(Constants.OP210_2); + Constants.PLC3.add(Constants.OP220_1); + Constants.PLC3.add(Constants.OP220_2); + Constants.PLC3.add(Constants.OP230_1); + Constants.PLC3.add(Constants.OP230_2); + Constants.PLC3.add(Constants.OP240_1); + Constants.PLC3.add(Constants.OP240_2); + Constants.PLC3.add(Constants.OP250_1); + Constants.PLC3.add(Constants.OP250_2); + Constants.PLC3.add(Constants.OP260_1); + Constants.PLC3.add(Constants.OP260_2); + Constants.PLC3.add(Constants.OP270_1); + Constants.PLC3.add(Constants.OP270_2); + Constants.PLC3.add(Constants.OP275); + Constants.PLC3.add(Constants.OP280); + Constants.PLC3.add(Constants.OP290_1); + Constants.PLC3.add(Constants.OP290_2); + Constants.PLC3.add(Constants.OP295); + Constants.PLC3.add(Constants.OP300); + Constants.PLC3.add(Constants.OP310); + //PLC4//鎺掓煡涓婁笅绾� + Constants.PLC4.add(Constants.C040); + Constants.PLC4.add(Constants.OP030); + Constants.PLC4.add(Constants.OP050); + Constants.PLC4.add(Constants.OP110); + Constants.PLC4.add(Constants.OP140); + + //涓婄嚎宸ヤ綅 + Constants.ONLINE.add(Constants.C005); + Constants.ONLINE.add(Constants.OP005); + //涓嬬嚎宸ヤ綅 + Constants.OFFLINE.add(Constants.C070); + Constants.OFFLINE.add(Constants.OP310); + Constants.OFFLINE.add(Constants.P010); OPCUaSubscription OPCUaSubscription = new OPCUaSubscription(miloService, daParamCollectionService, daStationCollectionService, omProductionOrderInfoService, omOrderSchedulingService, - bomChildInfoService); + bsBomChildInfoService, + daCollectionParamConfService, + daMaterialCollectionService, + sysCountService); List<String> lists = getList(); System.out.println("璁㈤槄鍐呭锛�"+lists); @@ -104,10 +137,80 @@ public List<String> getList(){ List<String> lists = new ArrayList<>(); - lists.add("PLC1.C005.RecordData");//璇锋眰淇濆瓨 - lists.add("PLC1.C005.WorkOrderRequest");//璇锋眰淇濆瓨 - lists.add("PLC1.OP010.RecordData");//璇锋眰淇濆瓨 - lists.add("PLC1.A1.RecordData");//璇锋眰淇濆瓨 + //PLC1 + lists.add("PLC1.C005.RecordData"); + lists.add("PLC1.C005.WorkOrderRequest");//璇锋眰宸ュ崟 + lists.add("PLC1.C010.RecordData"); + lists.add("PLC1.C020.RecordData"); + lists.add("PLC1.C030.RecordData"); + lists.add("PLC1.C050.RecordData"); + lists.add("PLC1.C060.RecordData"); + lists.add("PLC1.C070.RecordData"); + //PLC2 + lists.add("PLC2.OP005.RecordData"); + lists.add("PLC2.OP010.WorkOrderRequest");//璇锋眰宸ュ崟 + lists.add("PLC2.OP020.RecordData"); + lists.add("PLC2.OP040.RecordData"); + lists.add("PLC2.OP045.RecordData"); + lists.add("PLC2.OP060.RecordData"); + lists.add("PLC2.OP070.RecordData"); + lists.add("PLC2.OP075.RecordData"); + lists.add("PLC2.OP080.RecordData"); + lists.add("PLC2.OP090.RecordData"); + lists.add("PLC2.OP095-1.RecordData"); + lists.add("PLC2.OP095-2.RecordData"); + lists.add("PLC2.OP100-1.RecordData"); + lists.add("PLC2.OP100-2.RecordData"); + lists.add("PLC2.OP120.RecordData"); + lists.add("PLC2.P010.RecordData"); + lists.add("PLC2.P010.WorkOrderRequest");//璇锋眰宸ュ崟 + //PLC3 + lists.add("PLC3.OP130.RecordData"); + lists.add("PLC3.OP145-1.RecordData"); + lists.add("PLC3.OP145-2.RecordData"); + lists.add("PLC3.OP150-1.RecordData"); + lists.add("PLC3.OP150-2.RecordData"); + lists.add("PLC3.OP160.RecordData"); + lists.add("PLC3.OP165-1.RecordData"); + lists.add("PLC3.OP165-2.RecordData"); + lists.add("PLC3.OP170-1.RecordData"); + lists.add("PLC3.OP170-2.RecordData"); + lists.add("PLC3.OP180.RecordData"); + lists.add("PLC3.OP190-1.RecordData"); + lists.add("PLC3.OP190-2.RecordData"); + lists.add("PLC3.OP200-1.RecordData"); + lists.add("PLC3.OP200-2.RecordData"); + lists.add("PLC3.OP210-1.RecordData"); + lists.add("PLC3.OP210-2.RecordData"); + lists.add("PLC3.OP220-1.RecordData"); + lists.add("PLC3.OP220-2.RecordData"); + lists.add("PLC3.OP230-1.RecordData"); + lists.add("PLC3.OP230-2.RecordData"); + lists.add("PLC3.OP240-1.RecordData"); + lists.add("PLC3.OP240-2.RecordData"); + lists.add("PLC3.OP250-1.RecordData"); + lists.add("PLC3.OP250-2.RecordData"); + lists.add("PLC3.OP260-1.RecordData"); + lists.add("PLC3.OP260-2.RecordData"); + lists.add("PLC3.OP270-1.RecordData"); + lists.add("PLC3.OP270-2.RecordData"); + lists.add("PLC3.OP275.RecordData"); + lists.add("PLC3.OP280.RecordData"); + lists.add("PLC3.OP290-1.RecordData"); + lists.add("PLC3.OP290-2.RecordData"); + lists.add("PLC3.OP295.RecordData"); + lists.add("PLC3.OP300.RecordData"); + lists.add("PLC3.OP310.RecordData"); + //PLC4 + lists.add("PLC4.C040.RecordData"); + lists.add("PLC4.OP030.RecordData"); + lists.add("PLC4.OP050.RecordData"); + lists.add("PLC4.OP070.RecordData"); + lists.add("PLC3.OP110.RecordData"); + lists.add("PLC3.OP140.RecordData"); + + + return lists; } -- Gitblit v1.9.3