| | |
| | | from hollow_glass_relation_info |
| | | where flow_card_id = #{flowCardId} |
| | | </select> |
| | | <select id="queryProductNameByFlowCardId" resultType="com.mes.hollow.entity.dto.OrderDetailsDTO"> |
| | | select t.product_name, t1.customer_name |
| | | from sd.order_detail t |
| | | inner join sd.order t1 on t.order_id = t1.order_id |
| | | where (t.order_id, t.order_number) = ( |
| | | select min(order_id) as order_id, min(order_number) as order_number |
| | | from pp.flow_card |
| | | where process_id = #{flowCardId} |
| | | <if test="productName != null and productName != ''"> |
| | | and t.product_name like concat('%', #{productName}, '%') |
| | | </if> |
| | | <if test="customerName != null and customerName != ''"> |
| | | and t1.customer_name like concat('%', #{customerName}, '%') |
| | | </if> |
| | | ) |
| | | limit 1 |
| | | </select> |
| | | |
| | | <update id="clearDirtyFlowCardData"> |
| | | update hollow_glass_relation_info |
| | | set glass_id = null, |
| | | tempering_layout_id = null, |
| | | tempering_feed_sequence = null, |
| | | engineer_id = null, |
| | | state = 0 |
| | | update tempering_glass_relation_info |
| | | set shelf_order = null |
| | | , state = 0 |
| | | where flow_card_id = #{flowCardId} |
| | | and layer = #{layer} |
| | | and glass_id not in ( |
| | | select glass_id |
| | | from hollow_big_storage_cage_details |
| | | and shelf_order not in ( |
| | | select shelf_order |
| | | from vertical_sheet_cage_details |
| | | where flow_card_id = #{flowCardId} |
| | | and layer = #{layer} |
| | | and state in (100, 102, 103, 104) |