- 系统管理模块(用户/角色/组织/权限/日志) - 教育培训计划管理模块 - 教育培训实施模块 - 考试管理模块 - 调研问卷管理模块 - 外派培训管理模块 - 年度培训总结模块 - 学习资源管理模块 - 任职资格管理模块 - 即时通讯模块 - APP 版本管理 - 统计分析模块(FineReport) - 代码审查标准和报告(CODE_REVIEW_GUIDE.md, CODE_REVIEW_REPORT.md) - 项目开发指南(PROJECT_GUIDE.md)
167 lines
7.9 KiB
XML
167 lines
7.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<dynamic-sql>
|
|
<sql id="getDepartmentList"><![CDATA[
|
|
select * from et_exam_limitation where
|
|
<@p>exam_id</@p>
|
|
|
|
]]></sql>
|
|
|
|
<sql id="examLimitationList"><![CDATA[
|
|
select * from et_exam_limitation where
|
|
<@p>exam_id</@p>
|
|
|
|
]]></sql>
|
|
|
|
<sql id="deleteexamLimitation"><![CDATA[
|
|
delete from et_exam_limitation where 1=0
|
|
<@p p="or %s">exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="deleteTemporaryExam"><![CDATA[
|
|
delete from et_exam_limitation where
|
|
<@p>exam</@p>
|
|
<@p p="and %s">exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="updateLimitationExamId"><![CDATA[
|
|
update et_exam_limitation
|
|
set <@p p="exam_id = ? ">exam_id_</@p>
|
|
<@p p=" , %s">exam</@p>
|
|
where <@p>exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="insertInstituteResit"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,b.username as user,b.usercode as user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_train_baseuser b
|
|
where b.usercode not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
]]></sql>
|
|
|
|
<sql id="insertInstituteResit 较慢"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from (
|
|
select e.id as exam_id,b.username as user,b.usercode as user_id from et_exam_exampaper_and_editexampaper e,et_train_baseuser b
|
|
where e.limitation = '1'
|
|
) c
|
|
inner join et_exam_exampaper_and_editexampaper e
|
|
on c.exam_id = e.id
|
|
where (select count(1) as num from et_exam_usertest u where u.exam_id = c.exam_id and u.user_id = c.user_id) = 0
|
|
and e.state = '已关闭' and e.pg = '1' and <@p p=" e.id = ? ">exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="insertDepartmentResit"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from (
|
|
select l.exam_id as exam_id,b.username as user,b.usercode as user_id from et_exam_limitation l,et_train_baseuser b
|
|
where l.limitation = '2' and l.user_id = b.orgcode and <@p>exam_id</@p>
|
|
) c
|
|
inner join et_exam_exampaper_and_editexampaper e
|
|
on c.exam_id = e.id
|
|
where c.user_id not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
and e.state = '已关闭' and e.pg = '1' and <@p p=" e.id = ? ">exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="insertPersonResit"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_limitation c
|
|
inner join et_exam_exampaper_and_editexampaper e
|
|
on c.exam_id = e.id
|
|
where c.user_id not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
and e.state = '已关闭' and e.pg = '1' and <@p p=" e.id = ? ">exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="insertClassResit"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,username as user,usercode as user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from v_class_user v
|
|
where v.usercode not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
and classid in (select user_id from et_exam_limitation where <@p>exam_id</@p>)
|
|
]]></sql>
|
|
|
|
<sql id="insertCourseResit"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,username as user,usercode as user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from v_class_user v
|
|
where v.usercode not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
and courseid in (select user_id from et_exam_limitation where <@p>exam_id</@p>)
|
|
]]></sql>
|
|
|
|
<sql id="saveResitPaper"><![CDATA[
|
|
insert into et_exam_editexampaper
|
|
select md5(uuid()) as id,a.id as edit_id,e.num,e.subject,type,type_num,ismust,score,optionA,optionB,optionC,optionD,optionE,optionF,isParagraph,answer
|
|
from et_exam_editexampaper e,et_exam_exampaper_and_editexampaper a
|
|
where <@p>edit_id</@p> and <@p p=" a.id = ? ">id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="insertClassResit之前写法问题 应从创建班级处取人员"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,class_person,class_person_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_limitation_class c
|
|
inner join et_exam_exampaper_and_editexampaper a
|
|
on c.exam_id = a.id
|
|
where c.class_person_id not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
and a.state = '已关闭' and a.pg = '1' and <@p p=" a.id = ? ">exam_id</@p>
|
|
]]></sql>
|
|
|
|
<sql id="insertCourseResit之前写法问题 应从创建班级处取人员"><![CDATA[
|
|
insert into et_exam_limitation
|
|
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_usertest
|
|
where <@p>exam_id</@p>
|
|
group by user_id
|
|
having sum(user_score) < <@p p=" ? ">passpoints</@p>
|
|
union all
|
|
select md5(uuid()) as id,course_person,course_person_id,'临时试卷' as exam,<@p p=" ? ">temporary_id</@p> as exam_id,'3' as limitation
|
|
from et_exam_limitation_course c
|
|
inner join et_exam_exampaper_and_editexampaper a
|
|
on c.exam_id = a.id
|
|
where c.course_person_id not in (select user_id from et_exam_usertest where <@p>exam_id</@p> group by user_id)
|
|
and a.state = '已关闭' and a.pg = '1' and <@p p=" a.id = ? ">exam_id</@p>
|
|
]]></sql>
|
|
|
|
</dynamic-sql> |