严智鑫
2024-04-09 95db3e96a9465f137fdf16540e0c5985752894c2
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
package com.mes.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mes.entity.GlassInfo;
import com.mes.entity.Tempering;
 
import java.util.List;
 
import org.apache.ibatis.annotations.*;
 
@Mapper
public interface TemperingMapper extends BaseMapper<Tempering> {
 
 
//查询该玻璃的尺寸和坐标
@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<Tempering> 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<Tempering> 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 <Tempering> SelectOutGlass();
 
 
 
}