From 1eeafb1d1b85887bec13d693d4658fbe0770a512 Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期一, 27 十一月 2023 13:39:52 +0800 Subject: [PATCH] 更新PLC地址 --- springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java index f3bd4c0..a9598f5 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java +++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java @@ -32,7 +32,7 @@ List<StorageCage> selectRack4(); // 鏍规嵁浠诲姟绫诲瀷鏌ヨ褰撳墠姝e湪鍑虹墖锛岃繘鐗囩殑鐜荤拑淇℃伅 - @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage where state=#{task_type} limit 1") + @Select("select a.*,concat(round(a.glasswidth*b.conversionrate,2),' x ',round(a.glassheight*b.conversionrate,2)) as lengthwidth from storage_cage as a,conver as b where a.state=#{task_type} limit 1") List<StorageCage> selectinout(@Param("task_type") Integer task_type); // 鏌ヨ鏄惁瀛樺湪姝よ鍗� @@ -68,7 +68,7 @@ List<alarmmg> SelectAlarmmgInfo(); //鑾峰彇鐞嗙墖绗煎唴鐜荤拑淇℃伅 - @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage ") + @Select("select *,concat(round(a.glasswidth*b.conversionrate,2),' x ',round(a.glassheight*b.conversionrate,2)) as lengthwidth from storage_cage as a,conver as b ") List<StorageCage> SelectCageInfo(short cage); @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid}") @@ -87,7 +87,7 @@ StorageCage SelectGlassInfo(String glassid); //鏌ヨ鐜荤拑淇℃伅 - @Select("select * from glass where glassid=#{glassid}") + @Select("select * from glass where glassid=#{glassid}") Glass SelectGlassByGlassID(String glassid); //鍚敤/绂佺敤鐞嗙墖绗兼牸瀛� @@ -102,4 +102,25 @@ @Select("select count(*) from storage_cage where glass_id=#{glassId}") short SelectStorageByGlassId(String glassId); + //鏍规嵁璁㈠崟鏌ヨ鐜荤拑淇℃伅 + @Select("select * from glass where position(#{orderid} in orderid)") + List<Glass> SelectGlass(String orderid); + + //鑾峰彇涓婄墖闃熷垪淇℃伅 + @Select("select gl.* from queue qe inner join glass gl on qe.glassid=gl.glassid where qe.id=#{id}") + Glass GetQueueInfo(int id); + + //鎵嬪姩娣诲姞鎵爜浣嶇幓鐠� + @Select("update queue set glassid=#{glassid},state=1 where id=#{id}") + void InsertQueueGlassId(String glassid,Short id); + + //纭鎵爜浣嶇幓鐠冧俊鎭� + @Select("update queue set state=1 where id=1") + void UpdateQueueState(); + + //鎵嬪姩娣诲姞鎵爜浣嶇幓鐠� + @Select("update queue set glassid='' where id=#{id}") + void DeleteQueueGlass(String id); + + } -- Gitblit v1.8.0