From 9b982cadcc1f80b955b6dfc89e20c3aed34dfd26 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 14 Dec 2022 13:58:44 +0800 Subject: [PATCH 1/2] =?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 From ffae0661278ae7339dc356eaf3599af5d3fde168 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 14 Dec 2022 14:24:15 +0800 Subject: [PATCH 2/2] 500 --- .../renren/modules/activiti/controller/ActTaskController.java | 2 +- .../java/io/renren/modules/activiti/service/ActTaskService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java index e18b7c7e..43d32427 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java @@ -201,7 +201,7 @@ public class ActTaskController { .map(index_ -> index_.getMember()) .filter(Objects::nonNull) .flatMap(index_ -> index_.stream()) - .map(index_ -> (String) index_.get("id")) + .map(index_ -> index_.get("id").toString()) .filter(index_ -> !userId.equals(index_)) // 过滤非本人 .distinct() .collect(Collectors.toList()); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java index 1c96b7a6..e6b022c1 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java @@ -153,7 +153,7 @@ public class ActTaskService extends BaseServiceImpl { .filter(Objects::nonNull) .filter(index -> !index.isEmpty()) .flatMap(index -> index.stream()) - .map(index -> (String) index.get("id")) + .map(index -> index.get("id").toString()) .filter(index -> !userId.equals(index)) // 过滤非本人 .distinct() .collect(Collectors.toList());