|
@ -47,6 +47,7 @@ import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
|
|
import com.epmet.service.ProjectSatisfactionStatisticsService; |
|
|
import com.epmet.service.ProjectSatisfactionStatisticsService; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -66,6 +67,7 @@ import java.util.stream.Collectors; |
|
|
* @since v1.0.0 2020-05-11 |
|
|
* @since v1.0.0 2020-05-11 |
|
|
*/ |
|
|
*/ |
|
|
@Service |
|
|
@Service |
|
|
|
|
|
@Slf4j |
|
|
public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl<ProjectSatisfactionStatisticsDao, ProjectSatisfactionStatisticsEntity> implements ProjectSatisfactionStatisticsService { |
|
|
public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl<ProjectSatisfactionStatisticsDao, ProjectSatisfactionStatisticsEntity> implements ProjectSatisfactionStatisticsService { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
@ -145,6 +147,10 @@ public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl<Pr |
|
|
return new ProjectEvaluateScoreResultDTO(NumConstant.EIGHTY); |
|
|
return new ProjectEvaluateScoreResultDTO(NumConstant.EIGHTY); |
|
|
} |
|
|
} |
|
|
ProjectSatisfactionStatisticsEntity entity = baseDao.selectInfoByProjectId(formDTO.getProjectId()); |
|
|
ProjectSatisfactionStatisticsEntity entity = baseDao.selectInfoByProjectId(formDTO.getProjectId()); |
|
|
|
|
|
if (null == entity){ |
|
|
|
|
|
log.warn("project not exist in project_satisfaction_statistics,projectId is {}",formDTO.getProjectId()); |
|
|
|
|
|
return new ProjectEvaluateScoreResultDTO(NumConstant.ZERO); |
|
|
|
|
|
} |
|
|
Integer realEvalCount = entity.getBadCount() + entity.getGoodCount() + entity.getPerfectCount(); |
|
|
Integer realEvalCount = entity.getBadCount() + entity.getGoodCount() + entity.getPerfectCount(); |
|
|
Integer shouldEvaluateCount = entity.getShouldEvaluateCount(); |
|
|
Integer shouldEvaluateCount = entity.getShouldEvaluateCount(); |
|
|
if (shouldEvaluateCount == NumConstant.ZERO){ |
|
|
if (shouldEvaluateCount == NumConstant.ZERO){ |
|
|