教培定时器
parent
577643bec6
commit
f06f50a620
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.mapper.datasource.task;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:在线学习考试-任务
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-20
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface StudyTaskMapper {
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd);
|
||||
|
||||
List<PageData> getUserExamine(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.task.StudyTaskMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_STUDYTASK
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.STUDY_NAME,
|
||||
f.TRAINTYPE,
|
||||
f.POSTTYPE,
|
||||
f.PEIXUE_START_TIME,
|
||||
f.PEIXUE_END_TIME,
|
||||
f.KJ_STATE,
|
||||
f.GJ_STATE,
|
||||
f.STAGEEXAMPAPER_ID,
|
||||
f.STUDY_USER_ID,
|
||||
f.STUDY_CURRICULUM_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE,
|
||||
f.CORPINFO_ID,
|
||||
f.STATE,
|
||||
f.COURSEWARE_COUNT,
|
||||
f.SUM_CLASSHOUR,
|
||||
f.STUDYTASK_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
STUDY_NAME,
|
||||
TRAINTYPE,
|
||||
POSTTYPE,
|
||||
PEIXUE_START_TIME,
|
||||
PEIXUE_END_TIME,
|
||||
KJ_STATE,
|
||||
GJ_STATE,
|
||||
STAGEEXAMPAPER_ID,
|
||||
STUDY_USER_ID,
|
||||
STUDY_CURRICULUM_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE,
|
||||
CORPINFO_ID,
|
||||
STATE,
|
||||
COURSEWARE_COUNT,
|
||||
SUM_CLASSHOUR,
|
||||
STUDYTASK_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{STUDY_NAME},
|
||||
#{TRAINTYPE},
|
||||
#{POSTTYPE},
|
||||
#{PEIXUE_START_TIME},
|
||||
#{PEIXUE_END_TIME},
|
||||
#{KJ_STATE},
|
||||
#{GJ_STATE},
|
||||
#{STAGEEXAMPAPER_ID},
|
||||
#{STUDY_USER_ID},
|
||||
#{STUDY_CURRICULUM_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE},
|
||||
#{CORPINFO_ID},
|
||||
#{STATE},
|
||||
#{COURSEWARE_COUNT},
|
||||
#{SUM_CLASSHOUR},
|
||||
#{STUDYTASK_ID}
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 绩效得分 -->
|
||||
<select id="getDeptExamine" parameterType="pd" resultType="pd" >
|
||||
SELECT
|
||||
d.DEPARTMENT_ID,
|
||||
ifnull(un.user_count,0) as user_count,
|
||||
ifnull(st.NUM,0) as st_count
|
||||
FROM
|
||||
OA_DEPARTMENT d
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
count( distinct f.USER_ID) NUM,
|
||||
u.DEPARTMENT_ID
|
||||
FROM
|
||||
bus_stagestudentrelation f
|
||||
LEFT JOIN BUS_STUDYTASK t ON t.STUDYTASK_ID = f.STUDYTASK_ID
|
||||
LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
|
||||
WHERE
|
||||
(
|
||||
t.PEIXUE_START_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
or
|
||||
t.PEIXUE_END_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
or
|
||||
(t.PEIXUE_START_TIME <= #{STARTTIME} and t.PEIXUE_END_TIME >= #{ENDTIME})
|
||||
)
|
||||
group by u.DEPARTMENT_ID
|
||||
) st on st.DEPARTMENT_ID=d.DEPARTMENT_ID
|
||||
LEFT JOIN
|
||||
( SELECT count( 1 ) as user_count,u.DEPARTMENT_ID FROM SYS_USER u WHERE u.ISDELETE = 0 group by u.DEPARTMENT_ID) un on un.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||
|
||||
where
|
||||
d.ISDELETE = 0
|
||||
</select>
|
||||
|
||||
<select id="getUserExamine" parameterType="pd" resultType="pd" >
|
||||
SELECT
|
||||
u.USER_ID,
|
||||
ifnull(st.NUM,0) as st_count,
|
||||
ifnull(pa.NUM,0) as pass_count
|
||||
FROM
|
||||
SYS_USER u
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
count( distinct f.USER_ID) NUM,
|
||||
f.USER_ID
|
||||
FROM
|
||||
bus_stagestudentrelation f
|
||||
LEFT JOIN BUS_STUDYTASK t ON t.STUDYTASK_ID = f.STUDYTASK_ID
|
||||
WHERE
|
||||
(
|
||||
t.PEIXUE_START_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
or
|
||||
t.PEIXUE_END_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
or
|
||||
(t.PEIXUE_START_TIME <= #{STARTTIME} and t.PEIXUE_END_TIME >= #{ENDTIME})
|
||||
)
|
||||
group by f.USER_ID
|
||||
) st on st.USER_ID=u.USER_ID
|
||||
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
count( distinct f.USER_ID) NUM,
|
||||
f.USER_ID
|
||||
FROM
|
||||
bus_stagestudentrelation f
|
||||
LEFT JOIN BUS_STUDYTASK t ON t.STUDYTASK_ID = f.STUDYTASK_ID
|
||||
LEFT JOIN BUS_STAGEEXAMPAPER p ON t.STUDYTASK_ID = p.STUDYTASK_ID
|
||||
WHERE
|
||||
(
|
||||
t.PEIXUE_START_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
or
|
||||
t.PEIXUE_END_TIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
or
|
||||
(t.PEIXUE_START_TIME <= #{STARTTIME} and t.PEIXUE_END_TIME >= #{ENDTIME})
|
||||
)
|
||||
and p.PASSSCORE <= f.STAGEEXAMSCORE
|
||||
group by f.USER_ID
|
||||
) pa on pa.USER_ID=u.USER_ID
|
||||
where
|
||||
u.ISDELETE = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -10,12 +10,4 @@
|
|||
|
||||
</typeAliases>
|
||||
|
||||
<plugins>
|
||||
<plugin interceptor="com.zcloud.plugins.PagePlugin">
|
||||
<property name="dialect" value="mysql"/>
|
||||
<property name="pageSqlId" value=".*listPage.*"/>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
|
||||
</configuration>
|
||||
|
|
Loading…
Reference in New Issue