| | |
| | | require.start_date, |
| | | require.complete_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> |
| | | 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' |
| | | <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> |
| | |
| | | require.update_time |
| | | from |
| | | aps_plate_standard_require require |
| | | left join aps_plate_standard_require_bom_order_detail detail on detail.require_id = require.id |
| | | left join aps_plate_standard_require_bom_order_detail detail on detail.require_id = require.id and detail.del_flag = '0' |
| | | </sql> |
| | | |
| | | <select id="selectApsPlanStandardRequire" parameterType="String" resultMap="ApsPlateStandardRequireResult"> |
| | | <include refid="selectApsPlateStandardRequireVo"/> |
| | | <where> |
| | | require.del_flag = '0' |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and detail.doc_no = #{workOrderNo}</if> |
| | | </where> |
| | | </select> |
| | |
| | | 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> |