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}