|
|
|
@ -57,7 +57,7 @@ public class UploadQuestionLibraryDTO {
|
|
|
|
|
|
|
|
|
|
public void doAction(List<AskTemplateQuestionLibrary> questionLibraryList, List<CommonDic> questionTypeDicList){
|
|
|
|
|
this.absentCheck();
|
|
|
|
|
this.matchQuestion(questionLibraryList);
|
|
|
|
|
//this.matchQuestion(questionLibraryList);
|
|
|
|
|
this.matchQuestionDicId(questionTypeDicList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -76,18 +76,18 @@ public class UploadQuestionLibraryDTO {
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
public void absentCheck(){
|
|
|
|
|
/*if (StrUtil.isEmpty(questionTypeOne)){
|
|
|
|
|
if (StrUtil.isEmpty(questionTypeOne)){
|
|
|
|
|
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.QUESTION_TYPE_ONE_EMPTY);
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isEmpty(questionTypeTwo)){
|
|
|
|
|
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.QUESTION_TYPE_TWO_EMPTY);
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isEmpty(question)){
|
|
|
|
|
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.QUESTION_EMPTY);
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isEmpty(answer)){
|
|
|
|
|
/*if (StrUtil.isEmpty(answer)){
|
|
|
|
|
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.ANSWER_EMPTY);
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -115,12 +115,8 @@ public class UploadQuestionLibraryDTO {
|
|
|
|
|
if (StrUtil.isEmpty(this.questionTypeTwo)){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (CommonDic questionTypeDic : questionTypeDicList) {
|
|
|
|
|
if (this.questionTypeTwo.equals(questionTypeDic.getNameZh())){
|
|
|
|
|
this.dictId = String.valueOf(questionTypeDic.getId());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(CollUtil.isEmpty(questionTypeDicList)){
|
|
|
|
|
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.DICE_NOT_FIND);
|
|
|
|
|
}
|
|
|
|
|
for (CommonDic questionTypeDic : questionTypeDicList) {
|
|
|
|
|
if (this.questionTypeTwo.equals(questionTypeDic.getNameZh())) {
|
|
|
|
@ -138,6 +134,7 @@ public class UploadQuestionLibraryDTO {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.DICE_NOT_FIND);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|