From fccf8f68b2e47457a97575fa0228cc25052c71a5 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期三, 01 十一月 2023 01:16:08 +0800
Subject: [PATCH] 优化代码

---
 service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java |  158 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 155 insertions(+), 3 deletions(-)

diff --git a/service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java b/service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java
index 04a8afc..c742fbf 100755
--- a/service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java
+++ b/service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java
@@ -7,7 +7,7 @@
 import com.java110.dto.report.ReportRoomDto;
 import com.java110.report.dao.IReportCommunityServiceDao;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -75,11 +75,163 @@
     }
 
     @Override
-    public List<CommunityDto> getCommunitys(CommunityDto communityDto) {
+    public List<Map> getCommunitys(Map communityDto) {
         logger.debug("鏌ヨgetCommunitys淇℃伅 鍏ュ弬 info : {}", JSONObject.toJSONString(communityDto));
 
-        List<CommunityDto> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.getCommunitys", communityDto);
+        List<Map> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.getCommunitys", communityDto);
 
         return communityDtos;
     }
+
+    @Override
+    public List<Map> queryRoomStructures(Map info) {
+        logger.debug("鏌ヨqueryRoomStructures淇℃伅 鍏ュ弬 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryRoomStructures", info);
+
+        return communityDtos;
+    }
+
+    @Override
+    public List<Map> queryCarStructures(Map info) {
+        logger.debug("鏌ヨqueryCarStructures淇℃伅 鍏ュ弬 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryCarStructures", info);
+
+        return communityDtos;
+    }
+
+    public int deleteInvalidFee(Map info){
+        logger.debug("deleteInvalidFee 鍏ュ弬 info : {}", info);
+
+        int saveFlag = sqlSessionTemplate.update("reportCommunityServiceDaoImpl.deleteInvalidFee", info);
+
+        return saveFlag;
+    }
+
+    @Override
+    public List<Map> queryInvalidFeeMonthStatistics(Map info) {
+        logger.debug("鏌ヨ鎶奸噾閫�璐规�婚噾棰濅俊鎭� 鍏ュ弬 info : {}", info);
+
+        List<Map> deposits = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryInvalidFeeMonthStatistics", info);
+
+        return deposits;
+    }
+
+
+    @Override
+    public List<Map> queryRoomsTree(Map info) {
+        logger.debug("鏌ヨqueryRoomsTree淇℃伅 鍏ュ弬 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryRoomsTree", info);
+
+        return communityDtos;
+    }
+
+    @Override
+    public int queryHisOwnerCarCount(Map info) {
+        logger.debug("鏌ヨ杞﹁締绠$悊鏁版嵁 鍏ュ弬 info : {}", info);
+
+        List<Map> businessOwnerCarInfos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisOwnerCarCount", info);
+        if (businessOwnerCarInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerCarInfos.get(0).get("count").toString());
+    }
+
+    @Override
+    public List<Map> queryHisOwnerCars(Map info) {
+        logger.debug("鏌ヨ杞﹁締绠$悊淇℃伅 鍏ュ弬 info : {}", info);
+
+        List<Map> businessOwnerCarInfos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisOwnerCars", info);
+
+        return businessOwnerCarInfos;
+    }
+
+    @Override
+    public int queryHisOwnerCount(Map info) {
+        logger.debug("鏌ヨqueryHisOwnerCount 鍏ュ弬 info : {}", info);
+
+        List<Map> businessOwnerCarInfos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisOwnerCount", info);
+        if (businessOwnerCarInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerCarInfos.get(0).get("count").toString());
+    }
+
+    @Override
+    public List<Map> queryHisOwners(Map info) {
+        logger.debug("鏌ヨqueryHisOwners 鍏ュ弬 info : {}", info);
+
+        List<Map> businessOwnerCarInfos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisOwners", info);
+
+        return businessOwnerCarInfos;
+    }
+
+    @Override
+    public int queryHisRoomCount(Map info) {
+        logger.debug("鏌ヨ queryHisRoomCount 鍏ュ弬 info : {}", info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisRoomCount", info);
+        if (infos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public List<Map> queryHisRooms(Map info) {
+        logger.debug("鏌ヨ queryHisRooms 鍏ュ弬 info : {}", info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisRooms", info);
+
+        return infos;
+    }
+
+    @Override
+    public int queryHisFeeCount(Map info) {
+        logger.debug("鏌ヨqueryHisFeeCount 鍏ュ弬 info : {}", info);
+
+        List<Map> businessOwnerCarInfos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisFeeCount", info);
+        if (businessOwnerCarInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerCarInfos.get(0).get("count").toString());
+    }
+
+    @Override
+    public List<Map> queryHisFees(Map info) {
+        logger.debug("鏌ヨ queryHisFees 鍏ュ弬 info : {}", info);
+
+        List<Map> businessOwnerCarInfos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisFees", info);
+
+        return businessOwnerCarInfos;
+    }
+
+    @Override
+    public int queryHisFeeConfigCount(Map info) {
+        logger.debug("鏌ヨ queryHisFeeConfigCount 鍏ュ弬 info : {}", info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisFeeConfigCount", info);
+        if (infos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public List<Map> queryHisFeeConfigs(Map info) {
+        logger.debug("鏌ヨ queryHisFees 鍏ュ弬 info : {}", info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryHisFeeConfigs", info);
+
+        return infos;
+    }
+
+
 }

--
Gitblit v1.8.0