From b4a4a24a65fa3f90b4d39a311918943f73e18d5d Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 07 五月 2024 22:07:35 +0800
Subject: [PATCH] 联调代码修改:写入确认字
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml | 5 ++
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/PlcHomeEdg.java | 49 +++++++++++++-----------
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml | 51 +++----------------------
3 files changed, 37 insertions(+), 68 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/PlcHomeEdg.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/PlcHomeEdg.java
index 5c0a7ab..08b144c 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/PlcHomeEdg.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/PlcHomeEdg.java
@@ -16,6 +16,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -34,7 +35,7 @@
EdgStorageCageService edgStorageCageService;
@Autowired
EdgStorageCageDetailsService edgStorageCageDetailsService;
- @Autowired
+ @Resource
private EdgStorageCageDetailsMapper edgStorageCageDetailsMapper;
private Map<String, String> mapParameter = new HashMap<String, String>();
@@ -44,28 +45,28 @@
private void initialize() {
- mapParameter.put("A06_request_word", "DB11.0"); //work
- mapParameter.put("A05_scanning_ID", "DB11.2");
- mapParameter.put("MES_confirmation_word", "DB11.40");
- mapParameter.put("A09_glass_status", "DB11.70");
- //mapParameter.put("A10_glass_status", "DB11.72");
- mapParameter.put("A09_prohibit_film_production", "DB11.74");
- mapParameter.put("A10_prohibit_film_production", "DB11.76");
- mapSettings.put("territoryPoor", 3);
- mapType.put("A06_request_word", "Word");
- mapType.put("A05_scanning_ID", "String");
- mapType.put("MES_confirmation_word", "Word");
- mapType.put("A09_glass_status", "Word");
- //mapType.put("A10_glass_status", "Word");
- mapType.put("A09_prohibit_film_production", "Word");
- mapType.put("A10_prohibit_film_production", "Word");
-// mapValue.put("A06_request_word","1");//璇锋眰瀛�
-// mapValue.put("A05_scanning_ID","7");//璇锋眰ID
-// mapValue.put("MES_confirmation_word","0");//MES鍙戦�佸瓧
-// mapValue.put("A09_glass_status","0");//A09鐜荤拑鐘舵��
-// mapValue.put("A10_glass_status","0");//A09鐜荤拑鐘舵��
-// mapValue.put("A09_prohibit_film_production","0");//A9绂佹鍑虹墖
-// mapValue.put("A10_prohibit_film_production","0");//A10绂佹鍑虹墖
+// mapParameter.put("A06_request_word", "DB11.0"); //work
+// mapParameter.put("A05_scanning_ID", "DB11.2");
+// mapParameter.put("MES_confirmation_word", "DB11.40");
+// mapParameter.put("A09_glass_status", "DB11.70");
+// //mapParameter.put("A10_glass_status", "DB11.72");
+// mapParameter.put("A09_prohibit_film_production", "DB11.74");
+// mapParameter.put("A10_prohibit_film_production", "DB11.76");
+// mapSettings.put("territoryPoor", 3);
+// mapType.put("A06_request_word", "Word");
+// mapType.put("A05_scanning_ID", "String");
+// mapType.put("MES_confirmation_word", "Word");
+// mapType.put("A09_glass_status", "Word");
+// //mapType.put("A10_glass_status", "Word");
+// mapType.put("A09_prohibit_film_production", "Word");
+// mapType.put("A10_prohibit_film_production", "Word");
+ mapValue.put("A06_request_word","1");//璇锋眰瀛�
+ mapValue.put("A05_scanning_ID","11111111111");//璇锋眰ID
+ mapValue.put("MES_confirmation_word","0");//MES鍙戦�佸瓧
+ mapValue.put("A09_glass_status","0");//A09鐜荤拑鐘舵��
+ mapValue.put("A10_glass_status","0");//A09鐜荤拑鐘舵��
+ mapValue.put("A09_prohibit_film_production","0");//A9绂佹鍑虹墖
+ mapValue.put("A10_prohibit_film_production","0");//A10绂佹鍑虹墖
}
@@ -93,6 +94,7 @@
taskCache.setCreateTime(new DateTime());
edgStorageCageDetailsMapper.updateById(edgStorageCageDetails);
taskCacheService.insertTaskCache(taskCache);
+ S7object.getinstance().plccontrol.WriteWord(mapParameter.get("MES_confirmation_word"), (short)1);
} else {
log.info("涓嶅瓨鍦ㄧ┖鏍�");
}
@@ -129,6 +131,7 @@
taskCache.setTaskType(2);
taskCache.setCreateTime(new DateTime());
taskCacheService.insertTaskCache(taskCache);
+ S7object.getinstance().plccontrol.WriteWord(mapParameter.get("MES_confirmation_word"), (short)1);
}
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml
index 63837a9..2dcebbc 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml
@@ -14,6 +14,11 @@
username: root
password: beibo.123/
driver-class-name: com.mysql.cj.jdbc.Driver
+ salve_hangzhoumes:
+ url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
+ username: sa
+ password: '!QAZ2wsx'
+ driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
cloud:
nacos:
discovery:
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
index b051f7b..a430a6f 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -1,51 +1,12 @@
server:
- port: 8081
+ port: 8085
+
spring:
- datasource:
- dynamic:
- primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master
- strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
- datasource:
- hangzhoumes:
- url: jdbc:mysql://localhost:3306/hangzhoumes?serverTimezone=GMT%2b8
- username: root
- password: beibo.123/
- driver-class-name: com.mysql.cj.jdbc.Driver
- pp:
- #url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
- url: jdbc:mysql://localhost:3306/pp?serverTimezone=GMT%2b8
- username: root
- password: beibo.123/
- driver-class-name: com.mysql.cj.jdbc.Driver
- salve_hangzhoumes:
- url: jdbc:sqlserver://localhost:1433;databasename=hangzhoumes
- username: sa
- password: beibo.123/
- driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-# pp:
-# url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
-# username: root
-# password: beibo.123/
-# driver-class-name: com.mysql.cj.jdbc.Driver
-# salve_hangzhoumes:
-# url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes
-# username: sa
-# password: beibo.123/
-# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- cloud:
- nacos:
- discovery:
- server-addr: localhost:8848
+ profiles:
+ active: dev
application:
- name: cacheGlass
- redis:
- database: 0
- host: localhost
- port: 6379
- password: 123456
- session:
- store-type: redis
+ name: unLoadGlass
mybatis-plus:
mapper-locations: classpath*:mapper/*.xml
configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
--
Gitblit v1.8.0