package com.mes.taskcache.mapper;
|
|
|
import com.mes.edgstoragecage.entity.EdgStorageCageDetails;
|
import com.mes.glassinfo.entity.GlassInfo;
|
import com.mes.taskcache.entity.TaskCache;
|
import org.apache.ibatis.annotations.*;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@Mapper
|
public interface HangzhouMesMapper {
|
|
// 玻璃信息 按ID查询
|
@Select("select * from `glass_info` where id=#{id}")
|
GlassInfo selectGlassId(String id);
|
|
// 查询磨边信息
|
@Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell}")
|
List<Map> selectEdgInfo(String EndCell);
|
|
// 查询笼子内空闲
|
@Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot")
|
List<EdgStorageCageDetails> selectCacheLeisure();
|
|
// 查询笼子内出片任务
|
@Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot WHERE escd.slot IS NOT NULL order by escd.tempering_layout_id,escd.tempering_feed_sequence")
|
List<EdgStorageCageDetails> selectCacheOut();
|
|
// 查询笼子内信息
|
@Select("select esc.*,escd.id as detailsID,escd.device_id as details_device_id,escd.glass_id,escd.sequence,escd.flow_card_id,escd.glass_type,escd.width,escd.height,escd.thickness,escd.edg_width,escd.edg_height,escd.tempering_layout_id,escd.tempering_feed_sequence,escd.pattern_sequence,escd.state,escd.gap from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot")
|
List<Map> selectCachInfo();
|
|
// 查询可进此片玻璃的栅格号
|
@Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence")
|
List<EdgStorageCageDetails> selectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence, double width);
|
|
// 查询可进此片玻璃的栅格号
|
@Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id<#{tempering_layout_id} and esc.remain_width-#{width}>0 order by escd.tempering_layout_id desc,escd.tempering_feed_sequence")
|
List<EdgStorageCageDetails> selectIsExistIntoCache(Integer tempering_layout_id, double width);
|
|
// 查询全部任务
|
@Select("select * from task_cache")
|
List<TaskCache> selectCacheInfoAll();
|
|
// 查询进片任务
|
@Select("select * from task_cache where task_type='1' and task_stauts='0'")
|
List<TaskCache> selectInputCacheInfo();
|
|
// 查询出片任务
|
@Select("select * from task_cache where task_type='2' and task_stauts='0'")
|
List<TaskCache> selectOutCacheInfo();
|
|
// 查询 A09 或 A10 最新的一片 出片任务
|
@Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1")
|
GlassInfo selectLastOutCacheInfo(String EndCell);
|
|
// 修改笼子内信息
|
@Update("update")
|
Integer updateCache(@Param("id") Integer id, @Param("order_id") String order_id);
|
|
// 添加理片任务
|
@Insert("INSERT into task_cache VALUES(#{id},#{start},#{end},#{type},0)")
|
Integer insertCacheTask(String id, String start, String end, String type);
|
|
//
|
// @Insert("INSERT `order`(order_id)VALUES(#{order_id})")
|
// Integer insert(Order order);
|
//
|
// @Delete("delete from `order` where id=#{id}")
|
// Integer deleteById(@Param("id") Integer id);
|
//
|
// @Update("update `order` set order_id=#{order_id} where id=#{id}")
|
// Integer update(@Param("id") Integer id,@Param("order_id") String order_id);
|
}
|