From f819aa0addac06d14f68526976a960c485af4cca Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 18 三月 2024 09:58:10 +0800
Subject: [PATCH] 添加主页面功能(笼子,出片任务)

---
 springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 54 insertions(+), 3 deletions(-)

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 6bb984e..be93c8b 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
@@ -3,6 +3,8 @@
 import org.apache.ibatis.annotations.*;
 
 import com.example.springboot.entity.CarPosition;
+import com.example.springboot.entity.Flowcard;
+import com.example.springboot.entity.GlassInfo;
 import com.example.springboot.entity.StorageCage;
 import com.example.springboot.entity.StorageTask;
 import com.example.springboot.entity.alarmmg;
@@ -85,9 +87,9 @@
   @Select("select dianqimima from user where id=1")
   String SelectPassword();
 
-  //鏍规嵁鐜荤拑id鏌ヨ鐞嗙墖绗间俊鎭�
-  @Select("select * from storage_cage where glass_id=#{glassid}")
-  StorageCage SelectGlassInfo(String glassid);
+  // //鏍规嵁鐜荤拑id鏌ヨ鐞嗙墖绗间俊鎭�
+  // @Select("select * from storage_cage where glass_id=#{glassid}")
+  // StorageCage SelectGlassInfo(String glassid);
 
   //鏍规嵁鐜荤拑id鏌ヨ鐞嗙墖绗间俊鎭�
   @Select("select * from storage_cage where glass_id=#{glassid}")
@@ -231,6 +233,55 @@
   //鏌ヨ鐞嗙墖绗煎唴淇℃伅
   @Select("select * from storage_cage")
   List<StorageCage> SelectStorageCageInfo();
+
+  //鍒犻櫎鏍煎瓙鍐呯幓鐠冧俊鎭�
+  @Update("update storage_cage set width=5000,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null where cell=#{cell}")
+  void DeleteStroageCageByCell(Integer cell);
+  
+  //淇敼鏍煎瓙鐜荤拑鏁伴噺
+  @Update("update storage_cage set number=number+#{num} where cell=#{cell}")
+  void updateStroageCageByCell(Integer cell, Integer num);
+
+  //璁$畻鏍煎瓙鍐呭墿浣欏搴�
+  @Update("update storage_cage set width=5000-(glasswidth+100)*number where cell=#{cell}")
+  void UpdateStroageCageWidthByCell(Integer cell);
+
+  //鏍规嵁浠诲姟绫诲瀷鑾峰彇浠诲姟
+  @Select("select * from storage_task where task_type=#{task_type} and task_state=0")
+  List<StorageTask> SelectStorageTask(int task_type);
+  
+  //鏍规嵁id浠诲姟
+  @Select("select * from storage_task where id=#{id}")
+  StorageTask SelectStorageTaskById(int id);
+
+  //鏍规嵁鏍煎瓙鏌ヨ鐜荤拑淇℃伅
+  @Select("select * from storage_cage where cell=#{cell}")
+  StorageCage SelectStorageByCell(String cell);
+
+  //鎵嬪姩瀹屾垚浠诲姟
+  @Select("update storage_task set task_state=1 where id=1429")
+  void FinishTask(Integer id);
+
+  @Select("select gi.* from glassinfo gi inner join flowcard fc on gi.flowcard=fc.flowcard where fc.state!=2 and position(#{width} in gi.width) and position(#{height} in gi.height) and position(#{thickness} in gi.thickness) and position(#{films} in gi.films) group by gi.id")
+  List<GlassInfo> SelectGlassInfo(String width,String height,String thickness,String films);
+
+  @Update("update storage_cage set glasstype=#{glassInfo.glasstype},glasswidth=#{glassInfo.width},glassheight=#{glassInfo.height},thickness=#{glassInfo.thickness},films=#{glassInfo.films},number=0 where cell=#{cell}")
+  void StorageCageAddGlass(String cell, GlassInfo glassInfo);
+
+  @Select("select * from flowcard where state!=2")
+  List<Flowcard> SelectOrderTask();
+
+  @Select("select * from glassinfo where flowcard=#{flowcard} order by mateid,tier")
+  List<GlassInfo> SelectOrderView(String flowcard);
+
+  @Update("update flowcard set state=#{state} where flowcard=#{flowcard}")
+  void ClaimTasks(String flowcard, int state);
+
+  @Update("update flowcard set method=#{method} where flowcard=#{flowcard}")
+  void ModeChange(String flowcard, int method);
+
+  @Select("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype} where state=0")
+  void UpdateQueue(String flowcard,double width,double height,Integer glasstype);
   
 
 }

--
Gitblit v1.8.0