ZengTao
2023-12-07 d1758c1be9863a10d03928bf93a42ca1bf31d07b
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -29,7 +29,7 @@
     @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=1;")
     @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state!=0;")
     int selectsum(int cage,int cell);
     //完成进片中的玻璃状态
     @Update("update storage_cage set state=#{state} where glass_id=#{glassid};")
@@ -58,8 +58,11 @@
     StorageCage selectGlassCage(int cage,double width,int cage1,int cage2);
    //删除笼子信息(出片)
    @Update("update storage_cage as a set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=0 where cage=#{cage} and cell=#{cell} and tier=#{tier};")
    void UpdataGlassCage(String orderid,String glassid,double width,int cage,int cell,int tier,int state);
    @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=0,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;")
    void UpdataGlassCage(String glassid,int state);
     //改变玻璃状态为出片中
    @Update("update storage_cage as a set state=#{state} where glass_id=#{glassid};")
    void UpdataGlassCageState(String glassid,int state);
    //修改笼子信息(进片)
    @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};")
@@ -152,12 +155,12 @@
     @Select("select state from queue where type=1")
     int Selectqueuestate();
     //判断铝框出片表是否有玻璃需要出
     @Select("SELECT glassid FROM `out_slice` where state=0  order by id limit 1;")
     @Select("SELECT glassid FROM `out_slice` where state=0  order by sequence,id  limit 1;")
     String SelectOutSlice();
     //判断铝框出片表是否有玻璃正在出片中
     @Select("SELECT count(*) FROM `out_slice` where state=1;")
     int SelectOutSliceshu();
     //完成出片队列的任务
     //更新出片队列的任务状态
     @Update("update out_slice set state=#{state} where glassid=#{glassid}")
     void OverOutSlice(String glassid,int state);