|
|
@ -3,8 +3,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<mapper namespace="com.msdw.tms.dao.ExperimentalTeachingDao"> |
|
|
|
<mapper namespace="com.msdw.tms.dao.ExperimentalTeachingDao"> |
|
|
|
|
|
|
|
|
|
|
|
<select id="queryExperimentalTeaching" resultType="com.msdw.tms.entity.ExperimentalTeachingEntity"> |
|
|
|
<!--SELECT |
|
|
|
SELECT |
|
|
|
|
|
|
|
id, |
|
|
|
id, |
|
|
|
experimental_class_name, |
|
|
|
experimental_class_name, |
|
|
|
experimental_name, |
|
|
|
experimental_name, |
|
|
@ -48,6 +47,53 @@ |
|
|
|
AND (user_id in (select userId FROM staff WHERE schoolId = #{exp.schoolId} AND isdel = 0 AND FIND_IN_SET(roleId,'1,2,3') ) |
|
|
|
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' ) ) ) |
|
|
|
OR user_id IN ( SELECT userId FROM hr_user_info WHERE disableAccount = 0 AND isdel = 0 AND FIND_IN_SET( roleId, '1' ) ) ) |
|
|
|
</if> |
|
|
|
</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 , |
|
|
|
|
|
|
|
systemId |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
tms_experimental_teaching t |
|
|
|
|
|
|
|
inner join hr_project_management m on m.projectId = t.project_id |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
t.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 |
|
|
|
order by creation_time desc |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|