From 1d6f16178d5281fbb2a81cdaa5bf04a385993738 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 17 May 2021 09:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=A1=88=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=A1=B9=E7=9B=AE=E8=AF=84=E4=BB=B7=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/ProjectSatisfactionStatisticsDao.java | 2 +- .../ProjectSatisfactionDetailServiceImpl.java | 8 ++++--- .../service/impl/ProjectServiceImpl.java | 21 +++++++++++++++++++ .../ProjectSatisfactionStatisticsDao.xml | 1 - 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionStatisticsDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionStatisticsDao.java index 01c9325c98..28de98cdda 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionStatisticsDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionStatisticsDao.java @@ -48,7 +48,7 @@ public interface ProjectSatisfactionStatisticsDao extends BaseDao> canEvaluateProjectCount = govIssueOpenFeignClient.canEvaluateProjectCount(projectEntity.getOriginId()); + if (!canEvaluateProjectCount.success()){ + throw new RenException("【查询项目应评价人数失败】,【"+canEvaluateProjectCount.getMsg()+"】"); + } + List userIds = canEvaluateProjectCount.getData(); + ProjectSatisfactionStatisticsEntity entity1 = new ProjectSatisfactionStatisticsEntity(); + entity1.setShouldEvaluateCount(userIds.size()); + entity1.setCustomerId(projectEntity.getCustomerId()); + entity1.setProjectId(fromDTO.getProjectId()); + entity1.setBadCount(NumConstant.ZERO); + entity1.setGoodCount(NumConstant.ZERO); + entity1.setPerfectCount(NumConstant.ZERO); + // 新添一条记录 + statisticsDao.insert(entity1); } @Override diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionStatisticsDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionStatisticsDao.xml index 983c2be73c..114f3c5a04 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionStatisticsDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionStatisticsDao.xml @@ -16,7 +16,6 @@ PERFECT_COUNT = PERFECT_COUNT + 1, - SHOULD_EVALUATE_COUNT = #{shouldEvaluateCount}, UPDATED_TIME = NOW() WHERE DEL_FLAG = '0' AND PROJECT_ID = #{projectId}