|
@@ -179,17 +179,17 @@ limit 10
|
|
|
),
|
|
|
t102 as (
|
|
|
select
|
|
|
- building_id,
|
|
|
- sum(amount) as maintenance_cost
|
|
|
+ jz_jzid as building_id,
|
|
|
+ sum(final_cost) as maintenance_cost
|
|
|
from
|
|
|
- house.building_repair_main_month
|
|
|
+ house.building_repair_month
|
|
|
where
|
|
|
repair_type != '财务预提冲销'
|
|
|
- and exists (select 1 from t101 where t101.building_id = house.building_repair_main_month.building_id)
|
|
|
+ and exists (select 1 from t101 where t101.building_id = house.building_repair_month.jz_jzid)
|
|
|
and year_month >= #{dto.startDate}
|
|
|
and year_month <= #{dto.endDate}
|
|
|
group by
|
|
|
- building_id
|
|
|
+ jz_jzid
|
|
|
),
|
|
|
t103 as (
|
|
|
select
|
|
@@ -249,17 +249,17 @@ order by
|
|
|
),
|
|
|
t103 as (
|
|
|
select
|
|
|
- building_id,
|
|
|
- sum(amount) as maintenance_cost
|
|
|
+ jz_jzid as building_id,
|
|
|
+ sum(final_cost) as maintenance_cost
|
|
|
from
|
|
|
- house.building_repair_main_month
|
|
|
+ house.building_repair_month
|
|
|
where
|
|
|
repair_type != '财务预提冲销'
|
|
|
- and exists (select 1 from t102 where t102.building_id = house.building_repair_main_month.building_id)
|
|
|
+ and exists (select 1 from t102 where t102.building_id = house.building_repair_month.jz_jzid)
|
|
|
and year_month >= #{dto.startDate}
|
|
|
and year_month <= #{dto.endDate}
|
|
|
group by
|
|
|
- building_id
|
|
|
+ jz_jzid
|
|
|
),
|
|
|
t104 as (
|
|
|
select
|
|
@@ -512,17 +512,17 @@ order by
|
|
|
),
|
|
|
t102 as (
|
|
|
select
|
|
|
- building_id,
|
|
|
- sum(amount) as maintenance_cost
|
|
|
+ jz_jzid as building_id,
|
|
|
+ sum(final_cost) as maintenance_cost
|
|
|
from
|
|
|
- house.building_repair_main_month
|
|
|
+ house.building_repair_month
|
|
|
where
|
|
|
repair_type != '财务预提冲销'
|
|
|
- and exists (select 1 from t101 where t101.building_id = house.building_repair_main_month.building_id)
|
|
|
+ and exists (select 1 from t101 where t101.building_id = house.building_repair_month.jz_jzid)
|
|
|
and year_month >= #{dto.startDate}
|
|
|
and year_month <= #{dto.endDate}
|
|
|
group by
|
|
|
- building_id
|
|
|
+ jz_jzid
|
|
|
),
|
|
|
t103 as (
|
|
|
select
|
|
@@ -575,17 +575,17 @@ order by
|
|
|
),
|
|
|
t102 as (
|
|
|
select
|
|
|
- building_id,
|
|
|
- sum(amount) as maintenance_cost
|
|
|
+ jz_jzid as building_id,
|
|
|
+ sum(final_cost) as maintenance_cost
|
|
|
from
|
|
|
- house.building_repair_main_month
|
|
|
+ house.building_repair_month
|
|
|
where
|
|
|
repair_type != '财务预提冲销'
|
|
|
- and exists (select 1 from t101 where t101.building_id = house.building_repair_main_month.building_id)
|
|
|
+ and exists (select 1 from t101 where t101.building_id = house.building_repair_month.jz_jzid)
|
|
|
and year_month >= #{dto.startDate}
|
|
|
and year_month <= #{dto.endDate}
|
|
|
group by
|
|
|
- building_id
|
|
|
+ jz_jzid
|
|
|
),
|
|
|
t103 as (
|
|
|
select
|
|
@@ -638,17 +638,17 @@ order by
|
|
|
),
|
|
|
t102 as (
|
|
|
select
|
|
|
- building_id,
|
|
|
- sum(amount) as maintenance_cost
|
|
|
+ jz_jzid as building_id,
|
|
|
+ sum(final_cost) as maintenance_cost
|
|
|
from
|
|
|
- house.building_repair_main_month
|
|
|
+ house.building_repair_month
|
|
|
where
|
|
|
repair_type != '财务预提冲销'
|
|
|
- and exists (select 1 from t101 where t101.building_id = house.building_repair_main_month.building_id)
|
|
|
+ and exists (select 1 from t101 where t101.building_id = house.building_repair_month.jz_jzid)
|
|
|
and year_month >= #{dto.startDate}
|
|
|
and year_month <= #{dto.endDate}
|
|
|
group by
|
|
|
- building_id
|
|
|
+ jz_jzid
|
|
|
),
|
|
|
t103 as (
|
|
|
select
|