Commit 93c370f0 by zhaopanyu

Merge branch 'master' of 49.232.152.146:xhxy/smart_school

parents 66423664 4b899612
...@@ -130,6 +130,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -130,6 +130,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/wx/user/getToken").permitAll() .antMatchers("/wx/user/getToken").permitAll()
//开发一个接口字典 //开发一个接口字典
.antMatchers("/system/dict/data/type/**").permitAll() .antMatchers("/system/dict/data/type/**").permitAll()
.antMatchers("/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
label-width="68px" label-width="68px"
style="margin-left: 15px; margin-top: 10px" style="margin-left: 15px; margin-top: 10px"
> >
<el-form-item label="仪器名称"> <el-form-item label="申请人">
<el-input <el-input
v-model="queryForm.name" v-model="queryForm.name"
placeholder="请输入" placeholder="请输入"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="仪器分类"> <el-form-item label="借用学科">
<el-select <el-select
v-model="queryForm.name" v-model="queryForm.name"
placeholder="请选择" placeholder="请选择"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
label-width="68px" label-width="68px"
style="margin-left: 15px; margin-top: 10px" style="margin-left: 15px; margin-top: 10px"
> >
<el-form-item label="仪器名称"> <el-form-item label="申请人">
<el-input <el-input
v-model="queryForm.name" v-model="queryForm.name"
placeholder="请输入" placeholder="请输入"
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="80px"> <el-form
<el-form-item prop="taskName" label="社团名称"> :model="queryForm"
<el-input v-model="queryForm.taskName" placeholder="社团名称"></el-input> ref="queryForm"
</el-form-item> size="small"
<el-form-item prop="grade" label="指导教师"> :inline="true"
<el-input v-model="queryForm.grade" placeholder="指导教师"></el-input> label-width="80px"
</el-form-item> >
<el-form-item> <el-form-item prop="taskName" label="社团名称">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-input
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> v-model="queryForm.taskName"
</el-form-item> placeholder="社团名称"
</el-form> ></el-input>
<el-row :gutter="10" class="mb8"> </el-form-item>
<el-col :span="1.5"> <el-form-item prop="grade" label="指导教师">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd()">新增</el-button> <el-input
</el-col> v-model="queryForm.grade"
</el-row> placeholder="指导教师"
<!-- 列表 --> ></el-input>
<div class="listBlock"> </el-form-item>
<div class="itemBlock" v-for="(task, index) in tasks" :key="index"> <el-form-item>
<div style="display:flex; justify-content:space-between;align-items: center "> <el-button
<div style="width: 50%;"> type="primary"
<!-- 任务详细信息 --> icon="el-icon-search"
<div class="task-info"> size="mini"
<div class="task-name">市二中田径社团</div> @click="handleQuery"
>搜索</el-button
</div> >
<div class="task-level"> <el-button
<span>指导教师:张三</span> icon="el-icon-refresh"
</div> size="mini"
<div class="task-time"> @click="resetQuery"
<div>社团宗旨:整合</div> >重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd()"
>新增</el-button
>
</el-col>
</el-row>
<!-- 列表 -->
<div class="listBlock">
<div class="itemBlock" v-for="(task, index) in tasks" :key="index">
<div
style="
display: flex;
justify-content: space-between;
align-items: center;
"
>
<div style="width: 50%">
<!-- 任务详细信息 -->
<div class="task-info">
<div class="task-name">市二中田径社团</div>
</div>
<div class="task-level">
<span>指导教师:张三</span>
</div>
<div class="task-time">
<div>
社团宗旨:整合校内外教育资源,培养学生良好的心理素质,发展学生的个性特长,促进学生身心健康、全面发展
</div>
</div>
</div>
<div style="width: 50%">
<!-- 成员人数 -->
<div class="task-count">
<div class="count">200</div>
<div class="sun">成员人数</div>
</div>
</div>
</div>
<!-- 按钮 -->
<div class="task-buttons">
<el-button
style="margin-left: 10px"
size="mini"
type="danger"
round
@click="handleUpdate(task)"
>删除
</el-button>
<el-button
type="success"
size="small"
round
@click="clubRegistrationReview(task.id, task.grade)"
>社团报名审核</el-button
>
<el-button
type="info"
size="small"
round
@click="clubActivityRecord(task.id, task.grade)"
>社团活动记录</el-button
>
<el-button
type="warning"
size="small"
round
@click="memberManagement(task.id, task.grade)"
>成员管理
</el-button>
<el-button
class="purpleBtn"
size="small"
round
type="primary"
@click="communityStyle(task.id, task.grade)"
>社团风采
</el-button>
<el-button
type="primary"
size="small"
round
@click="basicInformation(task.id, task.grade)"
>基础信息管理
</el-button>
</div>
</div> </div>
</div>
<div style="width: 50%">
<!-- 成员人数 -->
<div class="task-count">
<div class="count">
200
</div>
<div class="sun">成员人数</div>
</div>
</div>
</div>
<!-- 按钮 -->
<div class="task-buttons">
<el-button style="margin-left: 10px" size="mini" type="danger" round @click="handleUpdate(task)">删除
</el-button>
<el-button type="success" size="small" round @click="clubRegistrationReview(task.id, task.grade)">社团报名审核</el-button>
<el-button type="info" size="small" round @click="clubActivityRecord(task.id, task.grade)">社团活动记录</el-button>
<el-button type="warning" size="small" round
@click="memberManagement(task.id, task.grade)">成员管理
</el-button>
<el-button class="purpleBtn" size="small" round type="primary"
@click="communityStyle(task.id, task.grade)">社团风采
</el-button>
<el-button type="primary" size="small" round
@click="basicInformation(task.id, task.grade)">基础信息管理
</el-button>
</div> </div>
</div> <!-- 新增/修改弹窗 -->
<el-dialog
:title="title"
:visible.sync="open"
width="50%"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="110px"
>
<div>
<el-form-item label="社团名称" prop="taskName">
<el-input
v-model="form.taskName"
placeholder="请输入社团名称"
></el-input>
</el-form-item>
<el-form-item label="指导教师">
<el-select
style="width: 100%"
multiple
v-model="form.value"
filterable
placeholder="请选择指导教师"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="社团宗旨" prop="grade">
<el-input
type="textarea"
:rows="4"
v-model="form.grade"
placeholder="请输入社团宗旨"
></el-input>
</el-form-item>
<el-form-item label="社团简介" prop="grade">
<el-input
type="textarea"
:rows="4"
v-model="form.grade"
placeholder="请输入社团简介"
></el-input>
</el-form-item>
</div>
</el-form>
<div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div> </div>
<!-- 新增/修改弹窗 -->
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<div>
<el-form-item label="社团名称" prop="taskName">
<el-input v-model="form.taskName" placeholder="请输入社团名称"></el-input>
</el-form-item>
<el-form-item label="指导教师">
<el-select style="width: 100%;" multiple v-model="form.value" filterable placeholder="请选择指导教师">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="社团宗旨" prop="grade">
<el-input type="textarea" :rows="4" v-model="form.grade" placeholder="请输入社团宗旨"></el-input>
</el-form-item>
<el-form-item label="社团简介" prop="grade">
<el-input type="textarea" :rows="4" v-model="form.grade" placeholder="请输入社团简介"></el-input>
</el-form-item>
</div>
</el-form>
<div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import {dataCurricula, addCurricula, updateCurricula, getCurricula, getDept} import {
from "@/api/smartSchool/gradeWork/courseSelection/taskPublishing.js"; dataCurricula,
addCurricula,
updateCurricula,
getCurricula,
getDept
} from '@/api/smartSchool/gradeWork/courseSelection/taskPublishing.js'
export default { export default {
name: 'basicInformationManagement', name: 'basicInformationManagement',
data() { data() {
return { return {
tasks: [1, 2, 3], tasks: [1, 2, 3],
queryForm: { queryForm: {
taskName: "", taskName: '',
grade: "", grade: ''
},
},
form: {
form: { id: '',
id: "", taskName: '',
taskName: "", grade: '',
grade: "", startTime: '',
startTime: "", endTime: ''
endTime: "", },
}, //新增弹窗
//新增弹窗 open: false,
open: false, rules: {},
rules: {}, // 加载遮罩
// 加载遮罩 loading: true,
loading: true, // 记录条数
// 记录条数 total: 0,
total: 0, title: '',
title: "", // 详情
// 详情 look: false,
look: false, // 日期范围
// 日期范围 dateRange: [],
dateRange: [], options: [
options: [{ {
value: '选项1', value: '选项1',
label: '黄金糕' label: '黄金糕'
}, { },
value: '选项2', {
label: '双皮奶' value: '选项2',
}, { label: '双皮奶'
value: '选项3', },
label: '蚵仔煎' {
}, { value: '选项3',
value: '选项4', label: '蚵仔煎'
label: '龙须面' },
}, { {
value: '选项5', value: '选项4',
label: '北京烤鸭' label: '龙须面'
}], },
}; {
}, value: '选项5',
created() { label: '北京烤鸭'
this.getList(); }
}, ]
methods: {
/** 获取列表数据 */
getList() {
const params = {
taskName: this.queryForm.taskName,
grade: this.queryForm.grade,
};
// dataCurricula(params).then(response => {
// this.tasks = response.rows;
// this.total = response.total;
// }).catch(err => {
// this.loading = false;
// })
},
//新增按钮操作
handleAdd() {
this.reset();
this.open = true;
// getDept().then(response => {
// this.form.grade = response.data.grade;
// console.log(this.form.grade);
// })
// .catch(err => {
// this.loading = false;
// });
this.title = "新增社团基础信息";
},
// 社团报名审核
clubRegistrationReview(id, grade) {
this.$router.push({
path: "/massOrganization/clubRegistrationReview",
query: {
id,
grade
}
});
},
// 社团活动记录
clubActivityRecord(id, grade) {
this.$router.push({
path: "/massOrganization/clubActivityRecord",
query: {
id,
grade
} }
});
}, },
//成员管理 created() {
memberManagement(id, grade) { this.getList()
this.$router.push({
path: "/massOrganization/memberManagement",
query: {
id,
grade
}
});
},
//社团风采
communityStyle(id, grade) {
console.log("grade", grade)
this.$router.push({
path: "/massOrganization/communityStyle",
query: {
id,
grade
}
});
},
//基础信息管理
basicInformation(id, grade) {
this.reset();
this.open = true;
this.title = "社团基础信息维护";
},
// 取消按钮
cancel() {
this.open = false;
// this.resetQuery();
this.reset();
},
// 搜索按钮
handleQuery() {
this.throttle(() => {
this.queryForm.pageNum = 1;
this.getList();
});
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
}, },
// 提交表单 methods: {
submitForm() { /** 获取列表数据 */
// console.log('object', this.dateRange); getList() {
this.throttle(() => { const params = {
this.$refs["form"].validate(valid => { taskName: this.queryForm.taskName,
if (valid) { grade: this.queryForm.grade
if (this.form.id != null) {
// 编辑
const params = {
id: this.form.id,
taskName: this.form.taskName,
startTime: this.dateRange[0],
endTime: this.dateRange[1]
};
updateCurricula(params).then(response => {
console.log(params, 'params');
console.log("res1111");
this.$message.success("修改成功");
console.log("res", response);
this.open = false;
this.getList();
}).catch(err => {
});
} else {
// 新增
const params = {
taskName: this.form.taskName,
grade: this.form.grade,
startTime: this.dateRange[0],
endTime: this.dateRange[1]
};
addCurricula(params).then(response => {
this.$message.success("新增成功");
this.open = false;
this.getList();
}).catch(err => {
// Handle error if necessary
});
} }
} // dataCurricula(params).then(response => {
}); // this.tasks = response.rows;
}) // this.total = response.total;
}, // }).catch(err => {
// 编辑按钮 // this.loading = false;
handleUpdate(task) { // })
this.title = '修改'; },
this.open = true; //新增按钮操作
getCurricula(task.id).then(response => { handleAdd() {
this.form = response.data; this.reset()
this.dateRange = [response.data.startTime, response.data.endTime]; this.open = true
this.$modal.closeLoading(); // getDept().then(response => {
}).catch(err => { // this.form.grade = response.data.grade;
// console.log(this.form.grade);
}) // })
}, // .catch(err => {
// 重置表单 // this.loading = false;
reset() { // });
// 重置对话框表单 this.title = '新增社团基础信息'
this.form = { },
taskName: "", // 社团报名审核
grade: "", clubRegistrationReview(id, grade) {
}; this.$router.push({
this.dateRange = []; path: '/massOrganization/clubRegistrationReview',
this.resetForm('form'); query: {
}, id,
grade
}
}, })
}; },
// 社团活动记录
clubActivityRecord(id, grade) {
this.$router.push({
path: '/massOrganization/clubActivityRecord',
query: {
id,
grade
}
})
},
//成员管理
memberManagement(id, grade) {
this.$router.push({
path: '/massOrganization/memberManagement',
query: {
id,
grade
}
})
},
//社团风采
communityStyle(id, grade) {
console.log('grade', grade)
this.$router.push({
path: '/massOrganization/communityStyle',
query: {
id,
grade
}
})
},
//基础信息管理
basicInformation(id, grade) {
this.reset()
this.open = true
this.title = '社团基础信息维护'
},
// 取消按钮
cancel() {
this.open = false
// this.resetQuery();
this.reset()
},
// 搜索按钮
handleQuery() {
this.throttle(() => {
this.queryForm.pageNum = 1
this.getList()
})
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.resetForm('queryForm')
this.handleQuery()
},
// 提交表单
submitForm() {
// console.log('object', this.dateRange);
this.throttle(() => {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.id != null) {
// 编辑
const params = {
id: this.form.id,
taskName: this.form.taskName,
startTime: this.dateRange[0],
endTime: this.dateRange[1]
}
updateCurricula(params)
.then((response) => {
console.log(params, 'params')
console.log('res1111')
this.$message.success('修改成功')
console.log('res', response)
this.open = false
this.getList()
})
.catch((err) => {})
} else {
// 新增
const params = {
taskName: this.form.taskName,
grade: this.form.grade,
startTime: this.dateRange[0],
endTime: this.dateRange[1]
}
addCurricula(params)
.then((response) => {
this.$message.success('新增成功')
this.open = false
this.getList()
})
.catch((err) => {
// Handle error if necessary
})
}
}
})
})
},
// 编辑按钮
handleUpdate(task) {
this.title = '修改'
this.open = true
getCurricula(task.id)
.then((response) => {
this.form = response.data
this.dateRange = [
response.data.startTime,
response.data.endTime
]
this.$modal.closeLoading()
})
.catch((err) => {})
},
// 重置表单
reset() {
// 重置对话框表单
this.form = {
taskName: '',
grade: ''
}
this.dateRange = []
this.resetForm('form')
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.listBlock { .listBlock {
//display: flex; //display: flex;
//flex-direction: row; //flex-direction: row;
//align-items: flex-start; //align-items: flex-start;
//flex-wrap: wrap; //flex-wrap: wrap;
width: 100%; width: 100%;
} }
.itemBlock { .itemBlock {
width: 100%; width: 99%;
padding: 15px 20px 5px 20px; padding: 15px 20px 5px 20px;
margin: 0 1.5% 1.5% 0; margin: 0 1.5% 1.5% 0;
border-radius: 20px; border-radius: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 1px 2px 12px 1px rgba(0, 0, 0, 0.1);
} }
.listBlock .itemBlock:nth-child(2n) { .listBlock .itemBlock:nth-child(2n) {
margin-right: 0px !important; margin-right: 0px !important;
} }
.purpleBtn { .purpleBtn {
color: #FFFFFF; color: #ffffff;
background-color: #B66D93; background-color: #b886f8;
border: 1px solid #B66D93; border: 1px solid #b886f8;
} }
.rowBtn { .rowBtn {
color: #FFFFFF; color: #ffffff;
background-color: #D3C1B1; background-color: #d3c1b1;
border: 1px solid #D3C1B1; border: 1px solid #d3c1b1;
} }
.task-name { .task-name {
color: #0d84ff; color: #307def;
font-size: 38px; font-size: 45px;
//font-weight: 500; font-weight: 500;
text-align: left; text-align: left;
} }
.task-level { .task-level {
margin-bottom: 6px; margin-bottom: 6px;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 13px; font-size: 13px;
text-align: left; text-align: left;
} }
.task-level > span { .task-level > span {
margin-right: 25px; margin-right: 25px;
} }
.task-time { .task-time {
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 13px; font-size: 13px;
text-align: left; text-align: left;
margin-bottom: -50px;
} }
.task-info { .task-info {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-bottom: 15px; padding-bottom: 15px;
} }
.task-count { .task-count {
text-align: center; text-align: center;
padding-right: 10px; padding-left: 60%;
} }
.task-count > .count { .task-count > .count {
color: rgba(90, 123, 244, 1); font-weight: bold;
font-size: 38px; color: #307def;
font-weight: bold; font-size: 45px;
} }
.task-count > .sun { .task-count > .sun {
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 18px; font-size: 18px;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
} }
.task-buttons { .task-buttons {
text-align: left; text-align: left;
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
} }
.task-buttons button { .task-buttons button {
margin-bottom: 10px; margin-bottom: 10px;
} }
.el-card { .el-card {
margin-bottom: 20px; margin-bottom: 20px;
} }
</style> </style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="标题" prop="picName">
<el-input v-model="queryParams.picName" placeholder="请输入标题" clearable/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"-->
<!-- v-hasPermi="['system:pic:export']">导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>-->
</el-row>
<el-table v-loading="loading" ref="table" :data="picList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="序号" align="center" prop="seqencing" width="80"/>
<el-table-column label="活动主题" align="center" prop="picName"/>
<el-table-column label="活动开始时间" align="center" prop="picName"/>
<el-table-column label="活动结束时间" align="center" prop="picName"/>
<el-table-column label="活动负责人" align="center" prop="picName"/>
<el-table-column label="所属社团" align="center" prop="picName"/>
<el-table-column label="备注" align="center" prop="picName"/>
<el-table-column label="附件" align="center" prop="picName">
<template slot-scope="scope">
<!-- <ListImage :image-url="pev+scope.row.picUrl"></ListImage>-->
<!-- previewSrcList 开启预览大图的功能。-->
<el-image
style="width: 100px; height: 100px"
:src="scope.row.url"
:preview-src-list="srcList">
</el-image>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑
</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">查看
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 添加或修改社团主题对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px" style="width: 80%; margin: auto">
<el-form-item label="活动主题">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="活动开始时间">
<el-date-picker
v-model="form.value1"
type="datetime"
placeholder="选择活动开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动结束时间">
<el-date-picker
v-model="form.value1"
type="datetime"
placeholder="选择活动结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动负责人">
<el-select v-model="value" filterable placeholder="请选择活动负责人">
<el-option
v-for="item in activeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属社团">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item prop="gardenEmblem"
style="display: flex; text-align: center; justify-content: center; transform: translateX(-30px)">
<!-- <el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"-->
<!-- :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove"-->
<!-- :http-request="uploadImage" :limit="1" >-->
<el-upload :disabled="check == true ? true : false" v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"
:show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove"
:limit="1" >
<img v-if="imageUrl" :src="imageUrl" class="avatar"/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="风采主题:" prop="picName">
<el-input :readonly="check == true ? true : false" v-model="form.picName" placeholder="请输入风采主题" style="width: 100%"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="排序:" prop="seqencing">-->
<!-- <el-input-number v-model="form.seqencing" controls-position="right" style="width: 100%"-->
<!-- :min="1"></el-input-number>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {listPic, getPic, delPic, addPic, updatePic, updateState} from '@/api/smartSchool/schoolManage/introduce/pic'
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import {changeUserStatus} from '@/api/system/user'
import {uploadImage as commonUpload} from '@/api/common'
import {ExportType, TEXT_SIZE} from '@/enums/common'
export default {
name: 'clubActivityRecord',
components: {picAvatar},
data() {
return {
pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制
TEXT_SIZE,
//是否上传的院徽
isUploadPic: false,
//照片是否删除
options: [
{
value: 0,
label: '否'
},
{
value: 1,
label: '是'
}
],
//获取子组件传来的信息
pic: [],
// 图片路径
imageUrl: undefined,
// 图片上传遮罩层
uploadLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 园区照片表格数据
picList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
picName: null
},
// 表单参数
form: {},
// 表单校验
rules: {
picName: [{required: true, message: '请输入相片名称', trigger: 'blur'}],
seqencing: [{required: true, message: '请输入排序', trigger: 'blur'}],
remark: [{max: TEXT_SIZE, message: '备注信息在0到200字之间', trigger: 'blur'}]
},
//设置table列隐藏与显示
columns: [
{key: 0, label: `园区照片`, visible: true},
{key: 1, label: `相片名称`, visible: true},
// {key: 2, label: `相片路径`, visible: true},
{key: 2, label: `排序`, visible: true},
{key: 3, label: `备注`, visible: true},
{key: 4, label: `创建者`, visible: true},
{key: 5, label: `创建时间`, visible: true},
{key: 6, label: `操作`, visible: true}
],
// 作为临时图片展示
tempImage: '',
// 导出选项
exportOptions: {
title: '选择导出类别',
open: false
},
//查看状态
check:false,
//活动负责人下拉框
activeOptions:[{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}]
}
},
created() {
this.getList()
},
watch: {
pic: {
handler(newValue, oldValue) {
console.log('watch----oldValue', oldValue)
console.log('watch----newValue', newValue)
this.isUploadPic = newValue[3]
}
}
},
methods: {
//是否删除 选中值发生变化时id处理函数
selectChangeHandler(value) {
this.form.isShow = value
},
/** 查询园区照片列表 */
getList() {
this.loading = true
this.picList = []
listPic(this.queryParams).then(response => {
this.picList = response.rows
this.total = response.total
this.loading = false
})
},
//获取图片信息
getSchoolInfoPic(val) {
this.pic = val
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
params: {},
id: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
picName: null,
picUrl: null,
seqencing: null,
isShow: 0
}
this.imageUrl = ''
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.throttle(() => {
this.queryParams.pageNum = 1
this.getList()
})
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.check = false
this.reset()
this.open = true
this.title = '新增社团风采'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const ids = row.id || this.ids
getPic(ids).then(response => {
this.form = response.data
this.imageUrl = this.pev + this.form.picUrl
this.open = true
this.title = '修改园区照片'
})
},
/** 查看按钮操作 */
handleCheck(row){
this.check = true
this.open = true
this.title = '查看社团风采'
},
// 上传成功回调
handleAvatarSuccess(res, file) {
this.imageUrl = res.data.url
console.log(file)
this.commonUpload(file)
},
// 上传前格式和图片大小限制
beforeAvatarUpload(file) {
const type = file.type === 'image/jpeg' || 'image/jpg' || 'image/webp' || 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
if (!type) {
this.$message.error('图片格式不正确!(只能包含jpg,png,webp,JPEG)')
}
if (!isLt2M) {
this.$message.error('上传图片大小不能超过 2MB!')
}
return type && isLt2M
},
//删除图片
handleRemove(file, fileList){
this.imageUrl = ''
},
// 上传图片
uploadImage(file) {
const fileData = file.file
const formData = new FormData()
formData.append('file', fileData)
this.uploadLoading = true
commonUpload(formData)
.then(response => {
this.uploadLoading = false
this.$modal.msgSuccess('上传成功')
this.imageUrl = this.pev + response.url
// this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
this.form.picUrl = response.url
})
.catch(error => {
this.uploadLoading = false
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
this.$modal.loading('正在上传数据,请稍等...')
if (this.form.id != null) {
updatePic({
...this.form
})
.then(response => {
this.$modal.closeLoading()
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
.catch(error => {
this.$modal.closeLoading()
})
} else {
addPic({
...this.form,
isShow: '0'
})
.then(response => {
this.$modal.closeLoading()
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
.catch(error => {
this.$modal.closeLoading()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
if (ids) {
this.$modal
.confirm(`是否确认删除选中的${Object.hasOwnProperty.call(ids, 'length') ? ids.length : 1}条数据?`)
.then(() => {
this.$modal.loading('正在处理数据,请稍等...')
return delPic(ids)
})
.then(() => {
this.$modal.closeLoading()
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {
this.$modal.closeLoading()
})
}
},
/** 是否发布 */
handleIsShow(row) {
this.$modal
.confirm(row.isShow === '1' ? '是否确认显示为轮播图?' : '是否取消显示为轮播图?')
.then(() => {
this.$modal.loading('正在修改状态,请稍等...')
updateState(row.id, row.isShow)
.then(response => {
this.$modal.closeLoading()
this.$modal.msgSuccess('修改成功')
})
.catch(error => {
this.$modal.closeLoading()
row.isShow = row.isShow === '0' ? '1' : '0'
})
})
.catch(() => {
row.isShow = row.isShow === '0' ? '1' : '0'
})
}
}
}
</script>
<style scoped>
.avatar,
.avatar-uploader,
.el-icon-plus {
width: 650px;
}
</style>
<template> <template>
<div>社团报名审核</div> <div>
<!-- 搜索条件 -->
<el-form
:model="queryForm"
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="标题">
<el-input
v-model="queryForm.name"
placeholder="请输入"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="getList"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<!-- 表格 -->
<el-table border ref="table" :data="tableData">
<el-table-column
align="center"
type="index"
label="序号"
width="55"
/>
<el-table-column align="center" prop="name" label="姓名" />
<el-table-column align="center" prop="name" label="性别" />
<el-table-column align="center" prop="name" label="级别" />
<el-table-column align="center" prop="name" label="班级" />
<el-table-column align="center" prop="name" label="兴趣爱好" />
<el-table-column align="center" prop="name" label="联系电话" />
<el-table-column align="center" prop="name" label="申请理由" />
<el-table-column align="center" prop="name" label="审核状态" />
<el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
@click="handleAgree(scope.row)"
type="text"
size="small"
>同意</el-button
>
<el-button
@click="handleDisagree(scope.row)"
type="text"
size="small"
>不同意</el-button
>
<el-button
@click="handleDelete(scope.row)"
type="text"
size="small"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 弹窗 -->
<el-dialog
:title="title"
:visible.sync="dialogTableVisible"
width="66%"
show-close
>
<el-form :model="form" ref="form" size="small" label-width="108px">
<el-row>
<el-col :span="10">
<el-form-item label="姓名">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="性别">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="级部">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="班级">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="兴趣爱好">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="联系电话">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="申请理由">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="审核状态">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<!-- 分页 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryForm.pageNum"
:limit.sync="queryForm.pageSize"
@pagination="getList"
/>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "clubRegistrationReview" name: 'clubRegistrationReview',
data() {
return {
queryForm: {
pageNum: 1,
pageSize: 10,
name: ''
},
//表格数据
tableData: [
{
name: '1'
},
{
name: '2222'
},
{
name: '33',
hasChildren: true
},
{
name: '444'
}
],
title: '',
// 弹窗
form: {},
// 总计
total: 0,
single: false, // 添加 single 属性并设置初始值
multiple: false,
dialogTableVisible: false
}
},
methods: {
// 搜索
getList() {},
// 重置
resetQuery() {},
// 查看
handleDelete() {
this.dialogTableVisible = true
this.title = '社团报名审核'
},
// 同意
handleAgree() {},
// 同意
handleDisagree() {},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
}
}
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.el-form {
</style> margin-top: 15px;
margin-left: 10px;
}
.el-table {
margin-left: 10px;
}
</style>
\ No newline at end of file
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
<el-form-item label="年级:" prop="picName"> :model="queryParams"
<el-input v-model="queryParams.picName" placeholder="请输入年级" clearable/> ref="queryForm"
</el-form-item> size="small"
<el-form-item label="班级:" prop="picName"> :inline="true"
<el-input v-model="queryParams.picName" placeholder="请输入班级" clearable/> v-show="showSearch"
</el-form-item> label-width="68px"
<el-form-item> >
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-form-item label="年级:" prop="picName">
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-input
</el-form-item> v-model="queryParams.picName"
</el-form> placeholder="请输入年级"
clearable
/>
</el-form-item>
<el-form-item label="班级:" prop="picName">
<el-input
v-model="queryParams.picName"
placeholder="请输入班级"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增 <el-button
</el-button> type="primary"
</el-col> icon="el-icon-plus"
<el-col :span="1.5"> size="mini"
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除 @click="handleAdd"
</el-button> >新增
</el-col> </el-button>
</el-row> </el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" ref="table" :data="picList" @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="55" align="center"/> v-loading="loading"
<el-table-column label="序号" align="center" prop="seqencing" width="80"/> ref="table"
<el-table-column label="身份证号" align="center" prop="picName"/> :data="picList"
<el-table-column label="年级" align="center" prop="picName"/> @selection-change="handleSelectionChange"
<el-table-column label="班级" align="center" prop="picName"/> >
<el-table-column label="社团部门" align="center" prop="picName"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="社团职位" align="center" prop="picName"/> <el-table-column
<el-table-column label="联系方式" align="center" prop="picName"/> label="序号"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> align="center"
<template slot-scope="scope"> prop="seqencing"
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改 width="80"
</el-button> />
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除 <el-table-column label="姓名" align="center" prop="picName" />
</el-button> <el-table-column label="性别" align="center" prop="picName" />
</template> <el-table-column label="身份证号" align="center" prop="picName" />
</el-table-column> <el-table-column label="年级" align="center" prop="picName" />
</el-table> <el-table-column label="班级" align="center" prop="picName" />
<el-table-column label="社团部门" align="center" prop="picName" />
<el-table-column label="社团职位" align="center" prop="picName" />
<el-table-column label="联系方式" align="center" prop="picName" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList"/> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改社团主题对话框 --> <!-- 添加或修改社团主题对话框 -->
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body> <el-dialog
<el-form ref="form" :model="form" :rules="rules" label-width="90px" > :title="title"
<el-form-item label="姓名:" prop="picName"> :visible.sync="open"
<el-select v-model="form.value" style="width: 100%;" filterable placeholder="请选择姓名"> width="30%"
<el-option append-to-body
v-for="item in options" >
:key="item.value" <el-form ref="form" :model="form" :rules="rules" label-width="90px">
:label="item.label" <el-form-item label="姓名:" prop="picName">
:value="item.value"> <el-select
</el-option> v-model="form.value"
</el-select> style="width: 100%"
</el-form-item> filterable
<el-form-item label="性别:" prop="picName"> placeholder="请选择姓名"
<el-input readonly v-model="form.picName" placeholder="请输入性别:"/> >
</el-form-item> <el-option
<el-form-item label="身份证号:" prop="picName"> v-for="item in options"
<el-input readonly v-model="form.picName" placeholder="请输入身份证号"/> :key="item.value"
</el-form-item> :label="item.label"
<el-form-item label="年级:" prop="picName"> :value="item.value"
<el-input readonly v-model="form.picName" placeholder="请输入年级"/> >
</el-form-item> </el-option>
<el-form-item label="班级:" prop="picName"> </el-select>
<el-input readonly v-model="form.picName" placeholder="请输入班级"/> </el-form-item>
</el-form-item> <el-form-item label="性别:" prop="picName">
<el-form-item label="联系方式:" prop="picName"> <el-input
<el-input v-model="form.picName" placeholder="请输入联系方式"/> readonly
</el-form-item> v-model="form.picName"
<el-form-item label="社团部门:" prop="picName"> placeholder="请输入性别:"
<el-input v-model="form.picName" placeholder="请输入社团部门"/> />
</el-form-item> </el-form-item>
<el-form-item label="社团职位:" prop="picName"> <el-form-item label="身份证号:" prop="picName">
<el-input v-model="form.picName" placeholder="请输入社团职位"/> <el-input
</el-form-item> readonly
v-model="form.picName"
</el-form> placeholder="请输入身份证号"
<div slot="footer" class="dialog-footer"> />
<el-button type="primary" @click="submitForm">确 定</el-button> </el-form-item>
<el-button @click="cancel">取 消</el-button> <el-form-item label="年级:" prop="picName">
</div> <el-input
</el-dialog> readonly
</div> v-model="form.picName"
placeholder="请输入年级"
/>
</el-form-item>
<el-form-item label="班级:" prop="picName">
<el-input
readonly
v-model="form.picName"
placeholder="请输入班级"
/>
</el-form-item>
<el-form-item label="联系方式:" prop="picName">
<el-input
v-model="form.picName"
placeholder="请输入联系方式"
/>
</el-form-item>
<el-form-item label="社团部门:" prop="picName">
<el-input
v-model="form.picName"
placeholder="请输入社团部门"
/>
</el-form-item>
<el-form-item label="社团职位:" prop="picName">
<el-input
v-model="form.picName"
placeholder="请输入社团职位"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import {listPic, getPic, delPic, addPic, updatePic, updateState} from '@/api/smartSchool/schoolManage/introduce/pic' import {
listPic,
getPic,
delPic,
addPic,
updatePic,
updateState
} from '@/api/smartSchool/schoolManage/introduce/pic'
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar' import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import {changeUserStatus} from '@/api/system/user' import { changeUserStatus } from '@/api/system/user'
import {uploadImage as commonUpload} from '@/api/common' import { uploadImage as commonUpload } from '@/api/common'
import {ExportType, TEXT_SIZE} from '@/enums/common' import { ExportType, TEXT_SIZE } from '@/enums/common'
export default { export default {
name: 'communityStyle', name: 'communityStyle',
components: {picAvatar}, components: { picAvatar },
data() { data() {
return { return {
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制 // 输入框字数限制
TEXT_SIZE, TEXT_SIZE,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 弹出层标题 // 弹出层标题
title: '', title: '',
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
picName: null picName: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
picName: [{required: true, message: '请输入相片名称', trigger: 'blur'}], // picName: [
seqencing: [{required: true, message: '请输入排序', trigger: 'blur'}], // {
remark: [{max: TEXT_SIZE, message: '备注信息在0到200字之间', trigger: 'blur'}] // required: true,
}, // message: '请输入相片名称',
options: [{ // trigger: 'blur'
value: '选项1', // }
label: '黄金糕' // ],
}, { },
value: '选项2', options: [
label: '双皮奶' {
}, { value: '选项1',
value: '选项3', label: '黄金糕'
label: '蚵仔煎' },
}, { {
value: '选项4', value: '选项2',
label: '龙须面' label: '双皮奶'
}, { },
value: '选项5', {
label: '北京烤鸭' value: '选项3',
}], label: '蚵仔煎'
},
} {
}, value: '选项4',
created() { label: '龙须面'
this.getList() },
}, {
methods: { value: '选项5',
/** 查询园区照片列表 */ label: '北京烤鸭'
getList() { }
this.loading = true ]
this.picList = [] }
listPic(this.queryParams).then(response => {
this.picList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
params: {},
id: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
picName: null,
picUrl: null,
seqencing: null,
isShow: 0
}
this.imageUrl = ''
this.resetForm('form')
}, },
/** 搜索按钮操作 */ created() {
handleQuery() {
this.throttle(() => {
this.queryParams.pageNum = 1
this.getList() this.getList()
})
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '新增社团成员'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const ids = row.id || this.ids
getPic(ids).then(response => {
this.form = response.data
this.imageUrl = this.pev + this.form.picUrl
this.open = true
this.title = '修改社团成员信息'
})
}, },
/** 提交按钮 */ methods: {
submitForm() { /** 查询列表 */
this.$refs['form'].validate(valid => { getList() {
if (valid) { this.loading = true
this.$modal.loading('正在上传数据,请稍等...') this.picList = []
if (this.form.id != null) { listPic(this.queryParams).then((response) => {
updatePic({ this.picList = response.rows
...this.form this.total = response.total
this.loading = false
}) })
.then(response => { },
this.$modal.closeLoading() // 取消按钮
this.$modal.msgSuccess('修改成功') cancel() {
this.open = false this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
params: {},
id: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
picName: null,
picUrl: null,
seqencing: null,
isShow: 0
}
this.imageUrl = ''
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.throttle(() => {
this.queryParams.pageNum = 1
this.getList() this.getList()
})
.catch(error => {
this.$modal.closeLoading()
})
} else {
addPic({
...this.form,
isShow: '0'
}) })
.then(response => { },
this.$modal.closeLoading() /** 重置按钮操作 */
this.$modal.msgSuccess('新增成功') resetQuery() {
this.open = false this.resetForm('queryForm')
this.getList() this.handleQuery()
}) },
.catch(error => { // 多选框选中数据
this.$modal.closeLoading() handleSelectionChange(selection) {
}) this.ids = selection.map((item) => item.id)
} this.single = selection.length !== 1
} this.multiple = !selection.length
}) },
}, /** 新增按钮操作 */
/** 删除按钮操作 */ handleAdd() {
handleDelete(row) { this.reset()
const ids = row.id || this.ids this.open = true
if (ids) { this.title = '新增社团成员'
this.$modal },
.confirm(`是否确认删除选中的${Object.hasOwnProperty.call(ids, 'length') ? ids.length : 1}条数据?`) /** 修改按钮操作 */
.then(() => { handleUpdate(row) {
this.$modal.loading('正在处理数据,请稍等...') this.reset()
return delPic(ids) const ids = row.id || this.ids
}) getPic(ids).then((response) => {
.then(() => { this.form = response.data
this.$modal.closeLoading()
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {
this.$modal.closeLoading()
})
}
},
} this.open = true
this.title = '修改社团成员信息'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$modal.loading('正在上传数据,请稍等...')
if (this.form.id != null) {
updatePic({
...this.form
})
.then((response) => {
this.$modal.closeLoading()
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
.catch((error) => {
this.$modal.closeLoading()
})
} else {
addPic({
...this.form,
isShow: '0'
})
.then((response) => {
this.$modal.closeLoading()
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
.catch((error) => {
this.$modal.closeLoading()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
if (ids) {
this.$modal
.confirm(
`是否确认删除选中的${
Object.hasOwnProperty.call(ids, 'length')
? ids.length
: 1
}条数据?`
)
.then(() => {
this.$modal.loading('正在处理数据,请稍等...')
return delPic(ids)
})
.then(() => {
this.$modal.closeLoading()
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {
this.$modal.closeLoading()
})
}
}
}
} }
</script> </script>
<style scoped> <style scoped>
.avatar, .avatar,
.avatar-uploader, .avatar-uploader,
.el-icon-plus { .el-icon-plus {
width: 650px; width: 650px;
} }
</style> </style>
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId> <artifactId>spring-boot-starter-websocket</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
package yangtz.cs.liu.campus.controller.organization;
import java.util.Arrays;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationActivationRecord;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationActivationRecordService;
import yangtz.cs.liu.campus.vo.organization.ActivationRecordVo;
/**
* 社团活动记录Controller
*
* @author liul
* @date 2023-09-06
*/
@RestController
@RequestMapping("/record")
public class SchoolOrganizationActivationRecordController extends BaseController
{
@Autowired
private ISchoolOrganizationActivationRecordService schoolOrganizationActivationRecordService;
/**
* 查询社团活动记录列表
*/
@GetMapping("/list")
public TableDataInfo list(ActivationRecordVo vo)
{
LambdaQueryWrapper<SchoolOrganizationActivationRecord> wrapper = Wrappers.lambdaQuery();
wrapper.like(StringUtils.isNotEmpty(vo.getTheme()),SchoolOrganizationActivationRecord::getTheme,vo.getTheme())
.eq(SchoolOrganizationActivationRecord::getCid,vo.getCid())
.orderByDesc(SchoolOrganizationActivationRecord::getCreateTime);
startPage();
List<SchoolOrganizationActivationRecord> list = schoolOrganizationActivationRecordService.list(wrapper);
return getDataTable(list);
}
/**
* 获取社团活动记录详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationActivationRecordService.getById(id));
}
/**
* 新增社团活动记录
*/
@Log(title = "社团活动记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationActivationRecord schoolOrganizationActivationRecord)
{
return toAjax(schoolOrganizationActivationRecordService.save(schoolOrganizationActivationRecord));
}
/**
* 修改社团活动记录
*/
@Log(title = "社团活动记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolOrganizationActivationRecord schoolOrganizationActivationRecord)
{
return toAjax(schoolOrganizationActivationRecordService.updateById(schoolOrganizationActivationRecord));
}
/**
* 删除社团活动记录
*/
@Log(title = "社团活动记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
List<Long> list = Arrays.asList(ids);
return toAjax(schoolOrganizationActivationRecordService.removeByIds(list));
}
}
package yangtz.cs.liu.campus.controller.organization;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationFc;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationFcService;
import yangtz.cs.liu.campus.vo.organization.Fb2Vo;
import yangtz.cs.liu.campus.vo.organization.StFcVo;
import java.util.Arrays;
import java.util.List;
/**
* 社团风采Controller
*
* @author liul
* @date 2023-09-06
*/
@RestController
@RequestMapping("/fc")
public class SchoolOrganizationFcController extends BaseController
{
@Autowired
private ISchoolOrganizationFcService schoolOrganizationFcService;
/**
* 查询社团风采列表
*/
@GetMapping("/list")
public TableDataInfo list(StFcVo vo)
{
LambdaQueryWrapper<SchoolOrganizationFc> wrapper = Wrappers.lambdaQuery();
wrapper.like(StringUtils.isNotEmpty(vo.getTheme()),SchoolOrganizationFc::getTheme,vo.getTheme())
.eq(SchoolOrganizationFc::getCid,vo.getCid())
.orderByDesc(SchoolOrganizationFc::getCreateTime);
startPage();
List<SchoolOrganizationFc> list = schoolOrganizationFcService.list(wrapper);
return getDataTable(list);
}
/**
* 获取社团风采详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationFcService.getById(id));
}
/**
* 新增社团风采
*/
@Log(title = "社团风采", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationFc schoolOrganizationFc)
{
return toAjax(schoolOrganizationFcService.save(schoolOrganizationFc));
}
/**
* 是否发布
*/
@PostMapping("/isfb")
public AjaxResult fb(@RequestBody Fb2Vo vo)
{
SchoolOrganizationFc fc = schoolOrganizationFcService.getById(vo.getId());
String isfb = fc.getIsfb();
if (StringUtils.equals(isfb,"1")){
fc.setIsfb("2");
}else {
fc.setIsfb("1");
}
return toAjax(schoolOrganizationFcService.updateById(fc));
}
/**
* 修改社团风采
*/
@Log(title = "社团风采", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolOrganizationFc schoolOrganizationFc)
{
return toAjax(schoolOrganizationFcService.updateById(schoolOrganizationFc));
}
/**
* 删除社团风采
*/
@Log(title = "社团风采", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
List<Long> list = Arrays.asList(ids);
return toAjax(schoolOrganizationFcService.removeByIds(list));
}
}
package yangtz.cs.liu.campus.controller.organization;
import java.util.Arrays;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationFc;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationInfoService;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
/**
* 社团信息Controller
*
* @author liul
* @date 2023-09-06
*/
@RestController
@RequestMapping("/info")
public class SchoolOrganizationInfoController extends BaseController {
@Autowired
private ISchoolOrganizationInfoService schoolOrganizationInfoService;
@Autowired
private ISchoolOrganizationMemberService schoolOrganizationMemberService;
/**
* 查询社团信息列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolOrganizationInfo schoolOrganizationInfo)
{
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
LambdaQueryWrapper<SchoolOrganizationInfo> wrapper = Wrappers.lambdaQuery();
for (SysRole role : roles) {
if (role.getRoleKey().equals("organization_manager")){
//说明当前人是社团管理员 则只查看自己负责的社团
wrapper.like(SchoolOrganizationInfo::getTeachersId,user.getUserId());
}
}
wrapper.like(StringUtils.isNotEmpty(schoolOrganizationInfo.getName()),SchoolOrganizationInfo::getName,schoolOrganizationInfo.getName())
.like(StringUtils.isNotEmpty(schoolOrganizationInfo.getTeachers()),SchoolOrganizationInfo::getTeachers,schoolOrganizationInfo.getTeachers())
.orderByDesc(SchoolOrganizationInfo::getCreateTime);
startPage();
List<SchoolOrganizationInfo> list = schoolOrganizationInfoService.list(wrapper);
if (list!=null && list.size()>0){
for (int i = 0; i < list.size(); i++) {
//查询该社团下面有多少人
LambdaQueryWrapper<SchoolOrganizationMember> wrapper2 = Wrappers.lambdaQuery();
wrapper2.eq(SchoolOrganizationMember::getCid,list.get(i).getId())
.eq(SchoolOrganizationMember::getDelFlag,"0");
list.get(i).setNum(schoolOrganizationMemberService.count(wrapper2)+"");
}
}
return getDataTable(list);
}
/**
* 获取社团信息详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationInfoService.getById(id));
}
/**
* 新增社团信息
*/
@Log(title = "社团信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationInfo schoolOrganizationInfo)
{
return toAjax(schoolOrganizationInfoService.save(schoolOrganizationInfo));
}
/**
* 修改社团信息
*/
@Log(title = "社团信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolOrganizationInfo schoolOrganizationInfo)
{
return toAjax(schoolOrganizationInfoService.updateById(schoolOrganizationInfo));
}
/**
* 删除社团信息
*/
@Log(title = "社团信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
List<Long> list = Arrays.asList(ids);
return toAjax(schoolOrganizationInfoService.removeByIds(list));
}
}
package yangtz.cs.liu.campus.controller.organization;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
import yangtz.cs.liu.campus.vo.organization.MemberListVo;
import java.util.Arrays;
import java.util.List;
/**
* 社团成员Controller
*
* @author liul
* @date 2023-09-06
*/
@RestController
@RequestMapping("/member")
public class SchoolOrganizationMemberController extends BaseController
{
@Autowired
private ISchoolOrganizationMemberService schoolOrganizationMemberService;
/**
* 查询社团成员列表
*/
@GetMapping("/list")
public TableDataInfo list(MemberListVo vo)
{
LambdaQueryWrapper<SchoolOrganizationMember> wrapper = Wrappers.lambdaQuery();
wrapper.like(StringUtils.isNotEmpty(vo.getName()),SchoolOrganizationMember::getName,vo.getName())
.eq(SchoolOrganizationMember::getCid,vo.getCid())
.eq(StringUtils.isNotEmpty(vo.getClasses()),SchoolOrganizationMember::getClasses,vo.getClasses())
.eq(StringUtils.isNotEmpty(vo.getGrade()),SchoolOrganizationMember::getGrade,vo.getGrade())
.orderByDesc(SchoolOrganizationMember::getCreateTime);
startPage();
List<SchoolOrganizationMember> list = schoolOrganizationMemberService.list(wrapper);
return getDataTable(list);
}
/**
* 获取社团成员详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationMemberService.getById(id));
}
/**
* 新增社团成员
*/
@Log(title = "社团成员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationMember schoolOrganizationMember)
{
return toAjax(schoolOrganizationMemberService.save(schoolOrganizationMember));
}
/**
* 修改社团成员
*/
@Log(title = "社团成员", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolOrganizationMember schoolOrganizationMember)
{
return toAjax(schoolOrganizationMemberService.updateById(schoolOrganizationMember));
}
/**
* 删除社团成员
*/
@Log(title = "社团成员", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
List<Long> list = Arrays.asList(ids);
return toAjax(schoolOrganizationMemberService.removeByIds(list));
}
}
package yangtz.cs.liu.campus.controller.organization;
import java.util.Arrays;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationSignin;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationSigninService;
import yangtz.cs.liu.campus.vo.organization.SigninVo;
import yangtz.cs.liu.campus.vo.organization.signinApprove2Vo;
/**
* 社团报名审核Controller
*
* @author liul
* @date 2023-09-06
*/
@RestController
@RequestMapping("/signin")
public class SchoolOrganizationSigninController extends BaseController
{
@Autowired
private ISchoolOrganizationSigninService schoolOrganizationSigninService;
@Autowired
private ISchoolOrganizationMemberService schoolOrganizationMemberService;
/**
* 查询社团报名审核列表
*/
@GetMapping("/list")
public TableDataInfo list(SigninVo vo)
{
LambdaQueryWrapper<SchoolOrganizationSignin> wrapper = Wrappers.lambdaQuery();
wrapper.like(StringUtils.isNotEmpty(vo.getName()),SchoolOrganizationSignin::getName,vo.getName())
.eq(SchoolOrganizationSignin::getCid,vo.getCid())
.eq(StringUtils.isNotEmpty(vo.getClasses()),SchoolOrganizationSignin::getClasses,vo.getClasses())
.eq(StringUtils.isNotEmpty(vo.getGrade()),SchoolOrganizationSignin::getGrade,vo.getGrade())
.orderByDesc(SchoolOrganizationSignin::getCreateTime);
startPage();
List<SchoolOrganizationSignin> list = schoolOrganizationSigninService.list(wrapper);
return getDataTable(list);
}
/**
* 获取社团报名审核详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationSigninService.getById(id));
}
/**
* 新增社团报名
*/
/*@Log(title = "社团报名", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationSignin schoolOrganizationSignin)
{
return toAjax(schoolOrganizationSigninService.save(schoolOrganizationSignin));
}*/
/**
* 同意社团申请审批
*/
@Transactional
@PostMapping("/approve")
public AjaxResult approve(@RequestBody signinApprove2Vo vo)
{
SchoolOrganizationSignin so = new SchoolOrganizationSignin();
so.setId(vo.getId());
so.setStatus(vo.getStatus());
//同意后还要将当前人员数据插入到社团成员表中
if (StringUtils.equals(vo.getStatus(),"2")){
SchoolOrganizationMember member = new SchoolOrganizationMember();
member.setCid(so.getCid());
member.setName(so.getName());
member.setGrade(so.getGrade());
member.setClasses(so.getClasses());
member.setOrgName(so.getOrgName());
member.setPhone(so.getPhone());
member.setSex(so.getSex());
member.setUserId(so.getUserId());
schoolOrganizationMemberService.save(member);
}
return toAjax(schoolOrganizationSigninService.updateById(so));
}
/**
* 修改社团报名审核
*/
/* @Log(title = "社团报名审核", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolOrganizationSignin schoolOrganizationSignin)
{
return toAjax(schoolOrganizationSigninService.updateById(schoolOrganizationSignin));
}*/
/**
* 删除社团报名审核
*/
/*@Log(title = "社团报名审核", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
List<Long> list = Arrays.asList(ids);
return toAjax(schoolOrganizationSigninService.removeByIds(list));
}*/
}
...@@ -20,27 +20,17 @@ import com.ruoyi.common.annotation.Log; ...@@ -20,27 +20,17 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolExperimentPlanMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMentorMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeMentorService; import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeMentorService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService; import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanMbVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo;
import yangtz.cs.liu.campus.vo.schoolgrade.GradeTreeSelect;
import yangtz.cs.liu.campus.vo.student.SchoolStudentVO;
import static yangtz.cs.liu.campus.constant.GradeConstant.NEWTERM;
import static yangtz.cs.liu.campus.constant.GradeConstant.UNNEW;
/** /**
* 实验计划Controller * 实验计划Controller
...@@ -115,6 +105,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -115,6 +105,7 @@ public class SchoolExperimentPlanController extends BaseController
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo); List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
List<SchoolExperimentPlanVo> listNew = new ArrayList<>(); List<SchoolExperimentPlanVo> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据 //去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){ if (StringUtils.isNotNull(schoolGradeMentors)){
for (SchoolExperimentPlanVo experimentPlanVo : list) { for (SchoolExperimentPlanVo experimentPlanVo : list) {
...@@ -210,14 +201,26 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -210,14 +201,26 @@ public class SchoolExperimentPlanController extends BaseController
} }
/** /**
* 根据学年查询级部下拉框 * 查询级部下拉框
*/ */
@GetMapping("/getGrade/{schoolYear}") @GetMapping("/getGrade")
public AjaxResult getGrade(@PathVariable("schoolYear") int schoolYear){ public AjaxResult getGrade(){
//获取最新学年
int schoolYear = schoolGradeService.isNewSchoolYear();
return AjaxResult.success(schoolExperimentPlanService.getGrade(schoolYear,null)); return AjaxResult.success(schoolExperimentPlanService.getGrade(schoolYear,null));
} }
/** /**
* 查询级部下拉框(搜索条件)
*/
@GetMapping("/getGradeList")
public AjaxResult getGradeList(){
//获取最新学年
int schoolYear = schoolGradeService.isNewSchoolYear();
return AjaxResult.success(schoolExperimentPlanService.getGradeList(schoolYear));
}
/**
* 根据级部查询对应班级 * 根据级部查询对应班级
*/ */
@GetMapping("/getClass/{gradeId}") @GetMapping("/getClass/{gradeId}")
......
...@@ -196,7 +196,7 @@ public class SchoolLabClassYearController extends BaseController ...@@ -196,7 +196,7 @@ public class SchoolLabClassYearController extends BaseController
List<SchoolLabClassYearRelation> schoolLabClassYearRelations = schoolLabClassYearRelationService.list(wrapper); List<SchoolLabClassYearRelation> schoolLabClassYearRelations = schoolLabClassYearRelationService.list(wrapper);
schoolLabClassYearVo.setSchoolLabClassYearRelationList(schoolLabClassYearRelations); schoolLabClassYearVo.setSchoolLabClassYearRelationList(schoolLabClassYearRelations);
} }
return AjaxResult.success(); return AjaxResult.success(schoolLabClassYearVo);
} }
/** /**
......
...@@ -36,7 +36,7 @@ public class SchoolLabController extends BaseController ...@@ -36,7 +36,7 @@ public class SchoolLabController extends BaseController
public TableDataInfo list(SchoolLabVo schoolLabVo) public TableDataInfo list(SchoolLabVo schoolLabVo)
{ {
startPage(); startPage();
List<SchoolLabVo> list = schoolLabService.selectSchoolLabList(schoolLabVo); List<SchoolLabVo> list = schoolLabService.selectSchoolLabList(schoolLabVo,null);
return getDataTable(list); return getDataTable(list);
} }
...@@ -47,7 +47,7 @@ public class SchoolLabController extends BaseController ...@@ -47,7 +47,7 @@ public class SchoolLabController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SchoolLabVo schoolLabVo) public void export(HttpServletResponse response, SchoolLabVo schoolLabVo)
{ {
List<SchoolLabVo> list = schoolLabService.selectSchoolLabList(schoolLabVo); List<SchoolLabVo> list = schoolLabService.selectSchoolLabList(schoolLabVo,null);
ExcelUtil<SchoolLabVo> util = new ExcelUtil<SchoolLabVo>(SchoolLabVo.class); ExcelUtil<SchoolLabVo> util = new ExcelUtil<SchoolLabVo>(SchoolLabVo.class);
util.exportExcel(response, list, "实验室数据"); util.exportExcel(response, list, "实验室数据");
} }
......
...@@ -22,9 +22,11 @@ import com.ruoyi.common.annotation.Log; ...@@ -22,9 +22,11 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs;
import yangtz.cs.liu.campus.service.accessory.IAccessoryService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
...@@ -47,6 +49,8 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -47,6 +49,8 @@ public class SchoolTeacherExperimentApplyController extends BaseController
private ISchoolTeacherExperimentApplyService schoolTeacherExperimentApplyService; private ISchoolTeacherExperimentApplyService schoolTeacherExperimentApplyService;
@Autowired @Autowired
private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService; private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService;
@Autowired
private IAccessoryService accessoryService;
/** /**
* 查询教师个人实验申请列表 * 查询教师个人实验申请列表
...@@ -75,6 +79,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -75,6 +79,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper); List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs); list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
} }
LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,list1.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
list1.setSchoolAccessoryList(schoolAccessories);
}
}); });
return getDataTable(list); return getDataTable(list);
} }
...@@ -96,6 +107,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -96,6 +107,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper); List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs); list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
} }
LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,list1.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
list1.setSchoolAccessoryList(schoolAccessories);
}
}); });
return getDataTable(list); return getDataTable(list);
} }
...@@ -122,6 +140,45 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -122,6 +140,45 @@ public class SchoolTeacherExperimentApplyController extends BaseController
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper); List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
schoolTeacherExperimentApplyVo.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs); schoolTeacherExperimentApplyVo.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
} }
LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,schoolTeacherExperimentApplyVo.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
schoolTeacherExperimentApplyVo.setSchoolAccessoryList(schoolAccessories);
}
return AjaxResult.success(schoolTeacherExperimentApplyVo);
}
/**
* 实验室管理-教师个人实验申请-获取教师个人实验申请详细信息
*/
@GetMapping(value = "/detail/{id}")
public AjaxResult detail(@PathVariable("id") Long id)
{
SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo = schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyById(id);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String semester = "";
if (schoolTeacherExperimentApplyVo.getSemester().equals("1")){
semester = "上学期";
}else {
semester = "下学期";
}
schoolTeacherExperimentApplyVo.setSchoolYearSemester(schoolTeacherExperimentApplyVo.getSchoolYear() + semester);
schoolTeacherExperimentApplyVo.setPlannedTime(format.format(schoolTeacherExperimentApplyVo.getPlannedStartTime()) + "至" + format.format(schoolTeacherExperimentApplyVo.getPlannedEndTime()));
if (schoolTeacherExperimentApplyVo.getDeclareState().equals("3") || schoolTeacherExperimentApplyVo.getDeclareState().equals("2") ){
LambdaQueryWrapper<SchoolTeacherExperimentApplyLabs> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,id);
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
schoolTeacherExperimentApplyVo.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
}
LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,schoolTeacherExperimentApplyVo.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
schoolTeacherExperimentApplyVo.setSchoolAccessoryList(schoolAccessories);
}
return AjaxResult.success(schoolTeacherExperimentApplyVo); return AjaxResult.success(schoolTeacherExperimentApplyVo);
} }
...@@ -160,14 +217,14 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -160,14 +217,14 @@ public class SchoolTeacherExperimentApplyController extends BaseController
*/ */
@GetMapping("/getTeacherList") @GetMapping("/getTeacherList")
public TableDataInfo getTeacherList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo){ public TableDataInfo getTeacherList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo){
schoolTeacherExperimentApplyVo.setDeclareState("1"); schoolTeacherExperimentApplyVo.setDeclareState("0");
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
List<SysRole> roles = user.getRoles(); List<SysRole> roles = user.getRoles();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
//管理员返回全部 //管理员返回全部
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<SchoolTeacherExperimentApplyVo> list = schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo); List<SchoolTeacherExperimentApplyVo> list = schoolTeacherExperimentApplyService.getTeacherList(schoolTeacherExperimentApplyVo);
list.forEach(list1 ->{ list.forEach(list1 ->{
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -181,6 +238,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -181,6 +238,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController
wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,list1.getId()); wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,list1.getId());
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper); List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs); list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,list1.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
list1.setSchoolAccessoryList(schoolAccessories);
}
}); });
return getDataTable(list); return getDataTable(list);
} }
...@@ -189,7 +253,7 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -189,7 +253,7 @@ public class SchoolTeacherExperimentApplyController extends BaseController
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
startPage(); startPage();
List<SchoolTeacherExperimentApplyVo> list = schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo); List<SchoolTeacherExperimentApplyVo> list = schoolTeacherExperimentApplyService.getTeacherList(schoolTeacherExperimentApplyVo);
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -203,6 +267,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -203,6 +267,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController
wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,list1.getId()); wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,list1.getId());
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper); List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs); list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,list1.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
list1.setSchoolAccessoryList(schoolAccessories);
}
}); });
return getDataTable(list); return getDataTable(list);
} }
...@@ -222,7 +293,7 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -222,7 +293,7 @@ public class SchoolTeacherExperimentApplyController extends BaseController
schoolTeacherExperimentApplyVo.setSubs(labSubs); schoolTeacherExperimentApplyVo.setSubs(labSubs);
startPage(); startPage();
List<SchoolTeacherExperimentApplyVo> list = schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo); List<SchoolTeacherExperimentApplyVo> list = schoolTeacherExperimentApplyService.getTeacherList(schoolTeacherExperimentApplyVo);
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -232,11 +303,16 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -232,11 +303,16 @@ public class SchoolTeacherExperimentApplyController extends BaseController
} }
list1.setSchoolYearSemester(list1.getSchoolYear() + semester); list1.setSchoolYearSemester(list1.getSchoolYear() + semester);
list1.setPlannedTime(format.format(list1.getPlannedStartTime()) + "至" + format.format(list1.getPlannedEndTime())); list1.setPlannedTime(format.format(list1.getPlannedStartTime()) + "至" + format.format(list1.getPlannedEndTime()));
if (list1.getDeclareState().equals("3") || list1.getDeclareState().equals("2")){ LambdaQueryWrapper<SchoolTeacherExperimentApplyLabs> wrapper = new LambdaQueryWrapper<>();
LambdaQueryWrapper<SchoolTeacherExperimentApplyLabs> wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,list1.getId());
wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,list1.getId()); List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper); list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
list1.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs); LambdaQueryWrapper<SchoolAccessory> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(SchoolAccessory::getBusinessId,list1.getId())
.eq(SchoolAccessory::getAccessoryType,"教师个人实验结果附件");
List<SchoolAccessory> schoolAccessories = accessoryService.list(wrapper1);
if (schoolAccessories.size() > 0){
list1.setSchoolAccessoryList(schoolAccessories);
} }
}); });
return getDataTable(list); return getDataTable(list);
...@@ -250,4 +326,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController ...@@ -250,4 +326,13 @@ public class SchoolTeacherExperimentApplyController extends BaseController
public AjaxResult teacherExperimentLabs(@RequestBody SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo){ public AjaxResult teacherExperimentLabs(@RequestBody SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo){
return toAjax(schoolTeacherExperimentApplyService.teacherExperimentLabs(schoolTeacherExperimentApplyVo)); return toAjax(schoolTeacherExperimentApplyService.teacherExperimentLabs(schoolTeacherExperimentApplyVo));
} }
/**
* 上传实验结果附件
*/
@PostMapping("/experimentResult")
public AjaxResult experimentResult(@RequestBody SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo){
return toAjax(schoolTeacherExperimentApplyService.experimentResult(schoolTeacherExperimentApplyVo));
}
} }
...@@ -174,7 +174,7 @@ public class SchoolTeacherLabApplyController extends BaseController ...@@ -174,7 +174,7 @@ public class SchoolTeacherLabApplyController extends BaseController
*/ */
@GetMapping("/getTeacherClass") @GetMapping("/getTeacherClass")
public AjaxResult getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){ public AjaxResult getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){
return AjaxResult.success(schoolTeacherLabApplyService.getTeacherClass(schoolTeacherLabApplyVo)); return AjaxResult.success(schoolTeacherLabApplyService.getTeacherClass(schoolTeacherLabApplyVo,null));
} }
/** /**
...@@ -202,4 +202,14 @@ public class SchoolTeacherLabApplyController extends BaseController ...@@ -202,4 +202,14 @@ public class SchoolTeacherLabApplyController extends BaseController
public AjaxResult updateState(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply){ public AjaxResult updateState(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply){
return toAjax(schoolTeacherLabApplyService.updateState(schoolTeacherLabApply)); return toAjax(schoolTeacherLabApplyService.updateState(schoolTeacherLabApply));
} }
/**
* 实验室管理-查看实验室使用记录明细
*/
@GetMapping("/getLabUserDetial")
public TableDataInfo getLabUserDetial(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){
startPage();
return getDataTable(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo));
}
} }
package yangtz.cs.liu.campus.domain.organization;
import java.util.Date;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 社团活动记录对象 school_organization_activation_record
*
* @author liul
* @date 2023-09-06
*/
@Data
public class SchoolOrganizationActivationRecord extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 活动主题 */
@Excel(name = "活动主题")
private String theme;
/** 活动开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "活动开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date beginTime;
/** 活动结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 负责人 */
@Excel(name = "负责人")
private String fzr;
/** 社团id */
@Excel(name = "社团id")
private Long cid;
/** 社团名称 */
@Excel(name = "社团名称")
private String orgName;
/** 附件 */
@Excel(name = "附件")
private String file;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.organization;
import com.core.domain.OurBaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 社团风采对象 school_organization_fc
*
* @author liul
* @date 2023-09-06
*/
@Data
public class SchoolOrganizationFc extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 对应的社团id */
@Excel(name = "对应的社团id")
private Long cid;
/** 主题 */
@Excel(name = "主题")
private String theme;
/** 附件 */
@Excel(name = "附件")
private String file;
/** 是否发布(1发布 2不发布) */
@Excel(name = "是否发布", readConverterExp = "1=发布,2=不发布")
private String isfb;
}
package yangtz.cs.liu.campus.domain.organization;
import com.core.domain.OurBaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 社团信息对象 school_organization_info
*
* @author liul
* @date 2023-09-06
*/
@Data
public class SchoolOrganizationInfo extends OurBaseEntity {
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 社团名称 */
@Excel(name = "社团名称")
private String name;
/** 指导老师 */
@Excel(name = "指导老师")
private String teachers;
/** 指导老师id */
@Excel(name = "指导老师id")
private String teachersId;
/** 社团宗旨 */
@Excel(name = "社团宗旨")
private String aim;
/** 社团简介 */
@Excel(name = "社团简介")
private String intro;
/** 成员人数 */
private String num;
}
package yangtz.cs.liu.campus.domain.organization;
import com.core.domain.OurBaseEntity;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
/**
* 社团成员对象 school_organization_member
*
* @author liul
* @date 2023-09-06
*/
@Data
public class SchoolOrganizationMember extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 社团id */
@Excel(name = "社团id")
private Long cid;
/** 社团名称 */
@Excel(name = "社团名称")
private String orgName;
/** 学生姓名 */
@Excel(name = "学生姓名")
private String name;
/** 性别(1男 2女) */
@Excel(name = "性别(1男 2女)")
private String sex;
/** 身份证号 */
@Excel(name = "身份证号")
private String cardid;
/** 年级 */
@Excel(name = "年级")
private String grade;
/** 班级 */
@Excel(name = "班级")
private String classes;
/** 社团职位 */
@Excel(name = "社团职位")
private String orgPosition;
/** 电话 */
@Excel(name = "电话")
private String phone;
@Excel
private Long userId;
}
package yangtz.cs.liu.campus.domain.organization;
import com.core.domain.OurBaseEntity;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
/**
* 社团报名审核对象 school_organization_signin
*
* @author liul
* @date 2023-09-06
*/
@Data
public class SchoolOrganizationSignin extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 性别(1男 2女) */
@Excel(name = "性别(1男 2女)")
private String sex;
/** 年级 */
@Excel(name = "年级")
private String grade;
/** 班级 */
@Excel(name = "班级")
private String classes;
/** 兴趣爱好 */
@Excel(name = "兴趣爱好")
private String hobby;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 申请理由 */
@Excel(name = "申请理由")
private String reason;
/** 审核状态(1未审核 2同意 3不同意) */
@Excel(name = "审核状态", readConverterExp = "1=未审核,2=同意,3=不同意")
private String status;
/** 社团id */
@Excel(name = "社团id")
private Long cid;
/** 社团名称 */
@Excel(name = "社团名称")
private String orgName;
/** userId */
private Long userId;
}
...@@ -18,7 +18,7 @@ public class SchoolLabClassYearRelation ...@@ -18,7 +18,7 @@ public class SchoolLabClassYearRelation
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/** 年级实验室预约主键id */ /** 年级实验室预约主键id */
private Long labClassYearId; private Long labClassYearId;
/** 实验室id */ /** 实验室id */
......
...@@ -73,4 +73,7 @@ public class SchoolTeacherExperimentApply extends OurBaseEntity ...@@ -73,4 +73,7 @@ public class SchoolTeacherExperimentApply extends OurBaseEntity
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime; private Date applyTime;
/** 完成状态(0未完成,1已完成) */
private String state;
} }
package yangtz.cs.liu.campus.mapper.organization;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationActivationRecord;
/**
* 社团活动记录Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface SchoolOrganizationActivationRecordMapper extends BaseMapper<SchoolOrganizationActivationRecord>
{
}
package yangtz.cs.liu.campus.mapper.organization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationFc;
/**
* 社团风采Mapper接口
*
* @author liul
* @date 2023-09-06
*/
public interface SchoolOrganizationFcMapper extends BaseMapper<SchoolOrganizationFc>
{
}
package yangtz.cs.liu.campus.mapper.organization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import java.util.List;
/**
* 社团信息Mapper接口
*
* @author liul
* @date 2023-09-06
*/
public interface SchoolOrganizationInfoMapper extends BaseMapper<SchoolOrganizationInfo> {
}
package yangtz.cs.liu.campus.mapper.organization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
/**
* 社团成员Mapper接口
*
* @author liul
* @date 2023-09-06
*/
public interface SchoolOrganizationMemberMapper extends BaseMapper<SchoolOrganizationMember>
{
}
package yangtz.cs.liu.campus.mapper.organization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationSignin;
import java.util.List;
/**
* 社团报名审核Mapper接口
*
* @author liul
* @date 2023-09-06
*/
public interface SchoolOrganizationSigninMapper extends BaseMapper<SchoolOrganizationSignin>
{
}
...@@ -34,6 +34,7 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP ...@@ -34,6 +34,7 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP
*/ */
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/** /**
* 新增实验计划 * 新增实验计划
* *
......
...@@ -106,6 +106,13 @@ public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear> ...@@ -106,6 +106,13 @@ public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear>
List<Long> seletLabId(@Param("labClassYearIds") List<Long> labClassYearIds); List<Long> seletLabId(@Param("labClassYearIds") List<Long> labClassYearIds);
/** /**
* 获取实验室id
* @param teacherExperimentIds
* @return
*/
List<Long> seletLabIds(@Param("teacherExperimentIds") List<Long> teacherExperimentIds);
/**
* 实验室管理-年级实验室预约查看详情 * 实验室管理-年级实验室预约查看详情
* @param id * @param id
* @return * @return
......
package yangtz.cs.liu.campus.mapper.schoolLab; package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
...@@ -33,6 +34,14 @@ public interface SchoolTeacherExperimentApplyMapper extends BaseMapper<SchoolTea ...@@ -33,6 +34,14 @@ public interface SchoolTeacherExperimentApplyMapper extends BaseMapper<SchoolTea
public List<SchoolTeacherExperimentApplyVo> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo); public List<SchoolTeacherExperimentApplyVo> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo);
/** /**
* 查询教师个人实验申请列表
*
* @param schoolTeacherExperimentApplyVo 教师个人实验申请
* @return 教师个人实验申请集合
*/
public List<SchoolTeacherExperimentApplyVo> getTeacherList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo);
/**
* 新增教师个人实验申请 * 新增教师个人实验申请
* *
* @param schoolTeacherExperimentApplyVo 教师个人实验申请 * @param schoolTeacherExperimentApplyVo 教师个人实验申请
...@@ -78,4 +87,11 @@ public interface SchoolTeacherExperimentApplyMapper extends BaseMapper<SchoolTea ...@@ -78,4 +87,11 @@ public interface SchoolTeacherExperimentApplyMapper extends BaseMapper<SchoolTea
* 删除教师个人实验申请实验室 * 删除教师个人实验申请实验室
*/ */
public int deleteSchoolTeacherExperimentApplyLabsId(Long id); public int deleteSchoolTeacherExperimentApplyLabsId(Long id);
/**
* 批量新增附件信息
* @param list
* @return
*/
int batchSchoolAccessory(List<SchoolAccessory> list);
} }
package yangtz.cs.liu.campus.mapper.schoolgrade; package yangtz.cs.liu.campus.mapper.schoolgrade;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
...@@ -26,4 +27,8 @@ public interface SchoolGradeMapper extends BaseMapper<SchoolGrade> { ...@@ -26,4 +27,8 @@ public interface SchoolGradeMapper extends BaseMapper<SchoolGrade> {
//获取最新学年 //获取最新学年
int isNewSchoolYear(); int isNewSchoolYear();
public List<String> getYearList();
} }
package yangtz.cs.liu.campus.service.impl.organization;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationActivationRecord;
import yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationActivationRecordMapper;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationActivationRecordService;
/**
* 社团活动记录Service业务层处理
*
* @author liul
* @date 2023-09-06
*/
@Service
public class SchoolOrganizationActivationRecordServiceImpl extends ServiceImpl<SchoolOrganizationActivationRecordMapper, SchoolOrganizationActivationRecord> implements ISchoolOrganizationActivationRecordService
{
}
package yangtz.cs.liu.campus.service.impl.organization;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationFc;
import yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationFcMapper;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationFcService;
/**
* 社团风采Service业务层处理
*
* @author liul
* @date 2023-09-06
*/
@Service
public class SchoolOrganizationFcServiceImpl extends ServiceImpl<SchoolOrganizationFcMapper, SchoolOrganizationFc> implements ISchoolOrganizationFcService
{
}
package yangtz.cs.liu.campus.service.impl.organization;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationInfoMapper;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationInfoService;
/**
* 社团信息Service业务层处理
*
* @author liul
* @date 2023-09-06
*/
@Service
public class SchoolOrganizationInfoServiceImpl extends ServiceImpl<SchoolOrganizationInfoMapper, SchoolOrganizationInfo> implements ISchoolOrganizationInfoService {
}
package yangtz.cs.liu.campus.service.impl.organization;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
import yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationMemberMapper;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
/**
* 社团成员Service业务层处理
*
* @author liul
* @date 2023-09-06
*/
@Service
public class SchoolOrganizationMemberServiceImpl extends ServiceImpl<SchoolOrganizationMemberMapper, SchoolOrganizationMember> implements ISchoolOrganizationMemberService
{
}
package yangtz.cs.liu.campus.service.impl.organization;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationSignin;
import yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationSigninMapper;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationSigninService;
/**
* 社团报名审核Service业务层处理
*
* @author liul
* @date 2023-09-06
*/
@Service
public class SchoolOrganizationSigninServiceImpl extends ServiceImpl<SchoolOrganizationSigninMapper, SchoolOrganizationSignin> implements ISchoolOrganizationSigninService
{
}
...@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysUser; ...@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -83,10 +84,9 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe ...@@ -83,10 +84,9 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
throw new ServiceException("该分类编码已存在"); throw new ServiceException("该分类编码已存在");
} }
//父id //父id
Long parentId = schoolProductCategory.getParentId(); if (StringUtils.isNotNull(schoolProductCategory.getParentId())){
if (null != parentId){ SchoolProductCategory schoolProductCategory1 = productCategoryMapper.selectById(schoolProductCategory.getParentId());
SchoolProductCategory schoolProductCategory1 = productCategoryMapper.selectById(parentId); schoolProductCategory.setAncestors(schoolProductCategory1.getAncestors() + "," + schoolProductCategory.getParentId());
schoolProductCategory.setAncestors(schoolProductCategory1.getAncestors() + "," + parentId);
}else { }else {
schoolProductCategory.setParentId((long) 0); schoolProductCategory.setParentId((long) 0);
schoolProductCategory.setAncestors("0"); schoolProductCategory.setAncestors("0");
...@@ -108,6 +108,26 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe ...@@ -108,6 +108,26 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
@Override @Override
@Transactional @Transactional
public int updateSchoolProductCategory(SchoolProductCategory schoolProductCategory) { public int updateSchoolProductCategory(SchoolProductCategory schoolProductCategory) {
//查询分类编码是否重复
LambdaQueryWrapper<SchoolProductCategory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolProductCategory::getClassificationCode,schoolProductCategory.getClassificationCode())
.notIn(SchoolProductCategory::getId,schoolProductCategory.getId());
List<SchoolProductCategory> schoolProductCategories = productCategoryMapper.selectList(wrapper);
if (schoolProductCategories != null && schoolProductCategories.size() > 0){
throw new ServiceException("该分类编码已存在");
}
//父id
if (StringUtils.isNotNull(schoolProductCategory.getParentId())){
SchoolProductCategory schoolProductCategory1 = productCategoryMapper.selectById(schoolProductCategory.getParentId());
schoolProductCategory.setAncestors(schoolProductCategory1.getAncestors() + "," + schoolProductCategory.getParentId());
}else {
schoolProductCategory.setParentId((long) 0);
schoolProductCategory.setAncestors("0");
}
String[] split = schoolProductCategory.getAncestors().split(",");
schoolProductCategory.setRank((long) split.length);
//根据用户id获取用户名 //根据用户id获取用户名
String userName = sysUserMapper.selectUserById(schoolProductCategory.getAdminId()).getUserName(); String userName = sysUserMapper.selectUserById(schoolProductCategory.getAdminId()).getUserName();
schoolProductCategory.setAdmin(userName); schoolProductCategory.setAdmin(userName);
......
package yangtz.cs.liu.campus.service.impl.schoolLab; package yangtz.cs.liu.campus.service.impl.schoolLab;
import com.ruoyi.system.mapper.SysUserMapper;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.List; import java.util.List;
...@@ -19,20 +20,14 @@ import java.util.Map; ...@@ -19,20 +20,14 @@ import java.util.Map;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass; import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolExperimentPlanMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolExperimentPlanMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan; import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMentorMapper; import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMentorMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanMbVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
/** /**
* 实验计划Service业务层处理 * 实验计划Service业务层处理
...@@ -50,6 +45,8 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -50,6 +45,8 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
@Autowired @Autowired
private SchoolGradeMentorMapper schoolGradeMentorMapper; private SchoolGradeMentorMapper schoolGradeMentorMapper;
@Autowired
private SysUserMapper sysUserMapper;
/** /**
* 查询实验计划 * 查询实验计划
* *
...@@ -75,6 +72,16 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -75,6 +72,16 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
} }
/** /**
* 获取计划下拉列表
* @param schoolExperimentPlanVo
* @return
*/
@Override
public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.selectNameByVo(schoolExperimentPlanVo);
}
/**
* 新增实验计划 * 新增实验计划
* *
* @param schoolExperimentPlanVo 实验计划 * @param schoolExperimentPlanVo 实验计划
...@@ -181,9 +188,13 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -181,9 +188,13 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
*/ */
@Override @Override
public List<Map<String, Object>> getGrade(int schoolYear,Long userId) { public List<Map<String, Object>> getGrade(int schoolYear,Long userId) {
SysUser user = null;
//获取当前登录用户 //获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser(); if(null == userId){
user = SecurityUtils.getLoginUser().getUser();
}else {
user = sysUserMapper.selectUserById(userId);
}
//管理员级部 //管理员级部
if(1L == user.getUserId()){ if(1L == user.getUserId()){
List<Map<String, Object>> gradeList = schoolExperimentPlanMapper.getGrade(schoolYear,null); List<Map<String, Object>> gradeList = schoolExperimentPlanMapper.getGrade(schoolYear,null);
...@@ -201,6 +212,20 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -201,6 +212,20 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
} }
/** /**
* 查询级部(搜索条件)
* @param schoolYear
* @return
*/
@Override
public List<Map<String, Object>> getGradeList(int schoolYear) {
List<Map<String, Object>> gradeList = schoolExperimentPlanMapper.getGrade(schoolYear,null);
if(StringUtils.isNull(gradeList) || gradeList.size() == 0){
throw new ServiceException("当前学年为" + schoolYear + "学年,该学年没有级部信息");
}
return gradeList;
}
/**
* 根据级部查询对应班级 * 根据级部查询对应班级
* @param gradeId * @param gradeId
* @return * @return
......
package yangtz.cs.liu.campus.service.impl.schoolLab; package yangtz.cs.liu.campus.service.impl.schoolLab;
import com.ruoyi.framework.util.UserInfoUtil;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysUserService;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -22,11 +25,14 @@ import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation; ...@@ -22,11 +25,14 @@ import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper; import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.*; import yangtz.cs.liu.campus.mapper.schoolLab.*;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo; import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabVo;
import yangtz.cs.liu.campus.vo.schoolLab.*;
/** /**
* 年级实验室预约Service业务层处理 * 年级实验室预约Service业务层处理
...@@ -53,6 +59,35 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -53,6 +59,35 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
@Autowired @Autowired
private SchoolTeacherLabApplyMapper schoolTeacherLabApplyMapper; private SchoolTeacherLabApplyMapper schoolTeacherLabApplyMapper;
@Autowired
private SchoolTeacherExperimentApplyMapper teacherExperimentApplyMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private SchoolGradeMapper schoolGradeMapper;
@Autowired
private UserInfoUtil userInfoUtil;
public String getSub(){
String sub = null;
Long userId = userInfoUtil.getMpLoginUser().getUserId();
SysUser sysUser = sysUserMapper.selectUserById(userId);
for (SysRole role : sysUser.getRoles()) {
if (role.getRoleKey().equals("phy_lab_admin")){
sub = "1";
}else if (role.getRoleKey().equals("che_lab_admin")){
sub = "2";
}else if (role.getRoleKey().equals("bio_lab_admin")){
sub = "3";
}
}
return sub ;
}
/** /**
* 查询年级实验室预约 * 查询年级实验室预约
...@@ -89,11 +124,18 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -89,11 +124,18 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear) public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear)
{ {
schoolLabClassYear.setCreateTime(DateUtils.getNowDate()); schoolLabClassYear.setCreateTime(DateUtils.getNowDate());
schoolLabClassYear.setDeclareState("0");
int rows = schoolLabClassYearMapper.insertSchoolLabClassYear(schoolLabClassYear); int rows = schoolLabClassYearMapper.insertSchoolLabClassYear(schoolLabClassYear);
insertSchoolLabClassYearRelation(schoolLabClassYear); insertSchoolLabClassYearRelation(schoolLabClassYear);
return rows; return rows;
} }
@Override
public List<String> getYearList() {
return schoolGradeMapper.getYearList();
}
/** /**
* 新增年级实验室预约和实验室关系信息 * 新增年级实验室预约和实验室关系信息
* *
...@@ -168,8 +210,14 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -168,8 +210,14 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
*/ */
@Override @Override
public List<SchoolLabClassYearVo> getLabClassYear(SchoolLabClassYearVo schoolLabClassYearVo) { public List<SchoolLabClassYearVo> getLabClassYear(SchoolLabClassYearVo schoolLabClassYearVo) {
//获取当前登录用户 SysUser user = null;
SysUser user = SecurityUtils.getLoginUser().getUser(); if (schoolLabClassYearVo.getUserId() == null){
//获取当前登录用户
user = SecurityUtils.getLoginUser().getUser();
}else {
user = sysUserMapper.selectUserById(schoolLabClassYearVo.getUserId());
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
//获取用户角色集合 //获取用户角色集合
List<SysRole> roles = user.getRoles(); List<SysRole> roles = user.getRoles();
...@@ -266,6 +314,10 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -266,6 +314,10 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
for (SchoolLabClassYearRelation schoolLabClassYearRelation : schoolLabClassYearRelationList) for (SchoolLabClassYearRelation schoolLabClassYearRelation : schoolLabClassYearRelationList)
{ {
schoolLabClassYearRelation.setLabClassYearId(id); schoolLabClassYearRelation.setLabClassYearId(id);
//跟进实验是id 查询实验室名称
SchoolLabVo schoolLabVo = schoolLabMapper.selectSchoolLabById(
schoolLabClassYearRelation.getLabId());
schoolLabClassYearRelation.setLabName(schoolLabVo.getLabName());
list.add(schoolLabClassYearRelation); list.add(schoolLabClassYearRelation);
} }
if (list.size() > 0) if (list.size() > 0)
...@@ -273,9 +325,10 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -273,9 +325,10 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id); schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id);
schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list); schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list);
} }
schoolLabClassYearVo.setDeclareState("3");
SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear(); SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear();
BeanUtils.copyProperties(schoolLabClassYearVo,schoolLabClassYear); BeanUtils.copyProperties(schoolLabClassYearVo,schoolLabClassYear);
return schoolLabClassYearMapper.updateById(schoolLabClassYear); return schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear);
} }
/** /**
...@@ -294,16 +347,28 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -294,16 +347,28 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
LambdaQueryWrapper<SchoolLab> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolLab> wrapper = new LambdaQueryWrapper<>();
List<SchoolLab> schoolLabs = schoolLabMapper.selectList(wrapper); List<SchoolLab> schoolLabs = schoolLabMapper.selectList(wrapper);
//查询所有已分配实验室的年级实验室预约 List<String> declareStates = new ArrayList<>();
LambdaQueryWrapper<SchoolLabClassYear> lqw = new LambdaQueryWrapper<>(); declareStates.add("2");
lqw.eq(SchoolLabClassYear::getDeclareState,"3"); declareStates.add("3");
List<SchoolLabClassYear> schoolLabClassYears = schoolLabClassYearMapper.selectList(lqw);
//查询所有已保存已分配实验室的年级实验室预约
SchoolLabClassYearVo labClassYearVo = new SchoolLabClassYearVo();
labClassYearVo.setDeclareStates(declareStates);
List<SchoolLabClassYearVo> schoolLabClassYears = schoolLabClassYearMapper.selectSchoolLabClassYearList(labClassYearVo);
//查询所有已保存已分配实验室的教师个人实验申请
SchoolTeacherExperimentApplyVo teacherExperimentApplyVo = new SchoolTeacherExperimentApplyVo();
teacherExperimentApplyVo.setDeclareStates(declareStates);
List<SchoolTeacherExperimentApplyVo> teacherExperimentApplyVoList = teacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyList(teacherExperimentApplyVo);
//在时间范围内的年级实验室预约id集合 //在时间范围内的年级实验室预约id集合
List<Long> labClassYearIds = new ArrayList<>(); List<Long> labClassYearIds = new ArrayList<>();
//在时间范围内的教师个人实验申请id集合
List<Long> teacherExperimentIds = new ArrayList<>();
//筛选在计划时间范围内的年级实验室预约 //筛选在计划时间范围内的年级实验室预约
for (SchoolLabClassYear schoolLabClassYear : schoolLabClassYears) { for (SchoolLabClassYearVo schoolLabClassYear : schoolLabClassYears) {
//开始时间 //开始时间
Date startTime = schoolLabClassYear.getPlannedStartTime(); Date startTime = schoolLabClassYear.getPlannedStartTime();
//结束时间 //结束时间
...@@ -311,10 +376,43 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -311,10 +376,43 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
if ((startTime.after(plannedStartTime) && startTime.before(plannedEndTime)) || (endTime.after(plannedStartTime) && endTime.before(plannedEndTime))){ if ((startTime.after(plannedStartTime) && startTime.before(plannedEndTime)) || (endTime.after(plannedStartTime) && endTime.before(plannedEndTime))){
labClassYearIds.add(schoolLabClassYear.getId()); labClassYearIds.add(schoolLabClassYear.getId());
} }
if (startTime.equals(plannedStartTime) && endTime.equals(plannedEndTime)){
labClassYearIds.add(schoolLabClassYear.getId());
}
} }
//筛选在计划时间范围内的教师个人实验申请
for (SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo : teacherExperimentApplyVoList) {
//开始时间
Date startTime = schoolTeacherExperimentApplyVo.getPlannedStartTime();
//结束时间
Date endTime = schoolTeacherExperimentApplyVo.getPlannedEndTime();
if ((startTime.after(plannedStartTime) && startTime.before(plannedEndTime)) || (endTime.after(plannedStartTime) && endTime.before(plannedEndTime))){
teacherExperimentIds.add(schoolTeacherExperimentApplyVo.getId());
}
if (startTime.equals(plannedStartTime) && endTime.equals(plannedEndTime)){
teacherExperimentIds.add(schoolTeacherExperimentApplyVo.getId());
}
}
List<Long> labIds = new ArrayList<>();
if (labClassYearIds.size() > 0){ if (labClassYearIds.size() > 0){
//根据年级实验室预约主键id查询实验室id //根据年级实验室预约主键id查询实验室id
List<Long> labIds = schoolLabClassYearMapper.seletLabId(labClassYearIds); List<Long> seletLabId = schoolLabClassYearMapper.seletLabId(labClassYearIds);
if (seletLabId.size() > 0){
labIds.addAll(seletLabId);
}
}
if (teacherExperimentIds.size() > 0){
//根据教师个人实验申请主键id查询实验室id
List<Long> labIds1 = schoolLabClassYearMapper.seletLabIds(teacherExperimentIds);
if (labIds1.size() > 0){
labIds.addAll(labIds1);
}
}
if (labIds.size() > 0){
for (SchoolLab schoolLab : schoolLabs) { for (SchoolLab schoolLab : schoolLabs) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("labId",schoolLab.getId()); map.put("labId",schoolLab.getId());
......
...@@ -6,6 +6,8 @@ import com.ruoyi.common.core.domain.entity.SysUser; ...@@ -6,6 +6,8 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
...@@ -29,7 +31,8 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> ...@@ -29,7 +31,8 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
@Autowired @Autowired
private SchoolLabMapper schoolLabMapper; private SchoolLabMapper schoolLabMapper;
@Autowired
private SysUserMapper sysUserMapper;
/** /**
* 查询实验室 * 查询实验室
* *
...@@ -49,12 +52,17 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> ...@@ -49,12 +52,17 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
* @return 实验室 * @return 实验室
*/ */
@Override @Override
public List<SchoolLabVo> selectSchoolLabList(SchoolLabVo schoolLabVo) public List<SchoolLabVo> selectSchoolLabList(SchoolLabVo schoolLabVo,Long userId)
{ {
SysUser user = null;
List<SchoolLabVo> list = new ArrayList<>(); List<SchoolLabVo> list = new ArrayList<>();
//获取当前登录用户 //获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser(); if (null == userId){
user = SecurityUtils.getLoginUser().getUser();
}else {
user = sysUserMapper.selectUserById(userId);
}
//获取用户角色集合 //获取用户角色集合
List<SysRole> roles = user.getRoles(); List<SysRole> roles = user.getRoles();
......
...@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.StringUtils; ...@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
...@@ -57,6 +58,11 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -57,6 +58,11 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
return schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo); return schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo);
} }
@Override
public List<SchoolTeacherExperimentApplyVo> getTeacherList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo) {
return schoolTeacherExperimentApplyMapper.getTeacherList(schoolTeacherExperimentApplyVo);
}
/** /**
* 新增教师个人实验申请 * 新增教师个人实验申请
* *
...@@ -138,4 +144,34 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -138,4 +144,34 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
} }
return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo); return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo);
} }
/**
* 上传实验结果附件
* @param schoolTeacherExperimentApplyVo
* @return
*/
@Override
public int experimentResult(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo) {
//教师个人实验申请id
Long id = schoolTeacherExperimentApplyVo.getId();
//附件信息集合
List<SchoolAccessory> schoolAccessoryList = schoolTeacherExperimentApplyVo.getSchoolAccessoryList();
List<SchoolAccessory> list = new ArrayList<>();
for (SchoolAccessory schoolAccessory : schoolAccessoryList) {
schoolAccessory.setBusinessId(id);
schoolAccessory.setModuleName("教师-教师个人实验申请");
schoolAccessory.setAccessoryType("教师个人实验结果附件");
schoolAccessory.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolAccessory.setCreateTime(DateUtils.getNowDate());
list.add(schoolAccessory);
}
if (list.size() > 0){
schoolTeacherExperimentApplyMapper.batchSchoolAccessory(list);
}
SchoolTeacherExperimentApply schoolTeacherExperimentApply = new SchoolTeacherExperimentApply();
schoolTeacherExperimentApply.setId(id);
schoolTeacherExperimentApply.setState("1");
return schoolTeacherExperimentApplyMapper.updateById(schoolTeacherExperimentApply);
}
} }
...@@ -10,19 +10,26 @@ import com.ruoyi.common.exception.ServiceException; ...@@ -10,19 +10,26 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory; import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import yangtz.cs.liu.campus.mapper.accessory.AccessoryMapper; import yangtz.cs.liu.campus.mapper.accessory.AccessoryMapper;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolExperimentPlanMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabClassYearMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabClassYearMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabClassYearRelationMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabClassYearRelationMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo; import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo;
/** /**
...@@ -42,7 +49,11 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -42,7 +49,11 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
private SchoolLabClassYearRelationMapper schoolLabClassYearRelationMapper; private SchoolLabClassYearRelationMapper schoolLabClassYearRelationMapper;
@Autowired @Autowired
private AccessoryMapper accessoryMapper; private AccessoryMapper accessoryMapper;
@Autowired
private ISchoolExperimentPlanService schoolExperimentPlanService;
@Autowired
private SchoolClassMapper schoolClassMapper;
/** /**
* 查询教师实验室申请 * 查询教师实验室申请
* *
...@@ -133,9 +144,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -133,9 +144,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
@Override @Override
public List<Map<String, Object>> getTeacherLab(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) { public List<Map<String, Object>> getTeacherLab(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) {
//判断实验时间是否在计划之间之内 //判断实验时间是否在计划之间之内
LambdaQueryWrapper<SchoolLabClassYear> wrapper = new LambdaQueryWrapper<>(); SchoolLabClassYearVo schoolLabClassYear = schoolLabClassYearMapper.selectSchoolLabClassYearById(schoolTeacherLabApplyVo.getLabClassYearId());
wrapper.eq(SchoolLabClassYear::getId,schoolTeacherLabApplyVo.getLabClassYearId());
SchoolLabClassYear schoolLabClassYear = schoolLabClassYearMapper.selectOne(wrapper);
//计划开始时间 //计划开始时间
Date plannedStartTime = schoolLabClassYear.getPlannedStartTime(); Date plannedStartTime = schoolLabClassYear.getPlannedStartTime();
//计划结束时间 //计划结束时间
...@@ -195,8 +204,14 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -195,8 +204,14 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
* @return * @return
*/ */
@Override @Override
public List<Map<String, Object>> getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) { public List<Map<String, Object>> getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo,SysUser sysUser) {
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = null;
if (null == sysUser){
user = SecurityUtils.getLoginUser().getUser();
}else {
user = sysUser;
}
//如果是管理员,返回该实验计划所有班级 //如果是管理员,返回该实验计划所有班级
if (user.isAdmin()){ if (user.isAdmin()){
return schoolTeacherLabApplyMapper.getTeacherClassAll(schoolTeacherLabApplyVo); return schoolTeacherLabApplyMapper.getTeacherClassAll(schoolTeacherLabApplyVo);
...@@ -411,9 +426,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -411,9 +426,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
throw new ServiceException("已存在该班级此次实验申请"); throw new ServiceException("已存在该班级此次实验申请");
} }
//判断实验时间是否在计划之间之内 //判断实验时间是否在计划之间之内
LambdaQueryWrapper<SchoolLabClassYear> wrapper = new LambdaQueryWrapper<>(); SchoolLabClassYearVo schoolLabClassYear = schoolLabClassYearMapper.selectSchoolLabClassYearById(schoolTeacherLabApplyVo.getLabClassYearId());
wrapper.eq(SchoolLabClassYear::getId,schoolTeacherLabApplyVo.getLabClassYearId());
SchoolLabClassYear schoolLabClassYear = schoolLabClassYearMapper.selectOne(wrapper);
//计划开始时间 //计划开始时间
Date plannedStartTime = schoolLabClassYear.getPlannedStartTime(); Date plannedStartTime = schoolLabClassYear.getPlannedStartTime();
//计划结束时间 //计划结束时间
...@@ -446,9 +459,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -446,9 +459,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
@Transactional @Transactional
public int updateSchoolTeacherLabApplyVo(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) { public int updateSchoolTeacherLabApplyVo(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) {
//判断实验时间是否在计划之间之内 //判断实验时间是否在计划之间之内
LambdaQueryWrapper<SchoolLabClassYear> wrapper = new LambdaQueryWrapper<>(); SchoolLabClassYearVo schoolLabClassYear = schoolLabClassYearMapper.selectSchoolLabClassYearById(schoolTeacherLabApplyVo.getLabClassYearId());
wrapper.eq(SchoolLabClassYear::getId,schoolTeacherLabApplyVo.getLabClassYearId());
SchoolLabClassYear schoolLabClassYear = schoolLabClassYearMapper.selectOne(wrapper);
//计划开始时间 //计划开始时间
Date plannedStartTime = schoolLabClassYear.getPlannedStartTime(); Date plannedStartTime = schoolLabClassYear.getPlannedStartTime();
//计划结束时间 //计划结束时间
...@@ -472,16 +483,40 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -472,16 +483,40 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
@Override @Override
public List<SchoolTeacherLabApplyVo> getTeacherExperimentList(ClassSituationVo one) { public List<SchoolTeacherLabApplyVo> getTeacherExperimentList(ClassSituationVo one) {
SchoolTeacherLabApplyVo schoolTeacherLabApply = new SchoolTeacherLabApplyVo(); SchoolTeacherLabApplyVo schoolTeacherLabApply = new SchoolTeacherLabApplyVo();
schoolTeacherLabApply.setLabClassYearId(one.getLabClassYearId().toString()); schoolTeacherLabApply.setLabClassYearId(one.getLabClassYearId());
schoolTeacherLabApply.setSchoolYear(one.getSchoolYear().toString()); schoolTeacherLabApply.setSchoolYear(one.getSchoolYear().toString());
schoolTeacherLabApply.setSemester(one.getSemester()); schoolTeacherLabApply.setSemester(one.getSemester());
schoolTeacherLabApply.setExperimentTime(StringUtils.isNull(one.getExperimentTime())? null: new Date(one.getExperimentTime())); schoolTeacherLabApply.setExperimentTime(StringUtils.isNull(one.getExperimentTime())? null: new Date(one.getExperimentTime()));
schoolTeacherLabApply.setState(one.getState()); schoolTeacherLabApply.setState(StringUtils.isNull(one.getState())? null: one.getState());
schoolTeacherLabApply.setClassName(one.getClassName()); schoolTeacherLabApply.setClassName(StringUtils.isNull(one.getClassName())? null: one.getClassName());
//1.已经进行的班级 //1.已经进行的班级
List<SchoolTeacherLabApplyVo> schoolTeacherLabApplies = schoolTeacherLabApplyMapper.selectSchoolTeacherLabApplyList( List<SchoolTeacherLabApplyVo> schoolTeacherLabApplies = schoolTeacherLabApplyMapper.selectSchoolTeacherLabApplyList(
schoolTeacherLabApply); schoolTeacherLabApply);
//2.找出未进行中得班级
SchoolLabClassYearVo schoolLabClassYearVo = schoolLabClassYearMapper.selectSchoolLabClassYearById(
one.getLabClassYearId());
SchoolExperimentPlanVo schoolExperimentPlanVo = schoolExperimentPlanService.selectSchoolExperimentPlanById(
schoolLabClassYearVo.getExperimentPlanId());
List<SchoolExperimentPlanClass> schoolExperimentPlanClassList = schoolExperimentPlanVo.getSchoolExperimentPlanClassList();
//有记录
List<String> nameList = schoolTeacherLabApplies.stream().map(o -> o.getClassId()).collect(Collectors.toList());
//无记录
List<Long> collect = schoolExperimentPlanClassList.stream()
.map(SchoolExperimentPlanClass::getClassId).collect(Collectors.toList());
List<String> classList = new ArrayList<>();
for (Long classId :collect){
if (!nameList.contains(classId.toString())){
classList.add(classId.toString());
}
}
classList.forEach(id ->{
SchoolTeacherLabApplyVo schoolTeacherLabApplyVo = new SchoolTeacherLabApplyVo();
schoolTeacherLabApplyVo.setClassId(id);
schoolTeacherLabApplyVo.setClassName(schoolClassMapper.selectById(id).getClassName());
schoolTeacherLabApplyVo.setState("0");
schoolTeacherLabApplies.add(schoolTeacherLabApplyVo);
});
return schoolTeacherLabApplies; return schoolTeacherLabApplies;
} }
...@@ -496,4 +531,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -496,4 +531,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
schoolTeacherLabApply); schoolTeacherLabApply);
return maps; return maps;
} }
} }
package yangtz.cs.liu.campus.service.organization;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationActivationRecord;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import java.util.List;
/**
* 社团活动记录Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolOrganizationActivationRecordService extends IService<SchoolOrganizationActivationRecord>
{
}
package yangtz.cs.liu.campus.service.organization;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationFc;
/**
* 社团风采Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolOrganizationFcService extends IService<SchoolOrganizationFc> {
}
package yangtz.cs.liu.campus.service.organization;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
/**
* 社团信息Service接口
*
* @author liul
* @date 2023-09-06
*/
public interface ISchoolOrganizationInfoService extends IService<SchoolOrganizationInfo> {
}
package yangtz.cs.liu.campus.service.organization;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
/**
* 社团成员Service接口
*
* @author liul
* @date 2023-09-06
*/
public interface ISchoolOrganizationMemberService extends IService<SchoolOrganizationMember>
{
}
package yangtz.cs.liu.campus.service.organization;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationSignin;
/**
* 社团报名审核Service接口
*
* @author liul
* @date 2023-09-06
*/
public interface ISchoolOrganizationSigninService extends IService<SchoolOrganizationSignin>
{
}
...@@ -2,7 +2,6 @@ package yangtz.cs.liu.campus.service.schoolLab; ...@@ -2,7 +2,6 @@ package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan; import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanMbVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import java.util.List; import java.util.List;
...@@ -32,6 +31,7 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP ...@@ -32,6 +31,7 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
* @return 实验计划集合 * @return 实验计划集合
*/ */
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
public List<Map<String,String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/** /**
* 新增实验计划 * 新增实验计划
...@@ -73,6 +73,13 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP ...@@ -73,6 +73,13 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
List<Map<String,Object>> getGrade(int schoolYear,Long userId); List<Map<String,Object>> getGrade(int schoolYear,Long userId);
/** /**
* 查询级部下拉框(搜索条件)
* @param schoolYear
* @return
*/
List<Map<String,Object>> getGradeList(int schoolYear);
/**
* 根据级部查询对应班级 * 根据级部查询对应班级
* @param gradeId * @param gradeId
* @return * @return
......
...@@ -40,6 +40,8 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear> ...@@ -40,6 +40,8 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear>
* @return 结果 * @return 结果
*/ */
public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear); public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear);
public List<String> getYearList();
public String getSub();
/** /**
* 修改年级实验室预约 * 修改年级实验室预约
......
...@@ -30,7 +30,7 @@ public interface ISchoolLabService extends IService<SchoolLab> ...@@ -30,7 +30,7 @@ public interface ISchoolLabService extends IService<SchoolLab>
* @param schoolLabVo 实验室 * @param schoolLabVo 实验室
* @return 实验室集合 * @return 实验室集合
*/ */
public List<SchoolLabVo> selectSchoolLabList(SchoolLabVo schoolLabVo); public List<SchoolLabVo> selectSchoolLabList(SchoolLabVo schoolLabVo,Long userId);
/** /**
* 新增实验室 * 新增实验室
......
...@@ -31,6 +31,14 @@ public interface ISchoolTeacherExperimentApplyService extends IService<SchoolTea ...@@ -31,6 +31,14 @@ public interface ISchoolTeacherExperimentApplyService extends IService<SchoolTea
public List<SchoolTeacherExperimentApplyVo> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo); public List<SchoolTeacherExperimentApplyVo> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo);
/** /**
* 查询教师个人实验申请列表
*
* @param schoolTeacherExperimentApplyVo 教师个人实验申请
* @return 教师个人实验申请集合
*/
public List<SchoolTeacherExperimentApplyVo> getTeacherList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo);
/**
* 新增教师个人实验申请 * 新增教师个人实验申请
* *
* @param schoolTeacherExperimentApply 教师个人实验申请 * @param schoolTeacherExperimentApply 教师个人实验申请
...@@ -69,4 +77,10 @@ public interface ISchoolTeacherExperimentApplyService extends IService<SchoolTea ...@@ -69,4 +77,10 @@ public interface ISchoolTeacherExperimentApplyService extends IService<SchoolTea
*/ */
int teacherExperimentLabs(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo); int teacherExperimentLabs(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo);
/**
* 上传实验结果附件
* @param schoolTeacherExperimentApplyVo
* @return
*/
int experimentResult(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo);
} }
package yangtz.cs.liu.campus.service.schoolLab; package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.entity.SysUser;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo; import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo;
...@@ -76,7 +77,8 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab ...@@ -76,7 +77,8 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
*/ */
List<Map<String, Object>> getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo); List<Map<String, Object>> getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo,
SysUser sysUser);
/** /**
* 上传附件 * 上传附件
......
package yangtz.cs.liu.campus.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/8 10:07
* @DESCRIPTION:
*/
@Data
public class ActivationRecordVo {
private Long cid;//社团id
private String theme;
}
package yangtz.cs.liu.campus.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/7 10:21
* @DESCRIPTION:
*/
@Data
public class Fb2Vo {
private Long id;
}
package yangtz.cs.liu.campus.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/8 9:44
* @DESCRIPTION:
*/
@Data
public class MemberListVo {
private Long cid;//社团id 必填
private String name;
private String classes;
private String grade;
}
package yangtz.cs.liu.campus.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/8 9:51
* @DESCRIPTION:
*/
@Data
public class SigninVo {
private Long cid; //社团id 必填
private String name;
private String classes;
private String grade;
}
package yangtz.cs.liu.campus.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/8 9:33
* @DESCRIPTION:
*/
@Data
public class StFcVo {
private Long cid; //社团id
private String theme; //主题
}
package yangtz.cs.liu.campus.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/7 11:28
* @DESCRIPTION:
*/
@Data
public class signinApprove2Vo {
private Long id;
/*1未审核 2同意 3不同意*/
private String status;
}
...@@ -26,6 +26,11 @@ public class ClassSituationVo { ...@@ -26,6 +26,11 @@ public class ClassSituationVo {
*/ */
private String grade; private String grade;
/** /**
* 学科(1物理,2化学,3生物)
*/
private String sub;
/**
* 班级id * 班级id
*/ */
private Long classId; private Long classId;
...@@ -78,5 +83,8 @@ public class ClassSituationVo { ...@@ -78,5 +83,8 @@ public class ClassSituationVo {
* 完成比例 * 完成比例
*/ */
private Integer proportion; private Integer proportion;
/**
* 移动端模糊查询
*/
private String querText;
} }
package yangtz.cs.liu.campus.vo.schoolLab; package yangtz.cs.liu.campus.vo.schoolLab;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Date; import java.util.Date;
...@@ -87,6 +88,8 @@ public class SchoolLabClassYearVo extends BaseEntity ...@@ -87,6 +88,8 @@ public class SchoolLabClassYearVo extends BaseEntity
@Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配") @Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配")
private String declareState; private String declareState;
private List<String> declareStates;
/** 申报人id */ /** 申报人id */
private Long applyId; private Long applyId;
...@@ -104,4 +107,11 @@ public class SchoolLabClassYearVo extends BaseEntity ...@@ -104,4 +107,11 @@ public class SchoolLabClassYearVo extends BaseEntity
/** 年级实验室预约和实验室关系信息 */ /** 年级实验室预约和实验室关系信息 */
private List<SchoolLabClassYearRelation> schoolLabClassYearRelationList; private List<SchoolLabClassYearRelation> schoolLabClassYearRelationList;
private Long userId;
/**
* 时间数组
*/
private String[] dateArrays;
} }
...@@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs;
/** /**
...@@ -81,6 +82,8 @@ public class SchoolTeacherExperimentApplyVo extends BaseEntity ...@@ -81,6 +82,8 @@ public class SchoolTeacherExperimentApplyVo extends BaseEntity
@Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配") @Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配")
private String declareState; private String declareState;
private List<String> declareStates;
/** 申报人id */ /** 申报人id */
private Long applyId; private Long applyId;
...@@ -93,6 +96,12 @@ public class SchoolTeacherExperimentApplyVo extends BaseEntity ...@@ -93,6 +96,12 @@ public class SchoolTeacherExperimentApplyVo extends BaseEntity
@Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime; private Date applyTime;
/** 完成状态(0未完成,1已完成) */
private String state;
/** 教师个人实验申请实验室列表 */ /** 教师个人实验申请实验室列表 */
private List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabsList; private List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabsList;
/** 附件信息集合 */
private List<SchoolAccessory> schoolAccessoryList;
} }
...@@ -28,7 +28,7 @@ public class SchoolTeacherLabApplyVo extends BaseEntity ...@@ -28,7 +28,7 @@ public class SchoolTeacherLabApplyVo extends BaseEntity
private Long id; private Long id;
/** 年级实验室预约主键id */ /** 年级实验室预约主键id */
private String labClassYearId; private Long labClassYearId;
/** 教师id */ /** 教师id */
private Long teacherId; private Long teacherId;
...@@ -81,6 +81,10 @@ public class SchoolTeacherLabApplyVo extends BaseEntity ...@@ -81,6 +81,10 @@ public class SchoolTeacherLabApplyVo extends BaseEntity
@Excel(name = "章节内容") @Excel(name = "章节内容")
private String chapterContent; private String chapterContent;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
/** 实验时间 */ /** 实验时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实验时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "实验时间", width = 30, dateFormat = "yyyy-MM-dd")
...@@ -126,4 +130,10 @@ public class SchoolTeacherLabApplyVo extends BaseEntity ...@@ -126,4 +130,10 @@ public class SchoolTeacherLabApplyVo extends BaseEntity
/** 附件信息集合 */ /** 附件信息集合 */
private List<SchoolAccessory> schoolAccessoryList; private List<SchoolAccessory> schoolAccessoryList;
/**
* 移动端查询参数
*/
private String querText;
} }
...@@ -3,10 +3,12 @@ package yangtz.cs.liu.wechat.controller.experiment; ...@@ -3,10 +3,12 @@ package yangtz.cs.liu.wechat.controller.experiment;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
...@@ -52,9 +54,12 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -52,9 +54,12 @@ public class ExperimentAdministratorsControoler extends BaseController {
@GetMapping("/classYear/list") @GetMapping("/classYear/list")
public AjaxResult classYearList(SchoolLabClassYearVo schoolLabClassYearVo) public AjaxResult classYearList(SchoolLabClassYearVo schoolLabClassYearVo)
{ {
schoolLabClassYearVo.setSub(schoolLabClassYearService.getSub());
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo)); return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo));
} }
/** /**
* 年级实验申请详情 * 年级实验申请详情
*/ */
...@@ -62,24 +67,38 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -62,24 +67,38 @@ public class ExperimentAdministratorsControoler extends BaseController {
@GetMapping(value = "/classYear/{id}") @GetMapping(value = "/classYear/{id}")
public AjaxResult classYearGetInfo(@PathVariable("id") Long id) public AjaxResult classYearGetInfo(@PathVariable("id") Long id)
{ {
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearById(id)); return AjaxResult.success(schoolLabClassYearService.getLabClassYearById(id));
} }
/** /**
* 年级实验申请分配 * 年级实验申请分配
*/ */
@PutMapping("/classYear/update") @PutMapping("/classYear/update")
public AjaxResult classYearUpdate(@RequestBody SchoolLabClassYear schoolLabClassYear) public AjaxResult classYearUpdate(@RequestBody SchoolLabClassYearVo schoolLabClassYear)
{ throws ParseException {
return toAjax(schoolLabClassYearService.updateSchoolLabClassYear(schoolLabClassYear)); SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd");
//截取时间
String[] dateArrays = schoolLabClassYear.getDateArrays();
String dateArray = dateArrays[0];
String dateArray1 = dateArrays[1];
Date stDate = ft.parse(dateArray);
Date enDate = ft.parse(dateArray1);
schoolLabClassYear.setPlannedStartTime(stDate);
schoolLabClassYear.setPlannedEndTime(enDate);
return toAjax(schoolLabClassYearService.updateLabClassYear(schoolLabClassYear));
} }
/** /**
* 教师实验室预约列表 * 教师实验室预约列表
*/ */
@GetMapping(value = "/teacher/list") @GetMapping(value = "/teacher/list")
public AjaxResult teacherList(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) public AjaxResult teacherList(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo)
{ {
schoolTeacherLabApplyVo.setSub(schoolLabClassYearService.getSub());
return AjaxResult.success(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo)); return AjaxResult.success(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo));
} }
...@@ -97,6 +116,7 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -97,6 +116,7 @@ public class ExperimentAdministratorsControoler extends BaseController {
@PutMapping("/teacher/update") @PutMapping("/teacher/update")
public AjaxResult teacherUpdate(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply) public AjaxResult teacherUpdate(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply)
{ {
schoolTeacherLabApply.setApplyState("1");
return toAjax(schoolTeacherLabApplyService.updateById(schoolTeacherLabApply)); return toAjax(schoolTeacherLabApplyService.updateById(schoolTeacherLabApply));
} }
...@@ -107,6 +127,7 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -107,6 +127,7 @@ public class ExperimentAdministratorsControoler extends BaseController {
@GetMapping(value = "/apply/list") @GetMapping(value = "/apply/list")
public AjaxResult applyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo) public AjaxResult applyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo)
{ {
schoolTeacherExperimentApplyVo.setSub(schoolLabClassYearService.getSub());
return AjaxResult.success(schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo)); return AjaxResult.success(schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo));
} }
...@@ -114,9 +135,9 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -114,9 +135,9 @@ public class ExperimentAdministratorsControoler extends BaseController {
* 个人实验室审批 * 个人实验室审批
*/ */
@PutMapping("/apply/update") @PutMapping("/apply/update")
public AjaxResult applyUpdate(@RequestBody SchoolTeacherExperimentApply schoolTeacherExperimentApply) public AjaxResult applyUpdate(@RequestBody SchoolTeacherExperimentApplyVo schoolTeacherExperimentApply)
{ {
return toAjax(schoolTeacherExperimentApplyService.updateById(schoolTeacherExperimentApply)); return toAjax(schoolTeacherExperimentApplyService.teacherExperimentLabs(schoolTeacherExperimentApply));
} }
/** /**
...@@ -138,6 +159,10 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -138,6 +159,10 @@ public class ExperimentAdministratorsControoler extends BaseController {
return AjaxResult.success(classSituationVos); return AjaxResult.success(classSituationVos);
} }
/** /**
* 实验室完成详情 * 实验室完成详情
*/ */
......
package yangtz.cs.liu.wechat.controller.experiment; package yangtz.cs.liu.wechat.controller.experiment;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import java.util.Calendar;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo; import yangtz.cs.liu.campus.vo.schoolLab.ClassSituationVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
...@@ -34,6 +42,35 @@ public class ExperimentLevelController extends BaseController { ...@@ -34,6 +42,35 @@ public class ExperimentLevelController extends BaseController {
private ISchoolTeacherLabApplyService schoolTeacherLabApplyService; private ISchoolTeacherLabApplyService schoolTeacherLabApplyService;
@Autowired
private ISchoolGradeService schoolGradeService;
@Autowired
private ISchoolGradeService gradeService;
/**
* 获取当前学年+学期
*/
@GetMapping("/getSemester")
public AjaxResult getSemester(){
AjaxResult ajaxResult = AjaxResult.success();
Calendar cal = Calendar.getInstance();
//获取当前年月
int month = cal.get(Calendar.MONTH) + 1;
//设置当前学期
String term = "1";
//2-7为第二学期,8-1为第一学期
//如果当前月份小于8月,则该学年应为当前年-1 到 当前年,例如当前年月为2023年7月,则该学年为2022-2023年的第二学期
if (month >= 2 && month < 8) {
term = "2";
}
int schoolYear = schoolGradeService.isNewSchoolYear();
ajaxResult.put("semester",term);
ajaxResult.put("schoolYear",schoolYear);
return ajaxResult;
}
@Log(title = "年级实验室预约", businessType = BusinessType.INSERT) @Log(title = "年级实验室预约", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolLabClassYear schoolLabClassYear) public AjaxResult add(@RequestBody SchoolLabClassYear schoolLabClassYear)
...@@ -49,7 +86,8 @@ public class ExperimentLevelController extends BaseController { ...@@ -49,7 +86,8 @@ public class ExperimentLevelController extends BaseController {
@GetMapping("/pxperimentPlanList") @GetMapping("/pxperimentPlanList")
public AjaxResult pxperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo) public AjaxResult pxperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo)
{ {
return AjaxResult.success(schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo)); schoolExperimentPlanVo.setSub(schoolLabClassYearService.getSub());
return AjaxResult.success(schoolExperimentPlanService.selectNameByVo(schoolExperimentPlanVo));
} }
/** /**
* 获取实验计划详细信息 * 获取实验计划详细信息
...@@ -60,13 +98,50 @@ public class ExperimentLevelController extends BaseController { ...@@ -60,13 +98,50 @@ public class ExperimentLevelController extends BaseController {
return AjaxResult.success(schoolExperimentPlanService.selectSchoolExperimentPlanById(id)); return AjaxResult.success(schoolExperimentPlanService.selectSchoolExperimentPlanById(id));
} }
@Log(title = "年级预约详情", businessType = BusinessType.INSERT)
@GetMapping("getInfo/{id}")
public AjaxResult getClassInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearById(id));
}
/**
* 获取人员级部
*/
@GetMapping("/getGrades")
public AjaxResult getGrade(SchoolLabClassYearVo schoolLabClassYearVo)
{ //获取最新学年
int schoolYear = gradeService.isNewSchoolYear();
return AjaxResult.success(schoolExperimentPlanService.getGrade(schoolYear,schoolLabClassYearVo.getUserId()));
}
/**
* 获取学年下拉表
*/
@GetMapping("/gradeYear")
public AjaxResult gradeYear()
{
return AjaxResult.success(schoolLabClassYearService.getYearList());
}
/**
* 申报
*/
@PutMapping("/report")
public AjaxResult applyReport( @RequestBody SchoolLabClassYear schoolLabClassYear)
{
schoolLabClassYear.setDeclareState("1");
return toAjax(schoolLabClassYearService.updateById(schoolLabClassYear));
}
/** /**
*获取级部预约列表 *获取级部预约列表
*/ */
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(SchoolLabClassYearVo schoolLabClassYear) public AjaxResult list(SchoolLabClassYearVo schoolLabClassYear)
{ {
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYear)); return AjaxResult.success(schoolLabClassYearService.getLabClassYear(schoolLabClassYear));
} }
/** /**
...@@ -122,7 +197,7 @@ public class ExperimentLevelController extends BaseController { ...@@ -122,7 +197,7 @@ public class ExperimentLevelController extends BaseController {
} }
/** /**
* 实验室完成详情 *实验室完成详情
*/ */
@GetMapping("/teacherExperimentList") @GetMapping("/teacherExperimentList")
public AjaxResult teacherExperimentList(ClassSituationVo classSituationVo){ public AjaxResult teacherExperimentList(ClassSituationVo classSituationVo){
...@@ -138,4 +213,13 @@ public class ExperimentLevelController extends BaseController { ...@@ -138,4 +213,13 @@ public class ExperimentLevelController extends BaseController {
return AjaxResult.success(teacherExperimentList); return AjaxResult.success(teacherExperimentList);
} }
/**
* 获取教师所在级部id
*/
@GetMapping("/getGrade/{userId}")
public AjaxResult getGrade(@PathVariable("userId") Long userId) {
return AjaxResult.success(schoolGradeService.getGradeId(userId));
}
} }
package yangtz.cs.liu.wechat.controller.experiment; package yangtz.cs.liu.wechat.controller.experiment;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.framework.util.UserInfoUtil;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
...@@ -55,11 +59,11 @@ public class TeacherExperimentController extends BaseController { ...@@ -55,11 +59,11 @@ public class TeacherExperimentController extends BaseController {
* 老师申请实验室 * 老师申请实验室
*/ */
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply) public AjaxResult add(@RequestBody SchoolTeacherLabApplyVo schoolTeacherLabApply)
{ {
schoolTeacherLabApply.setState("0"); schoolTeacherLabApply.setState("0");
schoolTeacherLabApply.setApplyState("0"); schoolTeacherLabApply.setApplyState("0");
return toAjax(schoolTeacherLabApplyService.save(schoolTeacherLabApply)); return toAjax(schoolTeacherLabApplyService.insertSchoolTeacherLabApplyVo(schoolTeacherLabApply));
} }
/** /**
* 获取实验计划详细信息 * 获取实验计划详细信息
...@@ -71,6 +75,34 @@ public class TeacherExperimentController extends BaseController { ...@@ -71,6 +75,34 @@ public class TeacherExperimentController extends BaseController {
} }
/** /**
* 获取实验室状态
*/
@GetMapping(value = "/getTeacherLab")
public AjaxResult getclassYearInfo(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo)
{
return AjaxResult.success(schoolTeacherLabApplyService.getTeacherLab(schoolTeacherLabApplyVo));
}
@Autowired
UserInfoUtil userInfoUtil;
@Autowired
ISysUserService userService;
/**
* 获取班级
*/
@GetMapping(value = "/getTeacherClass")
public AjaxResult getTeacherClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo)
{
Long userId = userInfoUtil.getMpLoginUser().getUserId();
SysUser sysUser = userService.selectUserById(userId);
return AjaxResult.success(schoolTeacherLabApplyService.getTeacherClass(schoolTeacherLabApplyVo,sysUser));
}
/**
* 实验室申请记录 * 实验室申请记录
*/ */
@GetMapping(value = "/list") @GetMapping(value = "/list")
......
package yangtz.cs.liu.wechat.controller.experiment;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.UserInfoUtil;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabVo;
/**
* 实验室
*/
@RestController
@RequestMapping("/wx/schoolLab")
public class WxSchoolLabControoler extends BaseController {
@Autowired
private ISchoolLabService schoolLabService;
@Autowired
private UserInfoUtil userInfoUtil;
/**
* 查询实验室列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolLabVo schoolLabVo)
{
startPage();
Long teacherUserId = userInfoUtil.getMpLoginUser().getUserId();
List<SchoolLabVo> list = schoolLabService.selectSchoolLabList(schoolLabVo,teacherUserId);
return getDataTable(list);
}
/**
* 获取实验室详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolLabService.selectSchoolLabById(id));
}
/**
* 新增实验室
*/
@Log(title = "实验室", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolLab schoolLab)
{
return toAjax(schoolLabService.insertSchoolLab(schoolLab));
}
/**
* 修改实验室
*/
@Log(title = "实验室", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolLab schoolLab)
{
return toAjax(schoolLabService.updateSchoolLab(schoolLab));
}
/**
* 删除实验室
*/
@Log(title = "实验室", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolLabService.deleteSchoolLabByIds(ids));
}
/**
* 获取实验室负责人下拉框
* @return
*/
@GetMapping("/getLabAdmin")
public AjaxResult getLabAdmin(){
return AjaxResult.success(schoolLabService.getLabAdmin());
}
/**
* 实验室管理员-获取学科下拉框
* @return
*/
@GetMapping("/getSub")
public AjaxResult getSub(){
return AjaxResult.success(schoolLabService.getSub());
}
}
package yangtz.cs.liu.wechat.controller.organization;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.UserInfoUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationSignin;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationInfoService;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationSigninService;
import yangtz.cs.liu.wechat.vo.organization.SchoolOrganizationInfoListVo;
import yangtz.cs.liu.wechat.vo.organization.WxOrganizationSigninVo;
import java.util.ArrayList;
import java.util.List;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/7 14:43
* @DESCRIPTION: 移动端社团信息获取Controller
*/
@RestController
@RequestMapping("/wx/info")
public class WxSchoolOrganizationController extends BaseController {
@Autowired
private ISchoolOrganizationInfoService schoolOrganizationInfoService;
@Autowired
private ISchoolOrganizationSigninService schoolOrganizationSigninService;
@Autowired
private ISchoolOrganizationMemberService schoolOrganizationMemberService;
@Autowired
private UserInfoUtil userInfoUtil;
/**
* 查询社团信息列表
*/
@GetMapping("/getInfo")
public AjaxResult getInfo()
{
ArrayList<SchoolOrganizationInfoListVo> myList = new ArrayList<>();
// String studentName = userInfoUtil.getMpLoginUser().getStudentName();
// String studentIdCard = userInfoUtil.getMpLoginUser().getStudentIdCard();
Long userId = userInfoUtil.getMpLoginUser().getUserId();
LambdaQueryWrapper<SchoolOrganizationInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(SchoolOrganizationInfo::getDelFlag,"0");
wrapper.orderByDesc(SchoolOrganizationInfo::getCreateTime);
List<SchoolOrganizationInfo> list = schoolOrganizationInfoService.list(wrapper);
if (list!=null && list.size()>0){
for (int i = 0; i < list.size(); i++) {
SchoolOrganizationInfo info = list.get(i);
Long id = info.getId();
LambdaQueryWrapper<SchoolOrganizationMember> wrapper2 = Wrappers.lambdaQuery();
wrapper2.eq(SchoolOrganizationMember::getCid,id)
.eq(SchoolOrganizationMember::getUserId,userId);
// .eq(StringUtils.isNotEmpty(studentName),SchoolOrganizationMember::getName,studentName)
// .eq(StringUtils.isNotEmpty(studentIdCard),SchoolOrganizationMember::getCardid,studentIdCard);
SchoolOrganizationMember one = schoolOrganizationMemberService.getOne(wrapper2);
SchoolOrganizationInfoListVo vo = new SchoolOrganizationInfoListVo();
BeanUtils.copyProperties(info,vo);
if (one!=null){
vo.setIsattend("1");//表示已加入该社团
}else {
vo.setIsattend("2");
}
myList.add(vo);
}
}
return AjaxResult.success(myList);
}
/**
* 根据id获取社团信息详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationInfoService.getById(id));
}
/**
* 通过当前登录人查询当前社团的报名情况
* */
@GetMapping("/search")
public AjaxResult search (@RequestBody WxOrganizationSigninVo vo){
Long userId = userInfoUtil.getMpLoginUser().getUserId();
//根据当前登录人 查询当前社团的报名状态
LambdaQueryWrapper<SchoolOrganizationSignin> wrapper = Wrappers.lambdaQuery();
wrapper.eq(SchoolOrganizationSignin::getUserId,userId)
.eq(StringUtils.isNotEmpty(vo.getOrgName()),SchoolOrganizationSignin::getOrgName,vo.getOrgName())
.eq(SchoolOrganizationSignin::getDelFlag,"0");
return AjaxResult.success(schoolOrganizationSigninService.getOne(wrapper));
}
/**
* 新增社团报名或重新报名
*/
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationSignin schoolOrganizationSignin)
{
schoolOrganizationSignin.setStatus("1"); //适配重新报名的情况
return toAjax(schoolOrganizationSigninService.save(schoolOrganizationSignin));
}
}
package yangtz.cs.liu.wechat.vo.organization;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/7 16:39
* @DESCRIPTION:
*/
@Data
public class SchoolOrganizationInfoListVo {
private Long id;
/** 社团名称 */
private String name;
/** 指导老师 */
private String teachers;
/** 指导老师id */
private String teachersId;
/** 社团宗旨 */
private String aim;
/** 社团简介 */
private String intro;
/** 成员人数 */
private String num;
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date createTime;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date updateTime;
/** 是否 删除 */
private String delFlag;
//是否参加 (1为已加入 2未加入)
private String isattend;
}
package yangtz.cs.liu.wechat.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/7 15:31
* @DESCRIPTION:
*/
@Data
public class SchoolOrganizationInfoVo {
}
package yangtz.cs.liu.wechat.vo.organization;
import lombok.Data;
/**
* @USER: liul 18266668098
* @DATE: 2023/9/7 15:03
* @DESCRIPTION:
*/
@Data
public class WxOrganizationSigninVo {
//社团名称
private String orgName;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationActivationRecordMapper">
<resultMap type="SchoolOrganizationActivationRecord" id="SchoolOrganizationActivationRecordResult">
<result property="id" column="id" />
<result property="theme" column="theme" />
<result property="beginTime" column="begin_time" />
<result property="endTime" column="end_time" />
<result property="fzr" column="fzr" />
<result property="cid" column="cid" />
<result property="orgName" column="org_name" />
<result property="remark" column="remark" />
<result property="file" column="file" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationFcMapper">
<resultMap type="SchoolOrganizationFc" id="SchoolOrganizationFcResult">
<result property="id" column="id" />
<result property="cid" column="cid" />
<result property="theme" column="theme" />
<result property="file" column="file" />
<result property="isfb" column="isfb" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationInfoMapper">
<resultMap type="SchoolOrganizationInfo" id="SchoolOrganizationInfoResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="teachers" column="teachers" />
<result property="teachersId" column="teachers_id" />
<result property="aim" column="aim" />
<result property="intro" column="intro" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="num" column="num" />
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationMemberMapper">
<resultMap type="SchoolOrganizationMember" id="SchoolOrganizationMemberResult">
<result property="id" column="id" />
<result property="cid" column="cid" />
<result property="orgName" column="org_name" />
<result property="name" column="name" />
<result property="sex" column="sex" />
<result property="cardid" column="cardid" />
<result property="grade" column="grade" />
<result property="classes" column="classes" />
<result property="orgPosition" column="org_position" />
<result property="phone" column="phone" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="userId" column="user_id" />
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.organization.SchoolOrganizationSigninMapper">
<resultMap type="SchoolOrganizationSignin" id="SchoolOrganizationSigninResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="sex" column="sex" />
<result property="grade" column="grade" />
<result property="classes" column="classes" />
<result property="hobby" column="hobby" />
<result property="phone" column="phone" />
<result property="reason" column="reason" />
<result property="status" column="status" />
<result property="cid" column="cid" />
<result property="orgName" column="org_name" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="userId" column="user_id" />
</resultMap>
</mapper>
\ No newline at end of file
...@@ -65,6 +65,34 @@ ...@@ -65,6 +65,34 @@
order by create_time DESC order by create_time DESC
</select> </select>
<select id="selectNameByVo" parameterType="SchoolExperimentPlanVo" resultType="Map">
SELECT id,experiment_name FROM school_experiment_plan
<where>
del_flag = '0'
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and grade like concat('%', #{grade}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
<if test="experimentName != null and experimentName != ''"> and experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and chapter_content = #{chapterContent}</if>
<if test="isAppointment != null and isAppointment != ''"> and is_appointment = #{isAppointment}</if>
<if test="plannedStartTime != null and plannedStartTime != ''"> and planned_start_time = #{plannedStartTime}</if>
<if test="plannedEndTime != null and plannedEndTime != ''"> and planned_end_time = #{plannedEndTime}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and experiment_use_goods = #{experimentUseGoods}</if>
<if test="gradeIds != null">
and grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
</where>
order by create_time DESC
</select>
<select id="getExperimentList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult"> <select id="getExperimentList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
<include refid="selectSchoolExperimentPlanVo"/> <include refid="selectSchoolExperimentPlanVo"/>
<where> <where>
......
...@@ -72,6 +72,12 @@ ...@@ -72,6 +72,12 @@
#{gradeId} #{gradeId}
</foreach> </foreach>
</if> </if>
<if test="declareStates != null">
and declare_state in
<foreach item="declareState" collection="declareStates" open="(" separator="," close=")">
#{declareState}
</foreach>
</if>
</where> </where>
order by create_time DESC order by create_time DESC
</select> </select>
...@@ -236,6 +242,13 @@ ...@@ -236,6 +242,13 @@
</foreach> </foreach>
</select> </select>
<select id="seletLabIds" resultType="Long">
select lab_id from school_teacher_experiment_apply_labs where del_flag = '0' and teacher_experiment_apply_id in
<foreach item="teacherExperimentId" collection="teacherExperimentIds" open="(" separator="," close=")">
#{teacherExperimentId}
</foreach>
</select>
<select id="getTeacherLabList" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult"> <select id="getTeacherLabList" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult">
<include refid="selectSchoolLabClassYearVo"/> <include refid="selectSchoolLabClassYearVo"/>
WHERE del_flag = '0' WHERE del_flag = '0'
...@@ -261,17 +274,19 @@ ...@@ -261,17 +274,19 @@
left join school_lab_class_year lcy on lcy.experiment_plan_id = ep.id left join school_lab_class_year lcy on lcy.experiment_plan_id = ep.id
WHERE ep.del_flag=0 and epc.del_flag=0 AND ep.school_year = #{schoolYear} AND ep.semester=#{semester} WHERE ep.del_flag=0 and epc.del_flag=0 AND ep.school_year = #{schoolYear} AND ep.semester=#{semester}
and ep.grade_id = #{gradeId} and ep.grade_id = #{gradeId}
<if test="querText !=null and querText != ''">
concat(class_name ,experiment_time) LIKE like concat('%', #{querText}, '%')
</if>
GROUP BY epc.class_id GROUP BY epc.class_id
</select> </select>
<select id="getexperimentList" parameterType="ClassSituationVo" resultType="ClassSituationVo"> <select id="getexperimentList" parameterType="ClassSituationVo" resultType="ClassSituationVo">
SELECT ep.id,ep.experiment_name,ep.school_year,ep.grade, ep.semester,COUNT(pc.class_id) as count FROM school_experiment_plan ep SELECT ep.id,ep.experiment_name,ep.school_year,ep.grade,cy.id labClassYearId, ep.semester,COUNT(pc.class_id) as count,ep.sub FROM school_experiment_plan ep
LEFT JOIN school_experiment_plan_class pc on ep.id = pc.experiment_plan_id LEFT JOIN school_experiment_plan_class pc on ep.id = pc.experiment_plan_id
LEFT JOIN school_lab_class_year cy on cy.experiment_plan_id = ep.id
WHERE ep.school_year = #{schoolYear} AND ep.semester =#{semester} AND ep.del_flag = 0 AND pc.del_flag=0 WHERE ep.school_year = #{schoolYear} AND ep.semester =#{semester} AND ep.del_flag = 0 AND pc.del_flag=0
<if test="experimentName != null "> and ep.experiment_name like concat('%', #{experimentName}, '%') </if> <if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if>
<if test="grade != null "> and ep.grade = #{grade}</if>
GROUP BY ep.id GROUP BY ep.id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<result property="applyId" column="apply_id" /> <result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" /> <result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" /> <result property="applyTime" column="apply_time" />
<result property="state" column="state" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
</resultMap> </resultMap>
<sql id="selectSchoolTeacherExperimentApplyVo"> <sql id="selectSchoolTeacherExperimentApplyVo">
select id, sub, grade_id, grade, school_year, semester, planned_start_time, planned_end_time, experiment_name, experiment_classify, experiment_use_goods, declare_state, apply_id, apply_name, apply_time, create_by, create_time, update_by, update_time, del_flag from school_teacher_experiment_apply select id, sub, grade_id, grade, school_year, semester, planned_start_time, planned_end_time, experiment_name, experiment_classify, experiment_use_goods, declare_state, apply_id, apply_name, apply_time, state, create_by, create_time, update_by, update_time, del_flag from school_teacher_experiment_apply
</sql> </sql>
<select id="selectSchoolTeacherExperimentApplyList" parameterType="SchoolTeacherExperimentApplyVo" resultMap="SchoolTeacherExperimentApplyVoResult"> <select id="selectSchoolTeacherExperimentApplyList" parameterType="SchoolTeacherExperimentApplyVo" resultMap="SchoolTeacherExperimentApplyVoResult">
...@@ -51,6 +52,43 @@ ...@@ -51,6 +52,43 @@
<if test="applyId != null "> and apply_id = #{applyId}</if> <if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if> <if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if> <if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="state != null "> and state = #{state}</if>
<if test="subs != null ">
and sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")">
#{sub}
</foreach>
</if>
<if test="declareStates != null">
and declare_state in
<foreach item="declareState" collection="declareStates" open="(" separator="," close=")">
#{declareState}
</foreach>
</if>
</where>
</select>
<select id="getTeacherList" parameterType="SchoolTeacherExperimentApplyVo" resultMap="SchoolTeacherExperimentApplyVoResult">
<include refid="selectSchoolTeacherExperimentApplyVo"/>
<where>
del_flag = '0'
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="plannedStartTime != null and plannedEndTime != null">
and planned_start_time between #{plannedStartTime} and #{plannedEndTime}
and planned_end_time between #{plannedStartTime} and #{plannedEndTime}
</if>
<if test="experimentName != null and experimentName != ''"> and experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and experiment_use_goods = #{experimentUseGoods}</if>
<if test="declareState != null and declareState != ''"> and declare_state != #{declareState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="state != null "> and state = #{state}</if>
<if test="subs != null "> <if test="subs != null ">
and sub in and sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")"> <foreach item="sub" collection="subs" open="(" separator="," close=")">
...@@ -82,6 +120,7 @@ ...@@ -82,6 +120,7 @@
<if test="applyId != null">apply_id,</if> <if test="applyId != null">apply_id,</if>
<if test="applyName != null">apply_name,</if> <if test="applyName != null">apply_name,</if>
<if test="applyTime != null">apply_time,</if> <if test="applyTime != null">apply_time,</if>
<if test="state != null">state,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
...@@ -103,6 +142,7 @@ ...@@ -103,6 +142,7 @@
<if test="applyId != null">#{applyId},</if> <if test="applyId != null">#{applyId},</if>
<if test="applyName != null">#{applyName},</if> <if test="applyName != null">#{applyName},</if>
<if test="applyTime != null">#{applyTime},</if> <if test="applyTime != null">#{applyTime},</if>
<if test="state != null">#{state},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
...@@ -128,6 +168,7 @@ ...@@ -128,6 +168,7 @@
<if test="applyId != null">apply_id = #{applyId},</if> <if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyName != null">apply_name = #{applyName},</if> <if test="applyName != null">apply_name = #{applyName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if> <if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="state != null">state = #{state},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
...@@ -165,4 +206,11 @@ ...@@ -165,4 +206,11 @@
( #{item.id}, #{item.teacherExperimentApplyId}, #{item.labId},#{item.labName}) ( #{item.id}, #{item.teacherExperimentApplyId}, #{item.labId},#{item.labName})
</foreach> </foreach>
</insert> </insert>
<insert id="batchSchoolAccessory">
insert into school_accessory( id, business_id, module_name, accessory_type, accessory_url, accessory_name, create_by,create_time) values
<foreach item="item" index="index" collection="list" separator=",">
( 0, #{item.businessId}, #{item.moduleName}, #{item.accessoryType}, #{item.accessoryUrl}, #{item.accessoryName}, #{item.createBy}, #{item.createTime})
</foreach>
</insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result property="classId" column="class_id" /> <result property="classId" column="class_id" />
<result property="className" column="class_name" /> <result property="className" column="class_name" />
<result property="chapterContent" column="chapter_content" /> <result property="chapterContent" column="chapter_content" />
<result property="experimentUseGoods" column="experiment_use_goods" />
<result property="experimentTime" column="experiment_time" /> <result property="experimentTime" column="experiment_time" />
<result property="section" column="section" /> <result property="section" column="section" />
<result property="labId" column="lab_id" /> <result property="labId" column="lab_id" />
...@@ -40,7 +41,13 @@ ...@@ -40,7 +41,13 @@
</sql> </sql>
<select id="selectSchoolTeacherLabApplyList" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult"> <select id="selectSchoolTeacherLabApplyList" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult">
<include refid="selectSchoolTeacherLabApplyVo"/> select tla.id, tla.lab_class_year_id, tla.experiment_classify, tla.experiment_plan_id,
tla.experiment_name, tla.sub, tla.grade_id, tla.grade, tla.school_year,
tla.semester, tla.class_id, tla.class_name, tla.chapter_content, lcy.experiment_use_goods, tla.experiment_time,
tla.section, tla.lab_id, tla.lab_name, tla.apply_state, tla.apply_id, tla.apply_name, tla.apply_time,
tla.remark,tla.state, tla.create_by, tla.create_time, tla.update_by, tla.update_time, tla.del_flag
from school_teacher_lab_apply tla
LEFT JOIN school_lab_class_year lcy ON tla.lab_class_year_id = lcy.id
<where> <where>
del_flag = '0' del_flag = '0'
<if test="labClassYearId != null and labClassYearId != ''"> and lab_class_year_id = #{labClassYearId}</if> <if test="labClassYearId != null and labClassYearId != ''"> and lab_class_year_id = #{labClassYearId}</if>
...@@ -64,13 +71,13 @@ ...@@ -64,13 +71,13 @@
<if test="applyTime != null "> and apply_time = #{applyTime}</if> <if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="state != null "> and state = #{state}</if> <if test="state != null "> and state = #{state}</if>
<if test="subs != null "> <if test="subs != null ">
and sub in and tla.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")"> <foreach item="sub" collection="subs" open="(" separator="," close=")">
#{sub} #{sub}
</foreach> </foreach>
</if> </if>
</where> </where>
order by create_time DESC order by tla.create_time DESC
</select> </select>
<select id="selectSchoolTeacherLabApplyById" parameterType="Long" resultMap="SchoolTeacherLabApplyVoResult"> <select id="selectSchoolTeacherLabApplyById" parameterType="Long" resultMap="SchoolTeacherLabApplyVoResult">
...@@ -243,7 +250,10 @@ ...@@ -243,7 +250,10 @@
COUNT(CASE WHEN experiment_classify = 2 THEN experiment_classify END) as sycount, COUNT(CASE WHEN experiment_classify = 2 THEN experiment_classify END) as sycount,
COUNT(CASE WHEN experiment_classify = 3 THEN experiment_classify END) as sjcount, COUNT(CASE WHEN experiment_classify = 3 THEN experiment_classify END) as sjcount,
COUNT(CASE WHEN state = 1 THEN state END) ywccount COUNT(CASE WHEN state = 1 THEN state END) ywccount
FROM school_teacher_lab_apply WHERE school_year = #{schoolYear} AND semester = #{semester} FROM school_teacher_lab_apply WHERE school_year = #{schoolYear}
<if test="semester != null and semester != ''">
AND semester = #{semester}
</if>
<if test="applyName != null and applyName != ''"> <if test="applyName != null and applyName != ''">
AND apply_name like concat('%', #{applyName}, '%') AND apply_name like concat('%', #{applyName}, '%')
</if> </if>
...@@ -297,7 +307,7 @@ ...@@ -297,7 +307,7 @@
</select> </select>
<select id="selectTeacherList" resultType="Map" parameterType="SchoolTeacherLabApply"> <select id="selectTeacherList" resultType="Map" parameterType="SchoolTeacherLabApply">
SELECT apply_name applyName,school_year schoolYear, SELECT apply_name applyName,school_year schoolYear,sub,
COUNT(CASE WHEN experiment_classify = 1 THEN experiment_classify END) as fzcount, COUNT(CASE WHEN experiment_classify = 1 THEN experiment_classify END) as fzcount,
COUNT(CASE WHEN experiment_classify = 2 THEN experiment_classify END) as sycount, COUNT(CASE WHEN experiment_classify = 2 THEN experiment_classify END) as sycount,
COUNT(CASE WHEN experiment_classify = 3 THEN experiment_classify END) as sjcount, COUNT(CASE WHEN experiment_classify = 3 THEN experiment_classify END) as sjcount,
......
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
order by school_year asc order by school_year asc
</select> </select>
<select id="getYearList" resultType="String">
select sg.school_year from school_grade sg
where del_flag = '0'
GROUP BY sg.school_year
order by school_year asc
</select>
<select id="getGradeIdsByYear" resultType="java.lang.Long"> <select id="getGradeIdsByYear" resultType="java.lang.Long">
select distinct id from school_grade select distinct id from school_grade
where del_flag = '0' and school_year = #{schoolYear} where del_flag = '0' and school_year = #{schoolYear}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment