严智鑫
2024-03-22 814323aa300f65154c299a9f3b1c44aa6cb5e9c6
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -22,6 +22,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();
@@ -284,7 +287,7 @@
  @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);
  
  //添加出片队列
@@ -297,4 +300,7 @@
  //查询全部玻璃类型
  @Select("select CONCAT(IFNULL(width,''),'_',IFNULL(height,''),'_',IFNULL(thickness,''),'_',IFNULL(films,'')) as type,glasstype from glassinfo GROUP BY width,height,thickness,films")
  List<Map> SelectType();
  // 查询笼内玻璃信息
  @Select("select * from storage_cage where cage=#{cage} order by id desc")
  List<StorageCage> SelectStorageCageByCage(Integer cage);
}