|
@ -21,6 +21,7 @@ import com.yihu.jw.utils.EntityUtils;
|
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.xpath.operations.Bool;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
@ -597,7 +598,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
if(result!=null&&result.size()>0){
|
|
|
for(Map<String,Object> map:result){
|
|
|
String tempId = (String)map.get("id");
|
|
|
List<WlyySurveyUserDO> list = surveyUserDao.findBySurvey(tempId,patient, DateUtil.strToDate(DateUtil.dateToStr(new Date(),"yyyy-MM-dd")));
|
|
|
List<WlyySurveyUserDO> list = surveyUserDao.findBySurvey(tempId,patient);
|
|
|
if(list!=null&&list.size()>0){
|
|
|
map.put("isAnswer",true);
|
|
|
}else{
|
|
@ -652,9 +653,9 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
List<WlyySurveyUserAnswerDO> answerDOs = EntityUtils.jsonToList(suaJsons,WlyySurveyUserAnswerDO.class);
|
|
|
for(WlyySurveyUserAnswerDO answerDO : answerDOs){
|
|
|
answerDO.setSurverUserId(surveyUserDO.getId());
|
|
|
WlyySurveyTemplateOptionDO surveyTemplateOptionDO = surveyTemplateOptionDao.findOne(answerDO.getTempOptionCode());
|
|
|
/*WlyySurveyTemplateOptionDO surveyTemplateOptionDO = surveyTemplateOptionDao.findOne(answerDO.getTempOptionCode());
|
|
|
answerDO.setTempQuestionCode(surveyTemplateOptionDO.getQuestionCode());
|
|
|
answerDO.setTempOptionCode(surveyTemplateOptionDO.getCode());
|
|
|
answerDO.setTempOptionCode(surveyTemplateOptionDO.getCode());*/
|
|
|
}
|
|
|
surveyUserAnswerDao.save(answerDOs);
|
|
|
BasePatientBusinessDO basePatientBusinessDO = basePatientBusinessDao.findByDoctorPatientRelationCode(surveyUserDO.getPatient(),surveyUserDO.getSurveyTempCode(),surveyUserDO.getDoctor());
|
|
@ -674,7 +675,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
if(StringUtils.isNotBlank(surverUserId)){
|
|
|
list = surveyUserAnswerDao.findBySurverUserId(surverUserId);
|
|
|
}else{
|
|
|
List<WlyySurveyUserDO> surveys = surveyUserDao.findBySurvey(tempId,patient, DateUtil.strToDate(DateUtil.dateToStr(new Date(),"yyyy-MM-dd")));
|
|
|
List<WlyySurveyUserDO> surveys = surveyUserDao.findBySurvey(tempId,patient);
|
|
|
System.out.println(surveys);
|
|
|
if(surveys!=null&&surveys.size()>0){
|
|
|
WlyySurveyUserDO wlyySurveyUserDO = surveys.get(0);
|
|
@ -927,4 +928,5 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
|
String response = HttpClientUtil.postBody(imAddr, params);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
}
|