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
| <?xml version="1.0" encoding="UTF-8" ?>
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
| <mapper namespace="com.mes.hollow.mapper.HollowFormulaDetailsMapper">
|
|
| <select id="1" resultType="com.mes.hollow.entity.HollowBigStorageCageDetails">
| select max(sequence) as sequence, device_id, slot
| from hollow_big_storage_cage_details
| where (flow_card_id, total_layer, layer, virtual_slot) =
| (#{flowCardId}, #{totalLayer}, #{layer}, #{virtualSlot})
| and state in (0, 100, 102, 103, 104)
| group by device_id, slot
| order by sequence
| </select>
| <select id="queryFormulaDetailsByGlassId" resultType="com.mes.hollow.entity.vo.HollowGlassFormulaVO">
| select t3.id,
| t3.formula_name,
| case
| when t3.film_remove = 0 then 0
| else ifnull(t2.film_remove, 0) end as film_remove,
| t3.top_remove,
| t3.bottom_remove,
| t3.left_remove,
| t3.right_remove,
| t3.frame_one,
| t3.frame_two,
| t3.frame_three,
| t3.frame_four,
| t3.seal_insert,
| t3.cas_one,
| t3.cas_two,
| t3.cas_three,
| t3.cas_four,
| t3.interval_frame_type,
| t3.interval_frame_width,
| t3.interval_frame_height,
| t2.width,
| t2.height,
| t2.thickness
| from hollow_glass_out_relation_info t
| inner join hollow_glass_queue_info t1 on t.id = t1.relation_id
| inner join glass_info t2 on t1.glass_id = t2.glass_id
| inner join hollow_formula_details t3 on t.formula_id = t3.id
| <where>
| 1=1
| <if test="glassId != null and glassId !=''">
| and t1.glass_id = #{glassId}
| </if>
| <if test="flowCardId != null and flowCardId !=''">
| and t.flow_card_id = #{flowCardId}
| </if>
| <if test="cell != null and cell !=''">
| and t.cell = #{cell}
| </if>
| </where>
| limit 1
| </select>
| </mapper>
|
|