|
|
|
@ -84,7 +84,8 @@ |
|
|
|
|
<update id="deleteReport"> |
|
|
|
|
UPDATE tms_project_record tpr,tms_experimental_report ter |
|
|
|
|
SET tpr.isdel = 1, ter.isdel = 1 |
|
|
|
|
WHERE tpr.recordId = #{recordId} AND ter.reportId = #{reportId} |
|
|
|
|
WHERE tpr.recordId = #{recordId} |
|
|
|
|
AND ter.reportId = #{reportId} |
|
|
|
|
</update> |
|
|
|
|
<update id="updateComment"> |
|
|
|
|
UPDATE tms_experimental_report |
|
|
|
@ -390,15 +391,35 @@ |
|
|
|
|
GROUP BY hec.codeId |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity"> |
|
|
|
|
SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM |
|
|
|
|
<!--SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM |
|
|
|
|
tms_project_record her where hpm.projectId = her.projectId and her.isdel = 0 ) as number |
|
|
|
|
FROM hr_project_management hpm |
|
|
|
|
WHERE systemId = #{systemId} |
|
|
|
|
AND hpm.isdel = 0 |
|
|
|
|
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPer missions = |
|
|
|
|
#{projectPermissions} |
|
|
|
|
AND hpm.projectPermissions = #{projectPermissions} |
|
|
|
|
|
|
|
|
|
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''">and hpm.creationTime between |
|
|
|
|
#{endTime} and #{startTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="month!=null and month != ''">and DATE_SUB(CURDATE(), INTERVAL #{month} month ) <= |
|
|
|
|
date(hpm.creationTime) |
|
|
|
|
</if> |
|
|
|
|
ORDER BY hpm.creationTime DESC--> |
|
|
|
|
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity"> |
|
|
|
|
SELECT |
|
|
|
|
hpm.projectId, |
|
|
|
|
hpm.projectName, |
|
|
|
|
hpm.projectPermissions, |
|
|
|
|
hpm.systemId, |
|
|
|
|
hpm.creationTime, |
|
|
|
|
hpm.isdel |
|
|
|
|
FROM |
|
|
|
|
hr_project_management hpm |
|
|
|
|
WHERE systemId = #{systemId} |
|
|
|
|
AND hpm.projectPermissions = #{projectPermissions} |
|
|
|
|
|
|
|
|
|
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''">and hpm.creationTime between |
|
|
|
@ -410,13 +431,52 @@ |
|
|
|
|
ORDER BY hpm.creationTime DESC |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<!-- <select id="newList" resultType="com.msdw.tms.entity.ResultsEntity">--> |
|
|
|
|
<!-- SELECT--> |
|
|
|
|
<!-- et.id,--> |
|
|
|
|
<!-- et.experimental_class_name AS experimentalClassName,--> |
|
|
|
|
<!-- et.experimental_name AS experimentalName,--> |
|
|
|
|
<!-- et.project_id AS projectId,--> |
|
|
|
|
<!-- pm.projectName,--> |
|
|
|
|
<!-- pm.projectPermissions,--> |
|
|
|
|
<!-- et.creation_time AS creationTime,--> |
|
|
|
|
<!-- ( SELECT count( * ) FROM tms_experimental_report her WHERE et.id = her.projectId AND her.isdel = 0 ) AS number,--> |
|
|
|
|
<!-- et.is_del--> |
|
|
|
|
<!-- FROM--> |
|
|
|
|
<!-- tms_experimental_teaching et,--> |
|
|
|
|
<!-- hr_project_management pm--> |
|
|
|
|
<!-- WHERE--> |
|
|
|
|
<!-- user_id = #{userId}--> |
|
|
|
|
<!-- AND et.project_id = pm.projectId--> |
|
|
|
|
<!-- AND pm.isdel = 0--> |
|
|
|
|
<!-- <if test="searchContant!=null and searchContant!=''">and et.experimental_class_name like--> |
|
|
|
|
<!-- concat('%',#{searchContant},'%') or et.experimental_name like concat('%',#{searchContant},'%') or--> |
|
|
|
|
<!-- pm.projectName like concat('%',#{searchContant},'%')--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''">and et.creation_time between--> |
|
|
|
|
<!-- #{endTime} and #{startTime}--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="month!=null and month != ''">and DATE_SUB(CURDATE(), INTERVAL #{month} month ) <=--> |
|
|
|
|
<!-- date(et.creation_time)--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- ORDER BY et.creation_time DESC--> |
|
|
|
|
<!-- </select>--> |
|
|
|
|
|
|
|
|
|
<select id="newList" resultType="com.msdw.tms.entity.ResultsEntity"> |
|
|
|
|
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as |
|
|
|
|
experimentalName,et.project_id as projectId, |
|
|
|
|
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM |
|
|
|
|
tms_project_record her where et.project_id = her.projectId and her.isdel = 0 ) as number |
|
|
|
|
FROM tms_experimental_teaching et,hr_project_management pm |
|
|
|
|
WHERE user_id = #{userId} |
|
|
|
|
SELECT |
|
|
|
|
et.id, |
|
|
|
|
et.experimental_class_name AS experimentalClassName, |
|
|
|
|
et.experimental_name AS experimentalName, |
|
|
|
|
et.project_id AS projectId, |
|
|
|
|
pm.projectName, |
|
|
|
|
pm.projectPermissions, |
|
|
|
|
et.creation_time AS creationTime, |
|
|
|
|
et.is_del |
|
|
|
|
FROM |
|
|
|
|
tms_experimental_teaching et, |
|
|
|
|
hr_project_management pm |
|
|
|
|
WHERE |
|
|
|
|
user_id = #{userId} |
|
|
|
|
AND et.project_id = pm.projectId |
|
|
|
|
AND pm.isdel = 0 |
|
|
|
|
<if test="searchContant!=null and searchContant!=''">and et.experimental_class_name like |
|
|
|
@ -431,7 +491,6 @@ |
|
|
|
|
</if> |
|
|
|
|
ORDER BY et.creation_time DESC |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="reportList" resultType="com.msdw.tms.entity.ReportEntity"> |
|
|
|
|
SELECT hui.userId,her.reportId,hui.userName as |
|
|
|
|
studentName,s.schoolName,stu.workNumber,her.score,her.creationTime |
|
|
|
@ -503,8 +562,8 @@ |
|
|
|
|
AND re.isdel = 0; |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getTeachAchievement" resultType="com.msdw.tms.entity.vo.AchievementManagementVO"> |
|
|
|
|
SELECT r.recordId, schoolName,tet.experimental_class_name, userName, workNumber, score, submitTime, ter.reportId |
|
|
|
|
|
|
|
|
|
<!--SELECT r.recordId, schoolName,tet.experimental_class_name, userName, workNumber, score, submitTime, ter.reportId |
|
|
|
|
from tms_project_record r |
|
|
|
|
inner join student s on s.userId = r.userId |
|
|
|
|
inner join hr_user_info u on u.userId = r.userId |
|
|
|
@ -518,8 +577,76 @@ |
|
|
|
|
AND u.isdel = 0 |
|
|
|
|
AND sch.isdel = 0 |
|
|
|
|
AND ter.isdel = 0 |
|
|
|
|
AND tet.is_del = 0 |
|
|
|
|
AND tet.is_del = 0--> |
|
|
|
|
<!-- <select id="getTeachAchievement" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">--> |
|
|
|
|
<!-- SELECT schoolName,--> |
|
|
|
|
<!-- experimental_class_name,--> |
|
|
|
|
<!-- userName,--> |
|
|
|
|
<!-- workNumber,--> |
|
|
|
|
<!-- r.score,--> |
|
|
|
|
<!-- r.recordId,--> |
|
|
|
|
<!-- report.reportId,--> |
|
|
|
|
<!-- r.submitTime,--> |
|
|
|
|
<!-- stu.studentId,--> |
|
|
|
|
<!-- t.id as projectId--> |
|
|
|
|
<!-- FROM tms_experimental_teaching t--> |
|
|
|
|
<!-- INNER JOIN tms_experimental_report report ON report.projectId = t.id--> |
|
|
|
|
<!-- INNER JOIN tms_project_record r ON r.recordId = report.eventId--> |
|
|
|
|
<!-- INNER JOIN hr_user_info u ON u.userId = r.userId--> |
|
|
|
|
<!-- INNER JOIN school s ON s.schoolId = u.schoolId--> |
|
|
|
|
<!-- INNER JOIN student stu ON stu.userId = u.userId--> |
|
|
|
|
<!-- WHERE t.id = #{id}--> |
|
|
|
|
<!-- AND t.is_del = 0--> |
|
|
|
|
<!-- AND report.isdel = 0--> |
|
|
|
|
|
|
|
|
|
<!-- </select>--> |
|
|
|
|
|
|
|
|
|
<select id="getTeachAchievement" resultType="com.msdw.tms.entity.vo.AchievementManagementVO"> |
|
|
|
|
SELECT schoolName, |
|
|
|
|
experimental_class_name, |
|
|
|
|
userName, |
|
|
|
|
workNumber, |
|
|
|
|
r.score, |
|
|
|
|
r.recordId, |
|
|
|
|
report.reportId, |
|
|
|
|
r.submitTime, |
|
|
|
|
stu.studentId, |
|
|
|
|
t.id as projectId, |
|
|
|
|
experimental_name as experimentalName |
|
|
|
|
FROM tms_experimental_teaching t |
|
|
|
|
INNER JOIN tms_experimental_report report ON report.projectId = t.id |
|
|
|
|
INNER JOIN tms_project_record r ON r.recordId = report.eventId |
|
|
|
|
INNER JOIN hr_user_info u ON u.userId = r.userId |
|
|
|
|
INNER JOIN school s ON s.schoolId = u.schoolId |
|
|
|
|
INNER JOIN student stu ON stu.userId = u.userId |
|
|
|
|
WHERE t.id = #{id} |
|
|
|
|
AND report.isdel = 0 |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<update id="modify" parameterType="com.msdw.tms.entity.ExperimentalReportEntity"> |
|
|
|
|
UPDATE tms_experimental_report |
|
|
|
|
<set> |
|
|
|
|
<if test="instructor != null"> |
|
|
|
|
instructor=#{instructor, jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="period != null"> |
|
|
|
|
period=#{period, jdbcType=INTEGER}, |
|
|
|
|
</if> |
|
|
|
|
<if test="proName != null"> |
|
|
|
|
proName=#{proName, jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="purpose != null"> |
|
|
|
|
purpose=#{purpose, jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="summarize != null"> |
|
|
|
|
summarize=#{summarize, jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
</set> |
|
|
|
|
|
|
|
|
|
WHERE reportId = #{reportId} |
|
|
|
|
|
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
</mapper> |