From 28795cfd31ba9d56d3660d79e75abc5813b98f86 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 9 Jun 2021 15:30:14 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/IssueProjectCategoryDictDao.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 4a7b073b73..05e72af022 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -235,12 +235,13 @@ SELECT #{l.projectId} AS projectId, - CATEGORY_NAME - FROM issue_project_category_dict - WHERE DEL_FLAG = '0' - AND IS_DISABLE = 'enable' - AND CUSTOMER_ID = #{customerId} - AND CATEGORY_CODE = #{l.categoryCode} + CONCAT(if(cd2.CATEGORY_CODE = '0','',CONCAT(cd2.CATEGORY_NAME,'-')),cd.CATEGORY_NAME) AS categoryName + FROM issue_project_category_dict cd + LEFT JOIN issue_project_category_dict cd2 ON cd2.CATEGORY_CODE = cd.PARENT_CATEGORY_CODE AND cd2.DEL_FLAG = '0' + WHERE cd.DEL_FLAG = '0' + AND cd.IS_DISABLE = 'enable' + AND cd.CUSTOMER_ID = #{customerId} + AND cd.CATEGORY_CODE = #{l.categoryCode} From 9a7fcd3b8241c294e96bc1527bef21d20113a028 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 9 Jun 2021 16:43:19 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E7=BE=A4=E4=BC=97=E4=B8=8D=E6=BB=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 05e72af022..dca01a63f5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -237,7 +237,7 @@ #{l.projectId} AS projectId, CONCAT(if(cd2.CATEGORY_CODE = '0','',CONCAT(cd2.CATEGORY_NAME,'-')),cd.CATEGORY_NAME) AS categoryName FROM issue_project_category_dict cd - LEFT JOIN issue_project_category_dict cd2 ON cd2.CATEGORY_CODE = cd.PARENT_CATEGORY_CODE AND cd2.DEL_FLAG = '0' + LEFT JOIN issue_project_category_dict cd2 ON cd2.CATEGORY_CODE = cd.PARENT_CATEGORY_CODE AND cd2.DEL_FLAG = '0' AND cd2.CUSTOMER_ID = #{customerId} WHERE cd.DEL_FLAG = '0' AND cd.IS_DISABLE = 'enable' AND cd.CUSTOMER_ID = #{customerId} From 4a406602538a3b32398839f81df582ef48c3350f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Jun 2021 14:01:54 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E7=AB=8B=E9=A1=B9=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BB=990=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProjectSatisfactionStatisticsServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java index 119f217c14..d36c39b6d6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.dto.result.MassesDiscontentResultDTO; import com.epmet.dto.result.ProjectCategoryDisPoseResultDTO; import com.epmet.dto.result.ProjectEvaluateScoreResultDTO; import com.epmet.dto.result.ProjectScoreResultDTO; +import com.epmet.entity.ProjectEntity; import com.epmet.entity.ProjectSatisfactionStatisticsEntity; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.redis.ProjectSatisfactionStatisticsRedis; @@ -138,6 +139,11 @@ public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl Date: Thu, 10 Jun 2021 14:04:56 +0800 Subject: [PATCH 4/8] =?UTF-8?q?made=E9=A1=B9=E7=9B=AE=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E7=BB=9980?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProjectSatisfactionStatisticsServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java index d36c39b6d6..f3925108f3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java @@ -142,7 +142,7 @@ public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl Date: Thu, 10 Jun 2021 14:43:47 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/user/impl/UserServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index a7f1d594c4..e38656d2b7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.user.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; @@ -752,6 +753,7 @@ public class UserServiceImpl implements UserService { return; } List collection = userDao.selectScreenProjectData(topicUserIdList); + logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(collection),topicUserIdList); Map topicUserMap = collection.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getTopicId,o->o,(o1,o2)->o1)); /* if(!CollectionUtils.isEmpty(collection)){ list.stream().flatMap(target -> collection.stream().filter(res -> StringUtils.equals(target.getLinkName(),res.getTopicId())) @@ -766,6 +768,7 @@ public class UserServiceImpl implements UserService { return; } List staffList = userDao.selectStaffInfo(staffUserIdList); + logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(staffList),staffUserIdList); Map collect = staffList.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getId,o->o,(o1,o2)->o1)); list.forEach(project->{ ScreenProjectDataDTO userDTO = collect.get(project.getLinkName()); From 3e56eff0d0b61043165e8d4385f06493b2fa6fcf Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Jun 2021 15:02:07 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/user/impl/UserServiceImpl.java | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index e38656d2b7..987c9a1167 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -749,37 +749,34 @@ public class UserServiceImpl implements UserService { public void fillScreenProjectData(List list) { List topicUserIdList = list.stream().filter(o -> ProjectConstant.PROJECT_ORIGIN_ISSUE.equals(o.getOrigin())) .map(ScreenProjectDataDTO::getLinkName).distinct().collect(Collectors.toList()); - if (CollectionUtils.isEmpty(topicUserIdList)){ - return; + Map topicUserMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(topicUserIdList)){ + List collection = userDao.selectScreenProjectData(topicUserIdList); + logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(collection),topicUserIdList); + topicUserMap = collection.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getTopicId,o->o,(o1,o2)->o1)); } - List collection = userDao.selectScreenProjectData(topicUserIdList); - logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(collection),topicUserIdList); - Map topicUserMap = collection.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getTopicId,o->o,(o1,o2)->o1)); - /* if(!CollectionUtils.isEmpty(collection)){ - list.stream().flatMap(target -> collection.stream().filter(res -> StringUtils.equals(target.getLinkName(),res.getTopicId())) - .map(merge -> { - target.setLinkName(merge.getLinkName()); - target.setLinkMobile(merge.getLinkMobile()); - return target;})); - }*/ + + List staffUserIdList = list.stream().filter(o -> ProjectConstant.PROJECT_ORIGIN_AGENCY.equals(o.getOrigin())) .map(ScreenProjectDataDTO::getLinkName).distinct().collect(Collectors.toList()); - if (CollectionUtils.isEmpty(topicUserIdList)){ - return; + + Map staffMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(topicUserIdList)){ + List staffList = userDao.selectStaffInfo(staffUserIdList); + logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(staffList),staffUserIdList); + staffMap = staffList.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getId,o->o,(o1,o2)->o1)); } - List staffList = userDao.selectStaffInfo(staffUserIdList); - logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(staffList),staffUserIdList); - Map collect = staffList.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getId,o->o,(o1,o2)->o1)); - list.forEach(project->{ - ScreenProjectDataDTO userDTO = collect.get(project.getLinkName()); - if (userDTO == null){ + + for (ScreenProjectDataDTO project : list) { + ScreenProjectDataDTO userDTO = staffMap.get(project.getLinkName()); + if (userDTO == null) { userDTO = topicUserMap.get(project.getLinkName()); } - if (userDTO != null){ + if (userDTO != null) { project.setLinkName(userDTO.getLinkName()); project.setLinkMobile(userDTO.getLinkMobile()); } - }); + } } /** From a9c1f527ffb44b35c695eb7541802395ca3e5a3f Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Jun 2021 15:18:54 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/user/impl/UserServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index 987c9a1167..8ce45d4779 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -777,6 +777,7 @@ public class UserServiceImpl implements UserService { project.setLinkMobile(userDTO.getLinkMobile()); } } + logger.info("fillScreenProjectData result list:{}", JSON.toJSONString(list)); } /** From d20a64c8b750c8a10c5851ad8df5e4b5ce3fc8c6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Jun 2021 15:32:57 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=97=A5=E5=BF=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/user/impl/UserServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index 8ce45d4779..9be10286b6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -761,7 +761,7 @@ public class UserServiceImpl implements UserService { .map(ScreenProjectDataDTO::getLinkName).distinct().collect(Collectors.toList()); Map staffMap = new HashMap<>(); - if (!CollectionUtils.isEmpty(topicUserIdList)){ + if (!CollectionUtils.isEmpty(staffUserIdList)){ List staffList = userDao.selectStaffInfo(staffUserIdList); logger.info("fillScreenProjectData staff list:{},param:{}", JSON.toJSONString(staffList),staffUserIdList); staffMap = staffList.stream().collect(Collectors.toMap(ScreenProjectDataDTO::getId,o->o,(o1,o2)->o1)); @@ -773,6 +773,7 @@ public class UserServiceImpl implements UserService { userDTO = topicUserMap.get(project.getLinkName()); } if (userDTO != null) { + logger.info("fillScreenProjectData every user data:{}", JSON.toJSONString(userDTO)); project.setLinkName(userDTO.getLinkName()); project.setLinkMobile(userDTO.getLinkMobile()); }