| 
					
				 | 
			
			
				@ -306,7 +306,7 @@ public class ManagerQuestionnaireService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(tempQestion.get("nextQuestion").toString())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            optionNextQuestion = tempOption.get("nextQuestion").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                qstNextQuestion = surveyTemplateQuestionsDao.findBySort(templateCode, tempQestion.get("nextQuestion")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                qstNextQuestion =(qstNextQuestion==null ?"0" :qstNextQuestion); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                qstNextQuestion = (qstNextQuestion == null ? "0" : qstNextQuestion); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            switch (type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                case 0: 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -344,11 +344,11 @@ public class ManagerQuestionnaireService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if (!StringUtils.isEmpty(tempOption.get("nextQuestion").toString())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            optionNextQuestion = tempOption.get("nextQuestion").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            optionNextQuestion = surveyTemplateQuestionsDao.findBySort(templateCode, tempOption.get("nextQuestion")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            optionNextQuestion =(optionNextQuestion==null ?"0" :optionNextQuestion); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            optionNextQuestion = (optionNextQuestion == null ? "0" : optionNextQuestion); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        自主创建,插入表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        SurveyQuestionnaireOptions surveyQuestionnaireOptions = new SurveyQuestionnaireOptions(optionCode,haveComment,questionnaireCode,optionComment, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                surveyCode, optionNextQuestion,required, optionSort, optionDel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        SurveyQuestionnaireOptions surveyQuestionnaireOptions = new SurveyQuestionnaireOptions(optionCode, haveComment, questionnaireCode, optionComment, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                surveyCode, optionNextQuestion, required, optionSort, optionDel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       /* surveyQuestionnaireOptions.setCode(optionCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        surveyQuestionnaireOptions.setHaveComment(haveComment); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        surveyQuestionnaireOptions.setQuestionnaireCode(questionnaireCode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -655,7 +655,7 @@ public class ManagerQuestionnaireService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (questionnair.getQuestionCodeNext() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String next = questionnair.getQuestionCodeNext(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                SurveyQuestionnaire sq = surveyQuestionnaireDao.findByIdAndQstId(id, next); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                question.put("nextQuestion", sq==null?0:sq.getSort()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                question.put("nextQuestion", sq == null ? 0 : sq.getSort()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            List<SurveyQuestionnaireOptions> options = surveyQuestionnaireOptionsDao.findById(qstcode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -674,7 +674,7 @@ public class ManagerQuestionnaireService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("=============optCode============== " + option.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("=============sq============== " + sq); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("=============next============== " + next); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    opt.put("nextQuestion", sq==null?0:sq.getSort()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    opt.put("nextQuestion", sq == null ? 0 : sq.getSort()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                opt.put("content", conetent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                opt.put("sort", st); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1526,25 +1526,23 @@ public class ManagerQuestionnaireService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            this.code = code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            this.codes = codes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            this.accessToken = accessToken; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            System.out.println("survey_id ===================>>>>>>" + code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            System.out.println("survey_id ===================>>>>>>" + code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        public void run() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Object obj = new Object(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            synchronized (obj) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("survey_id", code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                for (String cod : codes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("=========patient code ===========》" + cod); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Patient p = patientDao.findByCode(cod); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String name = p.getName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String openId = p.getOpenid(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("keyword2", sdf.format(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("toUser", cod); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("first", name + ",您好!为了给您提供更好的家庭医生健康服务,现有一份问卷需要您填写。"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    PushMsgTask.getInstance().sendWeixinMessage(accessToken, 11, openId, name, json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("survey_id", code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (String cod : codes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                System.out.println("=========patient code ===========》" + cod); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Patient p = patientDao.findByCode(cod); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String name = p.getName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String openId = p.getOpenid(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("keyword2", sdf.format(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("toUser", cod); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("first", name + ",您好!为了给您提供更好的家庭医生健康服务,现有一份问卷需要您填写。"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                PushMsgTask.getInstance().putWxMsg(accessToken, 11, openId, name, json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |