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/InvPlaceOrderDetailDao.xml

35 lines
1.1 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.InvPlaceOrderDetailDao">
<select id="selectDetailList" resultType="com.glxp.api.res.inv.InvPlaceOrderDetailResponse">
SELECT
a1.count,
a2.relId,
bp.cpmctymc as productName,
bp.ggxh,
a2.batchNo,
a2.serialNo,
bp.measname,
bp.zczbhhzbapzbh,
bp.manufactory,
asp.name as invSpaceName,
bp.nameCode,
(select name from basic_corp where erpId = a2.supId) supName
FROM
inv_place_order_detail a1
LEFT JOIN inv_prein_product_detail a2 ON a1.CODE = a2.CODE
LEFT JOIN basic_udirel bu ON bu.id = a2.relId
LEFT JOIN basic_products bp ON bp.uuid = bu.uuid
LEFT JOIN auth_space asp on a1.invSpaceCode=asp.`code`
<where>
<if test="recordId != null and recordId != ''">
AND a1.recordId = #{recordId}
</if>
</where>
GROUP BY a1.code
</select>
</mapper>