wu
2023-12-20 0be2f95c0042bacfab5965bdf127046ad04ea488
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -73,8 +73,8 @@
    int selectGlassState(int cage, int cell);
    // 判断该调拨的笼子
    @Select("select glass_id,cage,cell,max(state)as shu,ROUND(id/2)as prcid,id from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage),cell desc  limit 1;")
    StorageCage selectGlassCage(int cage, double width, int cage1, int cage2);
    @Select("select glass_id,cage,cell,max(state)as shu,ROUND(id/2)as prcid,id,abs(#{cell}-cell)as xuhao from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage),xuhao desc  limit 1;")
    StorageCage selectGlassCage(int cage, double width, int cage1, int cage2,int cell);
    // 删除笼子信息(出片)
    @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=null,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;")
@@ -234,4 +234,7 @@
    //新增日志表格
    @Insert("INSERT INTO `canadames`.`log`( `text`,time) VALUES (#{logtxt},now());")
    void insertlog(String logtxt);
    //获取该半区是否有执行的任务
    @Select(" select count(*) from storage_cage where state=#{state} and cage>#{cage1} and cage<#{cage2}")
    int SelectCageTask(int state,int cage1,int cage2);
}