Browse Source

试题查询

master
6 years ago
parent
commit
ad67115617
  1. 2
      ht/src/main/java/com/ccsens/ht/api/PatientReportController.java
  2. 4
      ht/src/main/resources/mapper_dao/HtQuestionOptionDao.xml

2
ht/src/main/java/com/ccsens/ht/api/PatientReportController.java

@ -50,7 +50,7 @@ public class PatientReportController {
//TODO 判断病友是否和当前医院绑定,未绑定,进行绑定 //TODO 判断病友是否和当前医院绑定,未绑定,进行绑定
JsonResponse<PatientReportVo.Generate> response = patientReportService.generatePatientReport(patientReport, dto.getUserId()); JsonResponse<PatientReportVo.Generate> response = patientReportService.generatePatientReport(patientReport, dto.getUserId());
log.info("生成病友报告单返回:{}", response); log.info("生成病友报告单返回:{}", response);
return JsonResponse.newInstance().ok(response); return response;
} }
@MustLogin @MustLogin
@DoctorAudit @DoctorAudit

4
ht/src/main/resources/mapper_dao/HtQuestionOptionDao.xml

@ -42,8 +42,8 @@
<select id="queryOption" resultMap="OptionMap"> <select id="queryOption" resultMap="OptionMap">
select t1.id, t1.type, t1.question_id, t1.name, t1.score, t1.display, if (t2.id is null, 0, 1) as choose , if(t2.type = 3, null, t2.answer) as answer select t1.id, t1.type, t1.question_id, t1.name, t1.score, t1.display, if (t2.id is null, 0, 1) as choose , if(t2.type = 3, null, t2.answer) as answer
from t_ht_question_option t1 left join t_ht_patient_score t2 on t1.id = t2.option_id from t_ht_question_option t1 left join t_ht_patient_score t2 on t1.id = t2.option_id and (t2.id is null or t2.patient_report_id = #{patientReportId,jdbcType=BIGINT})
where t1.question_id = #{questionId,jdbcType=BIGINT} and (t2.id is null or t2.patient_report_id = #{patientReportId,jdbcType=BIGINT}) where t1.question_id = #{questionId,jdbcType=BIGINT}
and t1.is_del = 0 and t1.is_del = 0
group by t1.id group by t1.id
order by t1.sort order by t1.sort

Loading…
Cancel
Save