|
@@ -10,12 +10,15 @@ import com.qmth.distributed.print.business.entity.TSyncExamStudentScore;
|
|
|
import com.qmth.distributed.print.business.enums.ImageTrajectoryEnum;
|
|
|
import com.qmth.distributed.print.business.mapper.TSyncExamStudentScoreMapper;
|
|
|
import com.qmth.distributed.print.business.service.TSyncExamStudentScoreService;
|
|
|
+import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
|
|
|
import com.qmth.teachcloud.common.config.DictionaryConfig;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
+import com.qmth.teachcloud.common.entity.BasicRoleDataPermission;
|
|
|
import com.qmth.teachcloud.common.entity.SysUser;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.teachcloud.common.enums.LocalCatalogEnum;
|
|
|
import com.qmth.teachcloud.common.enums.UploadFileEnum;
|
|
|
+import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
|
|
|
import com.qmth.teachcloud.common.service.TeachcloudCommonService;
|
|
|
import com.qmth.teachcloud.common.util.*;
|
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
@@ -53,6 +56,9 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
@Resource
|
|
|
TeachcloudCommonService teachcloudCommonService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ BasicRoleDataPermissionService basicRoleDataPermissionService;
|
|
|
+
|
|
|
|
|
|
* 同步成绩查询列表
|
|
|
*
|
|
@@ -74,7 +80,8 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
throw ExceptionResultEnum.ERROR.exception("请选择课程");
|
|
|
}
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- IPage<TSyncExamStudentScoreResult> list = tSyncExamStudentScoreMapper.list(iPage, sysUser.getSchoolId(), semesterId, examId, clazzId, courseCode);
|
|
|
+ DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
|
|
|
+ IPage<TSyncExamStudentScoreResult> list = tSyncExamStudentScoreMapper.list(iPage, sysUser.getSchoolId(), semesterId, examId, clazzId, courseCode, dpr);
|
|
|
list.getRecords().stream().map(m -> {
|
|
|
String localSheetUrls = m.getLocalSheetUrls();
|
|
|
if (StringUtils.isNotBlank(localSheetUrls)) {
|
|
@@ -102,7 +109,9 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
*/
|
|
|
@Override
|
|
|
public List<TSyncExamStudentScoreResult> export(Long schoolId, Long semesterId, Long examId, Long clazzId, String courseCode) {
|
|
|
- return tSyncExamStudentScoreMapper.export(schoolId, semesterId, examId, clazzId, courseCode);
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), ServletUtil.getRequest().getServletPath());
|
|
|
+ return tSyncExamStudentScoreMapper.export(schoolId, semesterId, examId, clazzId, courseCode, dpr);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -116,7 +125,9 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
*/
|
|
|
@Override
|
|
|
public int exportCount(Long schoolId, Long semesterId, Long examId, Long clazzId, String courseCode) {
|
|
|
- return tSyncExamStudentScoreMapper.exportCount(schoolId, semesterId, examId, clazzId, courseCode);
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), ServletUtil.getRequest().getServletPath());
|
|
|
+ return tSyncExamStudentScoreMapper.exportCount(schoolId, semesterId, examId, clazzId, courseCode, dpr);
|
|
|
}
|
|
|
|
|
|
|