From 0be2f95c0042bacfab5965bdf127046ad04ea488 Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期三, 20 十二月 2023 14:22:40 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes --- springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java index 1b0f721..867a94f 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java +++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java @@ -15,7 +15,7 @@ public interface SpianMapper { // 鍒ゆ柇鐩搁偦绗煎瓙鏄惁鏈夌┖鏍� - @Select("select COUNT(if(a.state1=0,cell,null))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) and disabled=0 GROUP BY cage ORDER BY cell desc LIMIT 1") + @Select("select COUNT(if(a.state1=0,cell,0))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) and disabled=0 GROUP BY cage ORDER BY cell desc LIMIT 1") int selectCage(int cage1); // @Select("(select*from storage_cage as a where a.state=0 and cage%2=0 ORDER BY @@ -42,7 +42,7 @@ 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!=0;") + @Select("select COUNT(tier)as tier from storage_cage where cage=#{cage} and cell=#{cell} and state=1;") int selectsum(int cage, int cell); // 瀹屾垚杩涚墖涓殑鐜荤拑鐘舵�� @@ -73,11 +73,11 @@ 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=0,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid} and state=3;") + @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;") void UpdataGlassCage(String glassid, int state); // 鏀瑰彉鐜荤拑鐘舵�佷负鍑虹墖涓� @@ -109,7 +109,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=2,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}") void UpdateDBCage(int id1, int cage, int cell, int tier); // @Insert("insert into user(name, date, address, user_no) values (#{name}, @@ -231,4 +231,10 @@ // 鎶婅杩涚墖鐨勭幓鐠冩洿鏂板埌鍑虹墖闃熷垪 @Select("update out_slice set state=0 where glassId=#{glassId} and state=3") void UpdateAddQueue(String glassId); -} + //鏂板鏃ュ織琛ㄦ牸 + @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); +} \ No newline at end of file -- Gitblit v1.8.0