From dbe1a260848e2314b2ac36691df9cb6f2f5b9062 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期五, 15 十二月 2023 17:01:17 +0800
Subject: [PATCH] 修改理片程序
---
CanadaMes-ui/src/views/home/index.vue | 14 ++++++--------
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 4 ++--
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 10 ++++++----
springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java | 2 +-
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java | 5 +----
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 2 +-
6 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index ed730fa..bd4a6e7 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -837,7 +837,6 @@
},
created() {
this.load();
-
this.init();
}
,
@@ -885,13 +884,13 @@
}
//鏄惁鎬ュ仠
this.EmergencyStop = obj.emergencystop[0];
+ console.log(this.EmergencyStop);
//澶嶄綅鍊掕鏃�
if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
this.CountDown();
}
//鏄惁鏈夎繘鐗囪姹�
- console.log(obj.D01RequestState[0]);
this.D01RequestState = obj.D01RequestState[0];
//鏄惁鍏佽鍑虹墖
@@ -947,8 +946,6 @@
this.cageinfo = res.data.cageinfo;
});
}
-
-
this.$forceUpdate();
}.bind(this);
@@ -983,6 +980,10 @@
});
});
+ //鍔犺浇灏忚溅浣嶇疆淇℃伅
+ Loadcarlist().then(res => {
+ this.carlist = res.data.carlist;
+ });
//鍔犺浇绗煎瓙浣跨敤鎯呭喌鏁版嵁
home().then(res => {
this.tableData = res.data.list;
@@ -1011,10 +1012,7 @@
SelectAlarmmgInfo().then(res => {
this.alarm = res.data.alarmmg;
});
- //鍔犺浇灏忚溅浣嶇疆淇℃伅
- Loadcarlist().then(res => {
- this.carlist = res.data.carlist;
- });
+
//鍔犺浇纭瀵嗙爜
SelectPassword().then(res => {
this.password = res.data.password;
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 c093df8..eff75d6 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
@@ -16,7 +16,7 @@
private JdbcConnections jdbcConnections;
private SpianMapper spianMapper;
private SpianService spianService;
-
+ int aaa;
@Override
public void run() {
boolean inglassbegin = false;
@@ -48,7 +48,7 @@
boolean B02backs = spianService.listbool("DB106.62");// b02姹囨姤
StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1鐨勭幓鐠僫d
StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02鐨勭幓鐠僫d
- int aaa=1;
+
// 褰撹繘鐗囧皬杞﹀畬鎴愪换鍔℃椂
if (B01backs == true) {
// 褰揃01灏忚溅姹囨姤瀹屾垚鏃舵洿鏀圭幓鐠冪姸鎬� 涓�1
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index 8c1bf9c..abbebb4 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -147,7 +147,7 @@
// S7control.getinstance().WriteWord("DB105.16", (short) 0);
} else {
spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell());
- homeMapper.UpdateCageTask2(glassid);
+ homeMapper.DeleteByGlassID(glassid);
// S7control.getinstance().WriteWord("DB105.18", (short) 0);
}
map.put("message3", "200");
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
index 512c562..38b5b3d 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -62,10 +62,6 @@
@Update("update storage_cage set state=1 where glass_id=#{glassid} and state=2")
void UpdateCageTask1(@Param("glassid") String glassid);
- // 鎵嬪姩瀹屾垚鍑虹墖浠诲姟淇敼绗煎瓙鏁版嵁
- @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid} and state=3")
- void UpdateCageTask2(@Param("glassid") String glassid);
-
//鑾峰彇鎶ヨ淇℃伅
@Select("select id,content,timeon as timeons,endTime from alarmmg where endTime is null")
List<alarmmg> SelectAlarmmgInfo();
@@ -74,6 +70,7 @@
@Select("select * from storage_cage where position(#{cage} in ifnull(glass_id,\"\"))")
List<StorageCage> SelectCageInfo(String cage);
+ // 鎵嬪姩瀹屾垚鍑虹墖浠诲姟淇敼绗煎瓙鏁版嵁
@Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null where glass_id=#{glassid}")
void DeleteByGlassID(String glassid);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java b/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java
index 617f7d7..aeba11e 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java
@@ -60,7 +60,7 @@
if(storageCage!=null){
spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell());
}
- homeMapper.UpdateCageTask2(glassid);
+ homeMapper.DeleteByGlassID(glassid);
S7control.getinstance().WriteWord("DB105.12", (short) 0);
Map<String, Object> map = new HashMap<>();
map.put("message", "200");
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 7f56ab3..8c127a6 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
@@ -176,7 +176,7 @@
spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1);// 鏂板浠诲姟
spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴�
spianMapper.UpdataGlassCageState(glassid, 3);// 鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
- spianMapper.OverOutSlice(glassid, 2);// 瀹屾垚鍑虹墖闃熷垪浠诲姟
+ spianMapper.OverOutSlice(glassid, 1);// 鏇存柊鍑虹墖闃熷垪浠诲姟
System.out.println("鍑虹墖浠诲姟|" + datas);
outmesid(glassid, "DB105.34");// 娲惧彂鍑虹墖ID
S7control.getinstance().WriteWord(adddresslist, datas);// 娲惧彂鍑虹墖杞︿换鍔�
@@ -202,6 +202,7 @@
datas.add((short) 2);
datas.add((short) 1);
// 鏇存崲鐜荤拑鐨勭瀛�
+ spianMapper.UpdataGlassCageState(glassid, 3);// 鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
String glassids = spianMapper.SelectGlassid(cage, cell); // 鑾峰彇琚皟鎷ㄧ殑鐜荤拑id
spianMapper.UpdateDBCage(ids, cage, cell, 2);// 灏嗗師鏍煎瓙鏁版嵁鏇存柊鍒版柊鏍煎瓙閲�
spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 鍑忓皯鏂版牸瀛愬搴�
@@ -232,12 +233,12 @@
datas.add((short) 2);
datas.add((short) 1);
String glassids = spianMapper.SelectGlassid(cage, cell); // 鑾峰彇琚皟鎷ㄧ殑鐜荤拑id
+ spianMapper.UpdataGlassCageState(glassid, 3);// 鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
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);// 鍑忓皯鏂版牸瀛愬搴�
- spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴�
- //spianMapper.UpdataGlassCageState(glassids, 3);// 鏇存敼绗煎瓙琛ㄧ殑鐜荤拑鐘舵��
+ spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴�
// 浼犺緭mes鏁版嵁,鍧愭爣锛屾暟鎹�
System.out.println("鍑虹墖浠诲姟|" + datas);
S7control.getinstance().WriteWord(adddresslist, datas);// 娲惧彂鍑虹墖杞︿换鍔�
@@ -298,10 +299,11 @@
// 鏍规嵁鐜荤拑id瀹屾垚鍦ㄨ繘琛屼腑鐨勪换鍔�
public void overtask(String glassid) {
- spianMapper.UpdateCageOver(glassid, 0);// 鏇存敼绗煎瓙琛ㄥ嚭鐗囩姸鎬�
+
spianMapper.UpdatetaskOut(glassid); // 瀹屾垚涓婁竴娆″嚭鐗囨垨鑰呰繘鐗囦换鍔�
spianMapper.OverOutSlice(glassid, 2);// 瀹屾垚鍑虹墖闃熷垪浠诲姟
spianMapper.UpdataGlassCage(glassid, 0);// 娓呴櫎鍑虹墖鏍煎瓙鐜荤拑淇℃伅
+ spianMapper.UpdateCageOver(glassid, 0);// 鏇存敼绗煎瓙琛ㄥ嚭鐗囩姸鎬�
spianMapper.UpdateCageadd(glassid,1);
String barcode = spianMapper.SelectBarcode(glassid);// 鑾峰彇璇ョ幓鐠冪殑閾濇id
spianMapper.UpdateAddQueue(glassid);// 鎶婅繘鐗囩殑鐜荤拑鏇存柊鍒板嚭鐗囬槦鍒椾腑
--
Gitblit v1.8.0