|
@ -333,7 +333,8 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
int optionDel = 1;
|
|
|
String optionNextQuestion = null;
|
|
|
if (!StringUtils.isEmpty(tempOption.get("nextQuestion").toString())) {
|
|
|
optionNextQuestion = tempOption.get("nextQuestion").toString();
|
|
|
// optionNextQuestion = tempOption.get("nextQuestion").toString();
|
|
|
optionNextQuestion = surveyTemplateQuestionsDao.findBySort(templateCode,tempOption.get("nextQuestion"));
|
|
|
}
|
|
|
// 自主创建,插入表
|
|
|
SurveyQuestionnaireOptions surveyQuestionnaireOptions = new SurveyQuestionnaireOptions();
|
|
@ -396,7 +397,8 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
int optionDel = 1;
|
|
|
String optionNextQuestion = null;
|
|
|
if (!StringUtils.isEmpty(tempOption.get("nextQuestion").toString())) {
|
|
|
optionNextQuestion = tempOption.get("nextQuestion").toString();
|
|
|
// optionNextQuestion = tempOption.get("nextQuestion").toString();
|
|
|
optionNextQuestion = surveyTemplateQuestionsDao.findBySort(templateCode,tempOption.get("nextQuestion"));
|
|
|
}
|
|
|
|
|
|
// 自主创建,插入表
|
|
@ -426,7 +428,8 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
// 问答特有属性
|
|
|
String nextQuestion = null;
|
|
|
if (tempQestion.has("nextQuestion")) {
|
|
|
nextQuestion = tempQestion.get("nextQuestion").toString();
|
|
|
// nextQuestion = tempQestion.get("nextQuestion").toString();
|
|
|
nextQuestion = surveyTemplateQuestionsDao.findBySort(templateCode,tempQestion.get("nextQuestion"));
|
|
|
}
|
|
|
SurveyQuestionnaire surveyQuestionnaire2 = new SurveyQuestionnaire();
|
|
|
surveyQuestionnaire2.setCode(questionnaireCode);
|
|
@ -620,6 +623,14 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
int isRequired = questionnair.getIsRequired();
|
|
|
int sort = questionnair.getSort();
|
|
|
int type = questionnair.getQuestionType();
|
|
|
if (questionnair.getMaxNum()!= null) {
|
|
|
int maxNum = questionnair.getMaxNum();
|
|
|
question.put("maxNum", maxNum);
|
|
|
}
|
|
|
if (questionnair.getMinNum() != null) {
|
|
|
int minNum = questionnair.getMinNum();
|
|
|
question.put("minNum", minNum);
|
|
|
}
|
|
|
if (questionnair.getQuestionComment() != null) {
|
|
|
String comment = questionnair.getQuestionComment();
|
|
|
question.put("comment", comment);
|
|
@ -642,6 +653,8 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
if (option.getQuestionCodeNext() != null) {
|
|
|
String next = option.getQuestionCodeNext();
|
|
|
SurveyQuestionnaire sq = surveyQuestionnaireDao.findByIdAndQstId(id, next);
|
|
|
System.out.println("=============qstcode============== " + qstcode);
|
|
|
System.out.println("=============optCode============== " + option.getCode());
|
|
|
System.out.println("=============sq============== " + sq);
|
|
|
System.out.println("=============next============== " + next);
|
|
|
opt.put("nextQuestion", sq.getSort());
|
|
@ -1476,6 +1489,7 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
this.code = code;
|
|
|
this.codes = codes;
|
|
|
this.accessToken = accessToken;
|
|
|
System.out.println("survey_id >>>>>>"+code);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@ -1486,9 +1500,6 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
Patient p = patientDao.findByCode(cod);
|
|
|
String name = p.getName();
|
|
|
String openId = p.getOpenid();
|
|
|
/*String name = "吴俊杰";
|
|
|
String openId = "o7NFZw1QM4YR1O19mLjwfX1Hh11A";
|
|
|
cod = "jojojojpkpokpko";*/
|
|
|
json.put("keyword2", sdf.format(new Date()));
|
|
|
json.put("toUser", cod);
|
|
|
json.put("first", name + ",您好!为了给您提供更好的家庭医生健康服务,现有一份问卷需要您填写。");
|