| | |
| | | List<StorageCage> SelectStorageCageInfo(); |
| | | |
| | | // 删除格子内玻璃信息 |
| | | @Update("update storage_cage set films=null,width=4300,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null,glass_id=null,flowcard=null,mateid=null where cell=#{cell}") |
| | | @Update("update storage_cage set films=null,width=4300,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null,glass_id=null,flowcard=null,mateid=null,tier=null where cell=#{cell}") |
| | | void DeleteStroageCageByCell(Integer cell); |
| | | |
| | | // 修改格子玻璃数量 |
| | |
| | | @Select("select * from storage_cage where cell=#{cell}") |
| | | StorageCage SelectStorageByCell(String cell); |
| | | //根据玻璃类型查询玻璃信息 |
| | | @Select("select a.shelf_rack as cage,a.load_rack as cell,b.mateid,b.width as glasswidth,b.height as glassheight,b.thickness,b.films from storage_task a left join glassinfo b on a.glasstype=b.glasstype where a.id=#{id} limit 1") |
| | | @Select("select a.shelf_rack as cage,a.load_rack as cell,b.mateid,b.width as glasswidth,b.height as glassheight,b.thickness,b.films,a.tier from storage_task a left join glassinfo b on a.glasstype=b.glasstype where a.id=#{id} limit 1") |
| | | StorageCage SelectStorageByCellGlass(Integer id); |
| | | |
| | | // 手动完成任务 |
| | | @Select("update storage_task set task_state=#{state} where id=#{id}") |
| | | void FinishTask(Integer id, int state); |
| | | //人工匹配测量查询 |
| | | @Select("select gi.* from glassinfo gi inner join flowcard fc on gi.flowcard=fc.flowcard where fc.state!=2 and fc.orderstate=1 and position(#{width} in gi.width) and position(#{height} in gi.height) and position(#{thickness} in gi.thickness) and position(#{films} in gi.films) group by gi.id") |
| | | List<GlassInfo> SelectGlassInfo(String width, String height, String thickness, String films); |
| | | @Select("select gi.* from glassinfo gi inner join flowcard fc on gi.flowcard=fc.flowcard where fc.state!=2 and fc.orderstate=1 and position(#{width} in gi.width) and position(#{height} in gi.height) and position(#{thickness} in gi.thickness) and position(#{films} in gi.films) and position(#{tier} in gi.tier) group by gi.id") |
| | | List<GlassInfo> SelectGlassInfo(String width, String height, String thickness, String films,String tier); |
| | | // @Select("select b.* from flowcard a left join glassinfo b on a.flowcard=b.flowcard INNER JOIN measuresetting c where a.orderstate=1 and a.state!=2 and b.width BETWEEN #{width} - c.errorwidth AND #{width} + c.errorwidth and b.height BETWEEN #{height} - c.errorheight AND #{height} + c.errorheight and b.films=#{films} and b.thickness=#{thickness}") |
| | | // List<GlassInfo> SelectGlassInfo(String width, String height, String thickness, String films); |
| | | |
| | | |
| | | @Update("update storage_cage set glasstype=#{glassInfo.glasstype},mateid=#{glassInfo.mateid},glass_id=#{glassInfo.glassid},flowcard=#{glassInfo.flowcard},glasswidth=#{glassInfo.width},glassheight=#{glassInfo.height},thickness=#{glassInfo.thickness},films=#{glassInfo.films},number=0 where cell=#{cell}") |
| | | @Update("update storage_cage set glasstype=#{glassInfo.glasstype},mateid=#{glassInfo.mateid},glass_id=#{glassInfo.glassid},flowcard=#{glassInfo.flowcard},glasswidth=#{glassInfo.width},glassheight=#{glassInfo.height},thickness=#{glassInfo.thickness},films=#{glassInfo.films},number=0,tier=#{glassInfo.tier} where cell=#{cell}") |
| | | void StorageCageAddGlass(String cell, GlassInfo glassInfo); |
| | | |
| | | @Select("select id,flowcard,Customer,totaltier,line,state,method,starttime,orderstate from flowcard where state!=2") |
| | |
| | | @Update("update queue set glassid=concat(#{flowcard},'-',#{tier}),flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},thickness=#{thickness},mateid=#{mateid},state=1 where state<=0") |
| | | void UpdateQueue(String flowcard, double width, double height, Integer glasstype, Double thickness, Integer tier,int mateid); |
| | | //人工匹配新增一条 |
| | | @Insert("INSERT INTO queue (flowcard,glassid,glasswidth,glassheight,glasstype,thickness,mateid,state) VALUES (#{flowcard},concat(#{flowcard},'-',#{tier}),#{width},#{height},#{glasstype},#{thickness},#{mateid},1)") |
| | | @Insert("INSERT INTO queue (flowcard,glassid,glasswidth,glassheight,glasstype,thickness,mateid,state,time) VALUES (#{flowcard},concat(#{flowcard},'-',#{tier}),#{width},#{height},#{glasstype},#{thickness},#{mateid},1,NOW())") |
| | | int AddQueue(String flowcard, double width, double height, Integer glasstype, Double thickness, Integer tier,int mateid); |
| | | //判断测量表是否有可更改的数据 |
| | | @Select("select count(*) from queue where state<1") |
| | |
| | | +" select #{flowcard}, 0, #{number}, 0, 0, 0, now(),#{Customer} where 0=( select count(*) from flowcard where flowcard=#{flowcard});") |
| | | void InsertFlowcard(String flowcard, Integer number,String Customer); |
| | | |
| | | @Delete("DELETE FROM queue WHERE id = (SELECT id FROM ( SELECT id FROM queue WHERE glasstype = #{glassId} ORDER BY time ASC LIMIT 1) AS temp);") |
| | | @Delete("DELETE FROM queue WHERE id = (SELECT id FROM ( SELECT id FROM queue WHERE state = 2 ORDER BY time ASC LIMIT 1) AS temp);") |
| | | void DeletequeueByGlassid(String glassId); |
| | | |
| | | @Select("select count(*) from flowcard where line=#{line} and state=1 and flowcard!=#{flowcard}") |
| | |
| | | @Update("UPDATE measuresetting SET `films` = #{films}, `thickness` = #{thickness} WHERE `id` = 1;") |
| | | int SaveMeasure(String films, Integer thickness); |
| | | //查询出片队列数据 |
| | | @Select("SELECT a.id,a.flowcard,customer,a.mateid,a.tier,b.films,b.thickness,b.width,b.height,a.task_state as state FROM `out_task` a left join glassinfo b on a.glasstype=b.glasstype where task_state!=1 ORDER BY task_state") |
| | | @Select("SELECT a.id,a.flowcard,customer,a.mateid,a.tier,b.films,b.thickness,b.width,b.height,a.task_state as state,shelf_rack as cell FROM `out_task` a left join glassinfo b on a.glasstype=b.glasstype where task_state!=1 ORDER BY task_state") |
| | | List<Map>SelectOutTask(); |
| | | //查询出片记录数据 |
| | | @Select(" select a.id,a.flowcard,customer,a.mateid,a.tier,b.films,b.thickness,b.width,b.height,a.task_state as state,a.shelf_rack as cell from storage_task a left join glassinfo b on a.glasstype=b.glasstype where task_type=1 ORDER BY a.id desc LIMIT 6;") |
| | | @Select(" select DISTINCT a.id,a.flowcard,customer,a.mateid,a.tier,b.films,b.thickness,b.width,b.height,a.task_state as state,a.shelf_rack as cell from storage_task a left join glassinfo b on a.glasstype=b.glasstype where task_type=1 ORDER BY a.id desc LIMIT 6;") |
| | | List<Map>SelectOutLog(); |
| | | //查询扫码数据 |
| | | @Select("select*from glassinfo a where a.flowcard=#{flowcard} and a.mateid=#{mateid} and a.tier=#{tier} LIMIT 1") |
| | | GlassInfo SelectCodeGlass(String flowcard,Integer mateid,Integer tier); |
| | | //查询出片队列的玻璃信息 |
| | | @Select("select shelf_rack from out_task where id=#{id}") |
| | | int SelectOutTaskId(Integer id); |
| | | |
| | | } |