From 712b7bd7bfc09dee41a63c769a272b9ebae68c90 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 07 三月 2024 14:44:11 +0800
Subject: [PATCH] 更新代码

---
 springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java |   39 +++++++++++----------------------------
 1 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
index e33d0bb..0318b11 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
@@ -9,36 +9,19 @@
 @Mapper
 @Repository
 public interface AlbaniaMapper  {
-    // 鑾峰彇鍒ゆ柇璇ユ牸瀛愭槸鍚﹂渶瑕佹妸澶栫墖鎺ㄥ叆鍐呯墖浣嶇疆
-    @Select("select state from storage_cage where  cage=#{cage} and cell=#{cell} and tier=1;")
-    int selectcell(int cage, int cell);
-     // 鍒ゆ柇璇ョ瀛愭槸鍚︽湁鍚堥�傚搴︾┖鏍�
-    @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and disabled=0 and width>=#{width} ORDER BY cell asc,tier asc LIMIT 1")
-    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!=0 and state!=3;")
-    int selectsum(int cage, int cell);
-
-    // 瀹屾垚鍑虹墖涓殑鐜荤拑鐘舵��
-    @Update("update storage_cage set state=#{state} where glass_id=#{glassid} and state=3;")
-    void UpdateCageOver(String glassid, int state);
-    // 瀹屾垚杩涚墖涓殑鐜荤拑鐘舵��
-    @Update("update storage_cage set state=#{state} where glass_id=#{glassid} and state=2;")
-    void UpdateCageadd(String glassid, int state);
-    //鏌ヨ鏄惁鏈夎绫诲瀷鐨勪换鍔¤繕鏈畬鎴�
-     // 鍒ゆ柇鍑虹墖涓�1鏃讹紝鏄惁鍙洿鎺ュ嚭鐗�
-    @Select("select COUNT(state) from storage_cage where state=#{state}")
-    int SelectCageState(int state);
-    // 鑾峰彇鐜荤拑淇℃伅
-    @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);
     //鍒ゆ柇绗煎唴鏄惁鏈夊悎閫傜殑绫诲瀷绌烘牸
-    @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and state=0 order by id limit 1")
-    int SelectCage(int glasstype,int width,int widths);
+    @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths}  order by id limit 1")
+    int SelectCage(int glasstype,Double width,int widths);
     //鍒ゆ柇绗煎唴娌℃湁鐜荤拑鐨勭┖鏍�
-    @Select("select id from storage_cage where state=0 and number=0 order by id limit 1")
-    int SelectNewCell();
+    @Select("select id from storage_cage where number=0 and cage>#{cage} and cage<#{cage2} order by id limit 1")
+    int SelectNewCell(int cage,int cage2);
+    //澧炲姞鐜荤拑鏁�
+    @Update("update storage_cage set number=number+1,width=width-glasswidth where id=#{id}")
+    void UpdateCageNumberAdd(int id);
+    //鍑忓皯鐜荤拑鏁�
+    @Update("update storage_cage set number=number-1,width=width+glasswidth where id=#{id}")
+    void UpdateCageNumberOut(int id);
+    
     
 
 }

--
Gitblit v1.8.0