|
|
|
@ -3,29 +3,75 @@ |
|
|
|
|
|
|
|
|
|
<mapper namespace="com.msdw.tms.dao.ExperimentalTeachingDao"> |
|
|
|
|
|
|
|
|
|
<!--SELECT |
|
|
|
|
id, |
|
|
|
|
experimental_class_name, |
|
|
|
|
experimental_name, |
|
|
|
|
project_id, |
|
|
|
|
project_name, |
|
|
|
|
(select count(*) |
|
|
|
|
from tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0) as experimental_number, |
|
|
|
|
experiment_duration, |
|
|
|
|
type, |
|
|
|
|
start_time, |
|
|
|
|
stop_time, |
|
|
|
|
status, |
|
|
|
|
invitation_code, |
|
|
|
|
is_code, |
|
|
|
|
user_id, |
|
|
|
|
creation_time, |
|
|
|
|
surplus_time |
|
|
|
|
FROM |
|
|
|
|
tms_experimental_teaching |
|
|
|
|
WHERE |
|
|
|
|
is_del = 0 |
|
|
|
|
<if test="exp.type!=null"> |
|
|
|
|
AND `type`=#{exp.type,jdbcType=INTEGER} |
|
|
|
|
</if> |
|
|
|
|
<if test="exp.status!=null"> |
|
|
|
|
AND `status`=#{exp.status,jdbcType=INTEGER} |
|
|
|
|
</if> |
|
|
|
|
<if test="exp.systemId!=null"> |
|
|
|
|
AND `system_id`=#{exp.systemId,jdbcType=INTEGER} |
|
|
|
|
</if> |
|
|
|
|
<if test='exp.startTime!=null and exp.stopTime!=null'> |
|
|
|
|
AND creation_time between #{exp.startTime} and #{exp.stopTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="exp.searchContent!=null"> |
|
|
|
|
AND (experimental_name like concat('%',#{exp.searchContent},'%') or experimental_class_name like concat('%',#{exp.searchContent},'%') ) |
|
|
|
|
</if> |
|
|
|
|
<if test="exp.month!=null"> |
|
|
|
|
AND DATE_SUB(CURDATE(), INTERVAL #{exp.month} month ) <= date(creation_time) |
|
|
|
|
</if> |
|
|
|
|
<if test='exp.schoolId!=null and exp.schoolId!=null'> |
|
|
|
|
AND (user_id in (select userId FROM staff WHERE schoolId = #{exp.schoolId} AND isdel = 0 AND FIND_IN_SET(roleId,'1,2,3') ) |
|
|
|
|
OR user_id IN ( SELECT userId FROM hr_user_info WHERE disableAccount = 0 AND isdel = 0 AND FIND_IN_SET( roleId, '1' ) ) ) |
|
|
|
|
</if> |
|
|
|
|
order by creation_time desc--> |
|
|
|
|
<select id="queryExperimentalTeaching" resultType="com.msdw.tms.entity.ExperimentalTeachingEntity"> |
|
|
|
|
SELECT |
|
|
|
|
id, |
|
|
|
|
experimental_class_name, |
|
|
|
|
experimental_name, |
|
|
|
|
project_id, |
|
|
|
|
project_name, |
|
|
|
|
(select count(*) |
|
|
|
|
from tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0) as experimental_number, |
|
|
|
|
experiment_duration, |
|
|
|
|
type, |
|
|
|
|
start_time, |
|
|
|
|
stop_time, |
|
|
|
|
status, |
|
|
|
|
invitation_code, |
|
|
|
|
is_code, |
|
|
|
|
user_id, |
|
|
|
|
creation_time, |
|
|
|
|
surplus_time |
|
|
|
|
id, |
|
|
|
|
experimental_class_name, |
|
|
|
|
experimental_name, |
|
|
|
|
project_id, |
|
|
|
|
project_name, |
|
|
|
|
( SELECT count( * ) FROM tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0 ) AS experimental_number, |
|
|
|
|
experiment_duration, |
|
|
|
|
type, |
|
|
|
|
start_time, |
|
|
|
|
stop_time, |
|
|
|
|
STATUS, |
|
|
|
|
invitation_code, |
|
|
|
|
is_code, |
|
|
|
|
user_id, |
|
|
|
|
creation_time, |
|
|
|
|
surplus_time , |
|
|
|
|
systemId |
|
|
|
|
FROM |
|
|
|
|
tms_experimental_teaching |
|
|
|
|
tms_experimental_teaching t |
|
|
|
|
inner join hr_project_management m on m.projectId = t.project_id |
|
|
|
|
WHERE |
|
|
|
|
is_del = 0 |
|
|
|
|
t.is_del = 0 |
|
|
|
|
<if test="exp.type!=null"> |
|
|
|
|
AND `type`=#{exp.type,jdbcType=INTEGER} |
|
|
|
|
</if> |
|
|
|
|