zhoushihao
2024-04-15 fb3ceff6f250f7483e77a1ebe90b13b712bd7817
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
package com.mes.temperingglass.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
@Mapper
public interface TemperingMapper extends BaseMapper<TemperingGlassInfo> {
 
 
    //查询该玻璃的尺寸和坐标
//@Select("select *from glass_info where id=#{glassid};")
//GlassInfo SelectGlass(String glassid);
//是否可以发送进炉信号
    @Select("select count(*) from glass_info where id=#{glassid};")
    int SelectTempering(String glassid);
 
    //查询等待中的钢化版图玻璃信息
    @Select("select*from tempering_glass_info a left join (select flowcard_id,count(state)state from tempering_glass_info GROUP BY flowcard_id,state)b on a.flowcard_id=b.flowcard_id where b.state=2")
    List<TemperingGlassInfo> SelectWaitingGlass();
 
    //查询进炉中的钢化版图玻璃信息
    @Select("select*from tempering_glass_info a left join (select flowcard_id,min(state)state1 from tempering_glass_info GROUP BY flowcard_id having state1=1)b on a.flowcard_id=b.flowcard_id where b.state1=1")
    List<TemperingGlassInfo> SelectInGlass();
 
    //查询钢化后的钢化版图信息
    @Select("select*from tempering_glass_info a left join (select flowcard_id,min(state)state1 from tempering_glass_info GROUP BY flowcard_id having state1=2)b on a.flowcard_id=b.flowcard_id where b.state1=2")
    List<TemperingGlassInfo> SelectOutGlass();
 
 
}