From f5e8074d44ac8c39e0a8e128b06e3c7572422810 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期六, 13 五月 2023 15:45:20 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/properties/SlaveProperties.java | 18 ++++----
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 6 +-
src/main/java/com/zy/core/thread/SiemensDevpThread.java | 29 ++------------
src/main/resources/application.yml | 30 +++++++-------
4 files changed, 32 insertions(+), 51 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index a6d75e2..a79beb9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -97,12 +97,12 @@
*/
public synchronized void generateStoreWrkFile(Integer mark) {
// 鏍规嵁杈撻�佺嚎plc閬嶅巻
- for (DevpSlave devp : slaveProperties.getDevp()) {
+ for (DevpSlave devp : slaveProperties.getDevp()) { //閬嶅巻杈撻�佺嚎
// 閬嶅巻鍏ュ簱鍙�
- for (DevpSlave.Sta inSta : devp.getInSta()) {
+ for (DevpSlave.Sta inSta : devp.getInSta()) { // 閬嶅巻鍏ュ簱鍙�
// 鑾峰彇鏉$爜鎵弿浠俊鎭�
BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode());
- if (barcodeThread == null) {
+ if (barcodeThread == null) { //濡傛灉鎵弿浠病鏈夋暟鎹紝鍒欒烦鍑烘娆″惊鐜紝閬嶅巻涓嬩竴涓叆搴撳彛鎵弿浠�
continue;
}
diff --git a/src/main/java/com/zy/core/properties/SlaveProperties.java b/src/main/java/com/zy/core/properties/SlaveProperties.java
index b2e19a4..04fb476 100644
--- a/src/main/java/com/zy/core/properties/SlaveProperties.java
+++ b/src/main/java/com/zy/core/properties/SlaveProperties.java
@@ -21,25 +21,25 @@
*/
@Data
@Configuration
-@ConfigurationProperties(prefix = "wcs-slave")
+@ConfigurationProperties(prefix = "wcs-slave") //鑾峰彇閰嶇疆鏂囦欢涓殑灞炴�у畾涔夊苟缁戝畾鍒癑ava Bean
public class SlaveProperties {
- private boolean doubleDeep;
+ private boolean doubleDeep; //鏄惁鍙屼几
- private List<Integer> doubleLocs = new ArrayList<>();
+ private List<Integer> doubleLocs = new ArrayList<>(); //鍙屼几鎺掑彿
- private int groupCount;
+ private int groupCount; //1涓爢鍨涙満璐熻矗鐨勬帓鏁�
- private List<CrnSlave> crn = new ArrayList<>();
+ private List<CrnSlave> crn = new ArrayList<>(); //鍫嗗灈鏈�
- private List<DevpSlave> devp = new ArrayList<>();
+ private List<DevpSlave> devp = new ArrayList<>(); //杈撻�佺嚎
- private List<Slave> barcode = new ArrayList<>();
+ private List<Slave> barcode = new ArrayList<>(); //鏉$爜鎵弿浠�
- private List<LedSlave> led = new ArrayList<>();
+ private List<LedSlave> led = new ArrayList<>(); //鐢佃鏈�
private List<Slave> scale = new ArrayList<>();
- private List<Slave> car = new ArrayList<>();
+ private List<Slave> car = new ArrayList<>(); //灏忚溅
}
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index b819693..b56a2cd 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -47,30 +47,13 @@
//
// }};
public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{
- add(100);add(101);add(102);add(103);
- add(104);add(105);add(106);add(107);
- add(108);add(109);add(110);add(111);
- add(112);add(113);add(114);add(115);
- add(116);add(117);add(118);add(119);
- add(120);add(121);add(122);add(123);
- add(124);add(125);add(126);add(127);
- add(128);add(129);add(130);add(131);
- add(132);add(133);add(134);add(135);
- add(136);add(137);add(138);add(139);
- add(140);add(141);add(142);add(143);
- add(144);add(145);add(146);add(147);
- add(148);add(149);add(150);add(151);
- add(152);add(153);add(154);add(155);
- add(156);add(157);add(158);
+ add(1);add(2);add(3);add(4);
+ add(5);add(6);add(7);add(8);
+ add(9);add(10);add(11);add(12);
+ add(13);
}};
- public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{
- add(200);add(201);add(202);add(203);
- add(204);add(205);add(206);add(207);
- add(208);add(209);add(210);add(211);
- add(212);add(213);add(214);add(215);
- add(216);add(217);
- }};
+
private Integer count=0;
@@ -101,8 +84,6 @@
switch (slave.getId()) {
case 1:
return staNos1;
- case 2:
- return staNos2;
default:
throw new CoolException("鏈嶅姟鍣ㄥ紓甯�");
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 36133a9..ecd4542 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -8,7 +8,7 @@
name: @pom.build.finalName@
datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- url: jdbc:sqlserver://192.168.4.15:1433;databasename=jxfyasrs
+ url: jdbc:sqlserver://192.168.4.13:1433;databasename=jxfyasrs
username: sa
password: sa@123
mvc:
@@ -47,7 +47,7 @@
# 鍫嗗灈鏈�1
crn[0]:
id: 1
- ip: 10.10.10.1
+ ip: 10.10.10.2
port: 102
rack: 0
slot: 0
@@ -57,7 +57,7 @@
# 鍫嗗灈鏈哄叆搴撶珯鐐�
crnInStn[0]:
devpPlcId: ${wcs-slave.devp[0].id}
- staNo: 010
+ staNo: 10
row: 1
bay: 1
lev: 1
@@ -71,7 +71,7 @@
# 鍫嗗灈鏈�2
crn[1]:
id: 2
- ip: 10.10.10.2
+ ip: 10.10.10.3
port: 102
rack: 0
slot: 0
@@ -81,14 +81,14 @@
# 鍫嗗灈鏈哄叆搴撶珯鐐�
crnInStn[0]:
devpPlcId: ${wcs-slave.devp[0].id}
- staNo: 006
+ staNo: 6
row: 4
bay: 1
lev: 1
# 鍫嗗灈鏈哄嚭搴撶珯鐐�
crnOutStn[0]:
devpPlcId: ${wcs-slave.devp[0].id}
- staNo: 003
+ staNo: 3
row: 5
bay: 1
lev: 1
@@ -96,30 +96,30 @@
# 杈撻�佺嚎1
devp[0]:
id: 1
- ip: 10.10.10.100
+ ip: 192.168.4.250
port: 102
rack: 0
slot: 0
# 鍏ュ簱鍙�1
inSta[0]:
- staNo: 002
+ staNo: 2
barcode: ${wcs-slave.barcode[0].id}
- backSta: 001
+ backSta: 1
led: ${wcs-slave.led[0].id}
# 绌烘澘鍏ュ簱鍙�1
emptyInSta[0]:
- staNo: 002
+ staNo: 2
barcode: ${wcs-slave.barcode[0].id}
- backSta: 001
+ backSta: 1
led: ${wcs-slave.led[0].id}
# 鎷f枡鍏ュ簱鍙�1
pickSta[0]:
- staNo: 002
+ staNo: 2
barcode: ${wcs-slave.barcode[0].id}
led: ${wcs-slave.led[0].id}
# 鍑哄簱鍙�1
outSta[0]:
- staNo: 012
+ staNo: 12
led: ${wcs-slave.led[1].id}
# 鏉$爜鎵弿浠�1
@@ -134,11 +134,11 @@
ip: 10.10.10.249
port: 5005
devpPlcId: ${wcs-slave.devp[0].id}
- staArr: 101
+ staArr: 2
# LED2
led[1]:
id: 2
ip: 10.10.10.248
port: 5005
devpPlcId: ${wcs-slave.devp[0].id}
- staArr: 109
\ No newline at end of file
+ staArr: 11
\ No newline at end of file
--
Gitblit v1.9.1