|
@@ -38,7 +38,10 @@
|
|
|
tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
|
|
|
from sys_uptown_house suh
|
|
|
inner join sys_uptown_home suho on suho.house_id=suh.house_id
|
|
|
- INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId} and suu.unit_id > 7000
|
|
|
+ INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
|
|
|
+ <if test="unitType != null and unitType != ''">
|
|
|
+ and suu.unit_id > 7000
|
|
|
+ </if>
|
|
|
left join ms_report msr on msr.house_id = suh.house_id and
|
|
|
<if test="date!=null and date!=''">
|
|
|
msr.report_date = #{date}
|
|
@@ -164,7 +167,10 @@
|
|
|
tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId,suh.house_id as houseId
|
|
|
from sys_uptown_house suh
|
|
|
left join sys_uptown_home suho on suho.house_id=suh.house_id
|
|
|
- left JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.unit_id > 7000
|
|
|
+ left JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id
|
|
|
+ <if test="unitType != null and unitType != ''">
|
|
|
+ and suu.unit_id > 7000
|
|
|
+ </if>
|
|
|
left join ms_report msr on msr.house_id = suh.house_id
|
|
|
<if test="date!=null and date!=''">
|
|
|
and msr.report_date = #{date}
|