Просмотр исходного кода

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

1037015548@qq.com 1 год назад
Родитель
Сommit
bc20eee7ad

+ 32 - 32
src/main/java/com/shkpr/service/aimodelpower/dbdao/shizilaishuiDataSource/service/WaterCollecationServiceImpl.java

@@ -37,15 +37,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     private ZoonMapper zoonMapper;
 
     @Override
-    public List<Map<String, Object>> getTbMWater(Boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getTbMWater(Boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getTbMWater(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -57,15 +57,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getTbMHourwater(Boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getTbMHourwater(Boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getTbMHourwater(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -77,15 +77,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getTbMHourwaterWaterwithdrawals(boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getTbMHourwaterWaterwithdrawals(boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getTbMHourwaterWaterwithdrawals(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -97,15 +97,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getTbMHourwaterWatersupply(boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getTbMHourwaterWatersupply(boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getTbMHourwaterWatersupply(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -117,15 +117,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getTbMWaterwithdrawalspump(boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getTbMWaterwithdrawalspump(boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getTbMWaterwithdrawalspump(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -137,15 +137,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getTbMWatersupplypump(boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getTbMWatersupplypump(boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getTbMWatersupplypump(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -157,15 +157,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getOrgConfig(boolean isPage, int limit, int offset, String extend) {
+    public List<Map<String, Object>> getOrgConfig(boolean isPage, int limit, int offset, String extend) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = waterCollecationDao.getOrgConfig(isPage,limit,offset,extend);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()
@@ -177,15 +177,15 @@ public class WaterCollecationServiceImpl implements WaterCollecationService{
     }
 
     @Override
-    public List<Map<String, Object>> getZoonInfoList(String puid,String subType) {
+    public List<Map<String, Object>> getZoonInfoList(String puid,String subType) throws Exception{
         int nCode = 0;
         String strMsg = "Success";
         List<Map<String, Object>> arrRes = null;
         try {
             arrRes = zoonMapper.selectWpRoomListByPid(puid,subType);
-        }catch (Exception e){
-            nCode = LogLevelFlag.LOG_ERROR.ordinal();
-            strMsg = e.getLocalizedMessage();
+        }catch (Exception e){ throw new Exception(e.getLocalizedMessage());
+            
+            
         }finally {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.valueFromInt(nCode)
                     , LogFlagBusiType.BUSI_CHILD_DB_TAP_WATER.toStrValue()

+ 8 - 8
src/main/java/com/shkpr/service/aimodelpower/dbdao/shizilaishuiDataSource/service/intef/WaterCollecationService.java

@@ -13,25 +13,25 @@ import java.util.Map;
 public interface WaterCollecationService {
 
     //TODO 查询样本及预测水量表;支持是否分页
-    public List<Map<String,Object>> getTbMWater(Boolean isPage, int limit, int offset, String extend);
+    public List<Map<String,Object>> getTbMWater(Boolean isPage, int limit, int offset, String extend)throws Exception;
 
     //TODO 查询样本及预测水量表;支持是否分页
-    public List<Map<String,Object>> getTbMHourwater(Boolean isPage, int limit, int offset, String extend);
+    public List<Map<String,Object>> getTbMHourwater(Boolean isPage, int limit, int offset, String extend)throws Exception;
 
     //TODO 查询取水泵房电耗预测接口
-    public List<Map<String,Object>> getTbMHourwaterWaterwithdrawals(boolean isPage,int limit,int offset,String extend);
+    public List<Map<String,Object>> getTbMHourwaterWaterwithdrawals(boolean isPage,int limit,int offset,String extend)throws Exception;
     //TODO 查询取水泵房方案数据
-    public List<Map<String,Object>> getTbMWaterwithdrawalspump(boolean isPage,int limit,int offset,String extend);
+    public List<Map<String,Object>> getTbMWaterwithdrawalspump(boolean isPage,int limit,int offset,String extend)throws Exception;
 
     //TODO 供水泵房电耗预测接口
-    public List<Map<String,Object>> getTbMHourwaterWatersupply(boolean isPage,int limit,int offset,String extend);
+    public List<Map<String,Object>> getTbMHourwaterWatersupply(boolean isPage,int limit,int offset,String extend)throws Exception;
     //TODO 查询供水泵房方案数据
-    public List<Map<String,Object>> getTbMWatersupplypump(boolean isPage,int limit,int offset,String extend);
+    public List<Map<String,Object>> getTbMWatersupplypump(boolean isPage,int limit,int offset,String extend)throws Exception;
 
     //TODO 获取水厂配置
-    public List<Map<String,Object>> getOrgConfig(boolean isPage,int limit,int offset,String extend);
+    public List<Map<String,Object>> getOrgConfig(boolean isPage,int limit,int offset,String extend)throws Exception;
 
     //TODO 主数据源相关
     //TODO 获取指定水厂的供/取水泵房分区
-    public List<Map<String,Object>> getZoonInfoList(String puid,String subType);
+    public List<Map<String,Object>> getZoonInfoList(String puid,String subType)throws Exception;
 }