zhoushihao
2025-09-22 d41ce9c4703807bf2607a74b8305c1d78aed4ec1
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -106,7 +106,10 @@
        from result
    </select>
    <select id="queryLackByFlowCard" resultMap="lackBaseMap">
        with relation_length as (
        with flow_card_id_info as (
            select distinct flow_card_id from hollow_big_storage_cage_details where state = 100
        ),
             relation_length as (
            select flow_card_id,
                   layer,
                   order_sort,
@@ -119,7 +122,7 @@
                   thickness,
                   films_id
            from hollow_glass_relation_info
            where flow_card_id = #{flowCardId}
                 where flow_card_id in (select flow_card_id from flow_card_id_info)
              and tempering_layout_id is null
              and tempering_feed_sequence is null
        ),
@@ -141,7 +144,9 @@
                        order_number      as order_sort,
                        count(1)          as damage_count
                 from damage
                 where process_id = #{flowCardId} and type in (8,9) and status &lt; 3
                 where process_id in (select flow_card_id from flow_card_id_info)
                   and type in (8, 9)
                   and status &lt; 3
                 group by process_id, technology_number, order_number
             ),
             result_count as (
@@ -149,6 +154,7 @@
                 from lack_count_temp t
                          left join damage_count_temp t1 on t.flow_card_id = t1.flow_card_id and t.layer = t1.layer and
                                                            t.order_sort = t1.order_sort
                 order by t.flow_card_id, t.layer
             )
        select *
        from result_count