From 06dce8797cca4884b82ce4e20cd274e151df5e31 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期二, 12 十二月 2023 09:13:28 +0800
Subject: [PATCH] 调整语言
---
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
index a94bd20..799ff79 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -1,16 +1,8 @@
package com.example.springboot.component;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Base64;
import java.util.List;
-
-import org.apache.ibatis.javassist.compiler.ast.Symbol;
import org.springframework.beans.factory.annotation.Autowired;
-
import com.example.springboot.service.JdbcConnections;
import com.example.springboot.service.SpianService;
-import com.example.springboot.entity.Glass;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.AlarmMapper;
import com.example.springboot.mapper.SpianMapper;
@@ -23,7 +15,7 @@
private JdbcConnections jdbcConnections;
private SpianMapper spianMapper;
private SpianService spianService;
-
+
@Override
public void run() {
boolean inglassbegin = false;
@@ -39,7 +31,6 @@
spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
-
// 鏍规嵁鐜荤拑id鑾峰彇璁㈠崟鍙�,鍗曠嫭鏁版嵁婧�
// try {
// north_glass_buffer1 glass = jdbcConnections.selectGlass(112);
@@ -48,7 +39,7 @@
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
-
+ //spianService.selectAll("X12345610102GV");
List<Short> datas1List = S7control.getinstance().ReadWord("DB106.24", 1);// 鑾峰彇prc杩涚墖璇锋眰鏁版嵁
List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 鑾峰彇杩涚墖杞︾姸鎬�
List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 鑾峰彇杩涚墖杞︿换鍔℃槸鍚﹀惎鍔�
@@ -59,11 +50,12 @@
StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02鐨勭幓鐠僫d
// 褰撹繘鐗囧皬杞﹀畬鎴愪换鍔℃椂
if (B01backs == true) {
- // 褰揃01灏忚溅姹囨姤瀹屾垚鏃舵洿鏀圭幓鐠冪姸鎬佷负1
+ // 褰揃01灏忚溅姹囨姤瀹屾垚鏃舵洿鏀圭幓鐠冪姸鎬� 涓�1
spianMapper.UpdateCageOver(B01glassid.toString(), 1);// 鏇存敼绗煎瓙琛ㄨ繘鐗囩姸鎬�
spianMapper.Updatetask(1, 0);// 鏇存敼杩涚墖浠诲姟鐘舵�佷负1
spianMapper.UpdatetaskOut(B01glassid.toString()); // 瀹屾垚涓婁竴娆″嚭鐗囨垨鑰呰繘鐗囦换鍔�
spianMapper.OverOutSlice(B01glassid.toString(), 2);// 瀹屾垚鍑虹墖闃熷垪浠诲姟
+ spianMapper.UpdataGlassCage(B01glassid.toString(),0);// 娓呴櫎鍑虹墖鏍煎瓙鐜荤拑淇℃伅
S7control.getinstance().WriteWord("DB106.60", (short) 0);// 鎭㈠B01灏忚溅搴旂瓟鏀逛负0
System.out.println("姹囨姤鏃禕01|" + B01glassid);
@@ -76,6 +68,7 @@
spianMapper.UpdateCageOver(B02glassid.toString(), 0);// 鏇存敼绗煎瓙琛ㄥ嚭鐗囩姸鎬�
spianMapper.UpdatetaskOut(B02glassid.toString()); // 瀹屾垚涓婁竴娆″嚭鐗囨垨鑰呰繘鐗囦换鍔�
spianMapper.OverOutSlice(B02glassid.toString(), 2);// 瀹屾垚鍑虹墖闃熷垪浠诲姟
+ spianMapper.UpdataGlassCage(B01glassid.toString(),0);// 娓呴櫎鍑虹墖鏍煎瓙鐜荤拑淇℃伅
S7control.getinstance().WriteWord("DB106.62", (short) 0);// 鎭㈠B02灏忚溅搴旂瓟鏀逛负0
// S7control.getinstance().WriteWord("DB105.50", (short) 1);//姹囨姤B02灏忚溅鏀跺埌
System.out.println("姹囨姤鏃禕02|" + B02glassid);
@@ -85,8 +78,8 @@
StringBuilder queueid1 = spianService.queGlassid("DB106.26", 14);// 鑾峰彇璇锋眰鐨刬d璺烡O1鍚屾椂娓�
// 鑾峰彇DO2鏁版嵁
StringBuilder queueid2 = spianService.queGlassid("DB103.58", 14);
- System.out.println("D01|" + queueid1);
- System.out.println("D02|" + queueid2);
+// System.out.println("D01|" + queueid1);
+// System.out.println("D02|" + queueid2);
int questate = spianMapper.Selectquecount(queueid1.toString());// 鍒ゆ柇鎵爜浣嶆槸鍚︽湁鐜荤拑宸茬‘璁�
// queueid1.toString().isEmpty()
@@ -146,7 +139,7 @@
outglassbegin = false;
}
- if (outstate == true & glass.getbarcode() != null) { // 褰撳嚭鐗囪溅绌洪棽涓旀湁鍑虹墖浠诲姟寰呭畬鎴愭椂
+ if (outstate == true & glass.getbarcode() != null&&Plchome.isAllowQueue==true) { // 褰撳嚭鐗囪溅绌洪棽涓旀湁鍑虹墖浠诲姟寰呭畬鎴愭椂
// 鍒ゆ柇鏈変袱涓嚭鐗囨垨璋冩嫧浠诲姟鏃跺苟涓斿嚭鐗噄d鍜屾湭瀹屾垚鐨勫嚭鐗囦换鍔d涓嶄竴鏍锋椂鎵ц鍑虹墖
if (!writedstrIdOut.toString().equals(glass.getbarcode().toString())) {
spianService.selectout2(glass.getbarcode().toString());
@@ -156,7 +149,7 @@
// 鍒ゆ柇褰撳墠鏄惁鏈夋湭鎵ц鐨勪换鍔�
int outnum = spianMapper.SelectOutSliceshu();
// 褰撴病鏈変换鍔℃墽琛屽苟涓斿嚭鐗囪溅绌洪棽鏃�
- if (outnum == 0 && outstate == true) {
+ if (outnum == 0 && outstate == true&&Plchome.isAllowQueue==true) {
// 鍒ゆ柇閾濇鍑虹墖闃熷垪琛ㄦ槸鍚︽湁寰呭嚭鐗囩殑鐜荤拑
String outglassid = spianMapper.SelectOutSlice();
if (outglassid != null) {
--
Gitblit v1.8.0