From d0e719bd6bb8d2a840211d60efbb46b83d77455d Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 21 九月 2023 09:51:54 +0800
Subject: [PATCH] 添加玻璃尺寸不在范围内的提示并不允许上片

---
 springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 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 3858c8f..05b5daf 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
@@ -65,11 +65,14 @@
     //淇敼鍚岀瀛愭牸瀛愬搴�
      @Update("update storage_cage set width=width-#{width} where   cage=#{cage} and cell=#{cell};")
     void UpdataAddCage1(double width,int cage,int cell);
+    //淇敼鍚岀瀛愭牸瀛愬搴�
+     @Update("update storage_cage set state=#{state} where   state=#{oldstate};")
+    void UpdataAddCageState(int state,int oldstate);
     //淇敼鍚岀瀛愭牸瀛愬搴�(鍑虹墖)
      @Update("update storage_cage set width=width+#{width} where   cage=#{cage} and cell=#{cell};")
     void UpdataOutCage1(double width,int cage,int cell);
     //璋冩嫧鏇存崲绗煎瓙淇℃伅
-    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1 where a.id=#{id1}")
+    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth where a.id=#{id1}")
     void UpdateDBCage(int id1,int cage,int cell);
     // @Insert("insert into user(name, date, address, user_no) values (#{name}, #{date}, #{address}, #{userNo})")
     // void insert (Spian spian);
@@ -97,4 +100,8 @@
     //鏍规嵁绗煎瓙鏍煎瓙灞傛暟鑾峰彇鐜荤拑id
      @Select("select glass_id from storage_cage where cage=#{cage} and cell=#{cell} and tier=2;")
      String SelectGlassid(int cage,int cell);
+     //鏍规嵁绗煎瓙鏍煎瓙灞傛暟鑾峰彇鐜荤拑id
+     @Select("SELECT COUNT(*) FROM `storage_cage` where state=3;")
+     Integer Selectoutstate();
 }
+    
\ No newline at end of file

--
Gitblit v1.8.0