From 7c4c17f4dadf24fff8112f2d899b992b7e1be37d Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期日, 24 三月 2024 10:01:10 +0800
Subject: [PATCH] 主界面功能修改
---
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 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 243c024..fe169a3 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
@@ -21,6 +21,9 @@
@Select("select cage,round(100-(21-sum(if(state>0,1,state)))/21*100) as cell,21-sum(if(state>0,1,state)) as state from (select cage,cell,max(state) as state from storage_cage group by cage,cell) as cages group by cage")
List<StorageCage> selectAll();
+ @Select("Select cage,sum(case when number=0 or number is null then 1 else 0 end) as cell,100-sum(case when number=0 or number is null then 1 else 0 end)/count(id)*100 as width from storage_cage group by cage")
+ List<StorageCage> selectAlls();
+
// 鏌ヨ10-6绗煎唴灞傛牸瀛愮姸鎬�
@Select("SELECT cage,state,ifnull(glasswidth/2750*2,0) as glasswidth from storage_cage where cage>5 and tier=2 order by cage desc,cell desc")
List<StorageCage> selectRack1();
@@ -239,7 +242,7 @@
void DeleteStroageCageByCell(Integer cell);
//淇敼鏍煎瓙鐜荤拑鏁伴噺
- @Update("update storage_cage set number=number+#{num} where cell=#{cell}")
+ @Update("update storage_cage set number=ifnull(number,0)+#{num} where cell=#{cell}")
void updateStroageCageByCell(Integer cell, Integer num);
//璁$畻鏍煎瓙鍐呭墿浣欏搴�
@@ -271,7 +274,7 @@
@Select("select * from flowcard where state!=2")
List<FlowCard> SelectOrderTask();
- @Select("select * from glassinfo where flowcard=#{flowcard} order by mateid,tier")
+ @Select("select gi.*,sum(sc.number) as cageno from glassinfo gi left join storage_cage sc on gi.glasstype=sc.glasstype where gi.flowcard=#{flowcard} group by gi.id order by gi.mateid,gi.tier")
List<GlassInfo> SelectOrderView(String flowcard);
@Update("update flowcard set state=#{state} where flowcard=#{flowcard}")
@@ -280,11 +283,14 @@
@Update("update flowcard set method=#{method} where flowcard=#{flowcard}")
void ModeChange(String flowcard, int method);
- @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},state=1 where state=0")
+ @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},state=1 where state<=0")
void UpdateQueue(String flowcard,double width,double height,Integer glasstype);
- @Update("update glassinfo set finishnumber=finishnumber+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{geTier}")
+ @Update("update glassinfo set finishnumber=ifnull(finishnumber,0)+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{geTier}")
void AddGlassNo(String flowcard, Integer mateid, Integer geTier);
+ // 鏌ヨ绗煎唴鐜荤拑淇℃伅
+ @Select("select * from storage_cage where cage=#{cage} order by id desc")
+ List<StorageCage> SelectStorageCageByCage(Integer cage);
}
--
Gitblit v1.8.0