教学实验成绩管理接口换接口

教师端成绩管理删除接口
学生端更改实验记录不判断isdel
hehai
jiakun.lin 4 years ago
parent 0710ea54a6
commit d85a6a5789
  1. 4
      src/main/java/com/msdw/tms/api/AchievementManagementApi.java
  2. 10
      src/main/java/com/msdw/tms/controller/AchievementManagementController.java
  3. 2
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  4. 2
      src/main/java/com/msdw/tms/service/AchievementManagementService.java
  5. 5
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  6. 26
      src/main/resources/mapper/tms/AchievementManagementDao.xml
  7. 6
      src/main/resources/mapper/tms/ProjectRecordDao.xml

@ -85,4 +85,8 @@ public interface AchievementManagementApi {
@ApiOperation(value = "成绩管理:虚拟仿真实验成绩管理", notes = "成绩管理:虚拟仿真实验成绩管理")
R getImitationAchievement(@ApiParam(value = "projectId", required = false) Integer projectId);
@ApiOperation(value = "成绩管理:实验教学成绩管理", notes = "成绩管理:实验教学成绩管理")
R getTeachAchievement(@RequestParam(required = true) Integer id);
}

@ -287,4 +287,14 @@ public class AchievementManagementController implements AchievementManagementApi
List<AchievementManagementVO> result = service.getImitationAchievement(projectId);
return R.ok().put("data", result);
}
/**
* 成绩管理:实验教学成绩管理
*/
@Override
@GetMapping("/getTeachAchievement")
public R getTeachAchievement(@RequestParam(required = true) Integer id) {
List<AchievementManagementVO> result = service.getTeachAchievement(id);
return R.ok().put("data", result);
}
}

@ -77,4 +77,6 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
//虚拟仿真成绩管理查询
List<AchievementManagementVO> getImitationAchievement(Integer projectId);
List<AchievementManagementVO> getTeachAchievement(Integer id);
}

@ -47,4 +47,6 @@ public interface AchievementManagementService extends IService<ExperimentalRepor
R deleteReportByProjectId(Integer projectId);
List<AchievementManagementVO> getImitationAchievement(Integer projectId);
List<AchievementManagementVO> getTeachAchievement(Integer id);
}

@ -299,4 +299,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
return list;
}
@Override
public List<AchievementManagementVO> getTeachAchievement(Integer id) {
return achievementManagementDao.getTeachAchievement(id);
}
}

@ -82,10 +82,9 @@
</insert>
<update id="deleteReport">
UPDATE tms_project_record tpr,hr_experimental_report tcr
SET tpr.isdel = 1, tcr.isdel = 1
WHERE tpr.recordId = #{recordId}
AND tcr.reportId = #{reportId}
UPDATE tms_project_record tpr,tms_experimental_report ter
SET tpr.isdel = 1, ter.isdel = 1
WHERE tpr.recordId = #{recordId} AND ter.reportId = #{reportId}
</update>
<update id="updateComment">
UPDATE tms_experimental_report
@ -504,4 +503,23 @@
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>

@ -58,7 +58,8 @@
INNER JOIN hr_project_management t ON t.projectId = c.projectId
INNER JOIN tms_project_record r ON r.recordId = c.recordId
WHERE c.userId = #{userId}
and r.isdel = 0
-- 教师端逻辑删除,学生端不做判断
-- and r.isdel = 0
and projectPermissions = #{projectPermissions}
and t.systemId = #{systemId}
GROUP BY c.recordId desc
@ -82,7 +83,8 @@
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId
LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id
WHERE tpr.userId = #{pro.userid}
AND tpr.isdel = #{pro.isdel}
-- 教师端逻辑删除,学生端不做判断(下面这行删掉报错,用>=来表示不管0,1都让通过)
AND tpr.isdel >= #{pro.isdel}
AND tp.projectPermissions !=0
AND
ter.eventId = tpr.recordId

Loading…
Cancel
Save