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