|
@ -398,7 +398,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
|
|
|
//设置选项
|
|
|
for(WlyySurveyTemplateQuestionVO tq:tqVOs){
|
|
|
List<WlyySurveyTemplateOptionDO> optionDOs = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),tq.getTemplateCode(),"1");
|
|
|
List<WlyySurveyTemplateOptionDO> optionDOs = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getCode(),tq.getTemplateCode(),"1");
|
|
|
List<WlyySurveyTemplateOptionVO> optionVOs = new ArrayList<>();
|
|
|
convertToModels(optionDOs,optionVOs,WlyySurveyTemplateOptionVO.class);
|
|
|
tq.setOptionVOs(optionVOs);
|
|
@ -448,7 +448,6 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
List<WlyySurveyTemplateQuestionDO> questions = EntityUtils.jsonToList(tempQJson, WlyySurveyTemplateQuestionDO.class);
|
|
|
for (WlyySurveyTemplateQuestionDO wlyySurveyTemplateQuestionDO:questions){
|
|
|
wlyySurveyTemplateQuestionDO.setTemplateCode(temp.getId());
|
|
|
wlyySurveyTemplateQuestionDO.setTitle(temp.getTitle());
|
|
|
wlyySurveyTemplateQuestionDO.setCode(wlyySurveyTemplateQuestionDO.getId());
|
|
|
wlyySurveyTemplateQuestionDO.setId(UUID.randomUUID().toString());
|
|
|
}
|
|
@ -466,6 +465,8 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
List<WlyySurveyTemplateOptionDO> options = EntityUtils.jsonToList(tempOpJson, WlyySurveyTemplateOptionDO.class);
|
|
|
for (WlyySurveyTemplateOptionDO wlyySurveyTemplateOptionDO:options){
|
|
|
wlyySurveyTemplateOptionDO.setTemplateCode(temp.getId());
|
|
|
wlyySurveyTemplateOptionDO.setCode(wlyySurveyTemplateOptionDO.getId());
|
|
|
wlyySurveyTemplateOptionDO.setId(UUID.randomUUID()+"");
|
|
|
}
|
|
|
surveyTemplateOptionDao.save(options);
|
|
|
}
|