class MySurveyStatsController {

    @Autowired
    private SurveyStatsManager surveyStatsManager;
    @Autowired
    private SurveyAnswerManager surveyAnswerManager;
    @Autowired
    private AccountManager accountManager;
    @Autowired
    private SurveyDirectoryManager surveyDirectoryManager;

    @RequestMapping("/report.do")
    @ResponseBody
    public HttpResult report(String surveyId) {<FILL_FUNCTION_BODY>}



}


        // 得到频数分析数据
        User user = accountManager.getCurUser();
        if(user!=null){
            SurveyDirectory survey = surveyDirectoryManager.findUniqueBy(surveyId);
            if(survey!=null){
                if(!user.getId().equals(survey.getUserId())){
                    return HttpResult.FAILURE_MSG("没有相应数据权限");
                }
                List<Question> questions = surveyStatsManager.findFrequency(survey);
                SurveyStats surveyStats = new SurveyStats();
                surveyStats.setQuestions(questions);
                return HttpResult.SUCCESS(surveyStats);
            }
        }
        return HttpResult.FAILURE();
    
<no_super_class>