From fb32fb5bb4be336171dca41e62d3d6c6c5803f34 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期二, 12 十二月 2023 17:02:55 +0800
Subject: [PATCH] A01启动 B01启动 增加plc地址 单独写入
---
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
index 2a1c301..01b9e20 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -64,7 +64,7 @@
}
// 鍒ゆ柇閫変腑绗煎瓙鏄惁鏈夊悎閫傚搴︾┖鏍�
// 鏈夊悎閫傜┖鏍兼椂杩涚墖
- if (cages1 != null && cages >= 1) {
+ if (cages1 != null && cages >= 1&&storageCage2.getDisabled()==0) {
ids = cages1.getId();// 鏁版嵁搴揑D
tiers = cages1.getTier();// 鍐呭鐗�
cells = cages1.getCell();// 鏍煎瓙鍙�
@@ -87,7 +87,7 @@
//spianMapper.UpdataAddCage(orderids, glassid, widths, cage1, cells, ids-1, 2);
spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1,cells, ids-1, 2);
spianMapper.UpdataAddCage1(widths, cage1, cells);// 鍑忓皯鏍煎瓙瀹藉害
- spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString());// 鏂板浠诲姟
+ spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(),prctier);// 鏂板浠诲姟
S7control.getinstance().WriteWord(adddresslist, datas);
System.out.println("姹囨姤鏃朵换鍔" + datas);
@@ -96,7 +96,7 @@
//spianMapper.UpdataAddCage(orderids, glassid, widths, cage1, cells, ids, 2);
spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1,cells, ids, 2);
spianMapper.UpdataAddCage1(widths, cage1, cells);// 鍑忓皯鏍煎瓙瀹藉害
- spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString());// 鏂板浠诲姟
+ spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(),prctier);// 鏂板浠诲姟
S7control.getinstance().WriteWord(adddresslist, datas);
System.out.println("姹囨姤鏃朵换鍔" + datas);
@@ -152,7 +152,7 @@
spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴�
spianMapper.UpdataGlassCageState(glassid,3);//鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
- spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 鏂板浠诲姟
+ spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid,state);// 鏂板浠诲姟
// int state = spianMapper.selectGlassState(cage, cell);//鑾峰彇鏍煎瓙鏁伴噺
if (state == 2) {
spianMapper.UpdateDBCage1(cage, cell);// 灏嗗唴鐗囨暟鎹洿鏂板埌澶栫墖閲�
@@ -174,7 +174,7 @@
datas.add((short) 1);
datas.add((short) 1);
spianMapper.OverOutSlice(glassid, 1);//鏇存柊鍑虹墖闃熷垪浠诲姟鐘舵�佷负杩涜涓�
- spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 鏂板浠诲姟
+ spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid,1);// 鏂板浠诲姟
spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴�
spianMapper.UpdataGlassCageState(glassid,3);//鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
spianMapper.OverOutSlice(glassid,2);//瀹屾垚鍑虹墖闃熷垪浠诲姟
@@ -207,7 +207,7 @@
spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 鍑忓皯鏂版牸瀛愬搴�
spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴�
spianMapper.UpdataGlassCageState(glassids,3);//鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
- spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassid);// 鏂板璋冨害浠诲姟
+ spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassid,2);// 鏂板璋冨害浠诲姟
//spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 鏂板鍑虹墖浠诲姟
// 浼犺緭mes鏁版嵁,鍧愭爣锛屾暟鎹�
S7control.getinstance().WriteWord(adddresslist, datas);// 娲惧彂鍑虹墖杞︿换鍔�
@@ -231,7 +231,7 @@
datas.add((short) 2);
datas.add((short) 1);
String glassids = spianMapper.SelectGlassid(cage, cell); // 鑾峰彇琚皟鎷ㄧ殑鐜荤拑id
- spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassid);// 鏂板璋冨害浠诲姟
+ spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassid,2);// 鏂板璋冨害浠诲姟
//spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 鏂板鍑虹墖浠诲姟
spianMapper.UpdateDBCage(ids, cage, cell,2);// 灏嗗師鏍煎瓙鏁版嵁鏇存柊鍒版柊鏍煎瓙閲�
spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 鍑忓皯鏂版牸瀛愬搴�
@@ -288,4 +288,17 @@
boolean listbool = list.contains((short) 1);
return listbool;
}
+ //鏍规嵁鐜荤拑id瀹屾垚鍦ㄨ繘琛屼腑鐨勪换鍔�
+ public void overtask(String glassid){
+ spianMapper.UpdateCageOver(glassid, 0);// 鏇存敼绗煎瓙琛ㄥ嚭鐗囩姸鎬�
+ spianMapper.UpdatetaskOut(glassid); // 瀹屾垚涓婁竴娆″嚭鐗囨垨鑰呰繘鐗囦换鍔�
+ spianMapper.OverOutSlice(glassid, 2);// 瀹屾垚鍑虹墖闃熷垪浠诲姟
+ spianMapper.UpdataGlassCage(glassid,0);// 娓呴櫎鍑虹墖鏍煎瓙鐜荤拑淇℃伅
+ String barcode=spianMapper.SelectBarcode(glassid);//鑾峰彇璇ョ幓鐠冪殑閾濇id
+ spianMapper.UpdateAddQueue(glassid);//鎶婅繘鐗囩殑鐜荤拑鏇存柊鍒板嚭鐗囬槦鍒椾腑
+ int barcodeState=spianMapper.SelectOverState(barcode);//鑾峰彇璇ラ摑妗嗙殑鐘舵��
+ if(barcodeState==2){//褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁
+ spianMapper.DeleteQueue(barcode);
+ }
+ }
}
--
Gitblit v1.8.0