|
|
|
@ -486,8 +486,8 @@ getCourseInfoByBusinessTypeAndTitle
|
|
|
|
|
|
|
|
|
|
@// 开课的课程表查询
|
|
|
|
|
@} else if(!isEmpty(businessType) && businessType == 'FROM_OPEN_COURSE') {
|
|
|
|
|
SELECT teacher_open_course_merge_course_info_id
|
|
|
|
|
FROM teacher_open_course_merge_course_info t
|
|
|
|
|
SELECT merge_course_info_id
|
|
|
|
|
FROM merge_course_info t
|
|
|
|
|
WHERE 1 AND ( 1
|
|
|
|
|
@if(!isEmpty(courseInfoTitle)){
|
|
|
|
|
AND (
|
|
|
|
@ -499,7 +499,46 @@ getCourseInfoByBusinessTypeAndTitle
|
|
|
|
|
@} else {
|
|
|
|
|
AND
|
|
|
|
|
@}
|
|
|
|
|
t.teacher_open_course_merge_course_info_id = #importCourseId#
|
|
|
|
|
t.merge_course_info_id = #importCourseId#
|
|
|
|
|
@}
|
|
|
|
|
)
|
|
|
|
|
@}
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
getGroupQuestionTypeCountAndSelectInfo
|
|
|
|
|
===
|
|
|
|
|
* 考证离线题库,根据题目类型分组查询数量,和选中的情况
|
|
|
|
|
|
|
|
|
|
select
|
|
|
|
|
z.*,
|
|
|
|
|
z.select_count * z.single_score as single_type_total_score
|
|
|
|
|
from (
|
|
|
|
|
SELECT
|
|
|
|
|
t.question_type,
|
|
|
|
|
count( 1 ) AS total_count,
|
|
|
|
|
@// 该题目类型下,选择的数据
|
|
|
|
|
( SELECT count( 1 ) FROM general_resources_question_snapshot v
|
|
|
|
|
WHERE v.general_question_setting_id = ta.general_question_setting_id
|
|
|
|
|
AND v.question_type = t.question_type AND v.question_status = 1 ) AS select_count,
|
|
|
|
|
@// 该题目类型下设置的分数,可能会有不同分数的情况,默认取最大分数
|
|
|
|
|
( SELECT max( question_score ) FROM general_resources_question_snapshot v
|
|
|
|
|
WHERE v.general_question_setting_id = ta.general_question_setting_id
|
|
|
|
|
AND v.question_type = t.question_type AND v.question_status = 1 ) AS single_score
|
|
|
|
|
FROM
|
|
|
|
|
resources_question t
|
|
|
|
|
LEFT JOIN general_question_setting ta ON ta.general_question_setting_id = t.resources_question_id
|
|
|
|
|
WHERE
|
|
|
|
|
1 = 1
|
|
|
|
|
AND t.question_status = 1
|
|
|
|
|
@ // 课程ID
|
|
|
|
|
@if(!isEmpty(courseInfoId)){
|
|
|
|
|
AND t.id = #courseInfoId#
|
|
|
|
|
@}
|
|
|
|
|
@ // 开课题目配置ID
|
|
|
|
|
@if(!isEmpty(questionSettingId)){
|
|
|
|
|
AND ta.question_setting_id = #questionSettingId#
|
|
|
|
|
@}
|
|
|
|
|
GROUP BY
|
|
|
|
|
1,3,4
|
|
|
|
|
ORDER BY
|
|
|
|
|
t.question_type ASC
|
|
|
|
|
) z
|