zhanghl
2025-05-13 088c51472985d0325141ca8ffd406d2e8b25a5d3
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml
@@ -47,14 +47,14 @@
            require.start_date,
            require.complete_date,
            plan.order_create_time
            from aps_plate_standard_require_bom_order_detail detail
            left join aps_plate_standard_require require  on detail.require_id =require.id
            left join aps_plate_plan plan on detail.doc_no = plan.document_number
        where detail.del_flag='0'
        from aps_plate_standard_require_bom_order_detail detail
        left join aps_plate_standard_require require on detail.require_id = require.id and require.del_flag = '0'
        left join aps_plate_plan plan on detail.doc_no = plan.document_number and plan.del_flag = '0'
        where detail.del_flag='0' and require.del_flag = '0' and plan.del_flag = '0'
            <if test="workOrderNo != null  and workOrderNo != ''"> and detail.doc_no = #{workOrderNo}</if>
            <if test="requireTrackId != null  and requireTrackId != ''"> and detail.require_track_id = #{requireTrackId} </if>
            <if test="mainPartNumber != null  and mainPartNumber != ''"> and plan.main_part_number = #{mainPartNumber} </if>
            <if test="hasDelayRisk != null  and hasDelayRisk != ''"> and require.has_delay_risk = #{hasDelayRisk} </if>
            <if test="requireTrackId != null  and requireTrackId != ''"> and detail.require_track_id = '${requireTrackId}'</if>
            <if test="mainPartNumber != null  and mainPartNumber != ''"> and plan.main_part_number = #{mainPartNumber}</if>
            <if test="hasDelayRisk != null  and hasDelayRisk != ''"> and require.has_delay_risk = #{hasDelayRisk}</if>
    </select>
@@ -137,9 +137,11 @@
            min(require.start_date) as start_date,
            min(require.complete_date) as end_date
        from aps_plate_standard_require_bom_order_detail detail
            left join aps_plate_standard_require require on detail.require_id = require.id
            left join aps_plate_plan plan on detail.doc_no = plan.document_number
        where plan.id in
            left join aps_plate_standard_require require on detail.require_id = require.id and require.del_flag = '0'
            left join aps_plate_plan plan on detail.doc_no = plan.document_number and plan.del_flag = '0'
        where
            detail.del_flag = '0' and
            plan.id in
        <foreach collection="planIds" item="planId" open="(" separator="," close=")">
            #{planId}
        </foreach>