use of cn.surveyking.server.domain.dto.AnswerQuery in project SurveyKing by javahuang.
the class AbstractTaskHandler method updateTaskAnswer.
protected void updateTaskAnswer(ApprovalTaskRequest request) {
if (request.getAnswer() == null) {
return;
}
FlowEntryNode flowElement = entryNodeService.getById(request.getActivityId());
AnswerQuery answerQuery = new AnswerQuery();
answerQuery.setId(request.getAnswerId());
AnswerView answerView = answerService.getAnswer(answerQuery);
LinkedHashMap mergedAnswer = mergeAnswer(request.getAnswer(), answerView.getAnswer(), flowElement.getFieldPermission());
AnswerRequest answerRequest = new AnswerRequest();
answerRequest.setId(request.getAnswerId());
answerRequest.setAnswer(mergedAnswer);
answerService.updateAnswer(answerRequest);
}
Aggregations