소스 검색

自来水预测数据接口 更改返回dao层结果

1037015548@qq.com 1 년 전
부모
커밋
d082d7d13c
1개의 변경된 파일14개의 추가작업 그리고 28개의 파일을 삭제
  1. 14 28
      src/main/java/com/shkpr/service/aimodelpower/dbdao/shizilaishuiDataSource/WaterCollecationDao.java

+ 14 - 28
src/main/java/com/shkpr/service/aimodelpower/dbdao/shizilaishuiDataSource/WaterCollecationDao.java

@@ -27,7 +27,7 @@ public class WaterCollecationDao {
 
     //TODO 查询样本及预测水量表;支持是否分页
     public List<Map<String,Object>> getTbMWater(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT " +
                     " a.\"ID\",to_char(a.\"Date\", 'YYYY-MM-DD') AS \"Date\",a.\"Max_temperature\",a.\"Min_temperature\",a.\"Weather\",a.\"Month\",a.\"Week\",a.\"Holiday\",a.\"LastActualWaterWithdrawals\",a.\"LastActualWaterSupply\",a.\"ActualWaterWithdrawals\",a.\"ActualWaterSupply\",a.\"ForecastWaterWithdrawals\",a.\"ForecastActualWaterSupply\",a.\"isAbnormal\",a.\"isForecast\",a.\"LastModifyTime\",a.\"orgId\" " +
                     " FROM tb_m_water AS a WHERE 1=1 ";
@@ -40,14 +40,12 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 
     //TODO 查询小时水量预测表;支持是否分页
     public List<Map<String,Object>> getTbMHourwater(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT " +
                     " a.\"ID\",to_char(a.\"Date\", 'YYYY-MM-DD') AS \"Date\",a.\"Hour\",a.\"HourForecastWaterWithdrawals\",a.\"HourForecastActualWaterSupply\",a.\"WaterWithdrawalsEnergy\",a.\"WaterSupplyEnergy\",a.\"RealWaterWithdrawalsEnergy\",a.\"RealWaterSupplyEnergy\",a.\"LastModifyTime\",a.\"orgId\"," +
                     " a.\"HourActualWaterWithdrawals\",a.\"HourActualWaterSupply\" " +
@@ -61,14 +59,12 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 
     //TODO 查询取水泵房电耗预测接口,支持是否分页
     public List<Map<String,Object>> getTbMHourwaterWaterwithdrawals(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT " +
                     " to_char(a.\"Date\", 'YYYY-MM-DD') AS \"Date\",a.\"Hour\",a.\"PumpID\",a.\"PumpStatus\",a.\"HourForecastWaterWithdrawals\",a.\"PumpWater\",a.\"RealPumpStatus\",a.\"PumpEnergy\",a.\"RealPumpEnergy\",a.\"LastModifyTime\",a.\"ID\",a.\"orgId\" " +
                     " FROM tb_m_hourwater_waterwithdrawals AS a WHERE 1=1 ";
@@ -81,14 +77,12 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 
     //TODO 查询供水泵房电耗预测接口,支持是否分页
     public List<Map<String,Object>> getTbMHourwaterWatersupply(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT " +
                     " a.\"ID\",to_char(a.\"Date\", 'YYYY-MM-DD') AS \"Date\",a.\"Hour\",a.\"PumpID\",a.\"PumpStatus\",a.\"HourForecastActualWaterSupply\",a.\"PumpWater\",a.\"RealPumpStatus\",a.\"PumpEnergy\",a.\"RealPumpEnergy\",a.\"LastModifyTime\",a.\"orgId\" " +
                     " FROM tb_m_hourwater_watersupply AS a WHERE 1=1 ";
@@ -101,14 +95,12 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 
     //TODO 查询水厂id配置列表
     public List<Map<String,Object>> getOrgConfig(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT * FROM water_org_config WHERE 1=1 ";
             if(!StringUtils.isEmpty(extend)){
                 sql+=extend;
@@ -119,14 +111,12 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 
     //TODO 查询取水泵房方案数据,支持是否分页
     public List<Map<String,Object>> getTbMWaterwithdrawalspump(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT * FROM tb_m_waterwithdrawalspump WHERE 1=1 ";
             if(!StringUtils.isEmpty(extend)){
                 sql+=extend;
@@ -137,14 +127,12 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 
     //TODO 查询供水泵房方案数据,支持是否分页
     public List<Map<String,Object>> getTbMWatersupplypump(boolean isPage,int limit,int offset,String extend){
-        try{
+        
             String sql = "SELECT * FROM tb_m_watersupplypump WHERE 1=1 ";
             if(!StringUtils.isEmpty(extend)){
                 sql+=extend;
@@ -155,8 +143,6 @@ public class WaterCollecationDao {
             JdbcTemplate pgJdbc = new JdbcTemplate(childDataSource);
             List<Map<String, Object>> tableData = pgJdbc.queryForList(sql);
             return tableData;
-        }catch(Exception ex){
-            return null;
-        }
+        
     }
 }