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-wms-java/src/main/resources/mybatis/mapper/inv/InvMAOrderDetailDao.xml

45 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.inv.InvMAOrderDetailDao">
<select id="filterList" resultType="com.glxp.api.res.inv.InvMAOrderDetailResponse">
SELECT mad.id,
mad.orderIdFk,
mad.CODE,
mad.relId,
mad.nameCode,
mad.batchNo,
mad.productionDate,
mad.expireDate,
mad.count,
mad.maStatus,
mad.deviceStatus,
mad.remark,
mad.createTime,
mad.updateTime,
basic_products.cpmctymc productName,
basic_products.ggxh,
basic_products.zczbhhzbapzbh,
basic_products.ylqxzcrbarmc
FROM inv_ma_order_detail mad
left join inv_ma_order ma on mad.orderIdFk = ma.orderId
LEFT JOIN basic_udirel ON mad.relId = basic_udirel.id
LEFT JOIN basic_products ON basic_products.uuid = basic_udirel.uuid
left join inv_product_detail ipd on ipd.relId = mad.relId
and ipd.invCode = ma.invCode and ipd.invSpaceCode = ma.invSpaceCode
left join inv_product ip on ipd.relId = ip.relIdFk and ip.batchNo = ipd.batchNo
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND mad.orderIdFk = #{orderIdFk}
</if>
</where>
group by mad.code
</select>
<select id="selectByOrderIdAndCode" resultType="com.glxp.api.entity.inv.InvMAOrderDetailEntity">
select *
from inv_ma_order_detail
where orderIdFk = #{orderIdFk}
and code = #{code}
limit 1
</select>
</mapper>