wuyouming666
2024-01-12 f9163b89a69f20289eb5bec62d31ecc7e43988f1
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -94,7 +94,7 @@
    void UpdataOutCage1(double width, int cage, int cell);
    // 调拨更换笼子信息
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid where a.id=#{id1}")
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid,a.FrameBarcode=b.FrameBarcode where a.id=#{id1}")
    void UpdateDBCage(int id1, int cage, int cell, int tier);
    // @Insert("insert into user(name, date, address, user_no) values (#{name},
@@ -117,11 +117,11 @@
    String SelectOrderout();
    // 内外片调换
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=1)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid where a.cage=#{cage} and a.cell=#{cell} and a.tier=2")
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=1)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid,a.FrameBarcode=b.FrameBarcode where a.cage=#{cage} and a.cell=#{cell} and a.tier=2")
    void UpdateDBCage1(int cage, int cell);
    // 清除内片数据
    @Update("update storage_cage a set glass_id='',order_id='',state=0,glasswidth=0,glassheight=0,glasswidthmm=0,glassheightmm=0,listid=null,boxid=null where a.cage=#{cage} and a.cell=#{cell} and a.tier=1;")
    @Update("update storage_cage a set glass_id=null,order_id=null,state=0,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null,FrameBarcode=null where a.cage=#{cage} and a.cell=#{cell} and a.tier=1;")
    void UpdateDBCage2(int cage, int cell);
    // 判断是否有调拨完后出片的任务
@@ -190,12 +190,15 @@
    int Selectqueuestate();
    // 判断铝框出片表是否有玻璃需要出
    @Select("SELECT glassid FROM `out_slice` where state=0  order by sequence,id  limit 1;")
    @Select("SELECT glassid FROM `out_slice` where state=0 and framestate!=1 order by sequence,id  limit 1;")
    String SelectOutSlice();
    // 判断铝框出片表是否有玻璃正在出片中
    @Select("SELECT count(*) FROM `out_slice` where state=1;")
    int SelectOutSliceshu();
    //判断是否有调拨任务未完成
    @Select("SELECT count(*) FROM `storage_cage` where state=#{state};")
    int Selectcageout(int state);
    // 更新出片队列的任务状态
    @Update("update out_slice set state=#{state} where glassid=#{glassid} and state=#{state2}")
@@ -222,4 +225,7 @@
    //获取该半区是否有执行的任务
    @Select(" select count(*) from storage_cage where state=#{state} and cage>#{cage1} and cage<#{cage2}")
    int SelectCageTask(int state,int cage1,int cage2);
    //判断玻璃是否禁用
    @Select(" select disabled from storage_cage where glass_id=#{glassid} limit 1;")
    int SelectCageGlassState(String glassid);
}