Browse Source

20241030

java8
qiezi 1 year ago
parent
commit
536220793c
  1. 25
      src/main/resources/mapper/quote/QuoteDetailMapper.xml

25
src/main/resources/mapper/quote/QuoteDetailMapper.xml

@ -226,15 +226,26 @@
</if> </if>
<if test="params.list != null and params.list.size() > 0"> <if test="params.list != null and params.list.size() > 0">
and pp.part_no in (
select distinct p.part_no from part p
left join part_sub_properties_value_header ph on p.part_no = ph.part_no and p.site = ph.site and p.sourceBu = ph.bu_no and p.code_no = ph.code_no and ph.record_type = 'IP'
left join part_sub_properties_value pd on ph.part_no = pd.part_no and pd.site = ph.site and pd.bu_no = ph.bu_no and pd.code_no = ph.code_no and ph.record_type = pd.record_type
left join BU b on p.sourceBu = b.bu_no and p.site = b.site
where b.id = #{params.buId} and p.code_no = #{params.codeNo}
and pp.part_no in (SELECT distinct p.part_no
FROM part p
LEFT JOIN BU b ON p.sourceBu = b.bu_no AND p.site = b.site
INNER JOIN part_sub_properties_value_header ph
ON p.part_no = ph.part_no AND p.site = ph.site AND
p.sourceBu = ph.bu_no
AND p.code_no = ph.code_no AND ph.record_type = 'IP'
WHERE b.id = 1018
AND p.code_no = 'M01'
<foreach collection="params.list" item="item"> <foreach collection="params.list" item="item">
AND EXISTS (
SELECT 1
FROM part_sub_properties_value pd
WHERE pd.part_no = p.part_no
AND pd.site = p.site
AND pd.bu_no = p.sourceBu
AND pd.code_no = p.code_no
AND pd.record_type = 'IP'
<if test="item.propertiesItemNo != null and item.propertiesItemNo != ''"> <if test="item.propertiesItemNo != null and item.propertiesItemNo != ''">
and (pd.properties_item_no = #{item.propertiesItemNo}
and pd.properties_item_no = #{item.propertiesItemNo}
</if> </if>
<if test="item.textValue != null and item.textValue != ''"> <if test="item.textValue != null and item.textValue != ''">
and pd.text_value = #{item.textValue} and pd.text_value = #{item.textValue}

Loading…
Cancel
Save