From 50bf776d1735d563b35aa1dbd50e9b2c01a700cb Mon Sep 17 00:00:00 2001
From: cl <418351270@qq.com>
Date: 星期三, 04 九月 2024 08:35:21 +0800
Subject: [PATCH] 修改报工接口

---
 jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java |   84 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
index 42bbb7c..852182c 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -9,6 +9,7 @@
 import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService;
 import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
 import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
+import com.jcdm.main.da.psConf.service.IDaPsConfService;
 import com.jcdm.main.da.testDeviceInterfaceTemp.service.IDaTestDeviceInterfaceTempService;
 import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
 import com.jcdm.main.plcserver.sub.OPCUaSubscription;
@@ -50,6 +51,9 @@
     @Autowired
     private IDaCellDataService daCellDataService;
 
+    @Autowired
+    private IDaPsConfService daPsConfService;
+
     @Override
     public void run(ApplicationArguments args) throws Exception {
 
@@ -82,14 +86,17 @@
         Constants.ModuleList.add(Constants.OP210);
         Constants.ModuleList.add(Constants.OP220);
 
+        getDate();//灏嗘棩鏈熸斁鍏AP闆嗗悎锛�1P1S鐢�
+
         OPCUaSubscription opcUaSubscription = new OPCUaSubscription(
                 miloService,
                 daPassingStationCollectionService,
                 collectionParamConfService,
                 daParamCollectionService,
                 omProductionOrdeInfoService,
-                daTestDeviceInterfaceTempService/*,
-                daCellDataService*/);
+                daTestDeviceInterfaceTempService,
+                daCellDataService,
+                daPsConfService);
 
         List<String> lists = getSubList();
         System.out.println("璁㈤槄鍐呭锛�"+lists);
@@ -106,5 +113,78 @@
                 .stream().map(DaOpcuaConfig::getNode).collect(Collectors.toList());
         return lists;
     }
+
+    /**
+     * 灏嗘棩鏈熸斁鍏AP闆嗗悎锛�1P1S鐢�
+     */
+    public static  void getDate(){
+        //骞�
+        Constants.YEARSMAP.put(2024,"E");
+        Constants.YEARSMAP.put(2025,"F");
+        Constants.YEARSMAP.put(2026,"G");
+        Constants.YEARSMAP.put(2027,"H");
+        Constants.YEARSMAP.put(2028,"J");
+        Constants.YEARSMAP.put(2029,"K");
+        Constants.YEARSMAP.put(2030,"L");
+        Constants.YEARSMAP.put(2031,"M");
+        Constants.YEARSMAP.put(2032,"N");
+        Constants.YEARSMAP.put(2033,"P");
+        Constants.YEARSMAP.put(2034,"R");
+        Constants.YEARSMAP.put(2035,"S");
+        Constants.YEARSMAP.put(2036,"T");
+        Constants.YEARSMAP.put(2037,"V");
+        Constants.YEARSMAP.put(2038,"W");
+        Constants.YEARSMAP.put(2039,"X");
+        Constants.YEARSMAP.put(2040,"Y");
+
+        //鏈�
+        Constants.MONTHSMAP.put(1,"1");
+        Constants.MONTHSMAP.put(2,"2");
+        Constants.MONTHSMAP.put(3,"3");
+        Constants.MONTHSMAP.put(4,"4");
+        Constants.MONTHSMAP.put(5,"5");
+        Constants.MONTHSMAP.put(6,"6");
+        Constants.MONTHSMAP.put(7,"7");
+        Constants.MONTHSMAP.put(8,"8");
+        Constants.MONTHSMAP.put(9,"9");
+        Constants.MONTHSMAP.put(10,"A");
+        Constants.MONTHSMAP.put(11,"B");
+        Constants.MONTHSMAP.put(12,"C");
+
+        //鏃�
+        Constants.DAYMAP.put(1,"1");
+        Constants.DAYMAP.put(2,"2");
+        Constants.DAYMAP.put(3,"3");
+        Constants.DAYMAP.put(4,"4");
+        Constants.DAYMAP.put(5,"5");
+        Constants.DAYMAP.put(6,"6");
+        Constants.DAYMAP.put(7,"7");
+        Constants.DAYMAP.put(8,"8");
+        Constants.DAYMAP.put(9,"9");
+        Constants.DAYMAP.put(10,"A");
+        Constants.DAYMAP.put(11,"B");
+        Constants.DAYMAP.put(12,"C");
+        Constants.DAYMAP.put(13,"D");
+        Constants.DAYMAP.put(14,"E");
+        Constants.DAYMAP.put(15,"F");
+        Constants.DAYMAP.put(16,"G");
+        Constants.DAYMAP.put(17,"H");
+        Constants.DAYMAP.put(18,"J");
+        Constants.DAYMAP.put(19,"K");
+        Constants.DAYMAP.put(20,"L");
+        Constants.DAYMAP.put(21,"M");
+        Constants.DAYMAP.put(22,"N");
+        Constants.DAYMAP.put(23,"P");
+        Constants.DAYMAP.put(24,"R");
+        Constants.DAYMAP.put(25,"S");
+        Constants.DAYMAP.put(26,"T");
+        Constants.DAYMAP.put(27,"V");
+        Constants.DAYMAP.put(28,"W");
+        Constants.DAYMAP.put(29,"X");
+        Constants.DAYMAP.put(30,"Y");
+        Constants.DAYMAP.put(31,"0");
+
+    }
+
 }
 

--
Gitblit v1.9.3