完成教师端注册、忘记密码、重置密码等接口,还有全部学生模块接口,助教管理模块接口完成了一部分
This commit is contained in:
parent
4ef89054c9
commit
fa40000378
|
|
@ -6,9 +6,21 @@ export default {
|
|||
getTeacherInfo: () => request.post('/adminusers/getTeacherInfo'),
|
||||
updateTeacherNoPassword: (data) => request.post('/adminusers/updateTeacherNoPassword', data),
|
||||
getTeacherSignList: () => request.post('/adminusers/getTeacherSignList'),
|
||||
// findAllClassPage: (data) => request.post('/classes/findAllClassPage', data),
|
||||
// findAllClasses: (data) => request.post('/classes/findAllClasses', data),
|
||||
// findAllCoursesPage: (data) => request.post('/course/findAllCoursesPage', data)
|
||||
signTeacher: (data) => request.post('/adminusers/signTeacher', data, { noNeedToken: true })
|
||||
|
||||
findAdminuserByno: (data) => request.post('/adminusers/findAdminuserByno', data, { noNeedToken: true }),
|
||||
signTeacher: (data) => request.post('/adminusers/signTeacher', data, { noNeedToken: true }),
|
||||
findAdminuserByAccountInRePwInfo: (data) =>
|
||||
request.post('/adminusers/findAdminuserByAccountInRePwInfo', data, { noNeedToken: true }),
|
||||
confirmQuestionAnswer: (data) =>
|
||||
request.post('/adminusers/confirmQuestionAnswer', data, { noNeedToken: true }),
|
||||
updatePasswordByAccount: (data) =>
|
||||
request.post('/adminusers/updatePasswordByAccount', data, { noNeedToken: true }),
|
||||
findStudentsByCondition: (data) => request.post('/user/findStudentsByCondition', data),
|
||||
getUser: (data) => request.post('/user/getUser', data),
|
||||
editUserInfoByTeacher: (data) => request.post('/user/editUserInfoByTeacher', data),
|
||||
editUserPasswordByTeacher: (data) => request.post('/user/editUserPasswordByTeacher', data),
|
||||
remove: (data) => request.post('/user/remove', data),
|
||||
findAllAssistant: (data) => request.post('/adminusers/findAllAssistant', data),
|
||||
findAllClasses: (data) => request.post('/classes/findAllClasses', data),
|
||||
getAssistantById: (data) => request.post('/adminusers/getAssistantById', data),
|
||||
editAssistant: (data) => request.post('/adminusers/editAssistant', data),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ initLoginInfo()
|
|||
showTo()
|
||||
|
||||
function showTo(){
|
||||
if(props.title==="OJ系统 - 管理端") showToStudent.value=false;
|
||||
if(props.title==="自动评测系统 - 管理端") showToStudent.value=false;
|
||||
}
|
||||
const regist=()=>{
|
||||
if (props.title==="OJ系统 - 管理端"){
|
||||
if (props.title==="自动评测系统 - 管理端"){
|
||||
router.push({name: 'AdminRegister'})
|
||||
}else {
|
||||
router.push({name:'Signup'})
|
||||
|
|
@ -163,7 +163,7 @@ const regist=()=>{
|
|||
}
|
||||
}
|
||||
const forget=()=>{
|
||||
if (props.title==="OJ系统 - 管理端"){
|
||||
if (props.title==="自动评测系统 - 管理端"){
|
||||
router.push({name:'AdminRePwInfo'})
|
||||
}else {
|
||||
router.push({name:'RePwInfo'})
|
||||
|
|
|
|||
|
|
@ -132,7 +132,8 @@ const queryByPage1 = async ()=>{
|
|||
}
|
||||
|
||||
onMounted(()=>{
|
||||
queryByPage()
|
||||
|
||||
queryByPage1()
|
||||
queryByPage()
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -117,10 +117,9 @@ const columns = [
|
|||
render(row) {
|
||||
return h(
|
||||
AssistantActions,
|
||||
{
|
||||
onClickDelete: () => onDeleteAssistant(row),
|
||||
onClickEdit: () => onEditAssistant(row),
|
||||
{onClickEdit: () => onEditAssistant(row),
|
||||
onClickPassword: () => onPasswordAssistant(row),
|
||||
onClickDelete: () => onDeleteAssistant(row),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -133,7 +132,7 @@ const queryByPage = async (currentPage)=>{
|
|||
const res = await api.findAllAssistant(
|
||||
{
|
||||
id:id,
|
||||
schoolId:assistantInfoValue.value.schoolId,
|
||||
// schoolId:assistantInfoValue.value.schoolId,
|
||||
pageNum:currentPage,
|
||||
pageSize:paginationReactive.pageSize,
|
||||
}
|
||||
|
|
@ -143,17 +142,17 @@ const queryByPage = async (currentPage)=>{
|
|||
paginationReactive.pageSize = pageSize
|
||||
paginationReactive.itemCount = total
|
||||
assistantList.value=list.map((item,i)=>{return item;})
|
||||
const res1=await api.findAllShoolsInAdminusers()
|
||||
const list1=res1.data
|
||||
const transformedDatas=list1.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
transformedDatas.unshift({
|
||||
label: '全部',
|
||||
value: 0,
|
||||
});
|
||||
options.value=transformedDatas;
|
||||
// const res1=await api.findAllShoolsInAdminusers()
|
||||
// const list1=res1.data
|
||||
// const transformedDatas=list1.map(item => ({
|
||||
// label: item.name,
|
||||
// value: item.id,
|
||||
// }));
|
||||
// transformedDatas.unshift({
|
||||
// label: '全部',
|
||||
// value: 0,
|
||||
// });
|
||||
// options.value=transformedDatas;
|
||||
} catch (err) {
|
||||
}finally{
|
||||
loading.value = false
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
编辑
|
||||
</n-button>
|
||||
<n-button type="primary" size="small" @click="onPassword" style="--n-width: 90px;">
|
||||
重置秘密
|
||||
重置密码
|
||||
</n-button>
|
||||
<n-button type="primary" size="small" @click="onDelete" style="--n-width: 70px;margin-left:20px ">
|
||||
删除
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ const formRules = {
|
|||
const findExistUser = async () => {
|
||||
const res = await api.findAdminuserByno({
|
||||
no: formValue.value.no
|
||||
// schoolId:formValue.value.schoolId
|
||||
})
|
||||
if (res.data) {
|
||||
const { account, name, email,no,question,answer} = res.data
|
||||
|
|
@ -159,7 +158,8 @@ const findExistUser = async () => {
|
|||
positiveText: '确认',
|
||||
negativeText: '取消',
|
||||
onPositiveClick: () => {
|
||||
router.push({ name: 'AdminRePwInfo', state: { account } })
|
||||
router.push({ name: 'AdminRePwInfo',
|
||||
state: { account } })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div flex-col gap-y-10 style="width: 30px">
|
||||
<div flex>
|
||||
<n-button type="primary" size="small"
|
||||
@click="onReview"
|
||||
@click="onPost"
|
||||
style="--n-width: 60px;margin-left: 8px">
|
||||
发布
|
||||
</n-button>
|
||||
|
|
@ -24,12 +24,12 @@
|
|||
|
||||
<script setup>
|
||||
const emit =
|
||||
defineEmits(['clickDelete','clickReview','clickDelete'])
|
||||
defineEmits(['clickDelete','clickPost','clickDelete'])
|
||||
const onEdit = ()=>{
|
||||
emit('clickEdit')
|
||||
}
|
||||
const onReview = ()=>{
|
||||
emit('clickReview')
|
||||
const onPost = ()=>{
|
||||
emit('clickPost')
|
||||
}
|
||||
const onDelete = ()=>{
|
||||
emit('clickDelete')
|
||||
|
|
|
|||
|
|
@ -60,15 +60,17 @@
|
|||
@update="allow"
|
||||
></n-checkbox>
|
||||
</n-form-item>
|
||||
</div><div
|
||||
class="grid md:grid-cols-12 md:gap-x-20">
|
||||
<n-button type="primary"
|
||||
size="small"
|
||||
@click="submit">确定
|
||||
</n-button>
|
||||
<n-button type="primary"
|
||||
size="small" @click="cancel">取消
|
||||
</n-button></div>
|
||||
</div> <div flex>
|
||||
<n-form-item style='margin-left: 30px'>
|
||||
<n-button type="primary"
|
||||
size="small"
|
||||
@click="submit">确定
|
||||
</n-button></n-form-item>
|
||||
<n-form-item style='margin-left: 20px'>
|
||||
<n-button type="primary"
|
||||
size="small" @click="cancel">取消
|
||||
</n-button>
|
||||
</n-form-item></div>
|
||||
|
||||
</div></n-form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
<template>
|
||||
<CommonPage show-footer>
|
||||
<div>
|
||||
<n-form ref="problemInfoRef"
|
||||
:model="problemInfoValue"
|
||||
:rules="rules"
|
||||
label-placement="left"style="margin-top: 15px;margin-left: 5%">
|
||||
<div class="flex" style='align-items: flex-start' >
|
||||
<div class="flex-1">
|
||||
<div class="flex-col justify-between">
|
||||
<n-form-item label="作业标题"
|
||||
path="title"
|
||||
>
|
||||
<n-input
|
||||
v-model:value="problemInfoValue.title"
|
||||
placeholder="输入作业标题"
|
||||
style='width: 800px'/>
|
||||
</n-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<n-button type="primary"
|
||||
size="small"
|
||||
style="margin-bottom:
|
||||
10px" @click="submit">确定
|
||||
</n-button>
|
||||
<n-button type="primary"
|
||||
size="small" @click="cancel" style="margin-left: 30px">取消</n-button>
|
||||
</div>
|
||||
<div class="mb-50 mt-10 flex-col">
|
||||
<div class="mb-10 mt-4 flex items-center">
|
||||
<h3 class="text-18">题目描述</h3>
|
||||
<span class="text-gray">(使用宋体字体,可以保证英文和数字等宽)</span>
|
||||
</div>
|
||||
<n-form-item path="description">
|
||||
<RichTextEditor
|
||||
v-model:value="problemInfoValue.description"
|
||||
:editor-style="{ height: descEditorHeight }"
|
||||
@on-focus="handleDescEditorFocus"
|
||||
/>
|
||||
</n-form-item>
|
||||
<div class="mb-10 mt-4 flex items-center">
|
||||
<h3 class="text-18">评分标准</h3>
|
||||
<n-button type="primary" size="small" @click="onAdd" style="margin-left: 12px">添加</n-button>
|
||||
</div>
|
||||
<StandardsList />
|
||||
</div>
|
||||
</n-form>
|
||||
</div>
|
||||
</CommonPage>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useRouter} from "vue-router";
|
||||
import {ref} from "vue";
|
||||
import api from "@/api/admin";
|
||||
import { useTagsStore } from '@/store'
|
||||
import StandardsList
|
||||
from '@/views/admin/problem/components/StandardList.vue'
|
||||
import RichTextEditor
|
||||
from '@/components/common/RichTextEditor.vue'
|
||||
const tagsStore = useTagsStore()
|
||||
const path=ref('')
|
||||
const router = useRouter()
|
||||
const rules=ref(null)
|
||||
const problemInfoValue = ref({
|
||||
name: ''
|
||||
});
|
||||
const problemInfoRef = ref(null)
|
||||
const descEditorHeight = ref('160px')
|
||||
|
||||
const cancel = ()=>{
|
||||
tagsStore.removeTag(path.value)
|
||||
router.push({path: 'problem-list'})
|
||||
}
|
||||
const onAdd = ()=>{
|
||||
router.push({name: 'AdminProblemScoringStandard'})
|
||||
}
|
||||
const submit =async ()=>{
|
||||
if(problemInfoValue.value.name!==''){
|
||||
try {
|
||||
await api.Addproblem({
|
||||
...problemInfoValue.value
|
||||
})
|
||||
$message.success("添加课程成功")
|
||||
tagsStore.removeTag(path.value)
|
||||
await router.push({name: 'AdminProblemList'})
|
||||
} catch (err) {
|
||||
tagsStore.removeTag(path.value)
|
||||
await router.push({name: 'AdminProblemList'})
|
||||
}
|
||||
}else {
|
||||
$message.error("作业名称不能为空")
|
||||
}
|
||||
}
|
||||
onMounted(()=>{
|
||||
path.value=router.currentRoute.value.fullPath
|
||||
})
|
||||
</script>
|
||||
|
|
@ -60,16 +60,18 @@
|
|||
@update="allow"
|
||||
></n-checkbox>
|
||||
</n-form-item>
|
||||
</div><div
|
||||
class="grid md:grid-cols-12 md:gap-x-20">
|
||||
</div>
|
||||
<div flex>
|
||||
<n-button type="primary"
|
||||
size="small" @click="submit">发布
|
||||
size="small" @click="submit" style='margin-left:
|
||||
30px'>发布
|
||||
</n-button>
|
||||
<n-button type="primary"
|
||||
size="small" @click="cancel">取消
|
||||
size="small" @click="cancel" style='margin-left:
|
||||
20px'>取消
|
||||
</n-button></div>
|
||||
|
||||
</div></n-form>
|
||||
</div>
|
||||
</n-form>
|
||||
</div>
|
||||
</CommonPage>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,170 @@
|
|||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
作业批阅
|
||||
<CommonPage show-footer>
|
||||
<div
|
||||
label-placement="left"style="margin-top: 15px;margin-left: 2%">
|
||||
<n-form
|
||||
ref="problemInfoRef"
|
||||
:model="problemInfoValue"
|
||||
:rules="problemAddRules"
|
||||
label-placement="left"
|
||||
label-align="right"
|
||||
label-width="100px"
|
||||
:show-require-mark="false"
|
||||
>
|
||||
<div class="exam-name-div">
|
||||
<n-h2
|
||||
class="show-problem-name">
|
||||
{{ problemName }}
|
||||
</n-h2>
|
||||
|
||||
<div style='display:flex;margin-left: 30px'>
|
||||
<n-form-item>{{problemDescription }}</n-form-item> </div>
|
||||
|
||||
<div flex>
|
||||
<n-form-item
|
||||
style='margin-left: 30px'>{{
|
||||
studentMessage.studentNo}} </n-form-item>
|
||||
<n-form-item style='margin-left: 30px'>{{studentMessage
|
||||
.name}}</n-form-item>
|
||||
<n-form-item style='margin-left: 30px'>
|
||||
{{studentMessage.class}}:</n-form-item>
|
||||
|
||||
</div>
|
||||
<div flex>
|
||||
<n-form-item style='margin-left: 30px'>
|
||||
<a :href="docUrl" download="example.doc" target="_blank">
|
||||
点击这里下载附件
|
||||
</a></n-form-item>
|
||||
</div>
|
||||
<div flex>
|
||||
<n-form-item style='margin-left:
|
||||
30px;width: 50%'>
|
||||
<label>自动评分:{{submitReport
|
||||
.autoscore}}</label>
|
||||
</n-form-item>
|
||||
<n-form-item style='width: 20%'>
|
||||
<label style='width: 100px'>教师评分:
|
||||
</label>
|
||||
<n-input v-model="submitReport.score"
|
||||
/>
|
||||
</n-form-item>
|
||||
</div>
|
||||
<div flex>
|
||||
<n-form-item style='margin-left:
|
||||
30px;width: 50%'>
|
||||
<label>评语:</label>
|
||||
</n-form-item>
|
||||
<n-form-item style='width: 20%'>
|
||||
<label style='width: 100px'>教师评语:
|
||||
</label>
|
||||
|
||||
</n-form-item>
|
||||
</div>
|
||||
<div flex>
|
||||
<n-form-item style='margin-left:
|
||||
30px;width: 50%'>
|
||||
<pre
|
||||
style='white-space: normal;word-wrap: break-word'>{{submitReport.aotocomment }}</pre>
|
||||
</n-form-item>
|
||||
<n-form-item
|
||||
style='width: 50%;margin-left: 30px'>
|
||||
<n-input
|
||||
type="textarea"
|
||||
v-model="submitReport.comment"
|
||||
rows="6"
|
||||
:autosize="{ minRows: 6, maxRows: 10 }"
|
||||
/>
|
||||
|
||||
</n-form-item>
|
||||
</div>
|
||||
|
||||
<div style='display: flex;justify-content: flex-end'>
|
||||
<n-form-item style='margin-right:
|
||||
20px'>
|
||||
<n-button type="primary"
|
||||
size="small"
|
||||
@click="submit">提交
|
||||
</n-button></n-form-item>
|
||||
<n-form-item style='margin-right:
|
||||
20px'>
|
||||
<n-button type="primary"
|
||||
size="small"
|
||||
@click="submitAndNext">提交并进入下一份
|
||||
</n-button></n-form-item>
|
||||
<n-form-item style='margin-right:
|
||||
30px'>
|
||||
<n-button type="primary"
|
||||
size="small"
|
||||
@click="redo">打回重做
|
||||
</n-button>
|
||||
</n-form-item></div>
|
||||
|
||||
</div></n-form>
|
||||
</div>
|
||||
</CommonPage>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<script setup>
|
||||
import {useRouter} from "vue-router";
|
||||
import {ref} from "vue";
|
||||
import api from "@/api/admin";
|
||||
import { useTagsStore } from '@/store'
|
||||
import StandardsList
|
||||
from '@/views/admin/problem/components/StandardList.vue'
|
||||
import RichTextEditor
|
||||
from '@/components/common/RichTextEditor.vue'
|
||||
const tagsStore = useTagsStore()
|
||||
const path=ref('')
|
||||
const router = useRouter()
|
||||
const rules=ref(null)
|
||||
const docUrl = ref('path/to/your/document.doc'); // 替换为你的 DOC 文件路径
|
||||
const problemInfoValue = ref({
|
||||
name: '',
|
||||
timeFrom: [],
|
||||
timeTo: [],
|
||||
allow:true
|
||||
});
|
||||
const problemInfoRef = ref(null)
|
||||
const descEditorHeight = ref('160px')
|
||||
const problemName = ref('作业标题')
|
||||
const problemDescription=ref('题目描述')
|
||||
const studentMessage=ref({
|
||||
studentNo:'211310509',
|
||||
name:'zlm',
|
||||
class:'c++班级'
|
||||
})
|
||||
const submitReport=ref({
|
||||
autoscore:90,
|
||||
aotocomment:`角色分为管理员、用户、商家,管理员在后台可以进行用户管理、商家管理、商品类型管理、商品信息管理、商品购买管理、交流信息管理、交流回复管理、留言板管理、系统管理;商家在后台可以进行商品类型管理、商品信息管理、商品购买管理、交流信息管理和交流回复管理;用户在后台可以进行商品购买管理、交流信息管理、交流回复管理、我的收藏管理、留言板管理。`,
|
||||
score:'',
|
||||
comment:''
|
||||
})
|
||||
const cancel = ()=>{
|
||||
tagsStore.removeTag(path.value)
|
||||
router.push({path: 'problem-list'})
|
||||
}
|
||||
const onAdd = ()=>{
|
||||
router.push({name: 'AdminProblemPostClass'})
|
||||
}
|
||||
const submit =async ()=>{
|
||||
if(problemInfoValue.value.name!==''){
|
||||
try {
|
||||
await api.Addproblem({
|
||||
...problemInfoValue.value
|
||||
})
|
||||
$message.success("添加课程成功")
|
||||
tagsStore.removeTag(path.value)
|
||||
await router.push({name: 'AdminProblemList'})
|
||||
} catch (err) {
|
||||
tagsStore.removeTag(path.value)
|
||||
await router.push({name: 'AdminProblemList'})
|
||||
}
|
||||
}else {
|
||||
$message.error("作业名称不能为空")
|
||||
}
|
||||
}
|
||||
onMounted(()=>{
|
||||
path.value=router.currentRoute.value.fullPath
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ if (role[0]=='admin'){
|
|||
ProblemActions2,
|
||||
{
|
||||
|
||||
onClickReview: () =>
|
||||
onReviewProblem(row),
|
||||
onClickPost: () =>
|
||||
onPostProblem(row),
|
||||
onClickEdit: () => onEditProblem(row),
|
||||
onClickDelete:()=>onDeleteProblem(row)
|
||||
}
|
||||
|
|
@ -257,6 +257,12 @@ const onEditProblem = async (problemid)=>{
|
|||
const {id} =1
|
||||
await router.push({name: 'AdminProblemEdit', params: {clId: id}})
|
||||
}
|
||||
const onPostProblem = async (problemid)=>{
|
||||
// const {id} = problemid
|
||||
const {id} =1
|
||||
await router.push({name: 'AdminProblemPost',
|
||||
params: {clId: id}})
|
||||
}
|
||||
const search=async ()=>{
|
||||
loading.value=true
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -136,19 +136,20 @@ const updateColumns=()=>{
|
|||
{
|
||||
key: 'studentNo',
|
||||
title: '学号',
|
||||
width: '160',
|
||||
width: '80',
|
||||
align:'center',
|
||||
},
|
||||
{
|
||||
key: 'chineseName',
|
||||
title: '姓名',
|
||||
width: '80',
|
||||
width: '50',
|
||||
align:'center',
|
||||
},
|
||||
{
|
||||
key: 'readTime',
|
||||
title: '领取时间',
|
||||
width: '200',
|
||||
width: '100',
|
||||
align:'center',
|
||||
render: (row) => {
|
||||
return
|
||||
row["readTime"]=formatDateTime(row["readTime"]);
|
||||
|
|
@ -157,7 +158,7 @@ const updateColumns=()=>{
|
|||
{
|
||||
key: 'status1',
|
||||
title: '状态',
|
||||
width: '150',
|
||||
width: '300',
|
||||
},
|
||||
// {
|
||||
// key: 'actions',
|
||||
|
|
@ -193,6 +194,7 @@ const updateColumns=()=>{
|
|||
key: 'submitTime',
|
||||
title: '提交时间',
|
||||
width: '160',
|
||||
align:'center',
|
||||
render: (row) => {
|
||||
return
|
||||
row["submitTime"]=formatDateTime(row["submitTime"]);
|
||||
|
|
@ -202,11 +204,13 @@ const updateColumns=()=>{
|
|||
key: 'status',
|
||||
title: '状态',
|
||||
width: '150',
|
||||
align:'center',
|
||||
},
|
||||
{
|
||||
key: 'score',
|
||||
title: '成绩',
|
||||
width: '170',
|
||||
align:'center',
|
||||
},
|
||||
{
|
||||
key: 'actions',
|
||||
|
|
|
|||
|
|
@ -78,6 +78,19 @@ export default {
|
|||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'AdminProblemEdit',
|
||||
path: 'problem-edit',
|
||||
isHidden: true,
|
||||
component: () => import('@/views/admin/problem/problem-edit.vue'),
|
||||
meta: {
|
||||
title: '作业编辑',
|
||||
icon: 'ic:baseline-add',
|
||||
role: ['admin', 'teacher'],
|
||||
requireAuth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'AdminProblemReview',
|
||||
path: 'problem-review',
|
||||
|
|
@ -143,6 +156,18 @@ export default {
|
|||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'AdminProblemTest',
|
||||
path: 'problem-test',
|
||||
component: () => import('@/views/admin/problem/test.vue'),
|
||||
meta: {
|
||||
title: '测试页',
|
||||
icon: 'ic:baseline-add',
|
||||
role: ['admin', 'teacher'],
|
||||
requireAuth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'AdminProblemStore',
|
||||
path: 'problem-store',
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const route = useRoute()
|
|||
const options=ref([])
|
||||
const loading = ref(true)
|
||||
const studentList =
|
||||
ref([{stId:1,studentNo:"211310509",chineseName:"张三",username:"zhangsan",banji:"计算机2101",email:"2286848422@qq.com"}])
|
||||
ref([])
|
||||
const {clId} = route.params
|
||||
const paginationReactive = reactive({
|
||||
page: 1,
|
||||
|
|
@ -141,9 +141,11 @@ const columns = [
|
|||
return h(
|
||||
StudentListAction,
|
||||
{
|
||||
onClickPassword: () => onPasswordClass(row),
|
||||
onClickEdit: () => onEditClass(row),
|
||||
onClickDelete: () => onDeleteClass(row),
|
||||
onClickPassword: () =>
|
||||
onPasswordStudent(row),
|
||||
onClickEdit: () => onEditStudent(row),
|
||||
onClickDelete: () =>
|
||||
onDeleteStudent(row),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -154,24 +156,24 @@ const studentInfoValue = ref({
|
|||
studentNo:'',
|
||||
chineseName:'',
|
||||
stu_userName:'',
|
||||
schoolId:0,
|
||||
// schoolId:0,
|
||||
pageNum:paginationReactive.page,
|
||||
pageSize:paginationReactive.pageSize
|
||||
});
|
||||
const queryByPage = async (currentPage)=>{
|
||||
loading.value = true
|
||||
try {
|
||||
const res1=await api.findAllShoolsInAdminusers()
|
||||
const list1=res1.data
|
||||
const transformedDatas=list1.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
transformedDatas.unshift({
|
||||
label: '全部',
|
||||
value: 0,
|
||||
});
|
||||
options.value=transformedDatas;
|
||||
// const res1=await api.findAllShoolsInAdminusers()
|
||||
// const list1=res1.data
|
||||
// const transformedDatas=list1.map(item => ({
|
||||
// label: item.name,
|
||||
// value: item.id,
|
||||
// }));
|
||||
// transformedDatas.unshift({
|
||||
// label: '全部',
|
||||
// value: 0,
|
||||
// });
|
||||
// options.value=transformedDatas;
|
||||
studentInfoValue.value.pageNum=currentPage
|
||||
studentInfoValue.value.pageSize=paginationReactive.pageSize
|
||||
const res = await api.findStudentsByCondition({
|
||||
|
|
@ -179,8 +181,8 @@ const queryByPage = async (currentPage)=>{
|
|||
pageSize:paginationReactive.pageSize,
|
||||
studentNo:studentInfoValue.value.studentNo,
|
||||
chineseName:studentInfoValue.value.chineseName,
|
||||
stu_userName:studentInfoValue.value.stu_userName,
|
||||
schoolId:studentInfoValue.value.schoolId
|
||||
stu_userName:studentInfoValue.value.stu_userName
|
||||
// schoolId:studentInfoValue.value.schoolId
|
||||
})
|
||||
if (res.message==='获取学生信息为空'){
|
||||
studentList.value=[]
|
||||
|
|
@ -209,23 +211,21 @@ const queryByPage = async (currentPage)=>{
|
|||
loading.value = false
|
||||
}
|
||||
}
|
||||
const onPasswordClass = async (classId)=>{
|
||||
// const {id} = classId
|
||||
const id=1
|
||||
if (classId.username==='请学生注册'){
|
||||
const onPasswordStudent = async (studentId)=>{
|
||||
const {id} = studentId
|
||||
if (studentId.username==='请学生注册'){
|
||||
$message.error("请先注册在进行此操作")
|
||||
}else {
|
||||
await router.push({name: 'StudentPassword', params: {clId: id}, query: {id: clId}})
|
||||
}
|
||||
}
|
||||
const onEditClass = async (classId)=>{
|
||||
// const {id} = classId
|
||||
const id=1
|
||||
const onEditStudent = async (studentId)=>{
|
||||
const {id} = studentId
|
||||
await router.push({name: 'StudentEdits', params: {clId: id}, query: {id: clId}})
|
||||
}
|
||||
const onDeleteClass = async (classId)=>{
|
||||
const onDeleteStudent = async (student)=>{
|
||||
try {
|
||||
await api.remove({ids:classId.username})
|
||||
await api.remove({username:student.username})
|
||||
$message.success("删除成功")
|
||||
if (!loading.value) {
|
||||
await queryByPage()
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@ public class HttpInterceptorConfig extends WebMvcConfigurationSupport {
|
|||
registry.addInterceptor(jwtInterceptor)
|
||||
.addPathPatterns("/api/**") //拦截所有请求,判断token是否合法决定是否需要登录
|
||||
.excludePathPatterns("/api/login/student","/api/login/admin","/api/login","/api/user/signUser",
|
||||
"/api/user/findUserByStudentNoSchoolId","/api/school/getSchoolByName");
|
||||
"/api/user" +
|
||||
"/findUserByStudentNoSchoolId","/api/school/getSchoolByName","/api/adminusers/findAdminuserByno","/api/adminusers/findAdminuserByAccountInRePwInfo",
|
||||
"/api/adminusers" +
|
||||
"/signTeacher",
|
||||
"/api/adminusers" +
|
||||
"/confirmQuestionAnswer","/api/adminusers/updatePasswordByAccount");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,12 @@ package com.example.aes.user.controller;
|
|||
|
||||
import com.example.aes.global.model.DecodeToken;
|
||||
import com.example.aes.global.model.RespBean;
|
||||
import com.example.aes.user.model.AssistantClass;
|
||||
import com.example.aes.user.model.DataGrid;
|
||||
import com.example.aes.user.model.PMAdminusers;
|
||||
import com.example.aes.user.model.UAdminusers;
|
||||
import com.example.aes.user.service.AdminusersServiceI;
|
||||
import com.example.aes.user.service.AssistantClassServiceI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -22,7 +26,8 @@ public class AdminusersController {
|
|||
|
||||
@Autowired
|
||||
AdminusersServiceI adminusersServiceI;
|
||||
|
||||
@Autowired
|
||||
AssistantClassServiceI assistantClassService;
|
||||
|
||||
// 管理员获取待审核记录列表
|
||||
@PostMapping("/getTeacherSignList")
|
||||
|
|
@ -35,70 +40,117 @@ public class AdminusersController {
|
|||
}
|
||||
return RespBean.error("不具备权限");
|
||||
}
|
||||
// @PostMapping("/signTeacher")
|
||||
// public RespBean signTeacher(@RequestBody PMAdminusers pmadminusers) // 注册教师
|
||||
// {
|
||||
// pmadminusers.setSessionId(pmadminusers.getSessionId().substring(64));
|
||||
// // 设置statu为未审核
|
||||
// pmadminusers.setStatus("待审核");
|
||||
// /*
|
||||
// * UUID uuid = UUID.randomUUID();
|
||||
// * pmadminusers.setUuid(uuid.toString().replaceAll("\\-", ""));
|
||||
// */
|
||||
// PMAdminusers pma = adminusersServiceI
|
||||
// .getAdminuserByAccount(pmadminusers.getAccount());
|
||||
// if (pma != null) {
|
||||
// if (pma.getQuestion().equals("") || pma.getQuestion().equals(null)) {
|
||||
// boolean result = adminusersServiceI
|
||||
// .updateQueAndAnsByaccount(pma);
|
||||
// if (result == true) {
|
||||
// return RespBean.ok("申请注册教师成功,请注意查收激活邮件!");
|
||||
// } else {
|
||||
// return RespBean.error("注册教师失败");
|
||||
// }
|
||||
// } else {
|
||||
// return RespBean.error("用户名重复,请修改用户名");
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
// boolean result = adminusersServiceI.addTeacher(pmadminusers);
|
||||
// if (result == true) {
|
||||
// return RespBean.ok("注册教师成功");
|
||||
// } else {
|
||||
// return RespBean.error("注册教师失败");
|
||||
// }
|
||||
/*
|
||||
* try {
|
||||
*
|
||||
* SendMail mail = new SendMail(); // 收信人 String[] list =
|
||||
* {pmadminusers.getEmail()}; //mail.setMailTo(list, "cc");
|
||||
* mail.setMailTo(list, "to"); // 发信人
|
||||
* mail.setMailFrom("dhuoj_noreply@163.com"); //
|
||||
* mail.setMailFrom("duzhen"); // 邮件主题
|
||||
* mail.setSubject("OJ系统教师注册激活邮件"); // 邮件发送时间 mail.setSendDate(new
|
||||
* Date()); // html格式邮件 // 邮件内容 String context = "<html>" + "<body>"
|
||||
* +
|
||||
* "您的OJ系统账号已创建,如果这是您在进行的操作,请点击链接(如果点击无效,请复制以下链接并在浏览器中打开)激活账号:<br>"
|
||||
* +
|
||||
* "<a href='http://218.193.156.209:8080/oj/admin/activeTeacher.jsp?account="
|
||||
* +pmadminusers.getAccount()+"&uuid="+pmadminusers.getUuid()+
|
||||
* "'>http://218.193.156.209:8080/oj/admin/activeTeacher.jsp?account="
|
||||
* +pmadminusers.getAccount()+"&uuid="+pmadminusers.getUuid()+"</a>"
|
||||
* + "</body>" + "</html>"; mail.addHtmlContext(context); // txt格式邮件
|
||||
* // mail.addTextContext(""); mail.send();
|
||||
* System.out.println("send success"); boolean
|
||||
* result=adminusersServiceI.addTeacher(pmadminusers);
|
||||
* if(result==true){ logger.info("注册教师成功"); j.setSuccess(true);
|
||||
* j.setMsg("申请注册教师成功,请注意查收激活邮件!"); super.writeJson(j); }else{
|
||||
* logger.info("注册教师失败"); j.setSuccess(false); j.setMsg("注册教师失败");
|
||||
* super.writeJson(j); }
|
||||
*
|
||||
* } catch (Exception e) { e.printStackTrace();
|
||||
* logger.info("注册教师邮件发送失败,请联系管理员11249242@qq.com");
|
||||
* j.setSuccess(false);
|
||||
* j.setMsg("注册教师邮件发送失败,请联系管理员11249242@qq.com"); super.writeJson(j);
|
||||
* }
|
||||
*/
|
||||
@PostMapping("/findAdminuserByno")
|
||||
public RespBean findAdminuserByno(@RequestBody UAdminusers uAdminusers){
|
||||
String no = uAdminusers.getNo();
|
||||
// int schoolId = uAdminusers.getSchoolId();
|
||||
|
||||
PMAdminusers pmAdminusers = adminusersServiceI.findAdminuserByno(no);
|
||||
if(pmAdminusers!=null)
|
||||
return RespBean.ok("查询成功", pmAdminusers);
|
||||
else
|
||||
return RespBean.ok("无该账号信息");
|
||||
}
|
||||
@PostMapping("/findAdminuserByAccountInRePwInfo")
|
||||
public RespBean findAdminuserByAccountInRePwInfo(@RequestBody PMAdminusers pmadminusers) {
|
||||
PMAdminusers adminuser = adminusersServiceI
|
||||
.getAdminuserByAccount(pmadminusers.getAccount());
|
||||
if (adminuser != null) {
|
||||
adminuser.setAnswer(null);
|
||||
adminuser.setPassword(null);
|
||||
return RespBean.ok("查询教师信息成功", adminuser);
|
||||
} else {
|
||||
return RespBean.error("查询教师信息失败");
|
||||
}
|
||||
}
|
||||
@PostMapping("/signTeacher")
|
||||
public RespBean signTeacher(@RequestBody PMAdminusers pmadminusers) // 注册教师
|
||||
{
|
||||
pmadminusers.setSessionId(pmadminusers.getSessionId().substring(64));
|
||||
// 设置statu为未审核
|
||||
pmadminusers.setStatus("待审核");
|
||||
/*
|
||||
* UUID uuid = UUID.randomUUID();
|
||||
* pmadminusers.setUuid(uuid.toString().replaceAll("\\-", ""));
|
||||
*/
|
||||
PMAdminusers pma = adminusersServiceI
|
||||
.getAdminuserByAccount(pmadminusers.getAccount());
|
||||
if (pma != null) {
|
||||
if (pma.getQuestion().equals("") || pma.getQuestion().equals(null)) {
|
||||
boolean result = adminusersServiceI
|
||||
.updateQueAndAnsByaccount(pma);
|
||||
if (result == true) {
|
||||
return RespBean.ok("申请注册教师成功,请注意查收激活邮件!");
|
||||
} else {
|
||||
return RespBean.error("注册教师失败");
|
||||
}
|
||||
} else {
|
||||
return RespBean.error("用户名重复,请修改用户名");
|
||||
}
|
||||
|
||||
} else {
|
||||
boolean result = adminusersServiceI.addTeacher(pmadminusers);
|
||||
if (result == true) {
|
||||
return RespBean.ok("注册教师成功");
|
||||
} else {
|
||||
return RespBean.error("注册教师失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
@PostMapping("/confirmQuestionAnswer")
|
||||
public RespBean confirmQuestionAnswer(@RequestBody PMAdminusers pmadminusers) {
|
||||
PMAdminusers adminuser = adminusersServiceI
|
||||
.getAdminuserByAccount(pmadminusers.getAccount());
|
||||
if (adminuser != null) {
|
||||
if(adminuser.getAnswer().equals(pmadminusers.getAnswer()) ){
|
||||
return RespBean.ok("问题答案正确");
|
||||
}else{
|
||||
return RespBean.error("问题答案错误");
|
||||
}
|
||||
} else {
|
||||
return RespBean.error("查询教师信息失败");
|
||||
}
|
||||
}
|
||||
@PostMapping("/updatePasswordByAccount")
|
||||
public RespBean updatePasswordByAccount(@RequestBody PMAdminusers pmadminusers) {
|
||||
pmadminusers.setSessionId(pmadminusers.getSessionId().substring(64));
|
||||
boolean result = adminusersServiceI
|
||||
.updatePasswordByAccount(pmadminusers);
|
||||
if (result == true) {
|
||||
return RespBean.ok("重置密码成功");
|
||||
} else {
|
||||
return RespBean.error("重置密码失败");
|
||||
}
|
||||
}
|
||||
@PostMapping("/findAllAssistant")
|
||||
public RespBean findAllAssistant(@RequestBody PMAdminusers pmadminusers,HttpServletRequest request) // 查看所有助教信息
|
||||
{
|
||||
DecodeToken decodeToken = new DecodeToken(request);
|
||||
int userId = Integer.parseInt(decodeToken.getUserId());
|
||||
pmadminusers.setId(userId);
|
||||
pmadminusers.setRole(decodeToken.getRole());
|
||||
System.out.println(decodeToken.getRole());
|
||||
// List<PMAdminusers> list = adminusersServiceI
|
||||
// .findAllAssistant(pmadminusers);
|
||||
DataGrid dataGrid = adminusersServiceI
|
||||
.findAllAssistant(pmadminusers);
|
||||
return RespBean.ok("查看助教信息成功", dataGrid);
|
||||
}
|
||||
@PostMapping("/getAssistantById")
|
||||
public RespBean getAssistantById(@RequestBody PMAdminusers pmadminusers) // 查找助教的信息
|
||||
{
|
||||
PMAdminusers assistant = adminusersServiceI
|
||||
.getAdminuserById(pmadminusers.getId());
|
||||
List<AssistantClass> list = assistantClassService
|
||||
.getAssistantClassByAssistantId(pmadminusers.getId());
|
||||
String classIds = "";
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
classIds += list.get(i).getClassId().intValue() + ",";
|
||||
}
|
||||
assistant.setClassIds(classIds);
|
||||
return RespBean.ok("查询用户成功", assistant);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
package com.example.aes.user.controller;
|
||||
|
||||
import com.example.aes.global.model.DecodeToken;
|
||||
import com.example.aes.global.model.RespBean;
|
||||
import com.example.aes.user.model.PMClasses;
|
||||
import com.example.aes.user.service.ClassesServiceI;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/classes")
|
||||
@Transactional
|
||||
public class ClassesController{
|
||||
@Autowired
|
||||
private ClassesServiceI classesServiceI;
|
||||
// private int classId, userId, examId,paperexamId,ClassTimeId;
|
||||
// @Autowired
|
||||
// private ClassstudentsDaoI classstudentsDao;
|
||||
// @Autowired
|
||||
// private ExamClassesDaoI examclassesDao;
|
||||
// @Autowired
|
||||
// private ExamClasseshisDaoI examClasseshisDaoI;
|
||||
// @Autowired
|
||||
// private PaperExamClassesDaoI paperexamclassesDao;
|
||||
// @Autowired
|
||||
// private ClassesDaoI classesDao;
|
||||
// @Autowired
|
||||
// private ExamServiceI examService;
|
||||
//
|
||||
// @Autowired
|
||||
// private AdminusersDaoI adminusersDaoI;
|
||||
// @Autowired
|
||||
// private LogServiceI logService;
|
||||
@PostMapping("/findAllClasses")
|
||||
public RespBean findAllClasses(@RequestBody PMClasses pmclasses, HttpServletRequest request) {
|
||||
DecodeToken decodeToken=new DecodeToken(request);
|
||||
int teacherId= Integer.parseInt(decodeToken.getUserId());
|
||||
String userrole=decodeToken.getRole();
|
||||
if (userrole.equals("admin")){
|
||||
teacherId=0;
|
||||
List<PMClasses> classes = classesServiceI.findClassesByCondition(teacherId);
|
||||
return RespBean.ok("查询所有班级信息成功",classes);
|
||||
}else{
|
||||
pmclasses.setTeacherId(teacherId);
|
||||
List<PMClasses> classes = classesServiceI.findClassesByCondition(pmclasses);
|
||||
return RespBean.ok("查询所有班级信息成功",classes);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import com.example.aes.global.model.DecodeToken;
|
|||
import com.example.aes.global.model.RespBean;
|
||||
import com.example.aes.user.model.*;
|
||||
import com.example.aes.user.service.UserServiceI;
|
||||
import com.example.aes.user.dao.ClassstudentsDaoI;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
|
@ -17,7 +19,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
@Transactional
|
||||
|
|
@ -25,29 +27,8 @@ public class UserController {
|
|||
|
||||
@Resource
|
||||
private UserServiceI userService;
|
||||
// @Resource
|
||||
// private ClassstudentsDaoI classstudentsDao;
|
||||
// @Resource
|
||||
// private ClassesDaoI classesDao;
|
||||
// @Resource
|
||||
// private AdminusersDaoI adminusersDao;
|
||||
|
||||
// 删除操作
|
||||
// @PostMapping("/remove")
|
||||
// public RespBean remove(@RequestBody PMUser user) {
|
||||
// String[] nUsernames = user.getIds().split(",");
|
||||
// int len = nUsernames.length;
|
||||
// // 判断这些用户是否有人已经加入班级
|
||||
// for(int i=0;i<len;i++){
|
||||
// Users users = userService.findStudentByusername(nUsernames[i]);
|
||||
// boolean result = classstudentsDao.findClassesByUserId(users.getId());
|
||||
// if(result)
|
||||
// return RespBean.error("已经参与班级不能删除");
|
||||
// }
|
||||
// userService.remove(user.getIds());
|
||||
// return RespBean.ok("删除成功");
|
||||
// }
|
||||
|
||||
@Resource
|
||||
private ClassstudentsDaoI classstudentsDao;
|
||||
// 修改用户信息
|
||||
@PostMapping("/editUserInfo")
|
||||
public RespBean editUserInfo(@RequestBody PMUser user, HttpServletRequest request) {
|
||||
|
|
@ -113,6 +94,21 @@ public class UserController {
|
|||
return RespBean.error("修改用户密码失败");
|
||||
}
|
||||
}
|
||||
// 删除操作
|
||||
@PostMapping("/remove")
|
||||
public RespBean remove(@RequestBody PMUser user) {
|
||||
String nUsernames =
|
||||
user.getUsername();
|
||||
// 判断这个用户是否已经加入班级
|
||||
Users users = userService.findStudentByusername(nUsernames);
|
||||
|
||||
boolean result = classstudentsDao.findClassesByUserId(users.getId());
|
||||
if(result)
|
||||
return RespBean.error("已经参与班级不能删除");
|
||||
|
||||
userService.remove(user.getUsername());
|
||||
return RespBean.ok("删除成功");
|
||||
}
|
||||
|
||||
@PostMapping("/getAllStudents")
|
||||
public RespBean getAllStudents() // 获取所有的学生信息
|
||||
|
|
@ -212,102 +208,7 @@ public class UserController {
|
|||
return RespBean.ok("无该学号信息");
|
||||
}
|
||||
|
||||
// @PostMapping("/getUserAdd")
|
||||
// public RespBean getUserAdd(@RequestBody PMUser user1) // 添加学生的信息
|
||||
// {
|
||||
// String studentNo = user1.getStudentNo();
|
||||
// String chineseName = user1.getChineseName();
|
||||
// String username = "";
|
||||
// String banji = user1.getBanji();
|
||||
// String sessionId = "";
|
||||
// String password = "";
|
||||
// int classId = user1.getId();
|
||||
//
|
||||
// try {
|
||||
// Classes onclass = classesDao.get(Classes.class, classId);
|
||||
// if (onclass != null) {
|
||||
// int teacherId = onclass.getTeacherId();
|
||||
// Adminusers adminuser = adminusersDao.get(Adminusers.class, teacherId);
|
||||
// if (adminuser != null) {
|
||||
// int schoolId = adminuser.getSchoolId();
|
||||
// Users user = userService.findUserByStudentNoSchoolId(studentNo, schoolId); // 用户信息
|
||||
// if (user != null) {
|
||||
// boolean result = classstudentsDao.findClassStudentByUserId(user.getId(), classId); // 如果为true则表明该学生已在表中
|
||||
// if (result) {
|
||||
// return RespBean.error("该学生已存在,不能重复添加!");
|
||||
// } else {
|
||||
// result = classstudentsDao.insertClassStudent(user.getId(), classId); // 强用户插入classstudents表
|
||||
// // 更新学生人数
|
||||
// int studentsNum = classstudentsDao.getClassStudentsNum(classId);
|
||||
// boolean results = classesDao.updateClassStudentsNum(classId, studentsNum);
|
||||
// if (results) {
|
||||
// return RespBean.ok("添加学生信息成功");
|
||||
// } else {
|
||||
// return RespBean.error("添加学生信息失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
// boolean flag = false;
|
||||
// PMUser pMuser = new PMUser();
|
||||
// // 将pMProblemTestCaseAdd 同属性的数据复制到problems
|
||||
// pMuser.setBanji(banji);
|
||||
// pMuser.setSchoolId(schoolId);
|
||||
// pMuser.setChineseName(chineseName);
|
||||
// pMuser.setStudentNo(studentNo);
|
||||
// pMuser.setUsername(username);
|
||||
// pMuser.setSessionId(sessionId);
|
||||
// pMuser.setPassword(password);
|
||||
//
|
||||
// flag = userService.addSignStudent(pMuser);
|
||||
// if (flag) {
|
||||
// Users u = userService.findUserByStudentNoSchoolId(studentNo, schoolId);
|
||||
// if (u != null) {
|
||||
// boolean result = classstudentsDao.findClassStudentByUserId(u.getId(), classId); // 如果为true则表明该学生已在表中
|
||||
// if (result == false)
|
||||
// result = classstudentsDao.insertClassStudent(u.getId(), classId); // 强用户插入classstudents表
|
||||
// }
|
||||
//
|
||||
// // 更新学生人数
|
||||
// int studentsNum = classstudentsDao.getClassStudentsNum(classId);
|
||||
// boolean results = classesDao.updateClassStudentsNum(classId, studentsNum);
|
||||
// return RespBean.ok("添加学生信息成功");
|
||||
// } else {
|
||||
// return RespBean.error("添加学生信息失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// // TODO: handle exception
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// // 新增
|
||||
// return RespBean.error("添加学生信息失败");
|
||||
// }
|
||||
|
||||
// 按条件查找学生
|
||||
@PostMapping("/findStudentsByCondition")
|
||||
public RespBean findStudentsByCondition(@RequestBody PMUser user) {
|
||||
if(user.getPageNum() < 1 || user.getPageSize() < 1)
|
||||
return RespBean.error("参数错误");
|
||||
DataGrid userList = new DataGrid();
|
||||
if (user.getSchoolId() == 0) {
|
||||
userList = userService.getAllStudentsPage(user);
|
||||
|
||||
} else {
|
||||
userList = userService.findStudentsByConditionPage(user);
|
||||
}
|
||||
|
||||
if (userList != null && userList.getList().size() != 0) {
|
||||
return RespBean.ok("获取学生信息成功", userList);
|
||||
} else {
|
||||
return RespBean.ok("获取学生信息为空");
|
||||
}
|
||||
}
|
||||
|
||||
// 此处有并发注册BUG
|
||||
// 1.解决方案1:加锁
|
||||
|
|
@ -387,38 +288,6 @@ public class UserController {
|
|||
return RespBean.error("查询学生信息失败");
|
||||
}
|
||||
}
|
||||
|
||||
// @PostMapping("/getUserByStudentNoClassId")
|
||||
// public RespBean getUserByStudentNoClassId(@RequestBody PMUser user1) {
|
||||
// int classId = user1.getId();
|
||||
// String studentNo = user1.getStudentNo();
|
||||
// Classes onclass = classesDao.get(Classes.class, classId);
|
||||
// if (onclass != null) {
|
||||
// int teacherId = onclass.getTeacherId();
|
||||
// Adminusers adminuser = adminusersDao.get(Adminusers.class, teacherId);
|
||||
// if (adminuser != null) {
|
||||
// int schoolId = adminuser.getSchoolId();
|
||||
// Users user = userService.findUserByStudentNoSchoolId(studentNo, schoolId); // 用户信息
|
||||
// if (user != null) // users表中存在用户则只在classStudents表中插入数据
|
||||
// {
|
||||
// PMUser p = new PMUser();
|
||||
// p.setUsername(user.getUsername());
|
||||
// p.setChineseName(user.getChineseName());
|
||||
// p.setStudentNo(user.getStudentNo());
|
||||
// p.setBanji(user.getBanji());
|
||||
// p.setSessionId(user.getPassword());
|
||||
// p.setPassword(user.getPwd());
|
||||
// p.setEmail(user.getEmail());
|
||||
// return RespBean.ok("获取学生信息成功", p);
|
||||
// } else {
|
||||
// return RespBean.ok("学生不存在!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// return RespBean.ok("找不到班级信息");
|
||||
// }
|
||||
|
||||
@PostMapping("/resetTPW")
|
||||
public RespBean resetTPW(@RequestBody PMUser user) {// 重置学生密码
|
||||
// 返回前台的json数据
|
||||
|
|
@ -483,5 +352,17 @@ public class UserController {
|
|||
return RespBean.error("重置密码失败");
|
||||
}
|
||||
}
|
||||
|
||||
// 按条件查找学生
|
||||
@PostMapping("/findStudentsByCondition")
|
||||
public RespBean findStudentsByCondition(@RequestBody PMUser user) {
|
||||
if(user.getPageNum() < 1 || user.getPageSize() < 1)
|
||||
return RespBean.error("参数错误");
|
||||
DataGrid userList = new DataGrid();
|
||||
userList = userService.getAllStudentsPage(user);
|
||||
if (userList != null && userList.getList().size() != 0) {
|
||||
return RespBean.ok("获取学生信息成功", userList);
|
||||
} else {
|
||||
return RespBean.ok("获取学生信息为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,16 @@ package com.example.aes.user.dao;
|
|||
|
||||
|
||||
import com.example.aes.user.model.Adminusers;
|
||||
import com.example.aes.user.model.PMAdminusers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AdminusersDaoI extends BaseDaoI<Adminusers> {
|
||||
|
||||
public List<Adminusers> getTeacherByStatus(String status);
|
||||
|
||||
public Adminusers findAdminuserByno(String no);
|
||||
public Adminusers getAdminuserByAccount(String account);
|
||||
public boolean addTeacher(PMAdminusers pmadminusers);
|
||||
public List<PMAdminusers> findAllAssistant(PMAdminusers pmadminusers); // 查看所有助教信息
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.example.aes.user.dao;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.example.aes.user.model.AssistantClass;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AssistantClassDaoI extends BaseDaoI<AssistantClass> {
|
||||
|
||||
public boolean addAssistantClass(int assistantId, int classId); // 为班级添加助教
|
||||
|
||||
public List<AssistantClass> getAssistantClassByAssistantId(int assistantId); // 查询助教所属的班级
|
||||
|
||||
public List<AssistantClass> getAssistantClassByClassId(int classId);
|
||||
|
||||
public AssistantClass getAssistantClassByPrimaryKey(int assistantId, int classId);
|
||||
|
||||
public List<AssistantClass> getAssistantClassAndClassNotEnd(int teacherId,
|
||||
int assistantId); // 获取教师没有结束的班级,时间为一年以内
|
||||
|
||||
public boolean delAssistantClass(int assistantId, int classId); // 删除一行
|
||||
|
||||
public boolean delAssistantClass(int id);
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
package com.example.aes.user.dao;
|
||||
|
||||
|
||||
import com.example.aes.user.model.Classes;
|
||||
|
||||
import com.example.aes.user.model.PMClasses;
|
||||
|
||||
import com.example.aes.user.model.PMUser;
|
||||
import com.example.aes.user.model.UClass;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ClassesDaoI extends BaseDaoI<Classes> {
|
||||
|
||||
public List<Classes> findAllClass(); // 查询所有班级
|
||||
|
||||
// public List<PMClasses> findAllClassPage(int pageNum, int pageSize);
|
||||
|
||||
public long findAllClassNum(int teacherId, String role);
|
||||
|
||||
public List<PMClasses> findClassesByCondition(int teacherId); // 根据teacherId获取所有的班级
|
||||
|
||||
public List<PMClasses> findClassesByConditionPage(int teacherId,String role, int pageNum, int pageSize);
|
||||
|
||||
public boolean editClassMessage(int id, String className, int teacherId, int advance, int late, int reject, String weektime, Date first_week_monday); // 修改班级信息
|
||||
|
||||
public boolean deleteClass(int id); // 删除班级
|
||||
|
||||
public List<PMUser> findClassStudentsById(int classId); // 通过班级id,查询学生
|
||||
|
||||
public List<PMUser> findClassStudentsByIdNoName(List<Integer> classIdList, String studentNo, String chineseName, int pageNum, int pageSize);
|
||||
|
||||
public long findClassStudentsByIdNoNameNum(List<Integer> classIdList, String studentNo, String chineseName);
|
||||
|
||||
public List<PMUser> findClassStudentsByIdPage(int classId, int pageNum, int pageSize);
|
||||
|
||||
public long findClassStudentsByIdNum(int classId);
|
||||
|
||||
public boolean deleteClassStudentsByUserId(int classId, int userId); // 通过userId删除班级学生
|
||||
|
||||
public boolean updateClassStudentsNum(int classId, int num); // 更新班级学生人数
|
||||
|
||||
public void addClass(PMClasses pclass); // 添加班级
|
||||
|
||||
public List<PMClasses> findClassInExam(int examId, boolean history); // 获取参与考试的班级
|
||||
|
||||
// public List<PMClasses> findClassInExam(int examId, int teacherId, String role, boolean history); // 获取参与考试的班级,并进行身份验证
|
||||
|
||||
public List<PMClasses> findClassInExamPage(int examId, int pageNum, int pageSize, boolean history); // 获取参与考试的班级
|
||||
|
||||
// public List<PMClasses> findClassInExamPage(int examId, int teacherId, String role, int pageNum, int pageSize); // 获取参与考试的班级,并进行身份验证
|
||||
|
||||
public long findClassInExamNum(int examId, boolean history);
|
||||
|
||||
// public long findClassInExamNum(int examId, int teacherId, String role);
|
||||
|
||||
public List<PMClasses> findClassInExamRole(int examId, String role, int teacherId); // 根据角色获取参与考试的班级
|
||||
|
||||
public List<PMClasses> findClassInExamNoRole(int examId, boolean history);
|
||||
|
||||
public List<PMClasses> findClassInExamRolePage(int examId, String role, int teacherId, int pageNum, int pageSize); // 根据角色获取参与考试的班级
|
||||
|
||||
public long findClassInExamRoleNum(int examId, String role, int teacherId);
|
||||
|
||||
public List<PMClasses> findClassInPaperExam(int paperexamId); // 获取参与考试的班级
|
||||
|
||||
public List<PMClasses> findClassNotInExam(int examId, int teacherId, int pageNum, int pageSize, boolean history); // 获取未参与考试的班级
|
||||
|
||||
public List<PMClasses> findClassNotInExam(UClass uClass, int pageNum, int pageSize); // 获取未参与考试的班级
|
||||
public long findClassNotInExamNum(int examId, int teacherId, boolean history);
|
||||
|
||||
public long findClassNotInExamNum(UClass uClass);
|
||||
|
||||
public List<PMClasses> findClassNotInPaperExam(int paperexamId); // 获取未参与笔试考试的班级
|
||||
|
||||
public List<Classes> findNotEndClassByTeacherId(int teacherId); // 通过教师查找所属的没有结束的班级,时间为一年以内
|
||||
|
||||
public List<PMClasses> findClassesByCondition(PMClasses pmclasses);
|
||||
|
||||
public List<PMClasses> findClassesByConditionPage(PMClasses pmclasses, int pageNum, int pageSize);
|
||||
|
||||
public long findClassesByConditionPageNum(PMClasses pmclasses);
|
||||
|
||||
public List<Classes> findClassByTeacherId(int teacherId);
|
||||
|
||||
public Classes getClassesByCode(String inviteCode);
|
||||
|
||||
//获取参与该场考试班级的数量和学生人数
|
||||
public List<Map<String,Object>> getClassAndStudentNumByExamId(int examId);
|
||||
|
||||
public List<Map<String,Object>> getClassAndStudentNumByExamIdHis(int examId, boolean history);
|
||||
|
||||
public List<Map<String,Object>> getClassAndStudentNumByExamIdHis(int examId);
|
||||
|
||||
public Integer findOnlyClassIdByUserExam(int examId,int userId);//通过userId和examId查找在本场考试中学生所属的班级
|
||||
|
||||
public List<Classes> findClassesAfterCreateTime(String createTime);
|
||||
|
||||
public Classes getLastClasses();
|
||||
|
||||
public List<Classes> getAllClassesByExamId(int examId);
|
||||
|
||||
public Classes getClassByPrimaryKey(String name, Integer teacherId, Date createTime);
|
||||
|
||||
public int addClass(Classes classes);
|
||||
|
||||
public int updateClass(Classes classes);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.example.aes.user.dao;
|
||||
|
||||
|
||||
import com.example.aes.user.model.Classstudents;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ClassstudentsDaoI extends BaseDaoI<Classstudents> {
|
||||
|
||||
public boolean insertClassStudent(int userId, int classId);
|
||||
|
||||
public boolean findClassStudentByUserId(int userId, int classId); // 查看该同学是否已在该课程中
|
||||
|
||||
public int getClassStudentsNum(int classId); // 获取班级的学生人数
|
||||
|
||||
public List<Classstudents> getClassStudentsByExamId(int examId, boolean history); // 获取考试的学生
|
||||
|
||||
public List<Classstudents> getClassStudentsByClassId(int classId);
|
||||
|
||||
public boolean findClassesByUserId(int userId);
|
||||
|
||||
public List<Classstudents> getClassStudentsByExamId(Integer examId);
|
||||
|
||||
public long addClassStudent(Classstudents classstudent);
|
||||
|
||||
public void deleteClassStudent(int classId, int userId);
|
||||
|
||||
public void deleteClassStudent(int id);
|
||||
}
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
package com.example.aes.user.dao.impl;
|
||||
|
||||
import com.example.aes.user.dao.AdminusersDaoI;
|
||||
import com.example.aes.user.dao.AssistantClassDaoI;
|
||||
import com.example.aes.user.dao.ClassesDaoI;
|
||||
import com.example.aes.user.model.Adminusers;
|
||||
import com.example.aes.user.model.AssistantClass;
|
||||
import com.example.aes.user.model.Classes;
|
||||
import com.example.aes.user.model.PMAdminusers;
|
||||
import org.hibernate.Query;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
|
||||
|
|
@ -16,15 +21,127 @@ import java.util.*;
|
|||
@Repository("adminusersDao")
|
||||
public class AdminusersDaoImpl extends BaseDaoImpl<Adminusers> implements
|
||||
AdminusersDaoI {
|
||||
|
||||
|
||||
@Autowired @Lazy
|
||||
private ClassesDaoI classesDao;
|
||||
@Autowired
|
||||
private AssistantClassDaoI assistantClassDao;
|
||||
// 查询出teacher中status为未审核状态的列表
|
||||
@Override
|
||||
public List<Adminusers> getTeacherByStatus(String status){
|
||||
String hql = "from Adminusers where status='"+ status + "' and role='" + "teacher" + "'";
|
||||
return this.find(hql);
|
||||
}
|
||||
@Override
|
||||
public Adminusers findAdminuserByno(String no){
|
||||
String hql = "from Adminusers where no=" +
|
||||
" '" + no+"'";
|
||||
List<Adminusers> list = this.find(hql);
|
||||
if (list != null && list.size() != 0) {
|
||||
return list.get(0);
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Adminusers getAdminuserByAccount(String account) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from Adminusers where account='" + account + "'";
|
||||
List<Adminusers> list = this.find(hql);
|
||||
if (list != null && list.size() != 0) {
|
||||
return list.get(0);
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public boolean addTeacher(PMAdminusers pmadminusers) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from Adminusers where account=:account";
|
||||
Query q = this.getCurrentSession().createQuery(hql);
|
||||
q.setParameter("account", pmadminusers.getAccount());
|
||||
List<Adminusers> list = q.list(); // 如果账号以及存在,则不能添加
|
||||
if (list.size() == 0) {
|
||||
Adminusers adminuser = new Adminusers();
|
||||
adminuser.setAccount(pmadminusers.getAccount());
|
||||
adminuser.setPassword(pmadminusers.getSessionId());
|
||||
adminuser.setPwd(pmadminusers.getPassword());
|
||||
adminuser.setName(pmadminusers.getName());
|
||||
adminuser.setRole("teacher");
|
||||
adminuser.setEmail(pmadminusers.getEmail());
|
||||
adminuser.setActive(1);
|
||||
// adminuser.setSchoolId(pmadminusers.getSchoolId());
|
||||
// adminuser.setUuid(pmadminusers.getUuid());
|
||||
adminuser.setQuestion(pmadminusers.getQuestion());
|
||||
adminuser.setAnswer(pmadminusers.getAnswer());
|
||||
adminuser.setNo(pmadminusers.getNo());
|
||||
adminuser.setStatus(pmadminusers.getStatus());
|
||||
Integer result = (Integer) this.save(adminuser);
|
||||
if (result != null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PMAdminusers> findAllAssistant(PMAdminusers pmadminusers) { // 查看所有助教
|
||||
// TODO Auto-generated method stub
|
||||
List<PMAdminusers> pmadminusersList = new ArrayList<PMAdminusers>();
|
||||
if (pmadminusers.getId() != 4) {//
|
||||
// 普通教师登陆,只能看到自己班的助教
|
||||
String hql = "from Adminusers where role='assistant'";
|
||||
List<Adminusers> adminusersList = this.find(hql, pmadminusers.getPageNum(), pmadminusers.getPageSize());
|
||||
List<Classes> classesList = classesDao
|
||||
.findClassByTeacherId(pmadminusers.getId());
|
||||
ArrayList<Integer> a = new ArrayList<Integer>();
|
||||
|
||||
for (int j = 0; j < classesList.size(); j++) {
|
||||
a.add(j, classesList.get(j).getId());
|
||||
}
|
||||
|
||||
for (int i = 0; i < adminusersList.size(); i++) {
|
||||
ArrayList<Integer> comment = new ArrayList<Integer>();
|
||||
ArrayList<Integer> ac = new ArrayList<Integer>();
|
||||
comment.addAll(a);
|
||||
Adminusers assistant = adminusersList.get(i);
|
||||
|
||||
List<AssistantClass> assistantclasses = assistantClassDao
|
||||
.getAssistantClassByAssistantId(assistant.getId());
|
||||
for (int j = 0; j < assistantclasses.size(); j++) {
|
||||
ac.add(j, assistantclasses.get(j).getClassId());
|
||||
}
|
||||
comment.retainAll(ac);
|
||||
if ( comment.size() != 0) {
|
||||
PMAdminusers p = new PMAdminusers();
|
||||
p.setId(assistant.getId());
|
||||
p.setName(assistant.getName());
|
||||
p.setAccount(assistant.getAccount());
|
||||
p.setRole(assistant.getRole());
|
||||
p.setEmail(assistant.getEmail());
|
||||
pmadminusersList.add(p);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {// 管理员登陆
|
||||
String hql = "from Adminusers where" +
|
||||
" role='assistant'";
|
||||
|
||||
List<Adminusers> adminusersList = this.find(hql, pmadminusers.getPageNum(), pmadminusers.getPageSize());
|
||||
pmadminusersList = new ArrayList<PMAdminusers>();
|
||||
for (int i = 0; i < adminusersList.size(); i++) {
|
||||
Adminusers assistant = adminusersList.get(i);
|
||||
PMAdminusers p = new PMAdminusers();
|
||||
p.setId(assistant.getId());
|
||||
p.setName(assistant.getName());
|
||||
p.setAccount(assistant.getAccount());
|
||||
p.setRole(assistant.getRole());
|
||||
p.setEmail(assistant.getEmail());
|
||||
pmadminusersList.add(p);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return pmadminusersList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
package com.example.aes.user.dao.impl;
|
||||
|
||||
|
||||
import com.example.aes.user.dao.AssistantClassDaoI;
|
||||
import com.example.aes.user.model.AssistantClass;
|
||||
import org.hibernate.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Repository("assistantClassDao")
|
||||
public class AssistantClassImpl extends BaseDaoImpl<AssistantClass> implements
|
||||
AssistantClassDaoI {
|
||||
|
||||
@Override
|
||||
public boolean addAssistantClass(int assistantId, int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "select count(*) from AssistantClass where assistantId="
|
||||
+ assistantId + " and classId=" + classId;
|
||||
long n = this.count(hql);
|
||||
if (n == 0) // 表示数据库中没有该项数据则添加
|
||||
{
|
||||
AssistantClass ac = new AssistantClass();
|
||||
ac.setAssistantId(assistantId);
|
||||
ac.setClassId(classId);
|
||||
this.save(ac);
|
||||
if (ac.getId() != null) // 插入成功
|
||||
{
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
} else
|
||||
// 如果有,则同样返回true
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AssistantClass> getAssistantClassByAssistantId(int assistantId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from AssistantClass where assistantId=" + assistantId;
|
||||
return this.find(hql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AssistantClass> getAssistantClassByClassId(int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from AssistantClass where classId=" + classId;
|
||||
return this.find(hql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssistantClass getAssistantClassByPrimaryKey(int assistantId, int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from AssistantClass where classId=" + classId + " and assistantId=" + assistantId;
|
||||
return this.get(hql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AssistantClass> getAssistantClassAndClassNotEnd(int teacherId,
|
||||
int assistantId) {
|
||||
// TODO Auto-generated method stub
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.add(Calendar.YEAR, -1);
|
||||
Date time = cal.getTime();
|
||||
String hql = "select distinct(ac) from AssistantClass ac,Classes c where ac.assistantId="
|
||||
+ assistantId + " and c.createTime>:time";
|
||||
Query q = this.getCurrentSession().createQuery(hql);
|
||||
q.setParameter("time", time);
|
||||
return q.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delAssistantClass(int assistantId, int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "delete from AssistantClass where assistantId="
|
||||
+ assistantId + " and classId=" + classId;
|
||||
int result = this.executeHql(hql);
|
||||
if (result > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delAssistantClass(int id) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "delete from AssistantClass where id=" + id;
|
||||
int result = this.executeHql(hql);
|
||||
if (result > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,109 @@
|
|||
package com.example.aes.user.dao.impl;
|
||||
|
||||
|
||||
import com.example.aes.user.dao.ClassstudentsDaoI;
|
||||
import com.example.aes.user.model.Classstudents;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository("classstudentsDao")
|
||||
public class ClassstudentsDaoImpl extends BaseDaoImpl<Classstudents> implements
|
||||
ClassstudentsDaoI {
|
||||
|
||||
@Override
|
||||
public boolean insertClassStudent(int userId, int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
Classstudents student = new Classstudents();
|
||||
student.setClassId(classId);
|
||||
student.setUserId(userId);
|
||||
this.save(student);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean findClassStudentByUserId(int userId, int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from Classstudents where userId=" + userId
|
||||
+ " and classId=" + classId;
|
||||
List<Classstudents> classstudents = this.find(hql);
|
||||
if (classstudents.size() > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean findClassesByUserId(int userId){
|
||||
String hql = "from Classstudents where userId=" + userId;
|
||||
List<Classstudents> classstudents = this.find(hql);
|
||||
if(classstudents.size()>0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClassStudentsNum(int classId) { // 获取班级学生的总数
|
||||
// TODO Auto-generated method stub
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
String hql = "select count(*) from Classstudents where classId=:classId";
|
||||
params.put("classId", classId);
|
||||
return countInt(hql, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Classstudents> getClassStudentsByExamId(int examId, boolean history) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "";
|
||||
if(history){
|
||||
hql = "from Classstudents c where c.classId in (select e.classId from Examclasses_his e where examId="
|
||||
+ examId + ")";
|
||||
}
|
||||
else {
|
||||
hql = "from Classstudents c where c.classId in (select e.classId from Examclasses e where examId="
|
||||
+ examId + ")";
|
||||
}
|
||||
List<Classstudents> classstudents = this.find(hql);
|
||||
return classstudents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Classstudents> getClassStudentsByClassId(int classId) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from Classstudents where classId=" + classId;
|
||||
List<Classstudents> classstudents = this.find(hql);
|
||||
return classstudents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Classstudents> getClassStudentsByExamId(Integer examId) {
|
||||
String hql = "FROM Classstudents WHERE classId IN (SELECT classId FROM Examclasses WHERE examId = :examId)";
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("examId", examId);
|
||||
return this.find(hql, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long addClassStudent(Classstudents classstudent) {
|
||||
this.save(classstudent);
|
||||
return classstudent.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteClassStudent(int classId, int userId) {
|
||||
// 删除考试对应的班级数据
|
||||
String hql = "delete from Classstudents where classId=" + classId
|
||||
+ " and userId=" + userId;
|
||||
this.executeHql(hql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteClassStudent(int id) {
|
||||
// 删除考试对应的班级数据
|
||||
String hql = "delete from Classstudents where id=" + id;
|
||||
this.executeHql(hql);
|
||||
}
|
||||
}
|
||||
|
|
@ -123,8 +123,7 @@ public class UserDaoImpl extends BaseDaoImpl<Users> implements UserDaoI {
|
|||
@Override
|
||||
public List<Users> findStudentsByCondition(PMUser user) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "from Users u where u.schoolId=" + user.getSchoolId()
|
||||
+ " and (u.studentNo like '%" + user.getStudentNo()
|
||||
String hql = "from Users u where (u.studentNo like '%" + user.getStudentNo()
|
||||
+ "%' and u.chineseName like '%" + user.getChineseName()
|
||||
+ "%' and u.username like '%" + user.getStu_userName() + "%') "
|
||||
+ "order by u.id asc";
|
||||
|
|
@ -135,8 +134,7 @@ public class UserDaoImpl extends BaseDaoImpl<Users> implements UserDaoI {
|
|||
|
||||
@Override
|
||||
public List<Users> findStudentsByConditionPage(PMUser user){
|
||||
String hql = "from Users u where u.schoolId=" + user.getSchoolId()
|
||||
+ " and (u.studentNo like '%" + user.getStudentNo()
|
||||
String hql = "from Users u where (u.studentNo like '%" + user.getStudentNo()
|
||||
+ "%' and u.chineseName like '%" + user.getChineseName()
|
||||
+ "%' and u.username like '%" + user.getStu_userName() + "%') "
|
||||
+ "order by u.id asc";
|
||||
|
|
@ -180,8 +178,7 @@ public class UserDaoImpl extends BaseDaoImpl<Users> implements UserDaoI {
|
|||
@Override
|
||||
public long findStudentsByConditionNum(PMUser user){
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "select count(*) from Users u where u.schoolId=" + user.getSchoolId()
|
||||
+ " and (u.studentNo like '%" + user.getStudentNo()
|
||||
String hql = "select count(*) from Users u where (u.studentNo like '%" + user.getStudentNo()
|
||||
+ "%' and u.chineseName like '%" + user.getChineseName()
|
||||
+ "%' and u.username like '%" + user.getStu_userName() + "%') "
|
||||
+ "order by u.id asc";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
package com.example.aes.user.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "assistantclass", catalog = "aes")
|
||||
public class AssistantClass implements java.io.Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer id;
|
||||
private Integer assistantId;
|
||||
private Integer classId;
|
||||
|
||||
public AssistantClass() {
|
||||
}
|
||||
|
||||
public AssistantClass(Integer assistantId, Integer classId) {
|
||||
this.assistantId = assistantId;
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id", unique = true, nullable = false)
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "assistantId", nullable = false)
|
||||
public Integer getAssistantId() {
|
||||
return assistantId;
|
||||
}
|
||||
|
||||
public void setAssistantId(Integer assistantId) {
|
||||
this.assistantId = assistantId;
|
||||
}
|
||||
|
||||
@Column(name = "classId", nullable = false)
|
||||
public Integer getClassId() {
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setClassId(Integer classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
package com.example.aes.user.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Classes entity. @author MyEclipse Persistence Tools
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "class", catalog = "aes")
|
||||
public class Classes implements java.io.Serializable {
|
||||
|
||||
// Fields
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4577366061004245861L;
|
||||
private Integer id;
|
||||
private Integer courseId;
|
||||
|
||||
|
||||
|
||||
private Integer teacherId;
|
||||
private String name;
|
||||
private Integer studentNum=0;
|
||||
private Date createTime;
|
||||
private String inviteCode;
|
||||
|
||||
// Constructors
|
||||
|
||||
/** default constructor */
|
||||
public Classes() {
|
||||
}
|
||||
|
||||
/** minimal constructor */
|
||||
public Classes(String name, Integer teacherId, Integer studentNum) {
|
||||
this.name = name;
|
||||
this.teacherId = teacherId;
|
||||
this.studentNum = studentNum;
|
||||
}
|
||||
|
||||
/** full constructor */
|
||||
public Classes(String name,
|
||||
Integer courseId,
|
||||
Integer teacherId,
|
||||
Integer studentNum,
|
||||
Date createTime, String inviteCode) {
|
||||
this.name = name;
|
||||
this.courseId=courseId;
|
||||
this.teacherId = teacherId;
|
||||
this.studentNum = studentNum;
|
||||
this.createTime = createTime;
|
||||
this.inviteCode=inviteCode;
|
||||
}
|
||||
|
||||
// Property accessors
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id", unique = true, nullable = false)
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "name", nullable = false, length = 100)
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@Column(name="courseId")
|
||||
public Integer getCourseId() {
|
||||
return courseId;
|
||||
}
|
||||
|
||||
public void setCourseId(Integer courseId) {
|
||||
this.courseId = courseId;
|
||||
}
|
||||
@Column(name = "teacherId", nullable = false)
|
||||
public Integer getTeacherId() {
|
||||
return this.teacherId;
|
||||
}
|
||||
|
||||
public void setTeacherId(Integer teacherId) {
|
||||
this.teacherId = teacherId;
|
||||
}
|
||||
|
||||
@Column(name = "studentNum", nullable = false)
|
||||
public Integer getStudentNum() {
|
||||
return this.studentNum;
|
||||
}
|
||||
|
||||
public void setStudentNum(Integer studentNum) {
|
||||
this.studentNum = studentNum;
|
||||
}
|
||||
|
||||
@Column(name = "createTime", length = 19)
|
||||
public Date getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
@Column(name = "inviteCode", length = 10)
|
||||
public String getInviteCode() {
|
||||
return inviteCode;
|
||||
}
|
||||
|
||||
|
||||
public void setInviteCode(String inviteCode) {
|
||||
this.inviteCode = inviteCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean compare(Classes classes) {
|
||||
return getName().equals(classes.getName()) &&
|
||||
getStudentNum().equals(classes.getStudentNum()) &&
|
||||
((getCreateTime() == null && classes.getCreateTime() == null) || (getCreateTime() != null && classes.getCreateTime() != null && getCreateTime().compareTo(classes.getCreateTime()) == 0)) &&
|
||||
(Objects.equals(getInviteCode(), classes.getInviteCode())) ;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.example.aes.user.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* Classstudents entity. @author MyEclipse Persistence Tools
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "studentclass", catalog = "aes")
|
||||
public class Classstudents implements java.io.Serializable {
|
||||
|
||||
// Fields
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8050828329203855066L;
|
||||
private Integer id;
|
||||
private Integer classId;
|
||||
private Integer userId;
|
||||
|
||||
// Constructors
|
||||
|
||||
/** default constructor */
|
||||
public Classstudents() {
|
||||
}
|
||||
|
||||
/** full constructor */
|
||||
public Classstudents(Integer classId, Integer userId) {
|
||||
this.classId = classId;
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
// Property accessors
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id", unique = true, nullable = false)
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "classId", nullable = false)
|
||||
public Integer getClassId() {
|
||||
return this.classId;
|
||||
}
|
||||
|
||||
public void setClassId(Integer classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
@Column(name = "userId", nullable = false)
|
||||
public Integer getUserId() {
|
||||
return this.userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -16,11 +16,11 @@ public class PMAdminusers implements java.io.Serializable {
|
|||
private String Email;
|
||||
private String examIds;
|
||||
private int teacherId;
|
||||
private int schoolId;
|
||||
// private int schoolId;
|
||||
private int active;
|
||||
private String classIds;
|
||||
private String uuid;
|
||||
private String schoolname;
|
||||
// private String schoolname;
|
||||
private String question;
|
||||
private String answer;
|
||||
|
||||
|
|
@ -62,13 +62,13 @@ public class PMAdminusers implements java.io.Serializable {
|
|||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public int getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(int schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
// public int getSchoolId() {
|
||||
// return schoolId;
|
||||
// }
|
||||
//
|
||||
// public void setSchoolId(int schoolId) {
|
||||
// this.schoolId = schoolId;
|
||||
// }
|
||||
|
||||
public int getActive() {
|
||||
return active;
|
||||
|
|
@ -151,13 +151,13 @@ public class PMAdminusers implements java.io.Serializable {
|
|||
return classIds;
|
||||
}
|
||||
|
||||
public String getSchoolname() {
|
||||
return schoolname;
|
||||
}
|
||||
|
||||
public void setSchoolname(String schoolname) {
|
||||
this.schoolname = schoolname;
|
||||
}
|
||||
// public String getSchoolname() {
|
||||
// return schoolname;
|
||||
// }
|
||||
//
|
||||
// public void setSchoolname(String schoolname) {
|
||||
// this.schoolname = schoolname;
|
||||
// }
|
||||
|
||||
public String getQuestion() {
|
||||
return question;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
package com.example.aes.user.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class PMClasses implements java.io.Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5372127226595718778L;
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Integer teacherId;
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCourseId() {
|
||||
return courseId;
|
||||
}
|
||||
|
||||
public void setCourseId(Integer courseId) {
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
|
||||
private Integer courseId;
|
||||
private String teacherName;
|
||||
private Integer studentNum=0;
|
||||
private Date createTime;
|
||||
private String inviteCode;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setTeacherId(int teacherId) {
|
||||
this.teacherId = teacherId;
|
||||
}
|
||||
|
||||
public int getTeacherId() {
|
||||
return teacherId;
|
||||
}
|
||||
|
||||
public void setTeacherName(String teacherName) {
|
||||
this.teacherName = teacherName;
|
||||
}
|
||||
|
||||
public String getTeacherName() {
|
||||
return teacherName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getStudentNum() {
|
||||
return studentNum;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
|
||||
public String getInviteCode() {
|
||||
return inviteCode;
|
||||
}
|
||||
|
||||
public void setInviteCode(String inviteCode) {
|
||||
this.inviteCode = inviteCode;
|
||||
}
|
||||
public void setStudentNum(Integer studentNum) {
|
||||
this.studentNum = studentNum;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -135,18 +135,18 @@ public class PMUser implements java.io.Serializable {
|
|||
private String rspMsg;
|
||||
private String nickName;
|
||||
private String stu_userName;
|
||||
private Integer schoolId;
|
||||
// private Integer schoolId;
|
||||
private String uuid;
|
||||
|
||||
private String messageCondition;
|
||||
|
||||
public Integer getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(Integer schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
// public Integer getSchoolId() {
|
||||
// return schoolId;
|
||||
// }
|
||||
//
|
||||
// public void setSchoolId(Integer schoolId) {
|
||||
// this.schoolId = schoolId;
|
||||
// }
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,191 @@
|
|||
package com.example.aes.user.model;
|
||||
|
||||
public class UAdminusers {
|
||||
private Integer id;
|
||||
// private Integer schoolId;
|
||||
private String account;
|
||||
private String password;
|
||||
private String name;
|
||||
private String role;
|
||||
private String email;
|
||||
private Integer active;
|
||||
private String uuid;
|
||||
private String question;
|
||||
private String answer;
|
||||
private String pwd;
|
||||
private int classId;
|
||||
|
||||
// 教师端的学号/工号
|
||||
private String no;
|
||||
|
||||
private String status;
|
||||
|
||||
private int pageNum;
|
||||
|
||||
private int pageSize;
|
||||
|
||||
private String endtime;
|
||||
|
||||
public UAdminusers(){}
|
||||
|
||||
public UAdminusers(Integer id, String account, String password, String name, String role, String email, Integer active, String uuid, String question, String answer, String pwd, int classId, String no) {
|
||||
this.id = id;
|
||||
// this.schoolId = schoolId;
|
||||
this.account = account;
|
||||
this.password = password;
|
||||
this.name = name;
|
||||
this.role = role;
|
||||
this.email = email;
|
||||
this.active = active;
|
||||
this.uuid = uuid;
|
||||
this.question = question;
|
||||
this.answer = answer;
|
||||
this.pwd = pwd;
|
||||
this.classId = classId;
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
// public Integer getSchoolId() {
|
||||
// return schoolId;
|
||||
// }
|
||||
//
|
||||
// public void setSchoolId(Integer schoolId) {
|
||||
// this.schoolId = schoolId;
|
||||
// }
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setActive(Integer active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public String getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
public void setQuestion(String question) {
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public String getAnswer() {
|
||||
return answer;
|
||||
}
|
||||
|
||||
public void setAnswer(String answer) {
|
||||
this.answer = answer;
|
||||
}
|
||||
|
||||
public String getPwd() {
|
||||
return pwd;
|
||||
}
|
||||
|
||||
public void setPwd(String pwd) {
|
||||
this.pwd = pwd;
|
||||
}
|
||||
|
||||
public int getClassId() {
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setClassId(int classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public String getNo() {
|
||||
return no;
|
||||
}
|
||||
|
||||
public void setNo(String no) {
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public int getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(int pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public void setEndtime(String endtime) {
|
||||
this.endtime = endtime;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
package com.example.aes.user.model;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public class UClass {
|
||||
|
||||
private int id;
|
||||
private int classId;
|
||||
private int userId;
|
||||
private int examId;
|
||||
private int paperexamId;
|
||||
private int ClassTimeId;
|
||||
private InputStream fileInput;
|
||||
|
||||
private int pageNum;
|
||||
private int pageSize;
|
||||
|
||||
private int teacherId;
|
||||
|
||||
// private int schoolId;
|
||||
|
||||
private boolean history;
|
||||
|
||||
public UClass(){}
|
||||
|
||||
public UClass(int classId, int userId, int examId, int paperexamId, int classTimeId, InputStream fileInput) {
|
||||
this.classId = classId;
|
||||
this.userId = userId;
|
||||
this.examId = examId;
|
||||
this.paperexamId = paperexamId;
|
||||
ClassTimeId = classTimeId;
|
||||
this.fileInput = fileInput;
|
||||
}
|
||||
|
||||
public int getClassId() {
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setClassId(int classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public int getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
public void setExamId(int examId) {
|
||||
this.examId = examId;
|
||||
}
|
||||
|
||||
public int getPaperexamId() {
|
||||
return paperexamId;
|
||||
}
|
||||
|
||||
public void setPaperexamId(int paperexamId) {
|
||||
this.paperexamId = paperexamId;
|
||||
}
|
||||
|
||||
public int getClassTimeId() {
|
||||
return ClassTimeId;
|
||||
}
|
||||
|
||||
public void setClassTimeId(int classTimeId) {
|
||||
ClassTimeId = classTimeId;
|
||||
}
|
||||
|
||||
public InputStream getFileInput() {
|
||||
return fileInput;
|
||||
}
|
||||
|
||||
public void setFileInput(InputStream fileInput) {
|
||||
this.fileInput = fileInput;
|
||||
}
|
||||
|
||||
public int getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(int pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getTeacherId() {
|
||||
return teacherId;
|
||||
}
|
||||
|
||||
public void setTeacherId(int teacherId) {
|
||||
this.teacherId = teacherId;
|
||||
}
|
||||
|
||||
// public int getSchoolId() {
|
||||
// return schoolId;
|
||||
// }
|
||||
//
|
||||
// public void setSchoolId(int schoolId) {
|
||||
// this.schoolId = schoolId;
|
||||
// }
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public boolean isHistory() {
|
||||
return history;
|
||||
}
|
||||
|
||||
public void setHistory(boolean history) {
|
||||
this.history = history;
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import java.util.Objects;
|
|||
* Users entity. @author MyEclipse Persistence Tools
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "users", catalog = "gdoj")
|
||||
@Table(name = "users", catalog = "aes")
|
||||
public class Users implements java.io.Serializable {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.example.aes.user.service;
|
||||
|
||||
|
||||
import com.example.aes.user.model.DataGrid;
|
||||
import com.example.aes.user.model.PMAdminusers;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -8,6 +9,13 @@ import java.util.List;
|
|||
public interface AdminusersServiceI {
|
||||
|
||||
public List<PMAdminusers> getTeacherByStatus(String status);
|
||||
public PMAdminusers findAdminuserByno(String no);
|
||||
public PMAdminusers getAdminuserByAccount(String account); // 通过账号查找
|
||||
public boolean updateQueAndAnsByaccount(PMAdminusers pma);
|
||||
|
||||
public boolean addTeacher(PMAdminusers pmadminusers);// 注册教师
|
||||
public boolean updatePasswordByAccount(PMAdminusers pmadminusers);
|
||||
public DataGrid findAllAssistant(PMAdminusers pmadminusers); // 查看所有助教信息
|
||||
public PMAdminusers getAdminuserById(int id); // 根据id获取单个老师的信息
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.example.aes.user.service;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.example.aes.user.model.AssistantClass;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AssistantClassServiceI {
|
||||
|
||||
public List<AssistantClass> getAssistantClassByAssistantId(int assistantId); // 获取助教班级信息
|
||||
|
||||
public void editAssistantClass(int teacherId, int assistantId,
|
||||
String classIds); // 修改助教管理的班级
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.example.aes.user.service;
|
||||
|
||||
|
||||
|
||||
import com.example.aes.user.model.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface ClassesServiceI {
|
||||
public List<PMClasses> findClassesByCondition(int teacherId);
|
||||
public List<PMClasses> findClassesByCondition(PMClasses pmclasses);
|
||||
// public List<Classes> findAllClass();
|
||||
//
|
||||
// public DataGrid findClassesByConditionPage(int teacherId, String role, int pageNum, int pageSize);
|
||||
//
|
||||
//
|
||||
//
|
||||
// //
|
||||
//
|
||||
// public boolean editClassMessage(int id, String className, int teacherId, int advance, int late, int reject, String weektime, Date first_week_monday); // 修改班级信息
|
||||
//
|
||||
// public boolean deleteClass(int id); // 删除班级
|
||||
//
|
||||
// public List<PMUser> findClassStudentsById(int classId); // 通过id查询所有学生
|
||||
//
|
||||
// public DataGrid findClassStudentsByIdNoName(List<Integer> classIdList, String studentNo, String chineseName, int pageNum, int pageSize); // 通过id查询所有学生
|
||||
//
|
||||
// public DataGrid findClassStudentsByIdPage(int classId,int pageNum, int pageSize);
|
||||
//
|
||||
// public boolean deleteClassStudentsByUserId(int classId, int userId);
|
||||
//
|
||||
// public void addClass(PMClasses pclass); // 添加班级
|
||||
//
|
||||
// public List<PMClasses> findClassInExam(int examId); // 获取参与考试的班级
|
||||
//
|
||||
// public List<PMClasses> findClassInExam(int examId, int teacherId, String role, boolean history); // 获取参与考试的班级(有身份验证)
|
||||
//
|
||||
// public DataGrid findClassInExamPage(int examId, int pageNum, int pageSize, boolean history); // 获取参与考试的班级
|
||||
//
|
||||
// public DataGrid findClassInExamPage(int examId, int teacherId, String role, int pageNum, int pageSize); // 获取参与考试的班级(有身份验证)
|
||||
//
|
||||
// public List<PMClasses> findClassInExamRole(int examId, String role, int teacherId); // 根据角色获取参与考试的班级
|
||||
//
|
||||
// public List<PMClasses> findClassInExamNoRole(int examId, boolean history); // 根据角色获取参与考试的班级
|
||||
//
|
||||
// public DataGrid findClassInExamRolePage(int examId, String role, int teacherId, int pageNum, int pageSize); // 根据角色获取参与考试的班级
|
||||
//
|
||||
// public List<PMClasses> findClassInPaperExam(int paperexamId); // 获取参与考试的班级
|
||||
//
|
||||
// public DataGrid findClassNotInExam(int examId, int teacherId, int pageNum, int pageSize, boolean history); // 获取未参加考试的班级
|
||||
//
|
||||
// public DataGrid findClassNotInExam(UClass uClass, int pageNum, int pageSize); // 获取未参加考试的班级
|
||||
//
|
||||
// public List<PMClasses> findClassNotInPaperExam(int paperexamId); // 获取未参加笔试考试的班级
|
||||
//
|
||||
// public Classes findClassById(int classId);
|
||||
//
|
||||
// public List<Classes> findNotEndClassByTeacherId(int teacherId); // 通过教师查找所属的班级,班级时间为一年以内
|
||||
//
|
||||
// public List<PMClasses> findClassesByCondition(PMClasses pmclasses); //查找教师没有参加该考试的班级
|
||||
//
|
||||
// public DataGrid findClassesByConditionPage(PMClasses pmclasses, int pageNum, int pageSize); //查找教师没有参加该考试的班级
|
||||
//
|
||||
// public Json takeOneClass(String inviteCode, int studentID);
|
||||
//
|
||||
// public List<ClassTimes> getAttendanceByClassId(int classId); // 通过班级id查询考勤情况
|
||||
//
|
||||
// // 根据studentId获取该学生考勤的相关信息
|
||||
// public List<StudentAttendance> findStudentAttendanceById(int studentId, int classId, int ClassTimeId);
|
||||
//
|
||||
//// public List<ClassTimes> getClassStudentsByClassId(int classId); // 通过班级id查询班级所有学生
|
||||
//// 根据学生id和考试id查询本场考试中该学生的所属班级
|
||||
// public Integer findClassInExamByStudentId(int studentId,int examId);
|
||||
//
|
||||
// public List<Classes> findClassesAfterCreateTime(String createTime);
|
||||
//
|
||||
// public Classes getLastClasses();
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package com.example.aes.user.service.impl;
|
|||
|
||||
import com.example.aes.user.dao.AdminusersDaoI;
|
||||
import com.example.aes.user.model.Adminusers;
|
||||
import com.example.aes.user.model.DataGrid;
|
||||
import com.example.aes.user.model.PMAdminusers;
|
||||
import com.example.aes.user.service.AdminusersServiceI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
|
@ -23,10 +24,65 @@ public class AdminusersServiceImpl implements AdminusersServiceI {
|
|||
public void setAdminusersDaoI(AdminusersDaoI adminusersDao) {
|
||||
this.adminusersDao = adminusersDao;
|
||||
}
|
||||
@Override
|
||||
public PMAdminusers getAdminuserById(int id) {
|
||||
// TODO Auto-generated method stub
|
||||
Adminusers adminuser = adminusersDao.get(Adminusers.class, id);
|
||||
if (adminuser != null) {
|
||||
PMAdminusers pa = new PMAdminusers();
|
||||
pa.setAccount(adminuser.getAccount());
|
||||
pa.setName(adminuser.getName());
|
||||
pa.setId(adminuser.getId());
|
||||
pa.setEmail(adminuser.getEmail());
|
||||
// pa.setSchoolId(adminuser.getSchoolId());
|
||||
pa.setRole(adminuser.getRole());
|
||||
pa.setNo(adminuser.getNo());
|
||||
return pa;
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
public AdminusersDaoI getAdminusersDaoI() {
|
||||
return adminusersDao;
|
||||
}
|
||||
public PMAdminusers findAdminuserByno(String no){
|
||||
Adminusers adminusers = adminusersDao.findAdminuserByno(no);
|
||||
if(adminusers!=null){
|
||||
PMAdminusers pmAdminusers = new PMAdminusers();
|
||||
pmAdminusers.setId(adminusers.getId());
|
||||
pmAdminusers.setName(adminusers.getName());
|
||||
pmAdminusers.setAccount(adminusers.getAccount());
|
||||
pmAdminusers.setRole(adminusers.getRole());
|
||||
pmAdminusers.setEmail(adminusers.getEmail());
|
||||
pmAdminusers.setStatus(adminusers.getStatus());
|
||||
pmAdminusers.setNo(adminusers.getNo());
|
||||
return pmAdminusers;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public PMAdminusers getAdminuserByAccount(String account) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
Adminusers a = adminusersDao.getAdminuserByAccount(account);
|
||||
if (a != null) {
|
||||
PMAdminusers p = new PMAdminusers();
|
||||
p.setId(a.getId());
|
||||
p.setAccount(a.getAccount());
|
||||
p.setName(a.getName());
|
||||
p.setRole(a.getRole());
|
||||
// p.setSchoolId(a.getSchoolId());
|
||||
p.setEmail(a.getEmail());
|
||||
p.setQuestion(a.getQuestion());
|
||||
p.setAnswer(a.getAnswer());
|
||||
p.setSessionId(a.getPassword());
|
||||
p.setPassword(a.getPwd());
|
||||
return p;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -49,6 +105,90 @@ public class AdminusersServiceImpl implements AdminusersServiceI {
|
|||
return pmadminusersList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addTeacher(PMAdminusers pmadminusers) {
|
||||
// TODO Auto-generated method stub
|
||||
return adminusersDao.addTeacher(pmadminusers);
|
||||
}
|
||||
@Override
|
||||
public boolean updateQueAndAnsByaccount(PMAdminusers pma) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "update Adminusers set question='" + pma.getQuestion()
|
||||
+ "',answer='" + pma.getAnswer() + "', where account='"
|
||||
+ pma.getAccount() + "'";
|
||||
int result = adminusersDao.executeHql(hql);
|
||||
if (result == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean updatePasswordByAccount(PMAdminusers pmadminusers) {
|
||||
// TODO Auto-generated method stub
|
||||
String hql = "update Adminusers set password='"
|
||||
+ pmadminusers.getSessionId() + "', pwd='" + pmadminusers.getPassword() + "' where account='"
|
||||
+ pmadminusers.getAccount() + "'";
|
||||
int result = adminusersDao.executeHql(hql);
|
||||
if (result == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public DataGrid findAllAssistant(PMAdminusers pmadminusers) {
|
||||
// TODO Auto-generated method stub
|
||||
DataGrid dg = new DataGrid();
|
||||
int totalLines;
|
||||
List<PMAdminusers> theadminusers;
|
||||
List<PMAdminusers> pmAdminusers= adminusersDao.findAllAssistant(pmadminusers);
|
||||
totalLines=pmAdminusers.size();
|
||||
int page= pmadminusers.getPageNum();
|
||||
List<PMAdminusers> Adminusers=new ArrayList<>();
|
||||
int j=pmadminusers.getPageSize()*page;
|
||||
if ((page-1)*pmadminusers.getPageSize()<totalLines){
|
||||
if (j<pmAdminusers.size()){
|
||||
for (int i=(page-1)*pmadminusers.getPageSize();i<j;i++){
|
||||
Adminusers.add(pmAdminusers.get(i));
|
||||
}
|
||||
}else {
|
||||
for (int i=(page-1)*pmadminusers.getPageSize();i<pmAdminusers.size();i++){
|
||||
Adminusers.add(pmAdminusers.get(i));
|
||||
}
|
||||
}
|
||||
}else {
|
||||
pmadminusers.setPageNum(1);
|
||||
if (j<pmAdminusers.size()){
|
||||
for (int i=0;i<j;i++){
|
||||
Adminusers.add(pmAdminusers.get(i));
|
||||
}
|
||||
}else {
|
||||
for (int i=0;i<pmAdminusers.size();i++){
|
||||
Adminusers.add(pmAdminusers.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
List<PMAdminusers> PMAdminusersList = new ArrayList<PMAdminusers>();
|
||||
changeModels(Adminusers,PMAdminusersList);
|
||||
dg.setTotal(totalLines);
|
||||
dg.setPageSize(pmadminusers.getPageSize());
|
||||
dg.setTotalPages((long) (Math.ceil((double) dg.getTotal() / (double) dg.getPageSize())));
|
||||
// 设置当前显示第几页
|
||||
dg.setPageNum(pmadminusers.getPageNum());
|
||||
|
||||
// 设置当前页的数据行数量
|
||||
dg.setCurrentPageLineNum(PMAdminusersList.size());
|
||||
// 设置当前页的所有数据行
|
||||
dg.setList(PMAdminusersList);
|
||||
return dg;
|
||||
}
|
||||
|
||||
private void changeModels(List<PMAdminusers> l, List<PMAdminusers> nl) {
|
||||
if (l != null && l.size() > 0) {
|
||||
for (PMAdminusers t : l) {
|
||||
PMAdminusers u = new PMAdminusers();
|
||||
BeanUtils.copyProperties(t, u);
|
||||
nl.add(u);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
package com.example.aes.user.service.impl;
|
||||
|
||||
|
||||
import com.example.aes.user.dao.AssistantClassDaoI;
|
||||
import com.example.aes.user.model.AssistantClass;
|
||||
import com.example.aes.user.service.AssistantClassServiceI;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AssistantClassServiceImpl implements AssistantClassServiceI {
|
||||
|
||||
AssistantClassDaoI assistantClassDao;
|
||||
|
||||
@Autowired
|
||||
public void setAssistantClassDao(AssistantClassDaoI assistantClassDao) {
|
||||
this.assistantClassDao = assistantClassDao;
|
||||
}
|
||||
|
||||
public AssistantClassDaoI getAssistantClassDao() {
|
||||
return assistantClassDao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AssistantClass> getAssistantClassByAssistantId(int assistantId) {
|
||||
// TODO Auto-generated method stub
|
||||
return assistantClassDao.getAssistantClassByAssistantId(assistantId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editAssistantClass(int teacherId, int assistantId,
|
||||
String classIds) {
|
||||
|
||||
List<AssistantClass> aelist = assistantClassDao
|
||||
.getAssistantClassAndClassNotEnd(teacherId, assistantId); // 获取教师一年以内的班级
|
||||
String classId[] = classIds.split(",");
|
||||
boolean isExist = false;
|
||||
for (int i = 0; i < classId.length; i++) {
|
||||
isExist = false;
|
||||
for (int j = 0; j < aelist.size(); j++) {
|
||||
if (Integer.parseInt(classId[i]) == aelist.get(j).getClassId()
|
||||
.intValue()) {
|
||||
isExist = true;
|
||||
aelist.remove(j); // 去掉重复
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (isExist == false) // 新增加的
|
||||
{
|
||||
assistantClassDao.addAssistantClass(assistantId,
|
||||
Integer.parseInt(classId[i]));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < aelist.size(); i++) // 去掉没有的
|
||||
{
|
||||
|
||||
assistantClassDao.delAssistantClass(assistantId, aelist.get(i)
|
||||
.getClassId().intValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.example.aes.user.service.impl;
|
||||
|
||||
import com.example.aes.user.dao.ClassesDaoI;
|
||||
import com.example.aes.user.dao.ClassstudentsDaoI;
|
||||
import com.example.aes.user.model.PMClasses;
|
||||
import com.example.aes.user.service.ClassesServiceI;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class ClassesServiceImpl implements ClassesServiceI {
|
||||
|
||||
private ClassesDaoI classesDao;
|
||||
// private ClassstudentsDaoI classstudentsDao;
|
||||
// private AttendenceDaoI attendenceDao;
|
||||
// private StudentAttendenceDaoI studentattendenceDao;
|
||||
// private ExamClassesDaoI examClassesDao;
|
||||
@Autowired
|
||||
public void setClassesDao(ClassesDaoI classesDao) {
|
||||
this.classesDao = classesDao;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PMClasses> findClassesByCondition(int teacherId) {
|
||||
// TODO Auto-generated method stub
|
||||
return classesDao.findClassesByCondition(teacherId);
|
||||
}
|
||||
@Override
|
||||
public List<PMClasses> findClassesByCondition(PMClasses pmclasses) {
|
||||
// TODO Auto-generated method stub
|
||||
return classesDao.findClassesByCondition(pmclasses);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ public class UserServiceImpl implements UserServiceI {
|
|||
String chineseName = user.getChineseName();
|
||||
String banji = user.getBanji();
|
||||
Date createDate = new Date();
|
||||
int schoolId = user.getSchoolId();
|
||||
// int schoolId = user.getSchoolId();
|
||||
Users u = new Users();
|
||||
u.setChineseName(chineseName);
|
||||
u.setStudentNo(studentNo);
|
||||
|
|
@ -399,7 +399,7 @@ public class UserServiceImpl implements UserServiceI {
|
|||
+ "', email='" + user.getEmail() + "'," + "createDate='" + time
|
||||
+ "' , question='" + user.getQuestion() + "', answer='"
|
||||
+ user.getAnswer() + "'where studentNo='" + user.getStudentNo()
|
||||
+ "' and schoolId='" + user.getSchoolId() + "'";
|
||||
+ "'";
|
||||
int result = userDao.executeHql(hql);
|
||||
if (result == 1)
|
||||
return true;
|
||||
|
|
@ -430,7 +430,7 @@ public class UserServiceImpl implements UserServiceI {
|
|||
String username = user.getUsername();
|
||||
String password = user.getSessionId();
|
||||
String pwd = user.getPassword();
|
||||
int schoolId = user.getSchoolId();
|
||||
// int schoolId = user.getSchoolId();
|
||||
String studentNo = user.getStudentNo();
|
||||
String chineseName = user.getChineseName();
|
||||
String banji = user.getBanji();
|
||||
|
|
@ -589,7 +589,8 @@ public class UserServiceImpl implements UserServiceI {
|
|||
|
||||
@Override
|
||||
public void selectForUpdate(int userId) {
|
||||
String sqlString ="select id from gdoj.users where id="+userId+" for update ";
|
||||
String sqlString ="select id from aes" +
|
||||
".users where id="+userId+" for update ";
|
||||
userDao.executesql(sqlString);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue