| | |
| | | package com.example.springboot.mapper; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | @Repository |
| | | public interface AlbaniaMapper { |
| | | //判断笼内是否有合适的类型空格 |
| | | @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and state=0 order by id limit 1") |
| | | @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and state=0 and disabled=0 order by id limit 1") |
| | | int SelectCage(int glasstype,Double width,int widths); |
| | | //判断笼内没有玻璃的空格 |
| | | @Select("select id from storage_cage where number=0 and cage>#{cage} and cage<#{cage2} order by id limit 1") |
| | | @Select("select id from storage_cage where number=0 and cage>#{cage} and cage<#{cage2} and disabled=0 order by id limit 1") |
| | | int SelectNewCell(int cage,int cage2); |
| | | //增加玻璃数 |
| | | @Update("update storage_cage set number=number+1,width=width-glasswidth where id=#{id}") |
| | |
| | | @Update("UPDATE `albania`.`storage_cage` SET `glass_id` =#{glassid}, `width` =width-#{glasswidth}, `glasswidth` =#{glasswidth}, `glassheight` =#{glassheight}, `glasswidthmm` =#{glasswidthmm}, `glassheightmm` = #{glassheightmm}, `state` = #{state}, `glasstype` = #{glasstype}, `number` = #{number} WHERE `id` =#{id};") |
| | | void AddCage(int id,String glassid,Double glasswidth,Double glassheight,Double glasswidthmm,Double glassheightmm,int state,int glasstype,int number); |
| | | //获取进片数据 |
| | | @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where state=0 limit 1") |
| | | @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where state=1 limit 1") |
| | | GlassInfo SelectGlass(); |
| | | //一号线查询任务 |
| | | @Select("select * from v_cagerelease1 where mateid not in(select mateid from v_cagerelease1 where surplus=0 group by mateid);") |
| | |
| | | //发送出片后增加已发数量 |
| | | @Update("update glassinfo set finishnumber=finishnumber+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{tier};") |
| | | void AddFinishNumber(String flowcard,int mateid,int tier); |
| | | //获取当前任务的id |
| | | @Select("select id from storage_task where state=0 glassid=#{glassid} LIMIT 1") |
| | | int SelectTaskId(String glassid); |
| | | //删除测量表的信息 |
| | | @Delete("delete from queue where glassid=#{glassid}") |
| | | int DeleteQueue(String glassid); |
| | | |
| | | |
| | | |
| | | } |