实现后台对未交作业人员的查询
This commit is contained in:
@@ -99,9 +99,9 @@ public class DataController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/home/findStudentInCourseFile")
|
@GetMapping("/home/findStudentInCourseFile")
|
||||||
public List<VUserfile> findStudentInCourseFile(
|
public List<TbStudentlist> findStudentInCourseFile(
|
||||||
@RequestParam(value = "Folder") String Folder,@RequestParam(value = "CourseName") String CourseName){
|
@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){
|
if (files!=null){
|
||||||
return files;
|
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.ResourceHandlerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@Configuration
|
/*@Configuration*/
|
||||||
public class WebAppConfig implements WebMvcConfigurer {
|
public class WebAppConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.fjy.spring.domain.TbFile;
|
|||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
public interface TbFileRepository extends JpaRepository<TbFile,Integer>{
|
public interface TbFileRepository extends JpaRepository<TbFile,Integer>{
|
||||||
public List<TbFile> findByColfilename(String name);
|
public List<TbFile> findByColfilename(String name);
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
package com.fjy.spring.repository;
|
package com.fjy.spring.repository;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fjy.spring.domain.TbStudentlist;
|
||||||
import com.fjy.spring.domain.VUserfile;
|
import com.fjy.spring.domain.VUserfile;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface VUserfileRepository extends JpaRepository<VUserfile,Integer> {
|
public interface VUserfileRepository extends JpaRepository<VUserfile,Integer> {
|
||||||
|
|
||||||
public List<VUserfile> findByWorkFolderAndCourseName(String workFolder,String courseName);
|
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;
|
package com.fjy.spring.service;
|
||||||
|
|
||||||
import com.fjy.spring.domain.TbFile;
|
import com.fjy.spring.domain.TbFile;
|
||||||
|
import com.fjy.spring.domain.VUserfile;
|
||||||
import com.fjy.spring.repository.TbFileRepository;
|
import com.fjy.spring.repository.TbFileRepository;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.fjy.spring.service;
|
package com.fjy.spring.service;
|
||||||
|
|
||||||
|
import com.fjy.spring.domain.TbStudentlist;
|
||||||
import com.fjy.spring.domain.VUserfile;
|
import com.fjy.spring.domain.VUserfile;
|
||||||
import com.fjy.spring.repository.VUserfileRepository;
|
import com.fjy.spring.repository.VUserfileRepository;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -15,4 +16,8 @@ public class VUserfileService {
|
|||||||
public List<VUserfile> findByWorkFolderAndCourseName(String workFolder, String courseName) {
|
public List<VUserfile> findByWorkFolderAndCourseName(String workFolder, String courseName) {
|
||||||
return vUserfileRepository.findByWorkFolderAndCourseName(workFolder, courseName);
|
return vUserfileRepository.findByWorkFolderAndCourseName(workFolder, courseName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<TbStudentlist> findStudentNoByWorkFolderAndCourseName(String workFolder, String courseName){
|
||||||
|
return vUserfileRepository.findStudentNoByWorkFolderAndCourseName(workFolder,courseName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
var Main = {
|
var Main = {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
restaurants: [],
|
||||||
|
state1: '',
|
||||||
|
state2: '',
|
||||||
activeIndex: '1',
|
activeIndex: '1',
|
||||||
formInline: {
|
formInline: {
|
||||||
user: '',
|
user: '',
|
||||||
@@ -61,8 +64,40 @@ var Main = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSelect(key, keyPath) {
|
querySearch(queryString, cb) {
|
||||||
console.log(key, keyPath);
|
var restaurants = this.restaurants;
|
||||||
|
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
||||||
|
// 调用 callback 返回建议列表的数据
|
||||||
|
cb(results);
|
||||||
|
},
|
||||||
|
createFilter(queryString) {
|
||||||
|
return (restaurant) => {
|
||||||
|
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
loadAll() {
|
||||||
|
return [
|
||||||
|
{ "value": "三全鲜食(北新泾店)", "address": "长宁区新渔路144号" },
|
||||||
|
{ "value": "Hot honey 首尔炸鸡(仙霞路)", "address": "上海市长宁区淞虹路661号" },
|
||||||
|
{ "value": "南拳妈妈龙虾盖浇饭", "address": "普陀区金沙江路1699号鑫乐惠美食广场A13" }
|
||||||
|
];
|
||||||
|
},
|
||||||
|
querySearchAsync(queryString, cb) {
|
||||||
|
var restaurants = this.restaurants;
|
||||||
|
var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
|
||||||
|
|
||||||
|
clearTimeout(this.timeout);
|
||||||
|
this.timeout = setTimeout(() => {
|
||||||
|
cb(results);
|
||||||
|
}, 1000 * Math.random());
|
||||||
|
},
|
||||||
|
createStateFilter(queryString) {
|
||||||
|
return (state) => {
|
||||||
|
return (state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleSelect(item) {
|
||||||
|
console.log(item);
|
||||||
},
|
},
|
||||||
ClickToJump(targe){
|
ClickToJump(targe){
|
||||||
window.location.href="http://localhost:8080/cms/home/" + targe;
|
window.location.href="http://localhost:8080/cms/home/" + targe;
|
||||||
@@ -83,6 +118,20 @@ var Main = {
|
|||||||
onSubmit() {
|
onSubmit() {
|
||||||
console.log('submit!');
|
console.log('submit!');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
/*this.restaurants = this.loadAll();*/
|
||||||
|
this.restaurants=this.$nextTick(() => {
|
||||||
|
var that = this;
|
||||||
|
axios.get('http://localhost:8080/cms/home/findvcourse')
|
||||||
|
.then(function (response) {
|
||||||
|
console.log(response.data);
|
||||||
|
that.logData = response.data;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var Ctor = Vue.extend(Main)
|
var Ctor = Vue.extend(Main)
|
||||||
|
|||||||
@@ -47,13 +47,14 @@
|
|||||||
<h4>添加课程</h4>
|
<h4>添加课程</h4>
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
<el-form-item label="课程名">
|
<el-form-item label="课程名">
|
||||||
<el-input v-model="formInline.user" placeholder="课程名"></el-input>
|
<el-autocomplete class="inline-input" v-model="state1"
|
||||||
|
:fetch-suggestions="querySearchAsync" placeholder="课程名"
|
||||||
|
@select="handleSelect"></el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="教师名">
|
<el-form-item label="教师名">
|
||||||
<el-select v-model="formInline.region" placeholder="教师名">
|
<el-autocomplete class="inline-input" v-model="state2"
|
||||||
<el-option label="区域一" value="shanghai"></el-option>
|
:fetch-suggestions="querySearchAsync" placeholder="教师名"
|
||||||
<el-option label="区域二" value="beijing"></el-option>
|
@select="handleSelect"></el-autocomplete>
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">添加</el-button>
|
<el-button type="primary" @click="onSubmit">添加</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user