You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-spms-java/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml

44 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoOrderDetailBizDao">
<select id="filterList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse">
select io_order_detail_biz.*
from io_order_detail_biz
left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk
left join basic_products bp on bu.uuid = bp.uuid
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
<if test="relId != null">
AND bindRlFk = #{relId}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}
</if>
<if test="productName != null and productName != ''">
AND bp.cpmctymc like concat('%', #{productName}, '%')
</if>
</where>
group by io_order_detail_biz.id
</select>
<select id="filterListInv" resultType="com.glxp.api.res.inout.IoOrderInvoiceResponse">
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
LEFT JOIN io_order_detail_biz io ON bu.id = io.bindRlFk
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND ic.orderIdFk = #{orderIdFk}
</if>
</where>
GROUP BY ic.orderIdFk
</select>
</mapper>