|
@@ -525,7 +525,7 @@
|
525
|
525
|
b.STATUS > 0
|
526
|
526
|
AND b.org_id = #{orgId}
|
527
|
527
|
AND IFNULL( b.person_type, '' ) IN ( 'estate agent', 'customer' )
|
528
|
|
- AND b.person_id NOT IN ( SELECT c.person_id FROM ta_recommend_customer c WHERE c.org_id = 84 AND person_id IS NOT NULL AND person_id != '' )
|
|
528
|
+ AND b.person_id NOT IN ( SELECT c.person_id FROM ta_recommend_customer c WHERE c.org_id = #{orgId} AND person_id IS NOT NULL AND person_id != '' )
|
529
|
529
|
<if test="startDate != null">
|
530
|
530
|
and TO_DAYS(b.create_date) >= TO_DAYS(#{startDate})
|
531
|
531
|
</if>
|
|
@@ -544,8 +544,10 @@
|
544
|
544
|
u.be_uv AS building_id
|
545
|
545
|
FROM
|
546
|
546
|
ta_uv u
|
|
547
|
+ LEFT JOIN ta_person p ON u.person_id = p.person_id
|
547
|
548
|
WHERE
|
548
|
549
|
u.tagert_type = 'project'
|
|
550
|
+ AND p.org_id = #{orgId}
|
549
|
551
|
<if test="startDate != null">
|
550
|
552
|
and TO_DAYS(u.create_date) >= TO_DAYS(#{startDate})
|
551
|
553
|
</if>
|