@ -2,378 +2,442 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "com.msdw.tms.dao.AchievementManagementDao" >
<mapper namespace= "com.msdw.tms.dao.AchievementManagementDao" >
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap id= "BaseResultMap" type= "com.msdw.tms.entity.ExperimentalReportEntity" >
<resultMap id= "BaseResultMap" type= "com.msdw.tms.entity.ExperimentalReportEntity" >
<id column= "reportId" property= "reportId" />
<id column= "reportId" property= "reportId" />
<result column= "projectId" property= "projectId" />
<result column= "projectId" property= "projectId" />
<result column= "principle" property= "principle" />
<result column= "principle" property= "principle" />
<result column= "content" property= "content" />
<result column= "content" property= "content" />
<result column= "data" property= "data" />
<result column= "data" property= "data" />
<result column= "analysis" property= "analysis" />
<result column= "analysis" property= "analysis" />
<result column= "conclusion" property= "conclusion" />
<result column= "conclusion" property= "conclusion" />
<result column= "summarize" property= "summarize" />
<result column= "summarize" property= "summarize" />
<result column= "purpose" property= "purpose" />
<result column= "purpose" property= "purpose" />
<result column= "improvement" property= "improvement" />
<result column= "improvement" property= "improvement" />
<result column= "comment" property= "comment" />
<result column= "comment" property= "comment" />
<result column= "studentId" property= "studentId" />
<result column= "studentId" property= "studentId" />
<result column= "teacherName" property= "teacherName" />
<result column= "teacherName" property= "teacherName" />
<result column= "period" property= "period" />
<result column= "period" property= "period" />
<result column= "laboratory" property= "laboratory" />
<result column= "laboratory" property= "laboratory" />
<result column= "equipment" property= "equipment" />
<result column= "equipment" property= "equipment" />
<result column= "score" property= "score" />
<result column= "score" property= "score" />
<result column= "timeConsuming" property= "timeConsuming" />
<result column= "timeConsuming" property= "timeConsuming" />
<result column= "startTime" property= "startTime" />
<result column= "startTime" property= "startTime" />
<result column= "creationTime" property= "creationTime" />
<result column= "creationTime" property= "creationTime" />
<result column= "className" property= "className" />
<result column= "className" property= "className" />
<result column= "steps1" property= "steps1" />
<result column= "steps1" property= "steps1" />
<result column= "steps2" property= "steps2" />
<result column= "steps2" property= "steps2" />
<result column= "steps3" property= "steps3" />
<result column= "steps3" property= "steps3" />
<result column= "steps4" property= "steps4" />
<result column= "steps4" property= "steps4" />
<result column= "steps5" property= "steps5" />
<result column= "steps5" property= "steps5" />
<result column= "steps6" property= "steps6" />
<result column= "steps6" property= "steps6" />
<result column= "steps7" property= "steps7" />
<result column= "steps7" property= "steps7" />
<result column= "steps8" property= "steps8" />
<result column= "steps8" property= "steps8" />
<result column= "steps9" property= "steps9" />
<result column= "steps9" property= "steps9" />
<result column= "steps10" property= "steps10" />
<result column= "steps10" property= "steps10" />
<result column= "projectName" property= "projectName" />
<result column= "projectName" property= "projectName" />
<result column= "workNumber" property= "workNumber" />
<result column= "workNumber" property= "workNumber" />
</resultMap>
</resultMap>
<select id= "getReport" resultMap= "BaseResultMap" parameterType= "com.msdw.tms.entity.ExperimentalReportEntity" >
<select id= "getReport" resultMap= "BaseResultMap" parameterType= "com.msdw.tms.entity.ExperimentalReportEntity" >
SELECT her.*,pm.projectName,s.workNumber FROM
SELECT her.*, pm.projectName, s.workNumber
hr_experimental_report her,hr_project_management pm,student s
FROM hr_experimental_report her,
WHERE her.reportId = #{reportId} and her.studentId = #{studentId} and her.projectId = pm.projectId and her.studentId = s.userId
hr_project_management pm,
student s
WHERE her.reportId = #{reportId}
and her.studentId = #{studentId}
and her.projectId = pm.projectId
and her.studentId = s.userId
</select>
</select>
<select id= "getScore" resultType= "com.msdw.tms.entity.vo.UserScoreVO" parameterType= "com.msdw.tms.entity.vo.UserScoreVO" >
<select id= "getScore" resultType= "com.msdw.tms.entity.vo.UserScoreVO"
SELECT id,score,tradingJudgmentPointsId,projectId,systemId,userId,isCorrect,reportId,userAnswers
parameterType="com.msdw.tms.entity.vo.UserScoreVO">
FROM hr_user_score WHERE reportId = #{reportId} and userId = #{userId}
SELECT id,
</select>
score,
tradingJudgmentPointsId,
projectId,
systemId,
userId,
isCorrect,
reportId,
userAnswers
FROM hr_user_score
WHERE reportId = #{reportId}
and userId = #{userId}
</select>
<!-- <resultMap id="achievementMap" type="com.msdw.tms.entity.ExperimentalReportEntity"> -->
<!-- <resultMap id="achievementMap" type="com.msdw.tms.entity.ExperimentalReportEntity"> -->
<!-- <result property="experimentalClassName" column="experimental_class_name"></result> -->
<!-- <result property="experimentalClassName" column="experimental_class_name"></result> -->
<!-- </resultMap> -->
<!-- </resultMap> -->
<insert id= "addReport" useGeneratedKeys= "true" keyProperty= "reportId" >
<insert id= "addReport" useGeneratedKeys= "true" keyProperty= "reportId" >
INSERT INTO hr_experimental_report( projectId, content, principle, step, analysis, summarize, improvement,
INSERT INTO hr_experimental_report(projectId, content, principle, step, analysis, summarize, improvement,
commentId, studentId, period,laboratory,className,steps1,steps2,steps3,steps4,steps5,steps6,steps7,steps8,steps9,steps10,timeConsuming,startTime,creationTime,purpose,teacherName)
commentId, studentId, period, laboratory, className, steps1, steps2, steps3,
VALUES
steps4, steps5, steps6, steps7, steps8, steps9, steps10, timeConsuming,
(#{projectId},#{content}, #{principle}, #{step}, #{analysis}, #{summarize}, #{improvement}, #{commentId}, #{studentId},
startTime, creationTime, purpose, teacherName)
#{period}, #{laboratory},#{className},#{steps1},#{steps2},#{steps3},#{steps4},#{steps5},#{steps6},#{steps7},#{steps8},#{steps9},#{steps10},#{timeConsuming},#{startTime},#{creationTime},#{purpose},#{teacherName})
VALUES (#{projectId}, #{content}, #{principle}, #{step}, #{analysis}, #{summarize}, #{improvement},
#{commentId}, #{studentId},
#{period}, #{laboratory}, #{className}, #{steps1}, #{steps2}, #{steps3}, #{steps4}, #{steps5},
#{steps6}, #{steps7}, #{steps8}, #{steps9}, #{steps10}, #{timeConsuming}, #{startTime}, #{creationTime},
#{purpose}, #{teacherName})
</insert>
</insert>
<update id= "deleteReport" >
<update id= "deleteReport" >
UPDATE tms_project_record tpr,hr_experimental_report tcr SET tpr.isdel = 1 , tcr.isdel = 1 WHERE tpr.recordId = tcr.eventId AND tcr.reportId = #{reportId}
UPDATE tms_project_record tpr,hr_experimental_report tcr
SET tpr.isdel = 1, tcr.isdel = 1
WHERE tpr.recordId = tcr.eventId AND tcr.reportId = #{reportId}
</update>
<update id= "updateComment" >
UPDATE tms_experimental_report
SET `comment` = #{comment}
WHERE reportId = #{reportId}
</update>
</update>
<update id= "updateComment" >
UPDATE tms_experimental_report SET `comment` = #{comment} WHERE reportId = #{reportId}
</update>
<update id= "updateSignatrue" >
<update id= "updateSignatrue" >
UPDATE tms_experimental_report SET isSignature = #{isSignature} , signatureId = #{signatureId}, `comment` = #{comment} WHERE reportId = #{reportId}
UPDATE tms_experimental_report
</update>
SET isSignature = #{isSignature},
<select id= "queryReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
signatureId = #{signatureId},
SELECT
`comment` = #{comment}
ter.reportId,
WHERE reportId = #{reportId}
IFNULL( ter.`comment`, ( SELECT `comment` FROM tms_comment WHERE id = commentId ) ) AS comment,
</update>
ter.projectId,
<select id= "queryReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
ter.principle,
SELECT ter.reportId,
ter.content,
IFNULL(ter.`comment`, (SELECT `comment` FROM tms_comment WHERE id = commentId)) AS comment,
ter.step,
ter.projectId,
ter.`data`,
ter.principle,
ter.analysis,
ter.content,
ter.conclusion,
ter.step,
ter.summarize,
ter.`data`,
ter.improvement,
ter.analysis,
ter.commentId,
ter.conclusion,
ter.studentId,
ter.summarize,
ter.teacherName,
ter.improvement,
ter.period,
ter.commentId,
ter.laboratory,
ter.studentId,
ter.eventId,
ter.teacherName,
ter.isSignature,
ter.period,
ter.signatureId,
ter.laboratory,
ter.isdel ,
ter.eventId,
hpm.projectName,
ter.isSignature,
hpm.systemId,
ter.signatureId,
ts.signature_name AS signatureName,
ter.isdel,
ts.signature_url AS signatureUrl,
hpm.projectName,
tc.`level`
hpm.systemId,
FROM
ts.signature_name AS signatureName,
tms_experimental_report ter
ts.signature_url AS signatureUrl,
LEFT JOIN tms_signature ts ON signatureId = ts.id
tc.`level`
LEFT JOIN tms_comment tc ON commentId = tc.id
FROM tms_experimental_report ter
LEFT JOIN tms_project_record AS tpr ON tpr.recordId = ter.eventId
LEFT JOIN tms_signature ts ON signatureId = ts.id
LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId
LEFT JOIN tms_comment tc ON commentId = tc.id
WHERE
LEFT JOIN tms_project_record AS tpr ON tpr.recordId = ter.eventId
reportId = #{reportId}
LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId
WHERE reportId = #{reportId}
</select>
<select id= "queryEvaluationReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
u.userName,
sch.schoolName,
s.workNumber,
tpr.score,
tpr.submitTime,
tpr.recordId,
tcr.reportId
FROM
hr_project_management hpm,
hr_user_info u,
student s,
tms_project_record tpr,
tms_experimental_report tcr,
school sch
WHERE
hpm.projectId = tpr.projectId
AND tpr.userId = u.userId
AND u.userId = s.userId
AND sch.schoolId = u.schoolId
AND tcr.eventId = tpr.recordId
AND tpr.isdel = 0
AND tcr.isdel = 0
AND u.isdel = 0
AND tpr.projectId = #{projectId}
<if test= "searchContant!=null and searchContant!=''" > AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
</select>
<select id= "queryAchievement" resultType= "com.msdw.tms.entity.request.AchievementImportRequest" >
SELECT
u.userName,
sch.schoolName,
s.workNumber,
tpr.score,
tpr.submitTime,
tpr.recordId,
tcr.reportId
FROM
hr_project_management hpm,
hr_user_info u,
student s,
tms_project_record tpr,
tms_experimental_report tcr,
school sch
WHERE
hpm.projectId = tpr.projectId
AND tpr.userId = u.userId
AND u.userId = s.userId
AND sch.schoolId = u.schoolId
AND tcr.eventId = tpr.recordId
AND tpr.isdel = 0
AND tcr.isdel = 0
AND u.isdel = 0
<if test= "ids.size()>0" >
AND recordId IN (
<foreach collection= "ids" separator= "," item= "recordId" >
#{recordId}
</foreach>
)
</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
</select>
<select id= "queryFictitiousRecord" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
hpm.projectName,
hpm.creationTime AS creationtime,
hpm.projectPermissions,
count( tcr.reportId ) AS reportNumber,
tcr.projectId,
tcr.reportId,
tpr.recordId
FROM
hr_project_management hpm
LEFT JOIN tms_project_record tpr ON hpm.projectId = tpr.projectId
LEFT JOIN tms_experimental_report tcr ON tpr.recordId = tcr.eventId
WHERE
tpr.isdel = 0
AND tcr.isdel = 0
AND hpm.projectPermissions = 0
<if test= "systemId!=null and systemId!=''" > AND hpm.systemId = #{systemId}</if>
<if test= "searchContant!=null and searchContant!=''" > and hpm.projectName like concat('%',#{searchContant},'%')
</if>
<if test= "startingtime!=null and startingtime!='' and endtime!=null and endtime != ''" > and hpm.creationTime
between #{endtime} and #{startingtime}
</if>
<if test= "month!=null and month != ''" > and DATE_SUB(CURDATE(), INTERVAL #{month} month ) < =
date(hpm.creationTime)
</if>
<if test= "projectIds.size!=null" >
AND tpr.projectId IN (
<foreach collection= "projectIds" separator= "," item= "projectId" >
#{projectId}
</foreach>
)
</if>
GROUP BY
tcr.reportId
ORDER BY
creationtime DESC,tcr.reportId DESC
</select>
</select>
<select id= "queryEvaluationReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
<select id= "queryEducationRecord" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
SELECT
u.userName,
hpm.projectName,
sch.schoolName,
hpm.creationTime AS creationtime,
s.workNumber,
tet.experimental_class_name,
tpr.score,
hpm.projectPermissions,
tpr.submitTime,
tcr.projectId,
tpr.recordId,
tcr.reportId,
tcr.reportId
tpr.recordId,
FROM
count( tcr.reportId ) AS reportNumber
hr_project_management hpm,
FROM
hr_user_info u,
hr_project_management hpm
student s,
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = hpm.projectId
tms_project_record tpr,
LEFT JOIN tms_project_record tpr ON tet.project_id = tpr.projectId
tms_experimental_report tcr,
LEFT JOIN tms_experimental_report tcr ON tcr.projectId = tet.id
school sch
WHERE
WHERE
tpr.isdel = 0
hpm.projectId = tpr.projectId
AND hpm.projectPermissions = 1
AND tpr.userId = u.userId
AND tcr.isdel = 0
AND u.userId = s.userId
<if test= "systemId!=null and systemId!=''" > AND hpm.systemId = #{systemId}</if>
AND sch.schoolId = u.schoolId
<if test= "searchContant!=null and searchContant!=''" > and (hpm.projectName like concat('%',#{searchContant},'%')
AND tcr.eventId = tpr.recordId
OR tet.experimental_class_name like concat('%',#{searchContant},'%') )
AND tpr.isdel = 0
</if>
AND tcr.isdel = 0
<if test= "startingtime!=null and startingtime!='' and endtime!=null and endtime != ''" > and hpm.creationTime
AND u.isdel = 0
between #{endtime} and #{startingtime}
AND tpr.projectId = #{projectId}
</if>
<if test= "searchContant!=null and searchContant!=''" > AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%') OR u.userName LIKE CONCAT('%',#{searchContant},'%') )</if>
<if test= "month!=null and month != ''" > and DATE_SUB(CURDATE(), INTERVAL #{month} month ) < =
GROUP BY
date(creation_time)
tcr.reportId
</if>
ORDER BY tpr.submitTime DESC
<if test= "projectIds.size!=null" >
</select>
AND tet.id IN (
<foreach collection= "projectIds" separator= "," item= "projectId" >
#{projectId}
</foreach>
)
</if>
GROUP BY
tcr.reportId
ORDER BY
creationtime DESC,tcr.reportId DESC
</select>
<select id= "queryFictitiousReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
u.userName,
sch.schoolName,
s.workNumber,
tpr.score,
tpr.submitTime,
tpr.recordId,
tcr.reportId
FROM
hr_project_management hpm,
hr_user_info u,
student s,
tms_project_record tpr,
tms_experimental_report tcr,
school sch
WHERE
hpm.projectId = tpr.projectId
AND tpr.userId = u.userId
AND u.userId = s.userId
AND sch.schoolId = u.schoolId
AND tcr.eventId = tpr.recordId
AND tpr.isdel = 0
AND tcr.isdel = 0
AND u.isdel = 0
AND tpr.projectId = #{projectId}
<if test= "searchContant!=null and searchContant!=''" > AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
</select>
<select id= "countEducationProjectId" resultType= "java.lang.Integer" >
SELECT ter.projectId
FROM tms_experimental_report ter
LEFT JOIN tms_experimental_teaching tet ON tet.id = ter.projectId
LEFT JOIN hr_project_management hpm ON tet.project_id = hpm.projectId
WHERE ter.isdel = 0
AND hpm.projectPermissions = 1
AND ter.projectId IS NOT NULL
GROUP BY ter.projectId
</select>
<select id= "countFictitiousProjectId" resultType= "java.lang.Integer" >
SELECT tpr.projectId
FROM tms_project_record tpr
LEFT JOIN hr_project_management hpm ON tpr.projectId = hpm.projectId
WHERE tpr.isdel = 0
AND hpm.projectPermissions = 0
GROUP BY tpr.projectId
</select>
<select id= "queryEvaluationName" resultType= "java.lang.String" >
SELECT project_name AS evaluationName
FROM tms_experimental_teaching
WHERE project_id = #{projectId}
</select>
<select id= "queryPythonTest" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT hec.`code` AS userAnswer,
hec.codeId,
IF
(p.rightAndWrong = 0, hsi.score, 0) AS codeScore,
hjp.judgmentPointsName,
hjp.experimentcode AS answer
FROM hr_experiment_code AS hec,
hr_score_index AS hsi,
hr_judgment_points AS hjp,
pointrecord p
WHERE hjp.judgmentPointsId = hsi.judgmentPointsId
AND hjp.judgmentPointsId = hec.judgmentPointsId
AND p.codeId = hec.codeId
<select id= "queryAchievement" resultType= "com.msdw.tms.entity.request.AchievementImportRequest" >
AND hjp.isdel = 0
SELECT
AND hec.recordId = #{recordId}
u.userName,
GROUP BY hec.codeId
sch.schoolName,
</select>
s.workNumber,
tpr.score,
tpr.submitTime,
tpr.recordId,
tcr.reportId
FROM
hr_project_management hpm,
hr_user_info u,
student s,
tms_project_record tpr,
tms_experimental_report tcr,
school sch
WHERE
hpm.projectId = tpr.projectId
AND tpr.userId = u.userId
AND u.userId = s.userId
AND sch.schoolId = u.schoolId
AND tcr.eventId = tpr.recordId
AND tpr.isdel = 0
AND tcr.isdel = 0
AND u.isdel = 0
<if test= "ids.size()>0" >
AND recordId IN (
<foreach collection= "ids" separator= "," item= "recordId" >
#{recordId}
</foreach>
)
</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
</select>
<select id= "queryFictitiousRecord" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
hpm.projectName,
hpm.creationTime AS creationtime,
hpm.projectPermissions,
count( tcr.reportId ) AS reportNumber,
tcr.projectId,
tcr.reportId,
tpr.recordId
FROM
hr_project_management hpm
LEFT JOIN tms_project_record tpr ON hpm.projectId = tpr.projectId
LEFT JOIN tms_experimental_report tcr ON tpr.recordId = tcr.eventId
WHERE
tpr.isdel = 0
AND tcr.isdel = 0
AND hpm.projectPermissions = 0
<if test= "systemId!=null and systemId!=''" > AND hpm.systemId = #{systemId} </if>
<if test= "searchContant!=null and searchContant!=''" > and hpm.projectName like concat('%',#{searchContant},'%')</if>
<if test= "startingtime!=null and startingtime!='' and endtime!=null and endtime != ''" > and hpm.creationTime between #{endtime} and #{startingtime}</if>
<if test= "month!=null and month != ''" > and DATE_SUB(CURDATE(), INTERVAL #{month} month ) < = date(hpm.creationTime)</if>
<if test= "projectIds.size!=null" >
AND tpr.projectId IN (
<foreach collection= "projectIds" separator= "," item= "projectId" >
#{projectId}
</foreach>
) </if>
GROUP BY
tcr.reportId
ORDER BY
creationtime DESC,tcr.reportId DESC
</select>
<select id= "queryEducationRecord" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
hpm.projectName,
hpm.creationTime AS creationtime,
tet.experimental_class_name,
hpm.projectPermissions,
tcr.projectId,
tcr.reportId,
tpr.recordId,
count( tcr.reportId ) AS reportNumber
FROM
hr_project_management hpm
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = hpm.projectId
LEFT JOIN tms_project_record tpr ON tet.project_id = tpr.projectId
LEFT JOIN tms_experimental_report tcr ON tcr.projectId = tet.id
WHERE
tpr.isdel = 0
AND hpm.projectPermissions = 1
AND tcr.isdel = 0
<if test= "systemId!=null and systemId!=''" > AND hpm.systemId = #{systemId} </if>
<if test= "searchContant!=null and searchContant!=''" > and (hpm.projectName like concat('%',#{searchContant},'%') OR tet.experimental_class_name like concat('%',#{searchContant},'%') )</if>
<if test= "startingtime!=null and startingtime!='' and endtime!=null and endtime != ''" > and hpm.creationTime between #{endtime} and #{startingtime}</if>
<if test= "month!=null and month != ''" > and DATE_SUB(CURDATE(), INTERVAL #{month} month ) < = date(creation_time)</if>
<if test= "projectIds.size!=null" >
AND tet.id IN (
<foreach collection= "projectIds" separator= "," item= "projectId" >
#{projectId}
</foreach>
) </if>
GROUP BY
tcr.reportId
ORDER BY
creationtime DESC,tcr.reportId DESC
</select>
<select id= "queryFictitiousReport" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
u.userName,
sch.schoolName,
s.workNumber,
tpr.score,
tpr.submitTime,
tpr.recordId,
tcr.reportId
FROM
hr_project_management hpm,
hr_user_info u,
student s,
tms_project_record tpr,
tms_experimental_report tcr,
school sch
WHERE
hpm.projectId = tpr.projectId
AND tpr.userId = u.userId
AND u.userId = s.userId
AND sch.schoolId = u.schoolId
AND tcr.eventId = tpr.recordId
AND tpr.isdel = 0
AND tcr.isdel = 0
AND u.isdel = 0
AND tpr.projectId = #{projectId}
<if test= "searchContant!=null and searchContant!=''" > AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%') OR u.userName LIKE CONCAT('%',#{searchContant},'%') )</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
</select>
<select id= "countEducationProjectId" resultType= "java.lang.Integer" >
SELECT
ter.projectId
FROM
tms_experimental_report ter
LEFT JOIN tms_experimental_teaching tet ON tet.id = ter.projectId
LEFT JOIN hr_project_management hpm ON tet.project_id = hpm.projectId
WHERE
ter.isdel = 0
AND hpm.projectPermissions = 1
AND ter.projectId IS NOT NULL
GROUP BY
ter.projectId
</select>
<select id= "countFictitiousProjectId" resultType= "java.lang.Integer" >
SELECT
tpr.projectId
FROM
tms_project_record tpr
LEFT JOIN hr_project_management hpm ON tpr.projectId = hpm.projectId
WHERE
tpr.isdel = 0
AND hpm.projectPermissions = 0
GROUP BY
tpr.projectId
</select>
<select id= "queryEvaluationName" resultType= "java.lang.String" >
SELECT project_name AS evaluationName FROM tms_experimental_teaching WHERE project_id = #{projectId}
</select>
<select id= "queryPythonTest" resultType= "com.msdw.tms.entity.vo.AchievementManagementVO" >
SELECT
hec.`code` AS userAnswer,
hec.codeId,
if(p.rightAndWrong=0,hsi.score,0) AS codeScore,
hjp.judgmentPointsName,
hjp.experimentcode AS answer
FROM
hr_experiment_code AS hec,
hr_score_index AS hsi,
hr_judgment_points AS hjp,
pointrecord p
WHERE
hjp.judgmentPointsId = hsi.judgmentPointsId
AND hjp.judgmentPointsId = hec.judgmentPointsId
AND p.codeId = hec.codeId
AND hsi.isdel = 0
AND hjp.isdel = 0
AND hec.recordId = #{recordId}
GROUP BY
hec.codeId
ORDER BY
hec.codeId ASC
</select>
<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 hr_experimental_report her where hpm.projectId = her.projectId ) as number
SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM
FROM hr_project_management hpm WHERE systemId = #{systemId}
hr_experimental_report her where hpm.projectId = her.projectId ) as number
AND hpm.isdel = 0
FROM hr_project_management hpm WHERE systemId = #{systemId}
<if test= "projectPermissions!=null and projectPermissions!=''" > AND hpm.projectPermissions = #{projectPermissions} </if>
AND hpm.isdel = 0
<if test= "searchContant!=null and searchContant!=''" > and hpm.projectName like concat('%',#{searchContant},'%')</if>
<if test= "projectPermissions!=null and projectPermissions!=''" > AND hpm.projectPermissions =
<if test= "startTime!=null and startTime!='' and endTime!=null and endTime != ''" > and hpm.creationTime between #{endTime} and #{startTime}</if>
#{projectPermissions}
<if test= "month!=null and month != ''" > and DATE_SUB(CURDATE(), INTERVAL #{month} month ) < = date(hpm.creationTime)</if>
</if>
ORDER BY hpm.creationTime DESC
<if test= "searchContant!=null and searchContant!=''" > and hpm.projectName like concat('%',#{searchContant},'%')
</select>
</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>
<select id= "newList" resultType= "com.msdw.tms.entity.ResultsEntity" >
<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,
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM hr_experimental_report her where et.project_id = her.projectId ) as number
experimentalName,et.project_id as projectId,
FROM tms_experimental_teaching et,hr_project_management pm
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM
WHERE user_id = #{userId}
hr_experimental_report her where et.project_id = her.projectId ) as number
AND et.project_id = pm.projectId
FROM tms_experimental_teaching et,hr_project_management pm
AND pm.isdel = 0
WHERE user_id = #{userId}
<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>
AND et.project_id = pm.projectId
<if test= "startTime!=null and startTime!='' and endTime!=null and endTime != ''" > and et.creation_time between #{endTime} and #{startTime}</if>
AND pm.isdel = 0
<if test= "month!=null and month != ''" > and DATE_SUB(CURDATE(), INTERVAL #{month} month ) < = date(et.creation_time)</if>
<if test= "searchContant!=null and searchContant!=''" > and et.experimental_class_name like
ORDER BY et.creation_time DESC
concat('%',#{searchContant},'%') or et.experimental_name like concat('%',#{searchContant},'%') or
</select>
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= "reportList" resultType= "com.msdw.tms.entity.ReportEntity" >
<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
SELECT hui.userId,her.reportId,hui.userName as
FROM hr_experimental_report her,hr_user_info hui,school s,student stu
studentName,s.schoolName,stu.workNumber,her.score,her.creationTime
WHERE her.projectId = #{projectId}
FROM hr_experimental_report her,hr_user_info hui,school s,student stu
AND her.studentId = hui.userId
WHERE her.projectId = #{projectId}
AND her.studentId = stu.userId
AND her.studentId = hui.userId
AND hui.schoolId = s.schoolId
AND her.studentId = stu.userId
AND her.isdel = 0
AND hui.schoolId = s.schoolId
<if test= "searchContant!=null and searchContant!=''" > AND (hui.userName LIKE CONCAT('%',#{searchContant},'%') OR s.schoolName LIKE CONCAT('%',#{searchContant},'%') )</if>
AND her.isdel = 0
ORDER BY her.creationTime desc
<if test= "searchContant!=null and searchContant!=''" > AND (hui.userName LIKE CONCAT('%',#{searchContant},'%') OR
</select>
s.schoolName LIKE CONCAT('%',#{searchContant},'%') )
</if>
ORDER BY her.creationTime desc
</select>
<select id= "getTeacher" resultType= "java.lang.String" >
<select id= "getTeacher" resultType= "java.lang.String" >
SELECT hui.userName FROM hr_project_management pm,hr_user_info hui
SELECT hui.userName
WHERE pm.projectId = #{projectId} and pm.userId = hui.userId
FROM hr_project_management pm,
</select>
hr_user_info hui
WHERE pm.projectId = #{projectId}
and pm.userId = hui.userId
</select>
<select id= "queryTradingJudgmentPointsId" resultType= "java.lang.Integer" >
<select id= "queryTradingJudgmentPointsId" resultType= "java.lang.Integer" >
SELECT tradingJudgmentPointsId FROM hr_user_score
SELECT tradingJudgmentPointsId
FROM hr_user_score
WHERE reportId = #{reportId}
WHERE reportId = #{reportId}
</select>
</select>
<select id= "getUserAnswers" resultType= "com.msdw.tms.entity.vo.JudgmentPointsRuleVO" >
<select id= "getUserAnswers" resultType= "com.msdw.tms.entity.vo.JudgmentPointsRuleVO" >
SELECT tjp.judgment_points_name as judgmentPointsName,ru.type,ru.id,ru.level_one as levelOne,ru.level_two as levelTwo,ru.level_three as levelThree,ru.level_four as levelFour,ru.trading_judgment_points_id as tradingJudgmentPointsId
SELECT tjp.judgment_points_name as judgmentPointsName,
FROM hr_trading_judgment_points_rule ru,hr_trading_judgment_points tjp
ru.type,
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId} and ru.trading_judgment_points_id = tjp.id
ru.id,
</select>
ru.level_one as levelOne,
ru.level_two as levelTwo,
ru.level_three as levelThree,
ru.level_four as levelFour,
ru.trading_judgment_points_id as tradingJudgmentPointsId
FROM hr_trading_judgment_points_rule ru,
hr_trading_judgment_points tjp
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId}
and ru.trading_judgment_points_id = tjp.id
</select>
</mapper>
</mapper>