| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | |
| | | QuestionAnswerDto questionAnswerDto = BeanConvertUtil.covertBean(reqJson, QuestionAnswerDto.class); |
| | | |
| | | questionAnswerDto.setQaType(QuestionAnswerDto.QA_TYPE_VOTE); |
| | | int count = questionAnswerV1InnerServiceSMOImpl.queryQuestionAnswersCount(questionAnswerDto); |
| | | |
| | | List<QuestionAnswerDto> questionAnswerDtos = null; |
| | |
| | | return; |
| | | } |
| | | List<QuestionTitleValueDto> values = null; |
| | | long votedCount = 0; |
| | | for (QuestionAnswerDto tmpQuestionAnswerDto : questionAnswerDtos) { |
| | | values = new ArrayList<>(); |
| | | votedCount = 0; |
| | | for (QuestionTitleValueDto tmpQuestionTitleValueDto : questionTitleValueDtos) { |
| | | if (!tmpQuestionTitleValueDto.getQaId().equals(tmpQuestionAnswerDto.getQaId())) { |
| | | continue; |
| | | } |
| | | values.add(tmpQuestionTitleValueDto); |
| | | tmpQuestionAnswerDto.setTitleType(tmpQuestionTitleValueDto.getTitleType()); |
| | | votedCount += tmpQuestionTitleValueDto.getPersonCount(); |
| | | } |
| | | tmpQuestionAnswerDto.setTitleValues(values); |
| | | tmpQuestionAnswerDto.setVotedCount(votedCount); |
| | | } |
| | | } |
| | | } |