From eb2c4d9fa167a9c03c15e4b1faf0692c94554522 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 31 May 2021 16:47:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=9D=A5=E6=BA=90=E6=98=AF?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=E7=9A=84=E5=9C=A8=E6=89=A7=E8=A1=8C=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProjectServiceImpl.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 26971b84d9..d5e6f7a08a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -719,20 +719,22 @@ public class ProjectServiceImpl extends BaseServiceImpl> 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); + if (projectEntity.getOrigin().equals(ProjectConstant.ISSUE)) { + Result> 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