select kmt_exercise_question_know.how_details_id
from kmt_exercise_question_know
where kmt_exercise_question_know.question_id = #{questionId}
union all
select kmt_exercise_question_know.how_details_id
from kmt_exercise_question_know,
kmt_exercise_questions brother,
kmt_exercise_questions
where kmt_exercise_question_know.question_id = brother.id
and brother.parent_id = kmt_exercise_questions.parent_id
and kmt_exercise_questions.id = #{questionId}
and ifnull(length(kmt_exercise_questions.parent_id), 0) > 0
select eq.id, eq.book_id, eq.unit_id, eq.book_course_id,
eb.auditing_user_id, eb.handle_user_id, eb.analysis_user_id, eb.analysis_auditer_id, eb.answer_correcter_id,
eq.question_type, eq.source, eq.big_question_index, eq.analysis_submit_time, eq.page_index,
eq.image, eq.precision_percent, eq.create_time, eq.deal_status, eq.remark, eq.analysis_submit_type,
eq.answer_image, eq.num, eq.small_question_name, eq.parent_id, eq.big_name, eq.real_exam_type, eq.publish_time,
eq.update_type, eq.difficulty_level, eq.training_skill, eq.course_name, eq.is_common_flag, eq.question_year, eq.exercise_book_id, eq.es_loaded,
eq.analysis_handler_submit_time, eq.question_class_type, eq.repulse_time,
eq.proofread_status, eq.question_path, eq.handler_submit_time
from kmt_exercise_questions eq
left join kmt_exercise_book eb on eq.exercise_book_id=eb.id where eq.id in
#{id}
limit 0, 5000
SELECT * FROM kmt_exercise_question_rollback where question_id in
#{id}
and type=#{dealType}
select eq.id question_id, eq.course_name, eb.handle_user_id, eb.auditing_user_id, eb.analysis_user_id, eb.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason, eq.from_user_id, eq.to_user_id,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, eq.parent_id, eq.proofread_status, eq.question_path, eq.num, eq.create_time
from kmt_exercise_questions eq left join kmt_exercise_book eb on eq.exercise_book_id=eb.id
where eq.book_course_id = #{bookCourseId} and (eq.exercise_book_id=#{exerciseBookId} or eq.is_common_flag = 0)
and eq.deal_status in (3, 7)
and eq.deal_status < 2
and eq.deal_status in (5, 8)
and eq.deal_status in (9, 10)
and eq.deal_status >= 4 and eq.deal_status != 7 and eb.answer_correcter_id=#{userId} and eq.proofread_status = 0
and eq.proofread_status > 0 and eb.answer_correcter_id=#{userId}
and eq.deal_status != 2
and eq.deal_status > 2
and eq.deal_status > 3 and eq.deal_status != 7
and eq.deal_status > 8
and eq.deal_status > 10
order by eq.num, eq.create_time
select eq.id question_id, eq.course_name, eb.handle_user_id, eb.auditing_user_id, eb.analysis_user_id, eb.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, eq.parent_id, eq.question_path
from kmt_exercise_questions eq
left join kmt_exercise_book eb on eq.exercise_book_id=eb.id
where eq.book_course_id = #{bookCourseId}
order by eq.num, eq.create_time
limit 0, 5000
select eqr.id, eqr.create_time, eqr.reason,eqr.user_id userId,eqr.to_user_id toUserId,user1.user_id tbUserId,user2.user_id tbToUserId, user1.name from_user, eqr.from_user_type from_type,user2.name to_user,
eqr.to_user_type to_type from kmt_exercise_question_rollback eqr left join tb_lib_manager user1 on eqr.user_id = user1.user_id and user1.type in (17, 18)
left join tb_lib_manager user2 on eqr.to_user_id = user2.user_id and user2.type in (17, 18)
where eqr.question_id = #{questionId}
order by eqr.create_time desc limit 20;
select eqr.id,eqr.create_time, eqr.reason, user1.name from_user, user1.type from_type, user2.name to_user,
user2.type to_type from kmt_exercise_question_rollback eqr left join kmt_sys_user user1 on eqr.user_id = user1.id
left join kmt_sys_user user2 on eqr.to_user_id = user2.id
where eqr.question_id = #{questionId} order by eqr.create_time desc limit 20;
select sum(ifnull(scon_homework_how_details.detail_count, 0)) wrong_count,
sum(ifnull(scon_homework_how_details.total_count, 1)) total_count
from scon_homework_how_details,
scon_homework
where scon_homework_how_details.homework_id = scon_homework.id
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time >= #{beginDateTime}
and #{endDateTime} >= scon_homework.create_time
and scon_homework_how_details.wrong_question_id is null
union all
select sum(if(kmt_homework_wrong_question.type = 1, 1, 0)) wrong_count, count(*) total_count
from kmt_homework_wrong_question,
scon_homework
where kmt_homework_wrong_question.homework_id = scon_homework.id
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time >= #{beginDateTime}
and #{endDateTime} >= scon_homework.create_time
and kmt_homework_wrong_question.is_delete = 0
select zyb_know_how_details_sort.alias, count(*) count_num
from scon_homework_how_details,
scon_homework,
zyb_know_how_details_sort
where scon_homework_how_details.homework_id = scon_homework.id
and scon_homework_how_details.how_detail_id = zyb_know_how_details_sort.how_details_id
and scon_homework_how_details.knowledge_version = zyb_know_how_details_sort.type
and zyb_know_how_details_sort.stat = 2
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time > #{beginDateTimeStr}
and #{endDateTimeStr} > scon_homework.create_time
and scon_homework_how_details.wrong_question_id is null
group by zyb_know_how_details_sort.alias
select kmt_homework_wrong_question.homework_id, kmt_homework_wrong_question.question_id
from kmt_homework_wrong_question,
scon_homework
where kmt_homework_wrong_question.homework_id = scon_homework.id
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time > #{beginDateTimeStr}
and #{endDateTimeStr} > scon_homework.create_time
and kmt_homework_wrong_question.is_delete = 0
select khds.alias, count(distinct eqk.question_id) count_num
from (select question_id, how_detail_sort_id
from kmt_exercise_question_know
where question_id in
#{questionId}
) eqk, zyb_know_how_details_sort khds
where eqk.how_detail_sort_id = khds.id
group by khds.alias
(select details_sort.alias,
details_sort.two_module module,
details_sort.module module,
group_concat(how_sort.alias) how_name,
sum(ifnull(scon_homework_how_details.detail_count, 0)) wrong_count,
sum(ifnull(scon_homework_how_details.total_count, 1)) total_count,
group_concat(details_sort.how_details_id) know_how_detail_id_str,
group_concat(details_sort.type) knowledge_version_str
from scon_homework_how_details,
scon_homework,
zyb_know_how_details_sort details_sort,
zyb_know_how_details_sort how_sort
where scon_homework_how_details.homework_id = scon_homework.id
and scon_homework_how_details.how_detail_id = details_sort.how_details_id
and scon_homework_how_details.knowledge_version = details_sort.type
and details_sort.stat = 2
and how_sort.how_id = details_sort.how_id
and how_sort.stat = 1
and how_sort.grade_num = details_sort.grade_num
and how_sort.semester = details_sort.semester
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time > #{beginDateTimeStr}
and #{endDateTimeStr} > scon_homework.create_time
and scon_homework_how_details.wrong_question_id is null
group by details_sort.alias)
union all
(select details_sort.alias,
details_sort.two_module module,
details_sort.module module,
group_concat(how_sort.alias) how_name,
sum(if(kmt_homework_wrong_question.type = 1, 1, 0)) wrong_count,
count(*) total_count,
group_concat(details_sort.how_details_id) know_how_detail_id_str,
group_concat(details_sort.type) knowledge_version_str
from kmt_homework_wrong_question,
scon_homework,
kmt_exercise_questions,
kmt_exercise_book_course,
kmt_exercise_question_know,
zyb_know_how_details_sort details_sort,
zyb_know_how_details_sort how_sort
where kmt_homework_wrong_question.homework_id = scon_homework.id
and kmt_homework_wrong_question.question_id = kmt_exercise_questions.id
and kmt_exercise_questions.book_course_id = kmt_exercise_book_course.id
and kmt_homework_wrong_question.question_id = kmt_exercise_question_know.question_id
and kmt_exercise_question_know.how_details_id = details_sort.how_details_id
and details_sort.type = kmt_exercise_book_course.version
and details_sort.stat = 2
and how_sort.how_id = details_sort.how_id
and how_sort.stat = 1
and how_sort.grade_num = details_sort.grade_num
and how_sort.semester = details_sort.semester
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time > #{beginDateTimeStr}
and #{endDateTimeStr} > scon_homework.create_time
and kmt_homework_wrong_question.is_delete = 0
group by details_sort.alias)
select *
from scon_homework_count
where vip_id = #{vipId}
and data_type = 2
and homework_month = #{homeworkMonth}
select how_details_id from kmt_exercise_question_know where question_id in
#{id}
group by how_details_id
select id question_id, big_question_index, question_path, num from kmt_exercise_questions where id in
#{id}
order by num
select scon_homework_how_details.how_detail_id,
scon_homework_how_details.knowledge_version version,
scon_homework_how_details.grade,
scon_homework_how_details.semester,
sum(ifnull(scon_homework_how_details.detail_count, 0)) wrong_count,
sum(ifnull(scon_homework_how_details.total_count, 1)) total_count
from scon_homework_how_details,
scon_homework,
zyb_know_how_details_sort
where scon_homework_how_details.homework_id = scon_homework.id
and scon_homework_how_details.how_detail_id = zyb_know_how_details_sort.how_details_id
and scon_homework_how_details.grade = zyb_know_how_details_sort.grade
and scon_homework_how_details.semester = zyb_know_how_details_sort.semester
and scon_homework_how_details.knowledge_version = zyb_know_how_details_sort.type
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time > #{beginDateTimeStr}
and #{endDateTimeStr} > scon_homework.create_time
and scon_homework_how_details.wrong_question_id is null
group by zyb_know_how_details_sort.alias
select kmt_homework_wrong_question.question_id, kmt_homework_wrong_question.type
from kmt_homework_wrong_question,
scon_homework
where kmt_homework_wrong_question.homework_id = scon_homework.id
and scon_homework.vip_id = #{vipId}
and scon_homework.subject = #{subject}
and scon_homework.create_time > #{beginDateTimeStr}
and #{endDateTimeStr} > scon_homework.create_time
and kmt_homework_wrong_question.is_delete = 0
select khds.how_details_id how_detail_id, khds.type version, khds.grade, khds.semester, khds.alias
from (select how_detail_sort_id from kmt_exercise_question_know where question_id = #{questionId}) eqk,
zyb_know_how_details_sort khds
where eqk.how_detail_sort_id = khds.id
select distinct t1.id, t1.book_id, t1.course_name, t1.version, t1.grade,
t1.semester, t1.book_name, t1.unit, t1.period, t1.unit_id,
t1.period_sort, t1.unit_sort from kmt_exercise_book_course t1 left join kmt_exercise_questions t2
on t1.id = t2.book_course_id where t1.analysis_user_id=#{analysisUserId} and t2.analysis_submit_type=0
order by t1.unit_sort, t1.period_sort limit 0, #{maxCount}
select k.id,
k.question_id,
k.how_details_id,
k.how_details_kd_id,
k.how_detail_sort_id,
k.how_detail_kd_sort_id,
k.version,
date_format(k.create_time, '%Y-%m-%dT%H:%i:%s.000Z') create_time,
book_id,
unit_id,
book_course_id,
question_type,
source,
big_question_index,
date_format(analysis_submit_time, '%Y-%m-%dT%H:%i:%s.000Z') analysis_submit_time,
page_index,
image,
precision_percent,
auditing_user_id,
handle_user_id,
deal_status,
remark,
analysis_submit_type,
answer_image,
t.num,
small_question_name,
ifnull(parent_id, '') parent_id,
big_name,
real_exam_type,
date_format(publish_time, '%Y-%m-%dT%H:%i:%s.000Z') publish_time,
update_type,
analysis_user_id,
ifnull(difficulty_level, 0) difficulty_level,
t.course_name,
training_skill,
concise_id,
analysis_auditer_id,
date_format(handler_submit_time, '%Y-%m-%dT%H:%i:%s.000Z') handler_submit_time,
date_format(analysis_handler_submit_time, '%Y-%m-%dT%H:%i:%s.000Z') analysis_handler_submit_time,
question_class_type,
ifnull(khds.alias, '') knowledge_name,
khds.course_name,
khds.semester,
khds.grade,
date_format(t.repulse_time, '%Y-%m-%dT%H:%i:%s.000Z') repulse_time,
t.question_path
from (select *
from kmt_exercise_question_know
where question_id in
#{questionId}
limit 1000) k join kmt_exercise_questions t on k.question_id = t.id
left join zyb_know_how_details_sort khds on k.how_detail_sort_id = khds.id
select k.id,
k.question_id,
k.how_details_id,
k.how_details_kd_id,
k.how_detail_sort_id,
k.how_detail_kd_sort_id,
k.version,
date_format(k.create_time, '%Y-%m-%dT%H:%i:%s.000Z') create_time,
book_id,
unit_id,
book_course_id,
question_type,
source,
big_question_index,
date_format(analysis_submit_time, '%Y-%m-%dT%H:%i:%s.000Z') analysis_submit_time,
page_index,
image,
precision_percent,
auditing_user_id,
handle_user_id,
deal_status,
remark,
analysis_submit_type,
answer_image,
t.num,
small_question_name,
ifnull(parent_id, '') parent_id,
big_name,
real_exam_type,
date_format(publish_time, '%Y-%m-%dT%H:%i:%s.000Z') publish_time,
update_type,
analysis_user_id,
ifnull(difficulty_level, 0) difficulty_level,
t.course_name,
training_skill,
concise_id,
analysis_auditer_id,
date_format(handler_submit_time, '%Y-%m-%dT%H:%i:%s.000Z') handler_submit_time,
date_format(analysis_handler_submit_time, '%Y-%m-%dT%H:%i:%s.000Z') analysis_handler_submit_time,
question_class_type,
ifnull(khds.alias, '') knowledge_name,
khds.course_name,
khds.semester,
khds.grade,
date_format(t.repulse_time, '%Y-%m-%dT%H:%i:%s.000Z') repulse_time,
t.question_path
from (select * from kmt_exercise_question_know where kmt_exercise_question_know.loaded = 0 limit #{pageSize}) k
join kmt_exercise_questions t on k.question_id = t.id
left join zyb_know_how_details_sort khds on k.how_detail_sort_id = khds.id
select count(distinct question_id)
from kmt_exercise_question_know
where how_details_id in
#{knowledgeId}
and kmt_exercise_question_know.version = #{version}
select eb.id exercise_book_id, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag != 3 and eb.had_handle=0 and eb.handle_user_id=#{handleUserId}
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select eb.book_id id, group_concat(distinct eb.book_year order by eb.book_year asc) book_year_list, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.part_flag
from kmt_exercise_book eb
where eb.course_name=#{subject} and eb.semester=#{semester} and eb.version=#{versionType} and eb.grade=#{grade}
and eb.handle_user_id is null
group by eb.book_id
select eb.id exercise_book_id, eb.book_id id,eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag != 3 and eb.had_auditing=0 and eb.auditing_user_id=#{auditingUserId}
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select eb.book_id id, group_concat(distinct eb.book_year order by eb.book_year asc) book_year_list, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.part_flag
from kmt_exercise_book eb
where eb.course_name=#{subject} and eb.semester=#{semester} and eb.version=#{versionType} and eb.grade=#{grade}
and eb.auditing_user_id is null
group by eb.book_id
select eb.id exercise_book_id, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag != 3 and eb.analysis_handled=0 and eb.analysis_user_id=#{analysisUserId}
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select eb.id exercise_book_id, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag != 3 and eb.analysis_audited=0 and eb.analysis_auditer_id=#{analysisAuditerId}
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select eb.id exerciseBookId, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag !=3 and eb.answer_correcter_id=#{userId} and eb.answer_corrected_status = 0
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select eb.id exerciseBookId, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag !=3 and eb.answer_correcter_id=#{userId} and eb.proofread_status > 0
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type
from kmt_exercise_book eb
where id in
#{id}
select eb.id exercise_book_id, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type, eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb
where eb.part_flag != 3 and eb.course_name=#{subject} and eb.semester=#{semester} and eb.version=#{versionType} and eb.grade=#{grade}
and eb.book_name = #{bookName}
and eb.book_name like concat('%',#{bookName},'%')
select ebc.unit_id id, ebc.unit name, ebc.id book_course_id, ebc.period book_course, ebc.period_sort from kmt_exercise_book_course ebc
left join kmt_exercise_questions eq on ebc.id=eq.book_course_id
left join kmt_exercise_book eb on eq.exercise_book_id = eb.id
where eq.exercise_book_id=#{bookId}
and eq.deal_status in (0, 1) and eb.handle_user_id=#{userId}
and eq.id=#{questionId}
and eq.deal_status in (3, 7) and eb.auditing_user_id=#{userId}
and eq.id=#{questionId}
and eq.deal_status in (5, 8) and eb.analysis_user_id=#{userId}
and eq.id=#{questionId}
and eq.deal_status in (9, 10) and eb.analysis_auditer_id=#{userId}
and eq.id=#{questionId}
and eq.deal_status >= 4 and eq.deal_status != 7 and eb.answer_correcter_id=#{userId} and eq.proofread_status = 0
and eq.id=#{questionId}
and eq.proofread_status > 0 and eb.answer_correcter_id=#{userId}
and eq.id=#{questionId}
and eq.id=#{questionId}
group by ebc.id
order by ebc.period_sort
select ebu.id, ebu.unit name, ebc.id book_course_id, ebc.period book_course from kmt_exercise_book_unit ebu
left join kmt_exercise_book_course ebc on ebu.id=ebc.unit_id
left join kmt_exercise_questions eq on ebc.id=eq.book_course_id
where ebu.book_id=#{bookId}
and ebc.had_handle = 0
and ebc.had_auditing = 0
and eq.deal_status in (5, 8)
and eq.deal_status in (9, 10)
group by ebc.id
order by ebu.num, ebc.period_sort
select ebc.unit_id id, ebc.unit name, ebc.id book_course_id, ebc.period book_course, ebc.period_sort from kmt_exercise_book_course ebc
where (ebc.book_id = #{bookId} and ebc.is_common_flag = 0) or (ebc.exercise_book_id=#{exerciseBookId} and ebc.is_common_flag = 1)
order by ebc.period_sort
select ebc.unit_id id, ebc.unit name, ebc.id book_course_id, ebc.period book_course, ebc.period_sort from kmt_exercise_book_course ebc
where ebc.exercise_book_id=#{exerciseBookId}
order by ebc.period_sort
select count(1) from kmt_exercise_questions where book_course_id=#{bookCourseId}
and id not in
#{id}
and deal_status in (3, 7)
and deal_status < 2
select count(1) from kmt_exercise_book_course where unit_id=#{unitId}
and id != #{bookCourseId}
and had_auditing = 0
and had_handle = 0
select count(1) from kmt_exercise_book_unit where book_id=#{bookId}
and id != #{unitId}
and had_auditing = 0
and had_handle = 0
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id, eq.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.num small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, parent_id, image question_image, eq.update_type
from kmt_exercise_questions eq
where (eq.id=#{questionId} or eq.parent_id=#{questionId}) and eq.question_class_type in (0, 2) and eq.book_id is null
and eq.handle_user_id = #{userId} and eq.deal_status < 2
and eq.auditing_user_id = #{userId} and eq.deal_status in (3, 7)
and eq.deal_status != 6
order by eq.num
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id, eq.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, parent_id, image question_image
from kmt_exercise_questions eq
left join kmt_exercise_question_know eqk on eq.id = eqk.question_id
where eqk.how_detail_sort_id = #{howDetailsId}
and eqk.how_detail_kd_sort_id= #{howDetailsKdId}
and eq.book_id is null and (((eq.parent_id is null or eq.parent_id='') and not exists (select 1 from kmt_exercise_questions tmpeq where tmpeq.parent_id = eq.id))
or (eq.parent_id is not null and eq.parent_id != ''))
and eq.handle_user_id = #{userId} and eq.deal_status < 2
and eq.auditing_user_id = #{userId} and eq.deal_status in (3, 7)
and eq.deal_status != 6
and (
eq.handle_user_id in
#{userId}
OR
eq.auditing_user_id in
#{userId}
)
group by eq.id
order by eq.handler_submit_time, eq.parent_id, eq.num, eq.id
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id, eq.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, parent_id, image question_image
from kmt_exercise_questions eq
left join zyb_know_how_details_sort khds on eq.concise_id=khds.id
where eq.book_id is null and eq.question_class_type in (0, 2)
and khds.grade = #{grade}
and khds.course_name = #{courseName}
and khds.type = #{type}
and khds.semester = #{semester}
and eq.handle_user_id = #{userId} and eq.deal_status < 2
and eq.auditing_user_id = #{userId} and eq.deal_status in (3, 7)
and eq.deal_status != 6
and (
eq.handle_user_id in
#{userId}
OR
eq.auditing_user_id in
#{userId}
)
group by eq.id
order by eq.handler_submit_time, eq.parent_id, eq.num, eq.id
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id, eq.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, eq.parent_id, image question_image
from kmt_exercise_questions eq
where eq.book_id is null and (((eq.parent_id is null or eq.parent_id='') and not exists (select 1 from kmt_exercise_questions tmpeq where tmpeq.parent_id = eq.id))
or (eq.parent_id is not null and eq.parent_id != ''))
and eq.handle_user_id = #{userId} and eq.deal_status < 2
and eq.auditing_user_id = #{userId} and eq.deal_status in (3, 7)
and eq.deal_status != 6
and (
eq.handle_user_id in
#{userId}
OR
eq.auditing_user_id in
#{userId}
)
group by eq.id
order by eq.handler_submit_time, eq.parent_id, eq.num, eq.id
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id, eq.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, eq.parent_id, image question_image
from kmt_exercise_questions eq
where eq.parent_id in
#{id}
and eq.deal_status != 6
order by eq.parent_id, eq.num
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id, eq.analysis_auditer_id, eq.book_course_id course_id,
eq.big_question_index, eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason,
eq.question_type question_types, eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, eq.parent_id, image question_image,eq.update_type
from kmt_exercise_questions eq
where eq.id = #{id}
select eqk.question_id, hds.id how_details_id, hds.alias detail_name, hdks.id how_details_kd_id, hdks.alias kd_name,
hds.grade, hds.course_name, hds.type version_type, hds.semester, khd.is_zt module_type, hs.alias how_name, hds.num, hdks.num
from kmt_exercise_question_know eqk
left join zyb_know_how_details_sort hds on eqk.how_detail_sort_id=hds.id
left join zyb_know_how_details_sort hs on hds.how_id=hs.how_id and hds.type=hs.type and hds.semester=hs.semester and hds.grade=hs.grade and hs.stat=1
left join zyb_know_how_details_sort hdks on eqk.how_detail_kd_sort_id=hdks.id
left join zyb_know_how_details khd on hds.how_details_id=khd.id
where question_id in
#{id}
order by eqk.question_id, hds.num, hdks.num
select eqk.question_id, hds.id how_details_id, hds.alias detail_name, hdks.id how_details_kd_id, hdks.alias kd_name,
hds.grade, hds.course_name, hds.type version_type, hds.semester, khd.is_zt module_type, hs.alias how_name
from kmt_quality_question_know eqk
left join zyb_know_how_details_sort hds on eqk.how_detail_sort_id=hds.id
left join zyb_know_how_details_sort hs on hds.how_id=hs.how_id and hds.type=hs.type and hds.semester=hs.semester and hds.grade=hs.grade and hs.stat=1
left join zyb_know_how_details_sort hdks on eqk.how_detail_kd_sort_id=hdks.id
left join zyb_know_how_details khd on hds.how_details_id=khd.id
where question_id in
#{id}
order by eqk.question_id, hds.num, hdks.num
select parent.* from kmt_exercise_questions child left join kmt_exercise_questions parent on child.parent_id=parent.id
where child.id=#{questionId} and parent.id is not null
select eb.id book_id, eb.book_name, eb.part_flag, eb.course_name, eb.version version_type, eb.semester from kmt_exercise_book eb
left join scon_homework_exercise_except hee on eb.id=hee.except_book_id
and hee.school=#{school}
where hee.id is null and eb.course_name=#{subject}
and version=#{versionType}
and eb.semester=#{semester} and eb.grade=#{grade}
and eb.book_type in (0, 1, 3)
order by eb.id
select eb.id book_id, eb.book_name, eb.part_flag, eb.course_name, eb.version version_type, eb.semester from kmt_exercise_book eb where eb.course_name=#{subject}
and eb.semester=#{semester} and eb.grade=#{grade}
and version=#{versionType}
and eb.book_type in (0, 1, 3)
order by eb.id
select * from kmt_exercise_book where id=#{bookId}
select id, book_id from kmt_exercise_book where book_id=#{bookId} and book_year=#{bookYear}
and book_type=#{bookType}
limit 1
select eb.id book_id, ebc.book_name, ebc.unit_id, ebc.unit, ebc.id, ebc.period, ebc.grade,
ebc.course_name, ebc.version, ebc.semester, eb.part_flag remark from kmt_exercise_book_course ebc
left join kmt_exercise_book eb on ebc.book_id=eb.book_id where eb.id in
#{id}
order by eb.id,ebc.unit_sort,ebc.period_sort limit 5000
delete from kmt_exercise_question_know where question_id in
#{id}
delete from kmt_exercise_book_status_count where exercise_book_id in
#{id}
UPDATE kmt_exercise_questions set deal_status=3 WHERE id in
#{id}
update kmt_exercise_question_know set loaded = 1 where loaded = 0 and id in
#{id}
update kmt_exercise_book set had_handle=0 where id=#{id}
update kmt_exercise_book set had_auditing=0 where id=#{id}
update kmt_exercise_book set analysis_handled=0 where id=#{id}
update kmt_exercise_book set analysis_audited=0 where id=#{id}
update kmt_exercise_book_course set had_handle=0, had_auditing=0 where id=#{id}
update kmt_exercise_book_course set had_auditing=0 where id=#{id}
update kmt_exercise_question_know set loaded = #{newLoaded}
where id in
#{kmtExerciseQuestionKnowId}
select id
from kmt_exercise_book eb
where eb.course_name = #{map.subject}
and eb.grade = #{map.grade}
and eb.semester = #{map.semester}
and eb.book_type in (0, 1, 3)
and not exists (
select 1 from scon_homework_exercise_except t1
where t1.school = #{map.school}
and t1.grade = #{map.grade}
and t1.course_name = #{map.subject}
and eb.book_id = t1.except_book_id
)
and version = #{map.version}
select
id,
difficulty_level difficulty,
question_type optionTypeInt,
course_name,
num
from kmt_exercise_questions
where parent_id = #{parentId}
order by num
t.id exerciseBookId,
t.url1,
t.url2,
t.book_name bookName,
t.press,
t.course_name subject,
t.grade,
t.version,
t.version_name versionName,
t.semester,
t.print_year printYear,
t.book_year bookYear,
t.book_year useYear,
t.status,
t.org_nums orgNums,
t.progress,
t.total_grade_priority priority,
t.identified_nums identifiedNums,
t.answer_correcter_id answerCorrecterId,
t.book_type,
t.check_time checkTime,
t.ai_rollback_import aiRollbackImport,
t.updated_time,
t.assigned_batch
select
from kmt_exercise_book t
where 1=1
and not exists (
select 1 from kmt_exercise_book_status_count t1
where t.id = t1.exercise_book_id
and t1.data_status = 1
and t1.status > 0
and t1.status < 5
)
and t.status is not null
and t.proofread_status = 0
and t.answer_correcter_id is null
and t.part_flag != 3
and t.book_type = ${map.bookType}
and t.progress = #{map.progress}
and t.course_name = #{map.subject}
and t.grade = #{map.grade}
and t.book_name like concat('%',#{map.bookName},'%')
and t.semester = #{map.semester}
and t.version_name = #{map.versionName}
and t.book_year = #{map.bookYear}
order by t.updated_time desc,t.book_name
select
,t1.name teacherName, t1.user_id, t.create_time
from kmt_exercise_book t
left join tb_lib_manager t1 on t.answer_correcter_id = t1.user_id
and t1.type = 17
and t1.authority = 8
and t1.state = 1
where 1=1
and t1.name regexp #{map.teacherName}
and t.book_name regexp #{map.exerciseName}
and t.check_time >= #{map.beginTime}
and t.check_time <= #{map.endTime}
and t.part_flag != 3
and t.answer_corrected_status = 0
and t.answer_correcter_id is not null
order by t1.name,t1.user_id,t.book_name
and t.part_flag != 3
and t.answer_corrected_status = 1
order by t1.name,t1.user_id,t.book_name,t.create_time asc
select * from kmt_exercise_question_rollback where question_id=#{questionId} order by create_time desc limit 1
select t1.*
from tb_lib_join t1
where 1=1
and t1.type = 1
and t1.league_name regexp #{map.name}
and exists (
select 1 from fx_merchant t2 where t1.id = t2.lib_id and t2.sign_service > 0
)
order by t1.league_name
select status,
count(*) totalCount,
sum(if(course_name = '语文', 1, 0)) chineseCount,
sum(if(course_name = '数学', 1, 0)) mathCount,
sum(if(course_name = '英语', 1, 0)) englishCount
from kmt_exercise_book_status_count
where data_status = 1
group by status
select t1.lib_id libId,t3.league_lat leagueLet,t3.league_lng leagueLng,t3.league_name leagueName, ifNull(t4.sign_service,0) signService
from kmt_exercise_book_lib t1
left join kmt_exercise_book t2 on t1.exercise_book_id =t2.id and t1.is_delete=0
left join tb_lib_join t3 on t1.lib_id=t3.id
left join fx_merchant t4 on t1.lib_id=t4.lib_id
where t1.lib_id is not null and t1.lib_id !=''
and t2.course_name=#{subject}
and t1.is_delete=0
and t4.sign_service!=0
and t4.sign_service is not null
group by libId
select distinct t1.book_id bookId, t1.book_name exerciseName,t1.version_name version,t1.total_grade_priority priority,t1.semester,t1.grade,t1.progress progress,t1.total_grade_priority totalPriority,t1.create_time createTime
from kmt_exercise_book_lib t
left join kmt_exercise_book t1 on t.exercise_book_id =t1.id
where t.lib_id=#{libId}
and t1.course_name=#{subject}
and t.is_delete=0
select distinct t1.exercise_book_id bookId, t1.lib_id libId,t3.league_lat leagueLet,t3.league_lng leagueLng,t3.league_name leagueName,ifNull(t4.sign_service,0)signService
from kmt_exercise_book_lib t1
left join kmt_exercise_book t2 on t1.exercise_book_id =t2.id
left join tb_lib_join t3 on t1.lib_id=t3.id
left join fx_merchant t4 on t1.lib_id=t4.lib_id
where t1.lib_id is not null
and t2.course_name=#{subject}
and t1.is_delete=0
select * from kmt_exercise_questions where (id in
#{id}
or parent_id in
#{id}
) and deal_status != 6
order by num
limit 2000
select * from kmt_exercise_question_rollback where question_id= #{questionId} order by create_time desc
select * from tb_lib_manager where user_id= #{userId}
and type in(17,18) limit 1
select t1.id id,t1.exercise_book_id exerciseBookId,t1.lib_id libId,t2.sign_service signService from kmt_exercise_book_lib t1 left join fx_merchant t2
on t1.lib_id=t2.lib_id
where t1.exercise_book_id is not null
and t1.is_delete=0
limit 10000
select eq.id, eq.book_id, eq.unit_id, eq.book_course_id,
eb.auditing_user_id, eb.handle_user_id, eb.analysis_user_id, eb.analysis_auditer_id, eb.answer_correcter_id,
eq.question_type, eq.source, eq.big_question_index, eq.analysis_submit_time, eq.page_index,
eq.image, eq.precision_percent, eq.create_time, eq.deal_status, eq.remark, eq.analysis_submit_type,
eq.answer_image, eq.num, eq.small_question_name, eq.parent_id, eq.big_name, eq.real_exam_type, eq.publish_time,
eq.update_type, eq.difficulty_level, eq.training_skill, eq.course_name, eq.is_common_flag, eq.question_year, eq.exercise_book_id, eq.es_loaded,
eq.analysis_handler_submit_time, eq.question_class_type, eq.repulse_time, eq.handler_submit_time,
eq.proofread_status, eq.question_path
from kmt_exercise_questions eq
left join kmt_exercise_book eb on eq.exercise_book_id=eb.id where eq.exercise_book_id=#{exerciseBookId} limit 10000
select eq.id, eq.book_id, eq.unit_id, eq.book_course_id,
eb.auditing_user_id, eb.handle_user_id, eb.analysis_user_id, eb.analysis_auditer_id, eb.answer_correcter_id,
eq.question_type, eq.source, eq.big_question_index, eq.analysis_submit_time, eq.page_index,
eq.image, eq.precision_percent, eq.create_time, eq.deal_status, eq.remark, eq.analysis_submit_type,
eq.answer_image, eq.num, eq.small_question_name, eq.parent_id, eq.big_name, eq.real_exam_type, eq.publish_time,
eq.update_type, eq.difficulty_level, eq.training_skill, eq.course_name, eq.is_common_flag, eq.question_year, eq.exercise_book_id, eq.es_loaded,
eq.analysis_handler_submit_time, eq.question_class_type, eq.repulse_time, eq.handler_submit_time,
eq.proofread_status, eq.question_path
from kmt_exercise_questions eq
left join kmt_exercise_book eb on eq.exercise_book_id=eb.id where eq.id in
#{id}
limit 10000
update kmt_exercise_book set exercise_relevancy_num=#{exerciseRelevancyNum} where id=#{exerciseBooId}
select * from kmt_exercise_book
where
exercise_relevancy_num !=0
and exercise_relevancy_num is not null
order by exercise_relevancy_num desc
limit 10000
select distinct t1.id exerciseBookId,
t1.book_name,
t1.course_name subject,
t1.grade,
t1.version,
t1.semester,
t1.proofread_status,
t1.book_type,
t1.latest_answer_wrong_date_time proofreadDate,
t3.name
from kmt_exercise_book t1 left join tb_lib_manager t3
on t1.answer_correcter_id=t3.user_id
and t3.type=17 and t3.authority=8 and t3.state=1
where t1.proofread_status in (2, 3)
and t1.course_name = #{req.subject}
and t1.grade = #{req.grade}
and t1.book_name like concat('%',#{req.bookName},'%')
and date(t1.latest_answer_wrong_date_time) = #{req.proofreadDate}
order by t1.proofread_status
select eq.id question_id, eq.course_name, eq.handle_user_id, eq.auditing_user_id, eq.analysis_user_id,
eq.analysis_auditer_id, eq.book_course_id course_id, eq.big_question_index,
eq.small_question_name small_question_index,
eq.deal_status question_status, eq.create_time, eq.remark reason, eq.question_type question_types,
eq.difficulty_level difficulty_levels, eq.real_exam_type real_exam_types,
eq.training_skill training_skills, eq.parent_id, eq.question_path,eq.num
from kmt_exercise_questions eq
where eq.exercise_book_id = #{req.exerciseBookId}
and eq.book_course_id = #{req.periodId}
and eq.proofread_status = 2
order by eq.num, eq.create_time
select eq.id question_id,
eq.course_name,
eb.handle_user_id,
eb.auditing_user_id,
eb.analysis_user_id,
eb.analysis_auditer_id,
eq.book_course_id course_id,
eq.big_question_index,
eq.small_question_name small_question_index,
eq.deal_status question_status,
eq.create_time,
eq.remark reason,
eq.from_user_id,
eq.to_user_id,
eq.question_type question_types,
eq.difficulty_level difficulty_levels,
eq.real_exam_type real_exam_types,
eq.training_skill training_skills,
eq.parent_id,
eq.question_path,
eq.num
from kmt_exercise_questions eq
left join kmt_exercise_book eb on eq.exercise_book_id=eb.id
where eq.exercise_book_id = #{req.exerciseBookId}
and eq.deal_status in
#{dealStatus}
order by eq.num, eq.create_time, eq.deal_status
limit 0, 5000
update kmt_exercise_book set priority=#{priority} where id=#{id}
update kmt_exercise_book set total_grade_priority=#{totalGradePriority} where id=#{id}
select id from kmt_exercise_book eb where eb.answer_correcter_id is not null
select eq.* from kmt_exercise_questions eq left kmt_exercise_book eb on eq.exercise_book_id=eb.id where eb.answer_correcter_id is not null and eq.book_id=#{bookId}
update kmt_exercise_book set proofread_status=#{proofreadStatus} where id=#{id}
update kmt_exercise_book set proofread_status=#{type}, latest_answer_wrong_date_time = now() where id=#{exerciseBookId}
select count(*) from kmt_exercise_questions where exercise_book_id = #{exerciseBookId} and proofread_status = 2 and deal_status not in (2, 6)
and id not in
#{id}
select count(1) total,sum(answer_corrected_status) finishedNums
from kmt_exercise_book
where answer_correcter_id = #{userId}
select ebc.unit_id id, ebc.unit name, ebc.id book_course_id, ebc.period book_course
from kmt_exercise_book_course ebc
where ebc.id in (select distinct book_course_id
from kmt_exercise_questions
where exercise_book_id = #{request.exerciseBookId} and proofread_status = 2)
select * from kmt_exercise_question_errors where question_id in
#{id}
and error_user_auth=#{beType}
select * from kmt_exercise_question_errors where error_user_id=#{userId} order by create_time desc
select count(1) from kmt_exercise_question_errors where exercise_book_id=#{exerciseBookId}
and error_user_id=#{userId} and error_user_auth=#{type}
SELECT t.*
FROM kmt_exercise_book t,
(select book_name,
course_name,
grade,
version_name,
semester,
book_type,
book_year,
COUNT(book_name) c1,
COUNT(course_name) c2,
COUNT(grade) c3,
COUNT(version_name) c4,
COUNT(semester) c5,
COUNT(book_type) c6,
COUNT(book_year) c7
from kmt_exercise_book
group by book_name, course_name, grade, version_name, semester, book_type, book_year
HAVING c1 > 1
and c2 > 1
and c3 > 1
and c4 > 1
and c5 > 1
and c6 > 1
and c7 > 1) t1
where t.book_name = t1.book_name
and t.course_name = t1.course_name
and t.grade = t1.grade
and t.version_name = t1.version_name
and t.semester = t1.semester
and t.book_type = t1.book_type
and t.book_year = t1.book_year
order by t.book_name, t.course_name, t.grade, t.version_name, t.semester, t.book_type, t.book_year, t.part_flag
select count(1) from kmt_exercise_questions where exercise_book_id=#{exerciseBookId}
and deal_status in (0, 1)
and deal_status in (3, 7)
and deal_status in (5, 8)
and deal_status in (9, 10)
select sum(if(handle_user_id is null or auditing_user_id is null or analysis_user_id is null or
analysis_auditer_id is null, 1, 0)) notDistributedExerciseBookCount,
count(*) totalExerciseBookCount
from kmt_exercise_book
where part_flag <> 3
select eb.exerciseBookId,
eb.importDate,
eb.subject,
eb.grade,
eb.version_name,
eb.semester,
eb.book_name,
eb.book_type,
eb.assigned_batch,
(select count(distinct unit_id)
from kmt_exercise_book_course ebc
where ebc.exercise_book_id = eb.exerciseBookId) unitNum,
(select count(*)
from kmt_exercise_book_course ebc
where ebc.exercise_book_id = eb.exerciseBookId) courseNum,
ebcHandle.accuracy intHandleAccuracy,
ebcHandleAudit.accuracy intHandleAuditAccuracy,
ebcAnalysis.accuracy intAnalysisAccuracy,
ebtrHandle.teacher_id handlerTeacherId,
ebtrHandle.teacher_name handlerName,
ebtrHandle.salary_given handlerSalaryGiven,
ebtrHandle.salary_given_time handlerSalaryGivenTime,
ebtrHandle.create_time handlerDistributeTime,
ebtrHandleAudit.teacher_id handlerAuditUserTeacherId,
ebtrHandleAudit.teacher_name handlerAuditUserName,
ebtrHandleAudit.salary_given handlerAuditUserSalaryGiven,
ebtrHandleAudit.salary_given_time handlerAuditUserSalaryGivenTime,
ebtrHandleAudit.create_time handlerAuditUserDistributeTime,
ebtrAnalysis.teacher_id analyserTeacherId,
ebtrAnalysis.teacher_name analyserName,
ebtrAnalysis.salary_given analyserSalaryGiven,
ebtrAnalysis.salary_given_time analyserSalaryGivenTime,
ebtrAnalysis.create_time analyserDistributeTime,
ebtrAnalysisAudit.teacher_id analysisAuditUserTeacherId,
ebtrAnalysisAudit.teacher_name analysisAuditUserName,
ebtrAnalysisAudit.salary_given analysisAuditUserSalaryGiven,
ebtrAnalysisAudit.salary_given_time analysisAuditUserSalaryGivenTime,
ebtrAnalysisAudit.create_time analysisAuditUserDistributeTime
from (select id exerciseBookId,
create_time importDate,
course_name subject,
grade,
version_name,
semester,
book_name,
book_type,
handle_user_id,
auditing_user_id,
analysis_user_id,
analysis_auditer_id,
assigned_batch
from kmt_exercise_book
where (3 > part_flag or part_flag > 3)
and (
handle_user_id is null and
auditing_user_id is null and
analysis_user_id is null and
analysis_auditer_id is null and
1 = 1
handle_user_id is null
or auditing_user_id is null
or analysis_user_id is null
or analysis_auditer_id is null
)
and (handle_user_id is not null
and auditing_user_id is not null
and analysis_user_id is not null
and analysis_auditer_id is not null)
and book_name like '%${req.bookName}%'
and course_name = #{req.subject}
and grade = #{req.grade}
and version = #{req.version}
and semester = #{req.semester}
and book_type = #{req.bookType}
and create_time > #{req.startTime}
and '${req.endTime} 23:59:59' > create_time
order by create_time desc
limit #{offset}, #{pageSize}) eb
left join kmt_exercise_book_teacher_record ebtrHandle
on eb.exerciseBookId = ebtrHandle.exercise_book_id and ebtrHandle.authority_type = 1
left join kmt_exercise_book_count ebcHandle
on eb.exerciseBookId = ebcHandle.exercise_book_id and ebcHandle.type = 1
left join kmt_exercise_book_teacher_record ebtrHandleAudit
on eb.exerciseBookId = ebtrHandleAudit.exercise_book_id and ebtrHandleAudit.authority_type = 2
left join kmt_exercise_book_count ebcHandleAudit
on eb.exerciseBookId = ebcHandleAudit.exercise_book_id and ebcHandleAudit.type = 2
left join kmt_exercise_book_teacher_record ebtrAnalysis
on eb.exerciseBookId = ebtrAnalysis.exercise_book_id and ebtrAnalysis.authority_type = 3
left join kmt_exercise_book_count ebcAnalysis
on eb.exerciseBookId = ebcAnalysis.exercise_book_id and ebcAnalysis.type = 3
left join kmt_exercise_book_teacher_record ebtrAnalysisAudit
on eb.exerciseBookId = ebtrAnalysisAudit.exercise_book_id and ebtrAnalysisAudit.authority_type = 4
left join kmt_exercise_book_count ebcAnalysisAudit
on eb.exerciseBookId = ebcAnalysisAudit.exercise_book_id and ebcAnalysisAudit.type = 4
order by eb.importDate desc
select count(*)
from kmt_exercise_book
where part_flag <> 3
and (
handle_user_id is null and
auditing_user_id is null and
analysis_user_id is null and
analysis_auditer_id is null and
1 = 1
handle_user_id is null
or auditing_user_id is null
or analysis_user_id is null
or analysis_auditer_id is null
)
and (handle_user_id is not null
and auditing_user_id is not null
and analysis_user_id is not null
and analysis_auditer_id is not null)
and book_name like '%${req.bookName}%'
and course_name = #{req.subject}
and grade = #{req.grade}
and version = #{req.version}
and semester = #{req.semester}
and book_type = #{req.bookType}
and create_time > #{req.startTime}
and '${req.endTime} 23:59:59' > create_time
update kmt_exercise_book set answer_correcter_id = #{teacherId}
where id in
#{exerciseBookId}
update kmt_exercise_questions set answer_correcter_id = #{teacherId}
where exercise_book_id in
#{exerciseBookId}
select ebdc.*, eb.assigned_batch
from kmt_exercise_book_distribution_count ebdc join kmt_exercise_book eb on ebdc.exercise_book_id=eb.id
and ebdc.import_date > #{req.startTime}
and '${req.endTime} 23:59:59' > ebdc.import_date
order by ebdc.import_date desc
limit #{offset}
select teacher_id,
teacher_name,
salary_given,
salary_given_time
, (select max(handler_submit_time)
from kmt_exercise_questions eq
where eq.exercise_book_id = #{exerciseBookId} and eq.deal_status > 0) lastSubmitTime
, (select max(publish_time)
from kmt_exercise_questions eq
where eq.exercise_book_id = #{exerciseBookId} and eq.deal_status > 3) lastSubmitTime
, (select max(analysis_handler_submit_time)
from kmt_exercise_questions eq
where eq.exercise_book_id = #{exerciseBookId} and eq.deal_status > 5) lastSubmitTime
, (select max(analysis_submit_time)
from kmt_exercise_questions eq
where eq.exercise_book_id = #{exerciseBookId} and eq.deal_status = 11) lastSubmitTime
from kmt_exercise_book_teacher_record
where exercise_book_id = #{exerciseBookId}
and teacher_id = #{userId}
and authority_type = #{authorityType}
order by create_time desc
limit 1
select * from kmt_exercise_book
where part_flag <> 3
and id in
#{selectedExerciseBookId}
limit #{offset}, #{pageSize}
select count(1) from kmt_exercise_questions where exercise_book_id=#{exerciseBookId}
and deal_status != 2 and proofread_status = 0
select count(1) from kmt_exercise_questions where exercise_book_id=#{exerciseBookId}
and proofread_status = 0
select * from kmt_exercise_book where book_id=#{bookId}
select * from kmt_exercise_book_teacher_record where exercise_book_id in
#{id}
and authority_type = #{authType}
select * from kmt_exercise_book_count where exercise_book_id=#{exerciseBookId} and type=#{type} limit 1
UPDATE kmt_exercise_book_count set accuracy=#{accuracy} WHERE id = #{bookCountId}
SELECT DISTINCT lib_id FROM
kmt_exercise_book_lib t
LEFT JOIN kmt_exercise_book t1 ON t.exercise_book_id = t1.id
WHERE
t.is_delete = 0
and t.lib_id is not null
AND t1.course_name = #{subjct}
select * from fx_merchant where lib_id=#{libId} and sign_service is not null limit 1
select eb.id exercise_book_id, eb.book_id id, eb.book_year, eb.book_name name, eb.grade, eb.course_name subject, eb.version version_type,
eb.semester, eb.book_type,eb.ai_rollback_import aiRollbackImport
from kmt_exercise_book eb, kmt_exercise_questions eq
where eb.id=eq.exercise_book_id and eq.id=#{questionId} and eb.part_flag != 3