fix:应付单关联采购单bug处理
parent
43fc48a3a5
commit
6e6d29511c
|
|
@ -353,13 +353,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectPurcahseNoByPayableBillCode" resultType="java.lang.String">
|
<select id="selectPurcahseNoByPayableBillCode" resultType="java.lang.String">
|
||||||
select group_concat(distinct concat(t4.purchase_no,'__',t4.id)) as purchase_no
|
select group_concat(distinct concat(t3.purchase_no,'__',t3.id)) as purchase_no
|
||||||
from oms_payable_bill as t1
|
from (
|
||||||
inner join oms_inventory_info as t2 on t1.inventory_code = t2.outer_code
|
select tt1.payable_bill_code, tt2.inner_code
|
||||||
inner join oms_purchase_order_item as t3 on t2.product_code = t3.product_code
|
from oms_payable_bill as tt1
|
||||||
inner join oms_purchase_order as t4 on t3.purchase_id = t4.id
|
inner join oms_inventory_info as tt2 on tt1.inventory_code = tt2.outer_code or tt1.inventory_code = tt2.inner_code
|
||||||
where t1.payable_bill_code = #{payableBillCode}
|
where tt1.payable_bill_code = #{payableBillCode}
|
||||||
group by t1.payable_bill_code
|
group by tt1.payable_bill_code, tt2.inner_code
|
||||||
|
) as t1
|
||||||
|
inner join oms_inventory_inner as t2 on t1.inner_code = t2.inner_code
|
||||||
|
inner join oms_purchase_order as t3 on t2.purchase_no = t3.purchase_no
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue