|
|
|
@ -148,13 +148,14 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getMAInvProducts" resultType="com.glxp.api.res.inv.InvProductResponse">
|
|
|
|
|
select ip.id, bp.nameCode, bp.cpmctymc, bp.ggxh, ip.batchNo, ip.productionDate, ip.expireDate
|
|
|
|
|
select ip.id, bp.nameCode, bp.cpmctymc, bp.ggxh, ip.batchNo, ip.productionDate, ip.expireDate,basic_corp.name supName
|
|
|
|
|
from inv_product ip
|
|
|
|
|
left join inv_product_detail ipd
|
|
|
|
|
on ip.relIdFk = ipd.relId and
|
|
|
|
|
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
|
|
|
|
|
left join basic_udirel bu on bu.id = ip.relIdFk
|
|
|
|
|
left join basic_products bp on bu.uuid = bp.uuid
|
|
|
|
|
left join basic_corp on ip.supId = basic_corp.erpId
|
|
|
|
|
<where>
|
|
|
|
|
(ip.inCount - ip.outCount) > 0
|
|
|
|
|
<if test="nameCode != null and nameCode != ''">
|
|
|
|
@ -202,6 +203,9 @@
|
|
|
|
|
<if test="invSpaceCode != null and invSpaceCode != ''">
|
|
|
|
|
AND ipd.invSpaceCode = #{invSpaceCode}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="supId != null and supId != ''">-->
|
|
|
|
|
<!-- AND ipd.supId = #{supId}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
</where>
|
|
|
|
|
group by ip.id
|
|
|
|
|
</select>
|
|
|
|
|