From a2cd0f560c226d7830c79fa3c0a6cb3db72927b4 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期三, 26 二月 2025 08:25:31 +0800
Subject: [PATCH] 修改

---
 billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java |   96 ++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 81 insertions(+), 15 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 f184d18..6d08b39 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
@@ -1,27 +1,100 @@
 package com.billion.main.plcServer;
 
+import com.billion.main.bs.service.IBsBomChildInfoService;
+import com.billion.main.constant.Constants;
 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.kangaroohy.milo.service.MiloService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.ApplicationArguments;
 import org.springframework.boot.ApplicationRunner;
+import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
 import java.util.List;
-
+@Component
 public class CustomRunner implements ApplicationRunner {
     @Autowired
     private MiloService miloService;
 
-
     @Autowired
     public IDaParamCollectionService daParamCollectionService;
+
+    @Autowired
+    public IDaStationCollectionService daStationCollectionService;
+
+    @Autowired
+    public IOmProductionOrderInfoService omProductionOrderInfoService;
+    @Autowired
+    public IOmOrderSchedulingService omOrderSchedulingService;
+    @Autowired
+    public IBsBomChildInfoService bomChildInfoService;
+
+
     @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);
+        //
 
         OPCUaSubscription OPCUaSubscription = new OPCUaSubscription(miloService,
-                daParamCollectionService);
+                daParamCollectionService,
+                daStationCollectionService,
+                omProductionOrderInfoService,
+                omOrderSchedulingService,
+                bomChildInfoService);
 
         List<String> lists = getList();
         System.out.println("璁㈤槄鍐呭锛�"+lists);
@@ -31,18 +104,11 @@
 
     public List<String> getList(){
         List<String> lists = new ArrayList<>();
-        lists.add("CFL4CVT.BCOP010.RecordData");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP040.RecordData");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP060.RecordData");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP100.RecordData");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BP020.RecordData");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.OP220.RecordData");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP010.MesRecordDataDone");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP040.MesRecordDataDone");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP060.MesRecordDataDone");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BCOP100.MesRecordDataDone");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.BP020.MesRecordDataDone");//璇锋眰淇濆瓨
-        lists.add("CFL4CVT.OP220.MesRecordDataDone");//璇锋眰淇濆瓨
+        lists.add("PLC1.C005.RecordData");//璇锋眰淇濆瓨
+        lists.add("PLC1.C005.WorkOrderRequest");//璇锋眰淇濆瓨
+        lists.add("PLC1.OP010.RecordData");//璇锋眰淇濆瓨
+        lists.add("PLC1.A1.RecordData");//璇锋眰淇濆瓨
+
         return lists;
     }
 }

--
Gitblit v1.9.3