|
@@ -16,10 +16,13 @@ import com.qmth.paper.library.business.service.PaperLibraryService;
|
|
|
import com.qmth.paper.library.business.service.PaperScanTaskService;
|
|
|
import com.qmth.paper.library.common.bean.params.DownLoadPaperParams;
|
|
|
import com.qmth.paper.library.common.contant.SystemConstant;
|
|
|
+import com.qmth.paper.library.common.entity.SysUser;
|
|
|
import com.qmth.paper.library.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.paper.library.common.enums.RoleTypeEnum;
|
|
|
+import com.qmth.paper.library.common.service.LibraryCommonService;
|
|
|
import com.qmth.paper.library.common.util.ServletUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.commons.lang3.SystemUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -27,6 +30,7 @@ import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -43,10 +47,15 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
|
|
|
@Resource
|
|
|
PaperLibraryService paperLibraryService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ LibraryCommonService libraryCommonService;
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<PaperArchivesResult> pageData(Long semesterId, Long managerOrgId, Long archivesTypeId, String archivesName, Integer pageNumber, Integer pageSize) {
|
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
- return this.baseMapper.pageData(new Page<>(pageNumber, pageSize), schoolId, semesterId, managerOrgId, archivesTypeId, archivesName);
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ Set<Long> orgIds = libraryCommonService.listSubOrgIds(sysUser.getOrgId());
|
|
|
+ return this.baseMapper.pageData(new Page<>(pageNumber, pageSize), schoolId, semesterId, managerOrgId, archivesTypeId, archivesName, orgIds);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -161,7 +170,7 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
|
|
|
String courseName = downLoadPaperParams.getCourseName();
|
|
|
String teacherName = downLoadPaperParams.getTeacherName();
|
|
|
String teachClazzName = downLoadPaperParams.getTeachClazzName();
|
|
|
- Boolean isBind = downLoadPaperParams.getBind();
|
|
|
+ Boolean isBind = downLoadPaperParams.getIsBind() == 1;
|
|
|
String param = downLoadPaperParams.getParam();
|
|
|
paperArchivesDetailResults = this.baseMapper.pageDetail(paperArchivesId, belongOrgId, majorName, clazzName, courseName, teacherName, teachClazzName, isBind, param);
|
|
|
}
|