|
|
@@ -10,13 +10,50 @@
|
|
|
a.poid,
|
|
|
a.dPODate,
|
|
|
a.cVenCode,
|
|
|
+ b.cVenName
|
|
|
from po_main a
|
|
|
left join vendor b on a.cVenCode = b.cVenCode
|
|
|
+ <trim prefix="WHERE" prefixOverrides="and |or">
|
|
|
+ <if test="cVenName != null and cVenName != ''">
|
|
|
+ and b.cVenName like CONCAT(CONCAT('%', #{cVenName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="cVenCode != null and cVenCode != ''">
|
|
|
+ and a.cVenCode = #{cVenCode}
|
|
|
+ </if>
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and a.id = #{id}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ order by a.id desc
|
|
|
</select>
|
|
|
<!--查询供应商下的物料信息-->
|
|
|
<select id="getMarketMaterial" resultType="java.util.Map">
|
|
|
select
|
|
|
-
|
|
|
- from po_podetailinfo
|
|
|
+ a.id,
|
|
|
+ a.poid,
|
|
|
+ a.cInvCode,
|
|
|
+ a.iQuantity,
|
|
|
+ a.iUnitPrice,
|
|
|
+ b.cInvName,
|
|
|
+ b.Pcode,
|
|
|
+ a.dArriveDate
|
|
|
+ from po_podetailinfo a
|
|
|
+ left join inventory b on a.cInvCode = b.ErpCode
|
|
|
+ where a.poid = #{poid}
|
|
|
+ <if test="cInvName != null and cInvName != ''">
|
|
|
+ and b.cInvName like CONCAT(CONCAT('%', #{cInvName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="Pcode != null and Pcode != ''">
|
|
|
+ and b.Pcode like CONCAT(CONCAT('%', #{Pcode}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="cInvCode != null and cInvCode != ''">
|
|
|
+ and a.cInvCode like CONCAT(CONCAT('%', #{cInvCode}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="dArriveDate != null and dArriveDate != ''">
|
|
|
+ and a.dArriveDate like CONCAT(CONCAT('%', #{dArriveDate}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and a.id = #{id}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|