wuyouming666
2023-12-05 e47aa1b3ca12923e194d6e88187d2ecdb29eb186
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -70,10 +70,10 @@
  List<alarmmg> SelectAlarmmgInfo();
  //获取理片笼内玻璃信息
  @Select("select *,concat(round(a.glasswidth),' x ',round(a.glassheight)) as lengthwidth from storage_cage as a")
  List<StorageCage> SelectCageInfo(short cage);
  @Select("select * from storage_cage where position(#{cage} in ifnull(glass_id,\"\"))")
  List<StorageCage> SelectCageInfo(String cage);
  @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid}")
  @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null where glass_id=#{glassid}")
  void DeleteByGlassID(String glassid);
  //查询小车位置
@@ -122,7 +122,7 @@
  void UpdateQueueState();
  //手动添加扫码位玻璃
  @Select("update queue set glassid='',state=0 where id=#{id}")
  @Select("update queue set glassid=null,orderid=null,listid=null,boxid=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,state=0 where id=#{id}")
  void DeleteQueueGlass(String id);
  //查询此订单在理片笼里的玻璃数
@@ -134,7 +134,7 @@
  north_glass_buffer1 SelectBoxNo(String glassid);
  //查询出片队列信息
  @Select("select * from out_slice where state=0 or state=1")
  @Select("select * from out_slice where state=0 or state=1 or state=2 order by sequence")
  List<Out_slice> SelectProductionqueue();
  //根据玻璃id查询笼内玻璃信息
@@ -143,8 +143,8 @@
  //根据玻璃id删除出片队列玻璃
  @Select("update out_slice set state=3 where id=#{id}")
  void DeleteProductionQueueGlass(Short id);
  @Select("update out_slice set state=3 where barcode=#{FrameNo} and (state=0 or state=1 or state=2)")
  void DeleteProductionQueueGlass(String id);
  //根据铝框id查询对应玻璃信息
  @Select("select * from north_glass_buffer1 where FrameBarcode=#{FrameBarcode}")
@@ -152,12 +152,20 @@
  //查询玻璃是否已存在于出片队列
  @Select("select * from out_slice where glassid=#{getbarcode} and (state=0 or state=1)")
  @Select("select * from out_slice where glassid=#{getbarcode} and (state=0 or state=1 or state=2)")
  Out_slice SelectQueueByglassid(String getbarcode);
  //添加出片队列
  @Select("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, 0, #{flip});")
  void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm);
  @Select("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`, `sequence`, `time` ,`position`) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, 0, #{flip}, #{sequence}, now(), #{position});")
  void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm, int sequence, String position);
  //出片队列调序
  @Select("update out_slice set sequence=#{sequence} where glassid=#{glassId}")
  void UpdateOutSliceSequence(String glassId,int sequence);
  //查询出片队列最大顺序
  @Select("select ifnull(max(sequence),0)+1 from out_slice ")
  Short SelectMaxSquence();
}