From 03ddbc02f5f0f35354489af3badacccd993457f0 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 21 十二月 2023 11:52:09 +0800
Subject: [PATCH] 修改进出片终止功能
---
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
index f638b6c..8ef5196 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -42,7 +42,7 @@
StorageCage selectCage1(int cage1, int cell, double width);
// 鍒ゆ柇绗煎瓙鍐呯幓鐠冩暟
- @Select("select COUNT(tier)as tier from storage_cage where cage=#{cage} and cell=#{cell} and state=1;")
+ @Select("select COUNT(tier)as tier from storage_cage where cage=#{cage} and cell=#{cell} and state!=0 and state!=3;")
int selectsum(int cage, int cell);
// 瀹屾垚杩涚墖涓殑鐜荤拑鐘舵��
@@ -53,7 +53,7 @@
void UpdateCageadd(String glassid, int state);
// 鑾峰彇鐜荤拑淇℃伅
- @Select("select *,ordernumber ,glasslength_mm as glasslengthmm,glassheight_mm as glassheightmm,barcode,listnumber,boxnumber,glasslength,glassheight from north_glass_buffer1 where barcode=#{glassid}")
+ @Select("select *,ordernumber ,glasslength_mm as glasslengthmm,glassheight_mm as glassheightmm,barcode,listnumber,boxnumber,glasslength,glassheight,FrameBarcode from north_glass_buffer1 where barcode=#{glassid}")
north_glass_buffer1 selectGlass(String glassid);
// 鍑虹墖浠诲姟鏌ヨ
@@ -73,11 +73,11 @@
int selectGlassState(int cage, int cell);
// 鍒ゆ柇璇ヨ皟鎷ㄧ殑绗煎瓙
- @Select("select glass_id,cage,cell,max(state)as shu,ROUND(id/2)as prcid,id from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage),cell desc limit 1;")
- StorageCage selectGlassCage(int cage, double width, int cage1, int cage2);
+ @Select("select glass_id,cage,cell,max(state)as shu,ROUND(id/2)as prcid,id,abs(#{cell}-cell)as xuhao from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage),xuhao desc limit 1;")
+ StorageCage selectGlassCage(int cage, double width, int cage1, int cage2,int cell);
// 鍒犻櫎绗煎瓙淇℃伅(鍑虹墖)
- @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=null,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;")
+ @Update("update storage_cage as a set state=#{state},glass_id=null,FrameBarcode=null,order_id=null,glasswidth=null,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;")
void UpdataGlassCage(String glassid, int state);
// 鏀瑰彉鐜荤拑鐘舵�佷负鍑虹墖涓�
@@ -88,7 +88,7 @@
@Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};")
void UpdataAddCage(String orderid, String glassid, double width, int cage, int cell, int id, int state);
- @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{glass.ordernumber},glasswidth=#{glass.glasslengthmm},glassheight=#{glass.glassheightmm},glasswidthmm=#{glass.glasslength},glassheightmm=#{glass.glassheight},listid=#{glass.listnumber},boxid=#{glass.boxnumber} where id=#{id};")
+ @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{glass.ordernumber},glasswidth=#{glass.glasslengthmm},glassheight=#{glass.glassheightmm},glasswidthmm=#{glass.glasslength},glassheightmm=#{glass.glassheight},listid=#{glass.listnumber},boxid=#{glass.boxnumber},FrameBarcode=#{glass.FrameBarcode} where id=#{id};")
void UpdataAddCage2(String orderid, String glassid, north_glass_buffer1 glass, int cage, int cell, int id,
int state);
@@ -213,7 +213,7 @@
int SelectOutSliceshu();
// 鏇存柊鍑虹墖闃熷垪鐨勪换鍔$姸鎬�
- @Update("update out_slice set state=#{state} where glassid=#{glassid}")
+ @Update("update out_slice set state=#{state} where glassid=#{glassid} and state=1")
void OverOutSlice(String glassid, int state);
// 鑾峰彇鐜荤拑鐨勯摑妗唅d
@@ -221,7 +221,7 @@
String SelectBarcode(String glassId);
// 鑾峰彇鍑虹墖闃熷垪鐨勯摑妗嗘槸鍚﹀叏閮ㄥ畬鎴�
- @Select("select MIN(state) from out_slice where barcode=#{barcode};")
+ @Select("select count(*) from out_slice where barcode=#{barcode} and (state=1 or state=0 or state=3);")
int SelectOverState(String barcode);
// 鍒犻櫎鍑虹墖闃熷垪璇ラ摑妗嗙殑id
@@ -234,4 +234,7 @@
//鏂板鏃ュ織琛ㄦ牸
@Insert("INSERT INTO `canadames`.`log`( `text`,time) VALUES (#{logtxt},now());")
void insertlog(String logtxt);
+ //鑾峰彇璇ュ崐鍖烘槸鍚︽湁鎵ц鐨勪换鍔�
+ @Select(" select count(*) from storage_cage where state=#{state} and cage>#{cage1} and cage<#{cage2}")
+ int SelectCageTask(int state,int cage1,int cage2);
}
\ No newline at end of file
--
Gitblit v1.8.0