|
@@ -47,7 +47,7 @@ where
|
|
|
from
|
|
|
house.building_month)
|
|
|
<if test="dto.city != null and dto.city != ''">
|
|
|
- and city = #{dto.city}
|
|
|
+ and area_name = #{dto.city}
|
|
|
</if>
|
|
|
)
|
|
|
select
|
|
@@ -319,14 +319,14 @@ limit 150
|
|
|
with
|
|
|
t1 as (
|
|
|
select
|
|
|
- city,
|
|
|
+ area_name,
|
|
|
sum(case when repair_type = '零星维修' then final_cost else 0 end) as odd_sum,
|
|
|
sum(final_cost) as total_sum
|
|
|
from
|
|
|
house.building_repair_month
|
|
|
where
|
|
|
- city is not null
|
|
|
- and city != ''
|
|
|
+ area_name is not null
|
|
|
+ and area_name != ''
|
|
|
and repair_type != '财务预提冲销'
|
|
|
and year_no = (
|
|
|
select
|
|
@@ -334,7 +334,7 @@ where
|
|
|
from
|
|
|
house.building_repair_month)
|
|
|
group by
|
|
|
- city
|
|
|
+ area_name
|
|
|
),
|
|
|
t2 as (
|
|
|
select
|
|
@@ -349,11 +349,11 @@ from
|
|
|
t3 as (
|
|
|
select
|
|
|
*
|
|
|
-from t2 left join house.second_unit_sort on t2.city = house.second_unit_sort.second_unit
|
|
|
+from t2 left join house.second_unit_sort on t2.area_name = house.second_unit_sort.second_unit
|
|
|
order by house.second_unit_sort.sort desc
|
|
|
)
|
|
|
select
|
|
|
- city as area_name,
|
|
|
+ area_name,
|
|
|
round(odd_sum / 10000,
|
|
|
2) as odd_sum,
|
|
|
round(total_sum / 10000,
|
|
@@ -372,8 +372,8 @@ from
|
|
|
with
|
|
|
t1 as (
|
|
|
select
|
|
|
- city,
|
|
|
- district,
|
|
|
+ area_name,
|
|
|
+ city_name,
|
|
|
sum(case when repair_type = '零星维修' then final_cost else 0 end) as odd_sum,
|
|
|
sum(final_cost) as total_sum
|
|
|
from
|
|
@@ -385,14 +385,14 @@ where
|
|
|
max(year_no)
|
|
|
from
|
|
|
house.building_repair_month)
|
|
|
- and city is not null
|
|
|
- and city != ''
|
|
|
- and district is not null
|
|
|
- and district != ''
|
|
|
- and city = #{dto.city}
|
|
|
+ and area_name is not null
|
|
|
+ and area_name != ''
|
|
|
+ and city_name is not null
|
|
|
+ and city_name != ''
|
|
|
+ and area_name = #{dto.city}
|
|
|
group by
|
|
|
- city,
|
|
|
- district
|
|
|
+ area_name,
|
|
|
+ city_name
|
|
|
),
|
|
|
t2 as (
|
|
|
select
|
|
@@ -405,7 +405,7 @@ from
|
|
|
t1
|
|
|
)
|
|
|
select
|
|
|
- district as area_name,
|
|
|
+ city_name as area_name,
|
|
|
round(odd_sum / 10000,
|
|
|
2) as odd_sum,
|
|
|
round(total_sum / 10000,
|