实现后台对未交作业人员的查询
This commit is contained in:
@@ -99,9 +99,9 @@ public class DataController {
|
||||
}
|
||||
|
||||
@GetMapping("/home/findStudentInCourseFile")
|
||||
public List<VUserfile> findStudentInCourseFile(
|
||||
public List<TbStudentlist> findStudentInCourseFile(
|
||||
@RequestParam(value = "Folder") String Folder,@RequestParam(value = "CourseName") String CourseName){
|
||||
List<VUserfile> files = vUserfileService.findByWorkFolderAndCourseName(Folder,CourseName);
|
||||
List<TbStudentlist> files = vUserfileService.findStudentNoByWorkFolderAndCourseName(Folder,CourseName);
|
||||
if (files!=null){
|
||||
return files;
|
||||
}
|
||||
|
||||
48
src/main/java/com/fjy/spring/domain/TbStudentlist.java
Normal file
48
src/main/java/com/fjy/spring/domain/TbStudentlist.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.fjy.spring.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class TbStudentlist {
|
||||
@Id
|
||||
private Integer listid;
|
||||
|
||||
private String colstudentno;
|
||||
|
||||
private String colrealname;
|
||||
|
||||
private String sex;
|
||||
|
||||
public Integer getListid() {
|
||||
return listid;
|
||||
}
|
||||
|
||||
public void setListid(Integer listid) {
|
||||
this.listid = listid;
|
||||
}
|
||||
|
||||
public String getColstudentno() {
|
||||
return colstudentno;
|
||||
}
|
||||
|
||||
public void setColstudentno(String colstudentno) {
|
||||
this.colstudentno = colstudentno;
|
||||
}
|
||||
|
||||
public String getColrealname() {
|
||||
return colrealname;
|
||||
}
|
||||
|
||||
public void setColrealname(String colrealname) {
|
||||
this.colrealname = colrealname;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
/*@Configuration*/
|
||||
public class WebAppConfig implements WebMvcConfigurer {
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.fjy.spring.domain.TbFile;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface TbFileRepository extends JpaRepository<TbFile,Integer>{
|
||||
public List<TbFile> findByColfilename(String name);
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.fjy.spring.repository;
|
||||
|
||||
|
||||
import com.fjy.spring.domain.TbStudentlist;
|
||||
import com.fjy.spring.domain.VUserfile;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VUserfileRepository extends JpaRepository<VUserfile,Integer> {
|
||||
|
||||
public List<VUserfile> findByWorkFolderAndCourseName(String workFolder,String courseName);
|
||||
|
||||
@Query(value = "SELECT l FROM TbStudentlist l WHERE l.colstudentno NOT IN ( SELECT colstudentno FROM VUserfile f WHERE f.workFolder = ?1 AND f.courseName = ?2 )")
|
||||
public List<TbStudentlist> findStudentNoByWorkFolderAndCourseName(String workFolder, String courseName);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.fjy.spring.service;
|
||||
|
||||
import com.fjy.spring.domain.TbFile;
|
||||
import com.fjy.spring.domain.VUserfile;
|
||||
import com.fjy.spring.repository.TbFileRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.fjy.spring.service;
|
||||
|
||||
import com.fjy.spring.domain.TbStudentlist;
|
||||
import com.fjy.spring.domain.VUserfile;
|
||||
import com.fjy.spring.repository.VUserfileRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -15,4 +16,8 @@ public class VUserfileService {
|
||||
public List<VUserfile> findByWorkFolderAndCourseName(String workFolder, String courseName) {
|
||||
return vUserfileRepository.findByWorkFolderAndCourseName(workFolder, courseName);
|
||||
}
|
||||
|
||||
public List<TbStudentlist> findStudentNoByWorkFolderAndCourseName(String workFolder, String courseName){
|
||||
return vUserfileRepository.findStudentNoByWorkFolderAndCourseName(workFolder,courseName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user