|
@ -401,7 +401,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
|
|
|
//设置选项
|
|
|
for(WlyySurveyTemplateQuestionVO tq:tqVOs){
|
|
|
List<WlyySurveyTemplateOptionDO> optionDOs = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),"1");
|
|
|
List<WlyySurveyTemplateOptionDO> optionDOs = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),tq.getTemplateCode(),"1");
|
|
|
List<WlyySurveyTemplateOptionVO> optionVOs = new ArrayList<>();
|
|
|
convertToModels(optionDOs,optionVOs,WlyySurveyTemplateOptionVO.class);
|
|
|
tq.setOptionVOs(optionVOs);
|
|
@ -434,12 +434,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
|
|
|
WlyySurveyTemplateDO temp = objectMapper.readValue(tempJson,WlyySurveyTemplateDO.class);
|
|
|
String doctor = temp.getCreaterCode();
|
|
|
BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctor);
|
|
|
if (null!=baseDoctorDO){
|
|
|
temp.setCreater(baseDoctorDO.getName());
|
|
|
}
|
|
|
temp = surveyTemplateDao.save(temp);
|
|
|
|
|
|
//删除原有问题
|
|
|
List<WlyySurveyTemplateQuestionDO> questionDODels = surveyTemplateQuestionDao.findByTemplateCodeAndDelOrderBySortAsc(temp.getId(),"1");
|
|
|
if(questionDODels!=null&&questionDODels.size()>0){
|
|
@ -701,7 +696,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
|
|
|
//设置选项
|
|
|
for(WlyySurveyTemplateQuestionVO tq:tqVOs){
|
|
|
List<WlyySurveyTemplateOptionDO> optionDOs = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),"1");
|
|
|
List<WlyySurveyTemplateOptionDO> optionDOs = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),tq.getTemplateCode(),"1");
|
|
|
List<WlyySurveyTemplateOptionVO> optionVOs = new ArrayList<>();
|
|
|
convertToModels(optionDOs,optionVOs,WlyySurveyTemplateOptionVO.class);
|
|
|
int tpCount = 0;
|