|
@@ -175,7 +175,7 @@ public class KmtExerciseQuestionListServiceImpl implements KmtExerciseQuestionLi
|
|
|
List<TbLibManager> users = getDealUsers(list);
|
|
|
|
|
|
list.forEach(temp -> {
|
|
|
- QuestionListV1Dto tar = changeExerciseDto2QuestionListDto(temp, questionKnows, users);
|
|
|
+ QuestionListV1Dto tar = changeExerciseDto2QuestionListDto(temp, questionKnows, users,null);
|
|
|
if (isTwoLevel && StringUtil.isNotBlank(temp.getParentId())){
|
|
|
addTar2Result(tar, result, temp.getParentId(), temp.getExerciseBookId(),null);
|
|
|
} else {
|
|
@@ -196,17 +196,11 @@ public class KmtExerciseQuestionListServiceImpl implements KmtExerciseQuestionLi
|
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
|
List<String> questionIds = list.stream().map(ExerciseQuetionDto::getQuestionId).collect(Collectors.toList());
|
|
|
|
|
|
- if(type == 1){
|
|
|
- TrTrainPartUser user = userServiceMapper.selectById(userId);
|
|
|
- if(user.getRoleType()==1){
|
|
|
- return result;
|
|
|
- }
|
|
|
- }
|
|
|
List<QuestionListKnowModel> questionKnows = kmtExerciseMapper.findQuestionKnowByQuestionIds(questionIds,userId);
|
|
|
List<TbLibManager> users = getDealUsers(list);
|
|
|
|
|
|
list.forEach(temp -> {
|
|
|
- QuestionListV1Dto tar = changeExerciseDto2QuestionListDto(temp, questionKnows, users);
|
|
|
+ QuestionListV1Dto tar = changeExerciseDto2QuestionListDto(temp, questionKnows, users,userId);
|
|
|
if (isTwoLevel && StringUtil.isNotBlank(temp.getParentId())){
|
|
|
addTar2Result(tar, result, temp.getParentId(), temp.getExerciseBookId(),userId);
|
|
|
} else {
|
|
@@ -225,11 +219,14 @@ public class KmtExerciseQuestionListServiceImpl implements KmtExerciseQuestionLi
|
|
|
* @return
|
|
|
*/
|
|
|
private QuestionListV1Dto changeExerciseDto2QuestionListDto (ExerciseQuetionDto exerciseDto, List<QuestionListKnowModel> questionKnows,
|
|
|
- List<TbLibManager> users) {
|
|
|
+ List<TbLibManager> users,String userId) {
|
|
|
QuestionListV1Dto tar = new QuestionListV1Dto();
|
|
|
- //设置知识点
|
|
|
- setQuestionKnowledge(tar, questionKnows.stream().filter(map ->
|
|
|
- exerciseDto.getQuestionId().equals(map.getQuestionId())).collect(Collectors.toList()));
|
|
|
+ TrTrainPartUser user = userServiceMapper.selectById(userId);
|
|
|
+ if(user.getRoleType()>1){
|
|
|
+ //设置知识点
|
|
|
+ setQuestionKnowledge(tar, questionKnows.stream().filter(map ->
|
|
|
+ exerciseDto.getQuestionId().equals(map.getQuestionId())).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
//设置打回人和被打回人
|
|
|
setFromUserAndToUser(tar, exerciseDto);
|
|
|
//设置加工审核人
|
|
@@ -285,7 +282,7 @@ public class KmtExerciseQuestionListServiceImpl implements KmtExerciseQuestionLi
|
|
|
q.setQuestion("<img src='" + PropertiesUtil.getValue("STATIC_FILE_URL") + q.getQuestionImage() + "'/>");
|
|
|
}
|
|
|
}
|
|
|
- parent = changeExerciseDto2QuestionListDto(questions.get(0), questionKnows, users);
|
|
|
+ parent = changeExerciseDto2QuestionListDto(questions.get(0), questionKnows, users,userId);
|
|
|
}
|
|
|
}
|
|
|
|