|
@@ -9,6 +9,8 @@
|
|
|
<result column="procureFirmName" property="procureFirmName"/>
|
|
<result column="procureFirmName" property="procureFirmName"/>
|
|
|
<result column="supplyEntId" property="supplyEntId"/>
|
|
<result column="supplyEntId" property="supplyEntId"/>
|
|
|
<result column="supplyFirmName" property="supplyFirmName"/>
|
|
<result column="supplyFirmName" property="supplyFirmName"/>
|
|
|
|
|
+ <result column="agentEntId" property="agentEntId"/>
|
|
|
|
|
+ <result column="agentFirmName" property="agentFirmName"/>
|
|
|
<result column="trading" property="trading"/>
|
|
<result column="trading" property="trading"/>
|
|
|
<result column="deliveryType" property="deliveryType"/>
|
|
<result column="deliveryType" property="deliveryType"/>
|
|
|
<result column="pickupType" property="pickupType"/>
|
|
<result column="pickupType" property="pickupType"/>
|
|
@@ -55,6 +57,8 @@
|
|
|
d.firm_name AS procureFirmName,
|
|
d.firm_name AS procureFirmName,
|
|
|
e.ent_id AS supplyEntId,
|
|
e.ent_id AS supplyEntId,
|
|
|
e.firm_name AS supplyFirmName,
|
|
e.firm_name AS supplyFirmName,
|
|
|
|
|
+ if(a.agent_flag = 1, e.ent_id, null) AS agentEntId,
|
|
|
|
|
+ if(a.agent_flag = 1, e.firm_name, null) AS agentFirmName,
|
|
|
a.trading AS trading,
|
|
a.trading AS trading,
|
|
|
a.delivery_type AS deliveryType,
|
|
a.delivery_type AS deliveryType,
|
|
|
a.pickup_type AS pickupType,
|
|
a.pickup_type AS pickupType,
|
|
@@ -172,9 +176,13 @@
|
|
|
<if test="query.saleEntId != null">
|
|
<if test="query.saleEntId != null">
|
|
|
and e.ent_id = #{query.saleEntId}
|
|
and e.ent_id = #{query.saleEntId}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="query.agentFlag != null">
|
|
|
|
|
|
|
+ <if test="query.agentFlag != null and query.agentEntId == null">
|
|
|
and a.agent_flag = #{query.agentFlag}
|
|
and a.agent_flag = #{query.agentFlag}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="query.agentEntId != null">
|
|
|
|
|
+ and a.agent_flag = 1
|
|
|
|
|
+ and e.ent_id = #{query.agentEntId}
|
|
|
|
|
+ </if>
|
|
|
<if test="query.status != null">
|
|
<if test="query.status != null">
|
|
|
and a.status = #{query.status}
|
|
and a.status = #{query.status}
|
|
|
</if>
|
|
</if>
|