jcdm-main/pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/controller/TestClass.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/controller/testClass.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/pom.xml
@@ -69,7 +69,7 @@ <dependency> <groupId>com.kangaroohy</groupId> <artifactId>milo-spring-boot-starter</artifactId> <version>3.0.5</version> <version>3.0.4</version> </dependency> <!-- opc end--> jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -92,8 +92,10 @@ lists.add(OPCElement.PACK_OP280_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP320A_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP320B_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP340_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP350_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP340A_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP340B_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP350A_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP350B_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP360_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP370_RecordData);//请æ±è®°å½æ°æ® lists.add(OPCElement.PACK_OP390_RecordData);//请æ±è®°å½æ°æ® jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
@@ -119,11 +119,17 @@ /** * OP340 */ public static final String PACK_OP340_RecordData = "PACK.OP340.RecordData";//请æ±è®°å½æ°æ® public static final String PACK_OP340A_RecordData = "PACK.OP340A.RecordData";//请æ±è®°å½æ°æ® public static final String PACK_OP340B_RecordData = "PACK.OP340B.RecordData";//请æ±è®°å½æ°æ® /** * OP350 */ public static final String PACK_OP350_RecordData = "PACK.OP350.RecordData";//请æ±è®°å½æ°æ® public static final String PACK_OP350A_RecordData = "PACK.OP350A.RecordData";//请æ±è®°å½æ°æ® public static final String PACK_OP350B_RecordData = "PACK.OP350B.RecordData";//请æ±è®°å½æ°æ® /** * OP360 */ jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -37,14 +37,16 @@ //æ°èªå¨å·¥ç« public List<String> automaticList = Arrays.asList("OP280", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470"); //èªå¨å·¥ä½ // public List<String> automaticList = Arrays.asList("OP300","OP280", "OP320A","OP320B", "OP340", "OP350", "OP360","OP370", "OP390", "OP470", "OP530", "OP540"); //éé模ç»å·¥ä½ ModuleCode public List<String> moduleCodeList = Arrays.asList("OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); //éé模ç»å·¥ä½ public List<String> moduleCodeList = Arrays.asList("OP300","OP310", "OP340", "OP350", "OP330"); //åºå模ç»åå·å·¥ä½ public List<String> distinguishingModules = Arrays.asList("OP300","OP310", "OP340", "OP350", "OP330"); //åºåpackåå·çå·¥ä½ public List<String> packIdList = Arrays.asList("OP280"); public List<String> packIdList = Arrays.asList("OP280","OP360","OP390","OP470"); //空ç public List<String> nullList = Arrays.asList("OP250","OP260"); @@ -112,7 +114,7 @@ //èªå¨å·¥ä½ if(automaticList.stream().anyMatch(s -> s.equals(device))){ //plcç»æ们ä¸ä¸ªæ¨¡ç»ç ï¼æ¿æ¨¡ç»ç æ ¡éªåºåå· if(moduleCodeList.stream().anyMatch(s -> s.equals(device))) { if(distinguishingModules.stream().anyMatch(s -> s.equals(device))) { //读模ç»ç String moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue().toString(); String productTye = thoroughfare + "." + device + ".ProductType"; @@ -130,6 +132,12 @@ } else { miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build()); } }else { //pack å¦æåºååå·çè¯å°±è¦å¤ç //è®°å½æ°æ®å®æ String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build()); } }else { //æå¨å·¥ä½å¤çé»è¾ @@ -217,8 +225,6 @@ String workOrderNo = ""; String productCode = ""; //2ãä¿åè¿ç«ééæ°æ® // String workOrderNo = miloService.readFromOpcUa(thoroughfare + "." + device + "." + "WorkOrderNumber").getValue().toString(); // String productCode = miloService.readFromOpcUa(thoroughfare + "." + device + "." + "ProductType").getValue().toString(); Object orderNumberObject = miloService.readFromOpcUa(thoroughfare + "." + device + "." + "WorkOrderNumber").getValue(); if(orderNumberObject!=null){ workOrderNo = orderNumberObject.toString(); jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/controller/TestClass.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,13 @@ package com.jcdm.main.restful.factoryMes.controller; import com.jcdm.main.restful.factoryMes.service.RestfulService; import java.text.SimpleDateFormat; import java.util.*; public class TestClass { public static void main(String[] args) { // System.out.println(RestfulService.getProductionWorkOrderRequest("0RSPA001111111E4T0000003","POP010")); System.out.println(RestfulService.getWorkReportResultFeedback("0RSPA001111111E4T0000003","POP010","2024-04-26 09:38:03")); } } jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/controller/testClass.java
ÎļþÒÑɾ³ý jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java
@@ -11,11 +11,11 @@ System.out.println(str.length()); } public static final String getRealmName = "https://imes-test-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; public static final String siteCode = "9786"; public static final String siteCode = "3983"; /** * ç产工å请æ±æ¥å£