etms/WEB-INF/mapping/et_train_kc.map.xml
liyuchen c24bea2687 Initial commit: JCDP 教育培训管理系统 v54
- 系统管理模块(用户/角色/组织/权限/日志)
- 教育培训计划管理模块
- 教育培训实施模块
- 考试管理模块
- 调研问卷管理模块
- 外派培训管理模块
- 年度培训总结模块
- 学习资源管理模块
- 任职资格管理模块
- 即时通讯模块
- APP 版本管理
- 统计分析模块(FineReport)
- 代码审查标准和报告(CODE_REVIEW_GUIDE.md, CODE_REVIEW_REPORT.md)
- 项目开发指南(PROJECT_GUIDE.md)
2026-04-16 16:41:34 +08:00

324 lines
15 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<dynamic-sql>
<sql id="getet_train_kcList"><![CDATA[
select CONCAT(nd,'|',kcmc) kcmc,id,kcnr,groupname,groupid,jhly,sfwp,nd,pxrs from et_train_kc a where sfwp='否'
<@p p="AND (%s)">groupid</@p>
<@p p="AND (%s)">sfwp</@p>
<@p p="AND (jhly='sj' or groupid=%s)" f="?">filter1</@p>
<@p p="AND groupid=%s" f="?">filter2</@p>
<@p p="AND 1=%s" f="?">filter3</@p>
<@p p="and id in (%s)" f="?">idarr</@p>
order by nd desc
]]>
</sql>
<sql id="getet_train_kcList_all"><![CDATA[
select CONCAT(nd,'|',kcmc) kcmc,id,kcnr,groupname,groupid,jhly,sfwp,nd,pxrs from et_train_kc_all where sfwp='否'
order by nd desc
]]>
</sql>
<sql id="getKcListForClassOper"><![CDATA[
select * from et_train_kc where sfwp='否'
<@p p="AND 1=%s" f="?">filter1</@p>
<@p p="AND groupid=%s" f="?">filter2</@p>
<@p p="AND 1=%s" f="?">filter3</@p>
<@p p="or jhly=%s" f="?">jhly</@p>
order by convert(kcmc using gbk)
]]>
</sql>
<sql id="getKcListForReplaceStu"><![CDATA[
select * from et_train_kc_all where sfwp='否'
<@p p="AND (jhly='sj' or groupid=%s)" f="?">filter1</@p>
<@p p="AND groupid=%s" f="?">filter2</@p>
<@p p="AND 1=%s" f="?">filter3</@p>
order by convert(kcmc using gbk)
]]>
</sql>
<sql id="getet_train_kc_paramList"><![CDATA[
select ID,CONCAT(nd,'|',kcmc)kcmc,kcnr,groupname,groupid,jhly,sfwp,nd,kcxl,pxrs from et_train_kc_all where 1=1
<@p p=" AND (%s)">sfwp</@p>
<@p p=" AND (%s)">groupid</@p>
<@p p=" AND (%s)">nd</@p>
<@p p=" and jhly IN(%s)" f="?">jhlyarr</@p>
order by nd desc
]]>
</sql>
<sql id="getet_train_kc_notfinish"><![CDATA[
select * from et_train_kc_all
where 1=1
<@p p=" AND (%s)">sfwp</@p>
<@p p=" AND (%s)">groupid</@p>
<@p p=" AND (%s)">nd</@p>
<@p p=" AND (%s)">jhly</@p>
and id not in(SELECT
a.kcmcid
FROM
et_train_pd_cc a
LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid
LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id
WHERE
IF(
et_train_kc_all.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
))
]]>
</sql>
<!-- <sql id="getet_train_kc_notfinish20231220"><![CDATA[-->
<!-- select * from et_train_kc-->
<!-- where 1=1-->
<!-- <@p p=" AND (%s)">sfwp</@p>-->
<!-- <@p p=" AND (%s)">groupid</@p>-->
<!-- <@p p=" AND (%s)">nd</@p>-->
<!-- <@p p=" AND (%s)">jhly</@p>-->
<!-- and id not in(select kcmcid from et_train_pd_cc where status = '2' and kcmcid is not null group by kcmcid )-->
<!-- ]]>-->
<!-- </sql>-->
<sql id="getet_train_kc_sl"><![CDATA[
select
(select count(*) from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '否') year_inplan_unout_num,
( SELECT
count( * )
FROM
et_train_kc_all
WHERE
<@p>nd</@p>
and <@p>groupid</@p>
AND jhly = 'bmn'
AND sfwp = '否'
AND id IN (
SELECT
a.kcmcid
FROM
et_train_pd_cc a
LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid
LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id
WHERE
1 = 1
AND
IF
(
et_train_kc_all.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
)
)
) inplan_unout_num,
(select count(*) from et_train_pd_cc_user where istrain = '1' and ccid in (select a.id from et_train_pd_cc a LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id LEFT JOIN et_train_kc_all d ON a.kcmcid=d.id where <@p p=" a.addgroupid = %s " f=" ? ">groupid</@p> and IF
(
d.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
)
<@p p="AND d.nd = ?">nd</@p>
<@p p="AND d.groupid = ?">groupid</@p>
AND d.jhly = 'bmn'
AND d.sfwp = '否'
)) inplan_unout_person,
( SELECT
sum( a.pxxsh )
FROM
et_train_pd_cc a
LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid
LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id
LEFT JOIN et_train_kc_all d ON a.kcmcid = d.id
WHERE
<@p p=" a.addgroupid = %s " f=" ? ">groupid</@p>
AND
IF
(
d.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
)
<@p p="AND d.nd = ?">nd</@p>
<@p p="AND d.groupid = ?">groupid</@p>
AND d.jhly = 'bmn'
AND d.sfwp = '否'
) inplan_unout_hour,
(SELECT count(*) FROM et_train_ot WHERE <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and `status`='5' and delstatus="0" and not exists (select 1 from et_train_ot_pxdj b where et_train_ot.id = b.otid and b.`status`!="4") AND EXISTS ( SELECT 1 FROM et_train_ot_pxdj b WHERE et_train_ot.id = b.otid AND b.`status` = "4" )AND wpid IN ( SELECT id FROM et_train_kc_all WHERE <@p>nd</@p> and <@p>groupid</@p> AND jhly = 'bmn' AND sfwp = '是' ) )inplan_out_num,
(select count(*) from et_train_ot_xy where otid in (select id from et_train_ot where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and `status`='5' and delstatus="0" and not exists (select 1 from et_train_ot_pxdj b where et_train_ot.id = b.otid and b.`status`!="4") AND EXISTS ( SELECT 1 FROM et_train_ot_pxdj b WHERE et_train_ot.id = b.otid AND b.`status` = "4" )and wpid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '是'))) inplan_out_person,
( SELECT
count( * )
FROM
et_train_kc_all
WHERE
<@p>nd</@p>
and <@p>groupid</@p>
AND jhly = 'bmw'
AND sfwp = '否'
AND id IN (
SELECT
a.kcmcid
FROM
et_train_pd_cc a
LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid
LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id
WHERE
1 = 1
AND
IF
(
et_train_kc_all.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
)
)
)outplan_unout_num,
(select count(*) from et_train_pd_cc_user where istrain = '1' and ccid in (select a.id from et_train_pd_cc a LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id LEFT JOIN et_train_kc_all d ON a.kcmcid=d.id where <@p p=" a.addgroupid = %s " f=" ? ">groupid</@p> and IF
(
d.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
)
<@p p="AND d.nd = ?">nd</@p>
<@p p="AND d.groupid = ?">groupid</@p>
AND d.jhly = 'bmw'
AND d.sfwp = '否'
)) outplan_unout_person,
( SELECT
sum( a.pxxsh )
FROM
et_train_pd_cc a
LEFT JOIN et_train_pd_cc_pg b ON a.id = b.ccid
LEFT JOIN et_train_pd_cc_pgwjyxx c ON c.pgID = b.id
LEFT JOIN et_train_kc_all d ON a.kcmcid = d.id
WHERE
<@p p=" a.addgroupid = %s " f=" ? ">groupid</@p>
AND
IF
(
d.nd >= 2023,
c.`status` = 2,
IF
( c.`status` IS NOT NULL, c.`status` = 2, b.`status` = 1 )
)
<@p p="AND d.nd = ?">nd</@p>
<@p p="AND d.groupid = ?">groupid</@p>
AND d.jhly = 'bmw'
AND d.sfwp = '否'
) outplan_unout_hour,
(SELECT count(*) FROM et_train_ot WHERE <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and `status`='5' and delstatus="0" and not exists (select 1 from et_train_ot_pxdj b where et_train_ot.id = b.otid and b.`status`!="4") AND EXISTS ( SELECT 1 FROM et_train_ot_pxdj b WHERE et_train_ot.id = b.otid AND b.`status` = "4" )AND wpid IN ( SELECT id FROM et_train_kc_all WHERE <@p>nd</@p> and <@p>groupid</@p> AND jhly = 'bmw' AND sfwp = '是' ) )outplan_out_num,
(select count(*) from et_train_ot_xy where otid in (select id from et_train_ot where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and `status`='5' and delstatus="0" and not exists (select 1 from et_train_ot_pxdj b where et_train_ot.id = b.otid and b.`status`!="4") AND EXISTS ( SELECT 1 FROM et_train_ot_pxdj b WHERE et_train_ot.id = b.otid AND b.`status` = "4" ) and wpid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmw' and sfwp = '是'))) outplan_out_person
]]>
</sql>
<sql id="getet_train_kc_sl20231219"><![CDATA[
select
(select count(*) from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '否') year_inplan_unout_num,
(select count(*) from (select * from et_train_pd_cc where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and status = '2' and kcmcid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '否') group by kcmcid ) e) inplan_unout_num,
(select count(*) from et_train_pd_cc_user where istrain = '1' and ccid in (select id from et_train_pd_cc where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and status = '2' and kcmcid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '否'))) inplan_unout_person,
(select sum(pxxsh) from et_train_pd_cc where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and status = '2' and kcmcid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '否')) inplan_unout_hour,
(select count(*) from (select * from et_train_ot where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and wpid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '是') group by wpid) d) inplan_out_num,
(select count(*) from et_train_ot_xy where otid in (select id from et_train_ot where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and wpid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmn' and sfwp = '是'))) inplan_out_person,
(select count(*) from et_train_pd_cc where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and status = '2' and kcmcid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmw' and sfwp = '否')) outplan_unout_num,
(select count(*) from et_train_pd_cc_user where istrain = '1' and ccid in (select id from et_train_pd_cc where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and status = '2' and kcmcid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmw' and sfwp = '否'))) outplan_unout_person,
(select sum(pxxsh) from et_train_pd_cc where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and status = '2' and kcmcid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmw' and sfwp = '否')) outplan_unout_hour,
(select count(*) from (select * from et_train_ot where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and wpid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmw' and sfwp = '是') group by wpid) c) outplan_out_num,
(select count(*) from et_train_ot where <@p p=" addgroupid = %s " f=" ? ">groupid</@p> and wpid in (select id from et_train_kc_all where <@p>nd</@p> and <@p>groupid</@p> and jhly = 'bmw' and sfwp = '是')) outplan_out_person
]]>
</sql>
<sql id="getet_train_kc_sl之前使用"><![CDATA[
select a.zs,b.wwc,c.bmw,d.wp,(zs+bmw+wp) xmzs from (select count(*) zs from et_train_kc
where 1=1
<@p p=" AND (%s)">groupid</@p>
<@p p=" AND (%s)">nd</@p> and jhly='bmn' and sfwp='否')a,
(select count(*) wwc from et_train_kc where 1=1
<@p p=" AND (%s)">groupid</@p>
<@p p=" AND (%s)">nd</@p>and jhly='bmn' and sfwp='否' and id not in(select kcmcid from et_train_pd_cc where kcmcid is not null group by kcmcid )) b,
(select count(*) bmw from et_train_kc where 1=1
<@p p=" AND (%s)">groupid</@p>
<@p p=" AND (%s)">nd</@p> and jhly='bmw' and sfwp='否' and id in(select kcmcid from et_train_pd_cc where kcmcid is not null group by kcmcid )) c,
(select count(*) wp from et_train_kc where 1=1
<@p p=" AND (%s)">groupid</@p>
<@p p=" AND (%s)">nd</@p> and sfwp='是' ) d
]]>
</sql>
<sql id="update_et_train_gip"><![CDATA[
update et_train_gip set status=2 where
datediff(enddate,curdate()) < 0
]]>
</sql>
<sql id="update_et_train_ip"><![CDATA[
update et_train_ip set status=2 where
datediff(enddate,curdate()) < 0
]]>
</sql>
<sql id="update_et_train_ys"><![CDATA[
update et_train_ys set status=2 where
datediff(enddate,curdate()) < 0
]]>
</sql>
<sql id="update_et_train_ysist"><![CDATA[
update et_train_ysist set status=2 where
datediff(enddate,curdate()) < 0
]]>
</sql>
<sql id="updateExampaperNotBegin"><![CDATA[
UPDATE et_exam_exampaper_and_editexampaper SET state='未开始'
WHERE datediff(startdate,curdate()) > 0 and datediff(enddate,curdate()) > 0 and state <> '已撤销'
]]>
</sql>
<sql id="updateExampaperBegin"><![CDATA[
UPDATE et_exam_exampaper_and_editexampaper SET state='正在进行'
WHERE datediff(startdate,curdate()) <= 0 and datediff(enddate,curdate()) >= 0 and state <> '已撤销'
]]>
</sql>
<sql id="updateExampaperEnd"><![CDATA[
UPDATE et_exam_exampaper_and_editexampaper SET state='已关闭'
WHERE datediff(startdate,curdate()) < 0 and datediff(enddate,curdate()) < 0 and state <> '已撤销'
]]>
</sql>
<sql id="getAllActionValue"><![CDATA[
select href,actionvalue,moduletype from jcdp_sys_module
]]>
</sql>
<sql id="getEtMyScheduleTable"><![CDATA[
select type,sqlsentence,controlswitch from et_myschedule
]]>
</sql>
<sql id="updateClassTableUserScore"><![CDATA[
update et_exam_limitation_class c
set score = (select sum(user_score) from et_exam_usertest where exam_id=c.exam_id and user_id = c.class_person_id)
where score = '' or score is null
]]>
</sql>
</dynamic-sql>