From bdb2f52b04d53f4e0faaa384238244f253b5334f Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 14 七月 2025 15:14:59 +0800 Subject: [PATCH] 修改用水户日、月、年用水量统计查询中的bug --- pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/stClient/StClientSv.java | 30 ++++++++++-------------------- 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/stClient/StClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/stClient/StClientSv.java index e255bc4..c05c768 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/stClient/StClientSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/stClient/StClientSv.java @@ -60,6 +60,10 @@ rsVo.pageCurr = qo.pageCurr; rsVo.calculateAndSet(itemTotal, params); + List<VoStClientIdAmountYearRecord> clientIds = stClientAmountDayDao.selectClientIds4DayStatistics(params); + String clientIdsJson = JSON.toJSONString(clientIds) ; + params.put("clientIdsJson", clientIdsJson); + rsVo.obj = stClientAmountDayDao.selectDayStatistics(params); } return rsVo ; @@ -83,6 +87,10 @@ rsVo.pageCurr = qo.pageCurr; rsVo.calculateAndSet(itemTotal, params); + List<VoStClientIdAmountYearRecord> clientIds = stClientAmountMonthDao.selectClientIds4MonthStatistics(params); + String clientIdsJson = JSON.toJSONString(clientIds) ; + params.put("clientIdsJson", clientIdsJson); + rsVo.obj = stClientAmountMonthDao.selectMonthStatistics(params); } return rsVo ; @@ -105,15 +113,7 @@ // 鐢熸垚鏌ヨ鍙傛暟 Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ; // 鑾峰彇绗﹀悎鏉′欢鐨勮褰曟暟 - Long itemTotal = 0L ; - String clientIdsJson = null ; - /* 2025-07-14 閲囩敤鍐滄埛鎬绘暟 - if(oneYear){ - itemTotal = stClientAmountYearDao.selectCountYearStatistics4OneYear(params) ; - }else{ - itemTotal = stClientAmountYearDao.selectCountYearStatistics(params) ; - }*/ - itemTotal = stClientAmountYearDao.selectCountYearStatistics(params) ; + Long itemTotal = stClientAmountYearDao.selectCountYearStatistics(params) ; if(itemTotal != null && itemTotal > 0) { rsQrVo.pageSize = qo.pageSize; @@ -121,7 +121,7 @@ rsQrVo.calculateAndSet(itemTotal, params); List<VoStClientIdAmountYearRecord> clientIds = stClientAmountYearDao.selectClientIds4YearStatistics(params); - clientIdsJson = JSON.toJSONString(clientIds) ; + String clientIdsJson = JSON.toJSONString(clientIds) ; List<VoStClientAmountYearRecords> group = new ArrayList<>(); int count = 1 ; @@ -129,16 +129,6 @@ params.put("year", year); params.put("clientIdsJson", clientIdsJson); List<VoStClientAmountYearRecord> list = stClientAmountYearDao.selectYearStatistics(params); - /* 2025-07-14 - if(oneYear){ - list = stClientAmountYearDao.selectYearStatistics4OneYear(params); - }else{ - if(clientIdsJson != null){ - params.put("clientIdsJson", clientIdsJson); - } - list = stClientAmountYearDao.selectYearStatistics(params); - }*/ - if(group.isEmpty()){ this.completion(group, list); } -- Gitblit v1.8.0