"CONVERT(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))*12/b.BLD_AREA),DECIMAL(10,2)) MONEY "+
"CONVERT(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))/b.BLD_AREA),DECIMAL(10,2)) MONEY "+
/*"sum(if(e.WATER_MONEY is null, 0, e.WATER_MONEY)) WATER_MONEY, " +
"sum(if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)) ELEC_MONEY, " +
"sum(if(e.GAS_MONEY is null, 0, e.GAS_MONEY)) GAS_MONEY " +*/
...
...
@@ -32,7 +32,7 @@ public interface MainteDistributedRepository {
@Select("<script>"+
"select t.BLD_TP_NM,e.MON,"+
"CONVERT(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))*12/b.BLD_AREA),DECIMAL(10,2)) MONEY "+
"CONVERT(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))/b.BLD_AREA),DECIMAL(10,2)) MONEY "+
"from energy_count_m e,bus_project b,bus_build_tp t "+
"where e.PRO_ID=b.PRO_ID and b.BLD_TP_ID=t.BLD_TP_ID and e.`YEAR`=#{year} and e.`MON` < #{month} and b.BLD_ZONE_ID=#{bldZoneId} "+
"group by e.PRO_ID,t.BLD_TP_NM,e.MON order by t.BLD_TP_NM,e.MON"+
...
...
@@ -44,19 +44,19 @@ public interface MainteDistributedRepository {
"convert(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))/b.BLD_AREA),decimal(10,2)) MONEY "+
"from energy_count_m e,bus_project b,bus_build_tp t "+
"where e.PRO_ID=b.PRO_ID and b.BLD_TP_ID=t.BLD_TP_ID "+
"where e.PRO_ID=b.PRO_ID and b.BLD_TP_ID=t.BLD_TP_ID and e.MON < ${month} "+
"group by e.PRO_ID,b.PRO_NM,t.BLD_TP_NM,date_format(b.BLD_YEAR, '%Y') "+
"convert(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))/b.BLD_AREA),decimal(10,2)) MONEY "+
"from energy_count_m e,bus_project b,bus_build_tp t "+
"where e.PRO_ID=b.PRO_ID and b.BLD_TP_ID=t.BLD_TP_ID "+
"where e.PRO_ID=b.PRO_ID and b.BLD_TP_ID=t.BLD_TP_ID and e.MON < ${month} "+
"group by e.PRO_ID,b.PRO_NM,t.BLD_TP_NM,date_format(b.DEVICE_YEAR, '%Y') "+