@@ -32,8 +32,13 @@ public interface ReportRepository {
...
@@ -32,8 +32,13 @@ public interface ReportRepository {
* @param params
* @param params
* @return
* @return
*/
*/
@Select("<script>select t.DEV_NUM,t.TM,t.ORIGINAL_STR,s.SENSOR_JSON,m.ELEC,m.GAS from total_original t "+
// @Select("<script>select t.DEV_NUM,t.TM,t.ORIGINAL_STR,s.SENSOR_JSON,m.ELEC,m.GAS from total_original t " +
"left join (select d.DEV_NUM,m.CREATE_TIME TM,m.ELEC,m.GAS from energy_count_m m,bus_device_meter d where m.PRO_ID=d.PRO_ID and m.MET_NUM=d.MET_NUM) m on t.TM=m.TM and t.DEV_NUM=m.DEV_NUM "+
// "left join (select d.DEV_NUM,m.CREATE_TIME TM,m.ELEC,m.GAS from energy_count_m m,bus_device_meter d where m.PRO_ID=d.PRO_ID and m.MET_NUM=d.MET_NUM) m on t.TM=m.TM and t.DEV_NUM=m.DEV_NUM " +
// "left join total_sensor s on t.TM=s.TM and t.PRO_ID=s.PRO_ID " +
// "where t.WATER_V is null and t.ELEC_V is null and t.GAS_V is null " +
// "and t.PRO_ID=#{proId} and date_format(t.TM, '%Y-%c-%e')=#{time} " +
// "order by t.DEV_NUM,t.TM</script>")
@Select("<script>select t.DEV_NUM,t.TM,t.ORIGINAL_STR,s.SENSOR_JSON from total_original t "+
"left join total_sensor s on t.TM=s.TM and t.PRO_ID=s.PRO_ID "+
"left join total_sensor s on t.TM=s.TM and t.PRO_ID=s.PRO_ID "+
"where t.WATER_V is null and t.ELEC_V is null and t.GAS_V is null "+
"where t.WATER_V is null and t.ELEC_V is null and t.GAS_V is null "+
"and t.PRO_ID=#{proId} and date_format(t.TM, '%Y-%c-%e')=#{time} "+
"and t.PRO_ID=#{proId} and date_format(t.TM, '%Y-%c-%e')=#{time} "+