@ -82,9 +82,9 @@
</insert>
</insert>
<update id= "deleteReport" >
<update id= "deleteReport" >
UPDATE tms_project_record tpr,hr_experimental_report tc r
UPDATE tms_project_record tpr,tms_experimental_report te r
SET tpr.isdel = 1, tc r.isdel = 1
SET tpr.isdel = 1, te r.isdel = 1
WHERE tpr.recordId = tcr.eventId AND tc r.reportId = #{reportId}
WHERE tpr.recordId = #{recordId} AND te r.reportId = #{reportId}
</update>
</update>
<update id= "updateComment" >
<update id= "updateComment" >
UPDATE tms_experimental_report
UPDATE tms_experimental_report
@ -132,7 +132,8 @@
LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId
LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId
WHERE reportId = #{reportId}
WHERE reportId = #{reportId}
</select>
</select>
<select id= "queryEvaluationReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
<!--
SELECT
SELECT
u.userName,
u.userName,
sch.schoolName,
sch.schoolName,
@ -158,14 +159,46 @@
AND tcr.isdel = 0
AND tcr.isdel = 0
AND u.isdel = 0
AND u.isdel = 0
AND tpr.projectId = #{projectId}
AND tpr.projectId = #{projectId}
<if test= "searchContant!=null and searchContant!=''" > AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
<if test= "searchContant!=null and searchContant!=''" >
AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
</if>
GROUP BY
GROUP BY
tcr.reportId
tcr.reportId
ORDER BY tpr.submitTime DESC
ORDER BY tpr.submitTime DESC
-->
<select id= "queryEvaluationReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
r.reportId,
re.recordId,
sch.schoolName,
s.workNumber,
u.userName,
re.score,
re.submitTime,
r.eventId
FROM
tms_experimental_report r
INNER JOIN tms_experimental_teaching t ON t.id = r.projectId
INNER JOIN student s ON s.studentId = r.studentId
INNER JOIN school sch ON sch.schoolId = s.schoolId
INNER JOIN hr_user_info u ON u.userId = s.userId
INNER JOIN tms_project_record re ON re.projectId = t.project_id
WHERE
t.id = r.projectId
and r.eventId = re.recordId
AND r.projectId = #{projectId}
AND r.isdel = 0
AND t.is_del = 0
AND u.isdel = 0
<if test= "searchContant!=null and searchContant!=''" >
AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY r.reportId DESC
</select>
</select>
<select id= "queryAchievement" resultType= "com.msdw.tms.entity.request.AchievementImportRequest" >
<select id= "queryAchievement" resultType= "com.msdw.tms.entity.request.AchievementImportRequest" >
SELECT
SELECT
u.userName,
u.userName,
@ -359,8 +392,9 @@
<select id= "list" resultType= "com.msdw.tms.entity.ResultsEntity" >
<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
hr_experimental_report her where hpm.projectId = her.projectId ) as number
tms_project_record her where hpm.projectId = her.projectId and her.isdel = 0 ) as number
FROM hr_project_management hpm WHERE systemId = #{systemId}
FROM hr_project_management hpm
WHERE systemId = #{systemId}
AND hpm.isdel = 0
AND hpm.isdel = 0
<if test= "projectPermissions!=null and projectPermissions!=''" > AND hpm.projectPer missions =
<if test= "projectPermissions!=null and projectPermissions!=''" > AND hpm.projectPer missions =
#{projectPermissions}
#{projectPermissions}
@ -380,7 +414,7 @@
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as
experimentalName,et.project_id as projectId,
experimentalName,et.project_id as projectId,
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM
hr_experimental_report her where et.project_id = her.projectId ) as number
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
FROM tms_experimental_teaching et,hr_project_management pm
WHERE user_id = #{userId}
WHERE user_id = #{userId}
AND et.project_id = pm.projectId
AND et.project_id = pm.projectId
@ -440,4 +474,52 @@
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId}
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId}
and ru.trading_judgment_points_id = tjp.id
and ru.trading_judgment_points_id = tjp.id
</select>
</select>
<update id= "deleteReportById" >
UPDATE hr_project_management
SET hr_project_management.isdel = 1
WHERE hr_project_management.projectId = #{projectId}
</update>
<select id= "getImitationAchievement" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT r.recordId,
schoolName,
userName,
workNumber,
score,
submitTime,
re.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
INNER JOIN school sch ON sch.schoolId = u.schoolId
inner join tms_experimental_report re on r.recordId = re.eventId
WHERE r.projectId = #{projectId}
AND r.isdel = 0
AND s.isdel = 0
AND u.isdel = 0
AND sch.isdel = 0
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
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
inner join school sch on sch.schoolId = u.schoolId
inner join tms_experimental_report ter on r.recordId = ter.eventId
inner join tms_experimental_teaching tet on r.projectId = tet.project_id
WHERE
tet.id = #{id}
AND r.isdel = 0
AND s.isdel = 0
AND u.isdel = 0
AND sch.isdel = 0
AND ter.isdel = 0
AND tet.is_del = 0
</select>
</mapper>
</mapper>