wuyouming666
2024-04-03 f9d0b853c119db7ab1639fea8a7f41d7c6f75b2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.mes.mapper;
 
import com.mes.entity.DownStorageCageDetails;
import com.mes.entity.GlassInfo;
import com.mes.entity.TaskCache;
import org.apache.ibatis.annotations.*;
 
import java.util.List;
import java.util.Map;
 
@Mapper
public interface SelectInfo {
    // 玻璃信息 按ID查询
    @Select("select * from `glass_info` where id=#{id}")
    GlassInfo SelectGlassId(String id);
 
    // 钢化按工程查询
  //  @Select("select * from `v_optimize_heat_layout` where project_no=#{projeceid} ")
//    List<Tempered> SelectTemperedTerritory(String projeceid);
//
    // 切割版图按工程查询
    @Select("select * from optimize_detail where project_no=#{projeceid} ")
    List<Map> SelectCutTerritory(String projeceid);
 
    // 查询磨边信息
    @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 down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot")
    List<DownStorageCageDetails> SelectCacheLeisure();
 
    // 查询笼子内出片任务
    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_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<DownStorageCageDetails> SelectCacheOut();
 
    // 查询笼子内信息
    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot")
    List<DownStorageCageDetails> SelectCachInfo();
 
    // 查询可进此片玻璃的栅格号
    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_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<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence,
            double width);
 
    // 查询可进此片玻璃的栅格号
    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_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<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, double width);
 
    // 查询全部任务
    @Select("select * from down_glass_task")
    List<TaskCache> SelectCacheInfoAll();
 
    // 查询进片任务
    @Select("select * from down_glass_task where task_type='1' and task_stauts='0'")
    List<TaskCache> SelectInputCacheInfo();
 
    // 查询出片任务
    @Select("select * from down_glass_task where task_type='2' and task_stauts='0'")
    List<TaskCache> SelectOutCacheInfo();
 
    // 查询  A04  或 A15 最新的一片 出片任务
    @Select("select * from down_glass_task 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 down_glass_task VALUES(#{id},#{start},#{end},#{type},0,)")
    Integer insertCacheTask(String id, String start, String end, String type,double width,double height,Integer filmsId,double thickness,String flowCardId);
 
    //
    // @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);
}