From 9b982cadcc1f80b955b6dfc89e20c3aed34dfd26 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 14 Dec 2022 13:58:44 +0800 Subject: [PATCH] =?UTF-8?q?selectTotal=20=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResourceServiceImpl.java | 42 ++++++++++--------- renren-admin/src/main/resources/ehcache.xml | 9 ++++ 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 4a0f0217..58b49478 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -129,6 +129,8 @@ public class ResourceServiceImpl extends CrudServiceImpl resultMap = new HashMap<>(); List re = resourceDao.selectTypeCount(null); @@ -2235,14 +2238,14 @@ public class ResourceServiceImpl extends CrudServiceImpl sb.append("'").append(x.get("lc_name").toString()).append("', ")); sb.deleteCharAt(sb.length() - 2); sb.append(") UNION ALL " + - "SELECT " + - " COUNT( BSNUM ) AS \"count\", " + - " 'ysp' AS \"type\" " + - "FROM " + - " VIEW_VIDEO_BUSINESS_INDEX " + - "WHERE " + - " 1 = 1 " + - " AND ORG_NAME IN ("); + "SELECT " + + " COUNT( BSNUM ) AS \"count\", " + + " 'ysp' AS \"type\" " + + "FROM " + + " VIEW_VIDEO_BUSINESS_INDEX " + + "WHERE " + + " 1 = 1 " + + " AND ORG_NAME IN ("); lcDept.forEach(x -> sb.append("'").append(x.get("lc_name").toString()).append("', ")); sb.deleteCharAt(sb.length() - 2); sb.append(")"); @@ -2257,14 +2260,14 @@ public class ResourceServiceImpl extends CrudServiceImpl> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params); zwyCountListMap.forEach((k, v) -> { - Map zwyCountMap = new HashMap<>(); - zwyCountMap.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum()); - zwyCountMap.put("type", k); - zwyCountMap.put("deptName", params.get("deptId").toString()); - zwyCountMap.put("district", 250000); - zwyCountMap.put("deptType", 2); - typeCountListByApplyDept.add(zwyCountMap); - } + Map zwyCountMap = new HashMap<>(); + zwyCountMap.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum()); + zwyCountMap.put("type", k); + zwyCountMap.put("deptName", params.get("deptId").toString()); + zwyCountMap.put("district", 250000); + zwyCountMap.put("deptType", 2); + typeCountListByApplyDept.add(zwyCountMap); + } ); Map>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); @@ -2313,8 +2316,9 @@ public class ResourceServiceImpl extends CrudServiceImpl> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params); Map>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); diff --git a/renren-admin/src/main/resources/ehcache.xml b/renren-admin/src/main/resources/ehcache.xml index ea90c19b..c3edf26f 100644 --- a/renren-admin/src/main/resources/ehcache.xml +++ b/renren-admin/src/main/resources/ehcache.xml @@ -110,4 +110,13 @@ diskPersistent="true" memoryStoreEvictionPolicy="LRU"/> + + \ No newline at end of file