| | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.Glass; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.Queue; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | List<StorageCage> selectRack4(); |
| | | |
| | | // 根据任务类型查询当前正在出片,进片的玻璃信息 |
| | | @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage where state=#{task_type} limit 1") |
| | | @Select("select * from storage_cage where state=#{task_type}") |
| | | List<StorageCage> selectinout(@Param("task_type") Integer task_type); |
| | | |
| | | // 查询是否存在此订单 |
| | |
| | | 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),' x ',round(a.glassheight)) as lengthwidth from storage_cage as a") |
| | | 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}") |
| | |
| | | |
| | | //查询玻璃信息 |
| | | // @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};") |
| | | Glass SelectGlassByGlassID(String glassid); |
| | | @Select("SELECT ordernumber,listnumber,boxnumber,barcode,glasslength,glassheight,glasslength_mm,glassheight_mm FROM north_glass_buffer1 where barcode=#{barcode}") |
| | | north_glass_buffer1 SelectGlassByGlassID(String barcode); |
| | | |
| | | //启用/禁用理片笼格子 |
| | | @Update("update storage_cage set disabled=#{disabled} where cage=#{cage} and cell=#{cell}") |
| | | void Disabled(short cage, short cell, short disabled); |
| | | |
| | | //理片笼新增玻璃 |
| | | @Update("update storage_cage set state=1,glass_id=#{glass.glassId},order_id=#{glass.orderId},glasswidth=#{glass.width},glassheight=#{glass.height} where cage=#{cage} and cell=#{cell} and tier=#{tier}") |
| | | void Inglassid(Glass glass, short cage, short cell, short tier); |
| | | @Update("update storage_cage set state=1,glass_id=#{glass.glassId},order_id=#{glass.orderId},glasswidth=#{glass.glasswidth},glassheight=#{glass.glassheight},glasswidthmm=#{glass.glasswidthmm},glassheightmm=#{glass.glassheightmm},listid=#{glass.listId},boxid=#{glass.boxId} where cage=#{cage} and cell=#{cell} and tier=#{tier}") |
| | | void Inglassid(Queue glass, short cage, short cell, short tier); |
| | | |
| | | //查询理片笼中是否有此玻璃 |
| | | @Select("select count(*) from storage_cage where glass_id=#{glassId}") |
| | | short SelectStorageByGlassId(String glassId); |
| | | |
| | | @Select("select * from glass where orderid=#{orderid}") |
| | | List<Glass> SelectGlass(String orderid); |
| | | |
| | | //根据订单查询玻璃信息 |
| | | @Select("select * from north_glass_buffer1 where position(#{orderid} in ordernumber)") |
| | | List<north_glass_buffer1> SelectGlass(String orderid); |
| | | |
| | | //获取上片队列信息 |
| | | @Select("select * from queue where id=#{id}") |
| | | Queue GetQueueInfo(int id); |
| | | |
| | | //手动添加扫码位玻璃 |
| | | @Select("update queue set glassid=#{queue.glassId},orderid=#{queue.orderId},listId=#{queue.listId},boxId=#{queue.boxId},glasswidth=#{queue.glasswidth},glassheight=#{queue.glassheight},glasswidthmm=#{queue.glasswidthmm},glassheightmm=#{queue.glassheightmm},state=1 where id=#{id}") |
| | | void InsertQueueGlassId(Queue queue,Short id); |
| | | |
| | | //确认扫码位玻璃信息 |
| | | @Select("update queue set state=1 where id=1") |
| | | void UpdateQueueState(); |
| | | |
| | | //手动添加扫码位玻璃 |
| | | @Select("update queue set glassid='',state=0 where id=#{id}") |
| | | void DeleteQueueGlass(String id); |
| | | |
| | | //查询此订单在理片笼里的玻璃数 |
| | | @Select("select count(*) from storage_cage where order_id=#{orderid}") |
| | | Short SelectGlassNo(String orderid); |
| | | |
| | | //根据玻璃id从客户表查询数据 |
| | | @Select("select * from north_glass_buffer1 where barcode=#{glassid}") |
| | | north_glass_buffer1 SelectBoxNo(String glassid); |
| | | |
| | | //查询出片队列信息 |
| | | @Select("select * from out_slice where state=0 or state=1") |
| | | List<Out_slice> SelectProductionqueue(); |
| | | |
| | | //根据玻璃id查询笼内玻璃信息 |
| | | @Select("select * from storage_cage where glass_id=#{glassid}") |
| | | StorageCage SelectStorageGlassById(String glassid); |
| | | |
| | | |
| | | //根据玻璃id删除出片队列玻璃 |
| | | @Select("update out_slice set state=3 where id=#{id}") |
| | | void DeleteProductionQueueGlass(Short id); |
| | | |
| | | //根据铝框id查询对应玻璃信息 |
| | | @Select("select * from north_glass_buffer1 where FrameBarcode=#{FrameBarcode}") |
| | | List<north_glass_buffer1> SelectAluminumFrameInfoById(String FrameBarcode); |
| | | |
| | | |
| | | //查询玻璃是否已存在于出片队列 |
| | | @Select("select * from out_slice where glassid=#{getbarcode} and (state=0 or state=1)") |
| | | 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); |
| | | |
| | | |
| | | } |