|
|
|
@ -12,18 +12,30 @@
|
|
|
|
|
|
|
|
|
|
<select id="selectOrderInvoice" parameterType="com.glxp.api.req.inout.IoOrderInvoiceRequest"
|
|
|
|
|
resultType="com.glxp.api.entity.inout.IoOrderInvoiceEntity">
|
|
|
|
|
select *
|
|
|
|
|
from io_order_invoice
|
|
|
|
|
SELECT ic.*,
|
|
|
|
|
(select cpmctymc from basic_products where basic_products.uuid = bu.uuid) cpmctymc,
|
|
|
|
|
(select ggxh from basic_products where basic_products.uuid = bu.uuid) ggxh
|
|
|
|
|
FROM io_order_invoice ic
|
|
|
|
|
LEFT JOIN basic_udirel bu ON bu.id = ic.bindRlFk
|
|
|
|
|
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
AND id = #{id}
|
|
|
|
|
<if test="orderIdFk != null and orderIdFk != ''">
|
|
|
|
|
AND ic.orderIdFk = #{orderIdFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bizIdFk != null">
|
|
|
|
|
AND bizIdFk = #{bizIdFk}
|
|
|
|
|
<if test="orderIdFk == null || orderIdFk == ''">
|
|
|
|
|
AND (ic.orderIdFk is null or ic.orderIdFk = '')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderIdFk != null and orderIdFk != ''">
|
|
|
|
|
AND orderIdFk = #{orderIdFk}
|
|
|
|
|
<if test="bindRlFk != null">
|
|
|
|
|
AND ic.bindRlFk = #{bindRlFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
AND ic.batchNo = #{batchNo}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="batchNo == null || batchNo == ''">
|
|
|
|
|
AND (ic.batchNo is null or ic.batchNo = '')
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY ic.id
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|