wuyouming666
2023-11-27 1eeafb1d1b85887bec13d693d4658fbe0770a512
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -32,7 +32,7 @@
  List<StorageCage> selectRack4();
  // 根据任务类型查询当前正在出片,进片的玻璃信息
  @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(round(a.glasswidth*b.Conversionrate,2),' x ',round(a.glassheight*b.Conversionrate,2)) as lengthwidth from storage_cage  as a,glass as b  ")
  @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,12 +87,7 @@
  StorageCage SelectGlassInfo(String glassid);
  //查询玻璃信息
//  @Select("select * from glass where glassid=#{glassid}")
  @Select("SELECT id,glassid,orderid,\n" +
          "       ROUND(width * Conversionrate, 2) AS width,\n" +
          "       ROUND(height * Conversionrate, 2) AS height\n" +
          "FROM glass\n" +
          "where glassid=#{glassid};")
 @Select("select * from glass where glassid=#{glassid}")
  Glass SelectGlassByGlassID(String glassid);
  //启用/禁用理片笼格子
@@ -107,7 +102,25 @@
  @Select("select count(*) from storage_cage where glass_id=#{glassId}")
  short SelectStorageByGlassId(String glassId);
  @Select("select * from glass where orderid=#{orderid}")
  //根据订单查询玻璃信息
  @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);
  
}