|
@ -108,7 +108,7 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
String str = "SELECT DISTINCT t.patient AS patient,p.name,p.openid " +
|
|
|
" FROM `wlyy_sign_patient_label_info` t,wlyy_patient p " +
|
|
|
" WHERE t.`patient` = p.`code` " +
|
|
|
" AND p.`openid` IS NOT NULL ";
|
|
|
" AND p.`openid` IS NOT NULL AND p.`openid`!='' ";
|
|
|
// 保存到维度详情表(不限不保存) 维度表(1性别 2疾病类型 3服务类型 4健康状况)
|
|
|
if (sex != 0) {
|
|
|
str += "AND(p.sex=" + sex + ")";
|
|
@ -247,7 +247,6 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
|
|
|
List<Map<String, Object>> patients = jdbcTemplate.queryForList(str);
|
|
|
int amount = patients.size();
|
|
|
// int amount = 1234;
|
|
|
for (Map<String, Object> patient : patients) {
|
|
|
String code = patient.get("patient").toString();
|
|
|
SurveyUser user = new SurveyUser(surveyCode, code, 0, 1, new Date(), new Date());
|
|
@ -682,8 +681,8 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
int type = question.getQuestionType();
|
|
|
int amount = 0;
|
|
|
int[] sum = surveyStatisticsDao.findByIdAndQstId(id, qstcode);
|
|
|
for (int count :sum) {
|
|
|
amount+=count;
|
|
|
for (int count : sum) {
|
|
|
amount += count;
|
|
|
}
|
|
|
qst.put("amount", amount);
|
|
|
qst.put("qstcode", qstcode);
|
|
@ -713,7 +712,7 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
public JSONObject getOptionsComment(String id, String questionId, String optionId,int pageNo,int pageSize) throws Exception {
|
|
|
public JSONObject getOptionsComment(String id, String questionId, String optionId, int pageNo, int pageSize) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
SurveyQuestionnaire question = surveyQuestionnaireDao.findByIdAndQstId(id, questionId);
|
|
|
Sort sort = new Sort(Sort.Direction.ASC, "createTime");
|
|
@ -725,13 +724,13 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
|
String option = opt.getContent();
|
|
|
jsonObject.put("option", option);
|
|
|
// 获取同一个选项的所有回答的说明(分页?)
|
|
|
Page<String> optionComment = surveyOptionAnswersDao.findByRelationCode(id, questionId, optionId,request);
|
|
|
Page<String> optionComment = surveyOptionAnswersDao.findByRelationCode(id, questionId, optionId, request);
|
|
|
jsonObject.put("content", optionComment.getContent());
|
|
|
int amount = surveyOptionAnswersDao.findByRelationCode(id, questionId, optionId);
|
|
|
jsonObject.put("amount", amount);
|
|
|
} else {
|
|
|
// 查看问答题答案(分页?)
|
|
|
Page<String> answer = surveyAnswersDao.findByRelationCode(id, questionId,request);
|
|
|
Page<String> answer = surveyAnswersDao.findByRelationCode(id, questionId, request);
|
|
|
jsonObject.put("content", answer.getContent());
|
|
|
int amount = surveyAnswersDao.findByRelationCode(id, questionId);
|
|
|
jsonObject.put("amount", amount);
|