<?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_one,
|
t3.interval_frame_width_one,
|
t3.interval_frame_height_one,
|
t3.interval_frame_type_two,
|
t3.interval_frame_width_two,
|
t3.interval_frame_height_two,
|
t3.interval_frame_type_three,
|
t3.interval_frame_width_three,
|
t3.interval_frame_height_three,
|
t3.interval_frame_type_four,
|
t3.interval_frame_width_four,
|
t3.interval_frame_height_four,
|
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>
|