上传代码

hehai
rong.liu 4 years ago
parent 44b86fcf58
commit a38fac4b18
  1. 2
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  2. 5
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  3. 43
      src/main/resources/mapper/tms/AchievementManagementDao.xml

@ -51,8 +51,6 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
IPage<AchievementManagementVO> queryEvaluationReport(Page<T> tPage, String searchContant, Integer projectId);
//实验成绩管理查看成绩 统计平均分
String getAVG(Integer projectId);
List<AchievementImportRequest> queryAchievement(@Param("ids") List<Integer> ids);

@ -182,12 +182,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
IPage<AchievementManagementVO> data = achievementManagementDao.queryEvaluationReport(tPage, searchContant, projectId);
String avg = achievementManagementDao.getAVG(projectId);
PageUtils result = new PageUtils(data);
return R.ok().put("data", result).put("avg", avg);
return R.ok().put("data", result);
}
@Override

@ -132,8 +132,9 @@
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
<!--
SELECT
u.userName,
sch.schoolName,
s.workNumber,
@ -158,17 +159,45 @@
AND tcr.isdel = 0
AND u.isdel = 0
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},'%') )
</if>
GROUP BY
tcr.reportId
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 id="getAVG" parameterType="java.lang.Integer" resultType="java.lang.String">
SELECT AVG(score) from tms_project_record WHERE projectId = #{projectId}
</select>
<select id="queryAchievement" resultType="com.msdw.tms.entity.request.AchievementImportRequest">
SELECT
@ -366,7 +395,7 @@
tms_project_record her where hpm.projectId = her.projectId ) as number
FROM hr_project_management hpm WHERE systemId = #{systemId}
AND hpm.isdel = 0
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPermissions =
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPer missions =
#{projectPermissions}
</if>
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%')

Loading…
Cancel
Save