|
@@ -153,7 +153,9 @@ public class PaperServiceImpl implements PaperService{
|
|
*/
|
|
*/
|
|
public Page<Paper> getImportPapers(PaperSearchInfo paperSearchInfo, int curPage, int pageSize) {
|
|
public Page<Paper> getImportPapers(PaperSearchInfo paperSearchInfo, int curPage, int pageSize) {
|
|
Query query = new Query();
|
|
Query query = new Query();
|
|
|
|
+ query.addCriteria(Criteria.where("orgId").is(paperSearchInfo.getOrgId()));
|
|
query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT));
|
|
query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT));
|
|
|
|
+ query.addCriteria(Criteria.where("course.enable").is("true"));
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getCourseNo())){
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getCourseNo())){
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
}
|
|
}
|
|
@@ -163,8 +165,6 @@ public class PaperServiceImpl implements PaperService{
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getLevel())){
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getLevel())){
|
|
query.addCriteria(Criteria.where("course.level").is(paperSearchInfo.getLevel()));
|
|
query.addCriteria(Criteria.where("course.level").is(paperSearchInfo.getLevel()));
|
|
}
|
|
}
|
|
- query.addCriteria(Criteria.where("course.enable").is("true"));
|
|
|
|
- query.addCriteria(Criteria.where("orgId").is(paperSearchInfo.getOrgId()));
|
|
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
query.with(new Sort(new Order(Direction.DESC,"createTime")));
|
|
query.with(new Sort(new Order(Direction.DESC,"createTime")));
|
|
query.limit(pageSize);
|
|
query.limit(pageSize);
|
|
@@ -183,17 +183,17 @@ public class PaperServiceImpl implements PaperService{
|
|
*/
|
|
*/
|
|
public Page<Paper> getImportPapersNotSuccess(PaperSearchInfo paperSearchInfo, int curPage, int pageSize) {
|
|
public Page<Paper> getImportPapersNotSuccess(PaperSearchInfo paperSearchInfo, int curPage, int pageSize) {
|
|
Query query = new Query();
|
|
Query query = new Query();
|
|
|
|
+ query.addCriteria(Criteria.where("orgId").is(paperSearchInfo.getOrgId()));
|
|
|
|
+ query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT));
|
|
|
|
+ query.addCriteria(Criteria.where("course.enable").is("true"));
|
|
if (paperSearchInfo.getPaperStatus() != null) {
|
|
if (paperSearchInfo.getPaperStatus() != null) {
|
|
query.addCriteria(Criteria.where("paperStatus").is(paperSearchInfo.getPaperStatus()));
|
|
query.addCriteria(Criteria.where("paperStatus").is(paperSearchInfo.getPaperStatus()));
|
|
} else {
|
|
} else {
|
|
query.addCriteria(Criteria.where("paperStatus").ne(PaperStatus.PASS));
|
|
query.addCriteria(Criteria.where("paperStatus").ne(PaperStatus.PASS));
|
|
}
|
|
}
|
|
- query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT));
|
|
|
|
- query.addCriteria(Criteria.where("orgId").is(paperSearchInfo.getOrgId()));
|
|
|
|
if (StringUtil.isNotBlank(paperSearchInfo.getCourseNo())) {
|
|
if (StringUtil.isNotBlank(paperSearchInfo.getCourseNo())) {
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
}
|
|
}
|
|
- query.addCriteria(Criteria.where("course.enable").is("true"));
|
|
|
|
long totalNumber = this.mongoTemplate.count(query, Paper.class);
|
|
long totalNumber = this.mongoTemplate.count(query, Paper.class);
|
|
query.limit(pageSize);
|
|
query.limit(pageSize);
|
|
query.skip((curPage - 1) * pageSize);
|
|
query.skip((curPage - 1) * pageSize);
|
|
@@ -269,15 +269,15 @@ public class PaperServiceImpl implements PaperService{
|
|
*/
|
|
*/
|
|
public Page<Paper> getGenPapers(PaperSearchInfo paperSearchInfo, int curPage, int pageSize) {
|
|
public Page<Paper> getGenPapers(PaperSearchInfo paperSearchInfo, int curPage, int pageSize) {
|
|
Query query = new Query();
|
|
Query query = new Query();
|
|
|
|
+ query.addCriteria(Criteria.where("orgId").is(paperSearchInfo.getOrgId()));
|
|
query.addCriteria(Criteria.where("paperType").is(PaperType.GENERATE.name()));
|
|
query.addCriteria(Criteria.where("paperType").is(PaperType.GENERATE.name()));
|
|
|
|
+ query.addCriteria(Criteria.where("course.enable").is("true"));
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getCourseNo())){
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getCourseNo())){
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
}
|
|
}
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getLevel())){
|
|
if(StringUtils.isNotBlank(paperSearchInfo.getLevel())){
|
|
query.addCriteria(Criteria.where("course.level").is(paperSearchInfo.getLevel()));
|
|
query.addCriteria(Criteria.where("course.level").is(paperSearchInfo.getLevel()));
|
|
}
|
|
}
|
|
- query.addCriteria(Criteria.where("course.enable").is("true"));
|
|
|
|
- query.addCriteria(Criteria.where("orgId").is(paperSearchInfo.getOrgId()));
|
|
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
query.with(new Sort(new Order(Direction.DESC,"createTime")));
|
|
query.with(new Sort(new Order(Direction.DESC,"createTime")));
|
|
query.limit(pageSize);
|
|
query.limit(pageSize);
|