|
|
@@ -59,15 +59,14 @@
|
|
|
ao.payment_value as paymentValue, ao.payment_type as paymentType, ao.payment_id as paymentId,
|
|
|
ao.payment_time as paymentTime, a.name, a.serial_number as achievementSerialNumber,
|
|
|
a.deleted_sign as deletedSign, a.audit_status as auditStatus, ui.username,
|
|
|
- ao.uid, oi.unit_name as unitName, a.bargaining_mode as bargainingMode,
|
|
|
+ ao.uid, a.bargaining_mode as bargainingMode,
|
|
|
a.transfer_price as transferPrice
|
|
|
from achievement_order ao
|
|
|
left join achievement a on a.id = ao.achievement_id
|
|
|
left join user_identity ui on ui.uid = ao.uid
|
|
|
- left join organization_identity oi on oi.uid = ao.uid
|
|
|
where ao.deleted_sign = 0
|
|
|
and a.deleted_sign = 0
|
|
|
- and a.owner_type= 0
|
|
|
+ and ui.username is not null
|
|
|
<if test="techBrokerId != null">
|
|
|
and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -78,8 +77,7 @@
|
|
|
and ao.uid = #{uid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="username != null">
|
|
|
- and (oi.unit_name = #{username,jdbcType=VARCHAR}
|
|
|
- or ui.username = #{username,jdbcType=VARCHAR})
|
|
|
+ and ui.username = #{username,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
order by ao.serial_number desc
|
|
|
<if test="page_sql!=null">
|
|
|
@@ -93,10 +91,9 @@
|
|
|
from achievement_order ao
|
|
|
left join achievement a on a.id = ao.achievement_id
|
|
|
left join user_identity ui on ui.uid = ao.uid
|
|
|
- left join organization_identity oi on oi.uid = ao.uid
|
|
|
where ao.deleted_sign = 0
|
|
|
and a.deleted_sign = 0
|
|
|
- and a.owner_type= 0
|
|
|
+ and ui.username is not null
|
|
|
<if test="techBrokerId != null">
|
|
|
and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -107,8 +104,7 @@
|
|
|
and ao.uid = #{uid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="username != null">
|
|
|
- and (oi.unit_name = #{username,jdbcType=VARCHAR}
|
|
|
- or ui.username = #{username,jdbcType=VARCHAR})
|
|
|
+ and ui.username = #{username,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -120,15 +116,14 @@
|
|
|
ao.payment_value as paymentValue, ao.payment_type as paymentType, ao.payment_id as paymentId,
|
|
|
ao.payment_time as paymentTime, a.name, a.serial_number as achievementSerialNumber,
|
|
|
a.deleted_sign as deletedSign, a.audit_status as auditStatus, ao.uid,
|
|
|
- oi.unit_name as unitName, ui.username, a.bargaining_mode as bargainingMode,
|
|
|
+ oi.unit_name as unitName, a.bargaining_mode as bargainingMode,
|
|
|
a.transfer_price as transferPrice
|
|
|
from achievement_order ao
|
|
|
left join achievement a on a.id = ao.achievement_id
|
|
|
- left join user_identity ui on ui.uid = ao.uid
|
|
|
left join organization_identity oi on oi.uid = ao.uid
|
|
|
where ao.deleted_sign = 0
|
|
|
and a.deleted_sign = 0
|
|
|
- and a.owner_type= 1
|
|
|
+ and oi.unit_name is not null
|
|
|
<if test="techBrokerId != null">
|
|
|
and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -139,8 +134,7 @@
|
|
|
and ao.uid = #{uid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="unitName != null">
|
|
|
- and (oi.unit_name = #{unitName,jdbcType=VARCHAR}
|
|
|
- or ui.username = #{unitName,jdbcType=VARCHAR})
|
|
|
+ and oi.unit_name = #{unitName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
order by ao.serial_number desc
|
|
|
<if test="page_sql!=null">
|
|
|
@@ -153,11 +147,10 @@
|
|
|
count(1)
|
|
|
from achievement_order ao
|
|
|
left join achievement a on a.id = ao.achievement_id
|
|
|
- left join user_identity ui on ui.uid = ao.uid
|
|
|
left join organization_identity oi on oi.uid = ao.uid
|
|
|
where ao.deleted_sign = 0
|
|
|
and a.deleted_sign = 0
|
|
|
- and a.owner_type= 1
|
|
|
+ and oi.unit_name is not null
|
|
|
<if test="techBrokerId != null">
|
|
|
and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -168,8 +161,7 @@
|
|
|
and ao.uid = #{uid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="unitName != null">
|
|
|
- and (oi.unit_name = #{unitName,jdbcType=VARCHAR}
|
|
|
- or ui.username = #{unitName,jdbcType=VARCHAR})
|
|
|
+ and oi.unit_name = #{unitName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
</mapper>
|