|  | @ -763,14 +763,16 @@ public class SurveyScreenResultService extends BaseService {
 | 
												
													
														
															|  |                             p = patientDao.findByCode(c);
 |  |                             p = patientDao.findByCode(c);
 | 
												
													
														
															|  |                             name = p.getName();
 |  |                             name = p.getName();
 | 
												
													
														
															|  |                             openId = p.getOpenid();
 |  |                             openId = p.getOpenid();
 | 
												
													
														
															|  | 
 |  |                             json.put("keyword1", keyword1);
 | 
												
													
														
															|  |                             json.put("keyword2", sdf.format(new Date()));
 |  |                             json.put("keyword2", sdf.format(new Date()));
 | 
												
													
														
															|  |                             json.put("survey", wxTemplateCode);
 |  |                             json.put("survey", wxTemplateCode);
 | 
												
													
														
															|  | //                        String first = name + ",您好!为了给您提供更好的家庭医生健康服务,现有一份问卷需要您填写。";
 |  | 
 | 
												
													
														
															|  | 
 |  |                             json.put("toUser", c);
 | 
												
													
														
															|  | 
 |  |                             json.put("url","html/jkpg/html/start-survey.html?survey="+wxTemplateCode);
 | 
												
													
														
															|  | 
 |  | //                          String first = name + ",您好!为了给您提供更好的家庭医生健康服务,现有一份问卷需要您填写。";
 | 
												
													
														
															|  |                             first = templateConfig.getFirst();
 |  |                             first = templateConfig.getFirst();
 | 
												
													
														
															|  |                             first = first.replace("key1",(name==null?"":name));
 |  |                             first = first.replace("key1",(name==null?"":name));
 | 
												
													
														
															|  |                             json.put("first", first);
 |  |                             json.put("first", first);
 | 
												
													
														
															|  |                             json.put("remark", remark);
 |  |                             json.put("remark", remark);
 | 
												
													
														
															|  |                             json.put("keyword1", keyword1);
 |  | 
 | 
												
													
														
															|  |                         } catch (JSONException e) {
 |  |                         } catch (JSONException e) {
 | 
												
													
														
															|  |                             continue;
 |  |                             continue;
 | 
												
													
														
															|  |                         }
 |  |                         }
 | 
												
											
												
													
														
															|  | @ -790,8 +792,10 @@ public class SurveyScreenResultService extends BaseService {
 | 
												
													
														
															|  |                                     if (StringUtils.isNotBlank(member.getOpenid())) {
 |  |                                     if (StringUtils.isNotBlank(member.getOpenid())) {
 | 
												
													
														
															|  |                                         json.remove("toUser");
 |  |                                         json.remove("toUser");
 | 
												
													
														
															|  |                                         json.put("toUser", member.getCode());
 |  |                                         json.put("toUser", member.getCode());
 | 
												
													
														
															|  | 
 |  |                                         json.put("url","html/jkpg/html/start-survey.html?survey="+wxTemplateCode);
 | 
												
													
														
															|  |                                         json.remove("first");
 |  |                                         json.remove("first");
 | 
												
													
														
															|  |                                         try {
 |  |                                         try {
 | 
												
													
														
															|  | 
 |  |                                             json.put("keyword1", keyword1);
 | 
												
													
														
															|  |                                             json.put("first", weiXinOpenIdUtils.getTitleMes(p, j.getInt("relation"), p.getName()) + first);
 |  |                                             json.put("first", weiXinOpenIdUtils.getTitleMes(p, j.getInt("relation"), p.getName()) + first);
 | 
												
													
														
															|  |                                         } catch (Exception e) {
 |  |                                         } catch (Exception e) {
 | 
												
													
														
															|  |                                             e.printStackTrace();
 |  |                                             e.printStackTrace();
 | 
												
											
												
													
														
															|  | @ -807,7 +811,13 @@ public class SurveyScreenResultService extends BaseService {
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | //       =====================================================
 |  | //       =====================================================
 | 
												
													
														
															|  | //     获取标签数组
 |  | //     获取标签数组
 | 
												
													
														
															|  |         JSONArray lables = jsonStr.getJSONArray("label");
 |  | 
 | 
												
													
														
															|  | 
 |  |         SurveyLabelInfo surveyLabelInfo = new SurveyLabelInfo();
 | 
												
													
														
															|  | 
 |  |         surveyLabelInfo.setCode(getCode());
 | 
												
													
														
															|  | 
 |  |         surveyLabelInfo.setRelationCode(surveyCode);
 | 
												
													
														
															|  | 
 |  |         surveyLabelInfo.setUseType(useType);
 | 
												
													
														
															|  | 
 |  |         surveyLabelInfo.setLabel(Integer.parseInt(templateLabel));
 | 
												
													
														
															|  | 
 |  |         SurveyLabelInfo ss = surveyLabelInfoDao.save(surveyLabelInfo);
 | 
												
													
														
															|  | 
 |  |        /* JSONArray lables = jsonStr.getJSONArray("label");
 | 
												
													
														
															|  | //        标签保存到wlyy_survey_label_info
 |  | //        标签保存到wlyy_survey_label_info
 | 
												
													
														
															|  |         for (Object label : lables) {
 |  |         for (Object label : lables) {
 | 
												
													
														
															|  |             SurveyLabelInfo surveyLabelInfo = new SurveyLabelInfo();
 |  |             SurveyLabelInfo surveyLabelInfo = new SurveyLabelInfo();
 | 
												
											
												
													
														
															|  | @ -816,7 +826,7 @@ public class SurveyScreenResultService extends BaseService {
 | 
												
													
														
															|  |             surveyLabelInfo.setUseType(useType);
 |  |             surveyLabelInfo.setUseType(useType);
 | 
												
													
														
															|  |             surveyLabelInfo.setLabel(Integer.parseInt(label.toString()));
 |  |             surveyLabelInfo.setLabel(Integer.parseInt(label.toString()));
 | 
												
													
														
															|  |             SurveyLabelInfo ss = surveyLabelInfoDao.save(surveyLabelInfo);
 |  |             SurveyLabelInfo ss = surveyLabelInfoDao.save(surveyLabelInfo);
 | 
												
													
														
															|  |         }
 |  | 
 | 
												
													
														
															|  | 
 |  |         }*/
 | 
												
													
														
															|  | //        获取问题数组
 |  | //        获取问题数组
 | 
												
													
														
															|  |         JSONArray questions = jsonStr.getJSONArray("questions");
 |  |         JSONArray questions = jsonStr.getJSONArray("questions");
 | 
												
													
														
															|  |         for (Object question : questions) {
 |  |         for (Object question : questions) {
 |