Commit 717c8180 by Cat
parents 90b42ed9 a34b7e02
import request from "@/utils/request";
//教师借用
//借用明细列表
export function getTeacherBorrow(query) {
return request({
url: "/schoolTeacherBorrow/selectInstrumentList",
method: "get",
params: query,
});
}
//新增教师借用
export function addTeacherBorrow(data) {
return request({
url: "/schoolTeacherBorrow/add",
method: "post",
data,
});
}
//查看教师借用列表
export function getTeacherBorrowlist(query) {
return request({
url: "/schoolTeacherBorrow/list",
method: "get",
params: query,
});
}
// 查看教师借用详情
export function getTeacherBorrowlxq(id) {
return request({
url: "/schoolTeacherBorrow/" + id,
method: "get",
});
}
//删除教师借用
export function deleteTeacherBorrow(ids) {
return request({
url: "/schoolTeacherBorrow/" + ids,
method: "delete",
data: ids,
});
}
import request from "@/utils/request";
//仓库仪器借用管理
//仓库仪器管理列表
export function getTeacherBorrow(query) {
return request({
url: "/schoolTeacherBorrow/selectBorrowInstrumentList",
method: "get",
params: query,
});
}
// 查看详情
export function getTeacherBorrowlxq(id) {
return request({
url: "/schoolTeacherBorrow/" + id,
method: "get",
});
}
//办理教师借用信息
export function teacherBorrow(data) {
return request({
url: "/schoolTeacherBorrow/edit",
method: "put",
data,
});
}
//归还教师借用仪器
export function getReturnInstrument(data) {
return request({
url: "/schoolTeacherBorrow/returnInstrument",
method: "post",
data,
});
}
import request from "@/utils/request";
//新增仪器药品分类
export function addInst(data) {
return request({
url: "/schoolInstrumentClassify/add",
method: "post",
data,
});
}
//修改仪器药品分类
export function editInst(data) {
return request({
url: "/schoolInstrumentClassify/edit",
method: "put",
data,
});
}
//查询仪器药品分类列表
export function getList(query) {
return request({
url: "/schoolInstrumentClassify/list",
method: "get",
params: query,
});
}
// 查看仪器药品分类详情
export function getInstxq(id) {
return request({
url: "/schoolInstrumentClassify/" + id,
method: "get",
});
}
//删除仪器药品分类
export function deleteInst(ids) {
return request({
url: "/schoolInstrumentClassify/" + ids,
method: "post",
data: ids,
});
}
import request from "@/utils/request";
//新增仪器
export function addInst(data) {
return request({
url: "/schoolInstrument/add",
method: "post",
data,
});
}
//修改仪器
export function editInst(data) {
return request({
url: "/schoolInstrument/edit",
method: "put",
data,
});
}
//查看仪器列表
export function getList(query) {
return request({
url: "/schoolInstrument/list",
method: "get",
params: query,
});
}
// 查询详情
export function getInstxq(id) {
return request({
url: "/schoolInstrument/" + id,
method: "get",
});
}
//删除仪器
export function deleteInst(ids) {
return request({
url: "/schoolInstrument/" + ids,
method: "delete",
data: ids,
});
}
//查看出入库明细列表
export function getListrk(query) {
return request({
url: "/schoolInstrumentDetail/list",
method: "get",
params: query,
});
}
//仪器库存修改
export function getInstrumentDetail(data) {
return request({
url: "/schoolInstrumentDetail/add",
method: "post",
data,
});
}
......@@ -15,7 +15,13 @@ export function getGrade() {
method: "get",
});
}
//获取级部下拉框(搜索条件);
export function getGradelist() {
return request({
url: "/experimentPlan/getGradeList",
method: "get",
});
}
//新增个人实验申请
export function addExperimentPlan(data) {
return request({
......@@ -39,13 +45,7 @@ export function deleteExperimentPlan(id) {
method: "post",
});
}
// 查询实验计划列表
export function getExperimentPlan(query) {
return request({
url: "/experimentPlan/list",
params: query,
});
}
// 查询个人实验申请列表
export function getApplylist(query) {
return request({
......@@ -55,7 +55,6 @@ export function getApplylist(query) {
});
}
//查看详情
export function getListxq(id) {
return request({
......@@ -63,3 +62,11 @@ export function getListxq(id) {
method: "get",
});
}
//查看详情
export function getResult(data) {
return request({
url: "/schoolTeacherExperimentApply/experimentResult",
method: "post",
data,
});
}
import request from "@/utils/request";
// 查看列表
export function getList(query) {
return request({
url: "/experimentPlan/gradeCountClass",
method: "get",
params: query,
});
}
// 查看班级完成详情
export function getClassDetailsxq(query) {
return request({
url: "/experimentPlan/getGradeClassDetails",
method: "get",
params: query,
});
}
//获取当前学年+学期
export function getSemester() {
return request({
url: "/experimentPlan/getSemester",
method: "get",
});
}
//获取级部下拉框(搜索条件);
export function getGradelist() {
return request({
url: "/experimentPlan/getGradeList",
method: "get",
});
}
import request from "@/utils/request";
// 查看列表
export function getList(query) {
return request({
url: "/experimentPlan/gradeCountExperiment",
method: "get",
params: query,
});
}
// 查看班级完成详情
export function getClassDetailsxq(query) {
return request({
url: "/experimentPlan/getClassDetails",
method: "get",
params: query,
});
}
//获取当前学年+学期
export function getSemester() {
return request({
url: "/experimentPlan/getSemester",
method: "get",
});
}
//获取级部下拉框(搜索条件);
export function getGradelist() {
return request({
url: "/experimentPlan/getGradeList",
method: "get",
});
}
\ No newline at end of file
......@@ -15,3 +15,10 @@ export function getExperimentPlaxq(id) {
method: "get",
});
}
//获取当前学年+学期
export function getSemester() {
return request({
url: "/experimentPlan/getSemester",
method: "get",
});
}
\ No newline at end of file
......@@ -39,3 +39,10 @@ export function deleteCompetition(id) {
method: "post",
});
}
//老师下拉框
export function getTeacher() {
return request({
url: "/schoolLabCompetition/getTeacher",
method: "get",
});
}
......@@ -26,3 +26,10 @@ export function getSemester() {
});
}
//获取级部下拉框(搜索条件);
export function getGradelist() {
return request({
url: "/experimentPlan/getGradeList",
method: "get",
});
}
......@@ -3,9 +3,15 @@ import request from "@/utils/request";
// 查看列表
export function getList(query) {
return request({
url: "/experimentPlan/getExperimentRecord",
url: "/experimentPlan/getCountTeacher",
method: "get",
params: query,
});
}
//获取当前学年+学期
export function getSemester() {
return request({
url: "/experimentPlan/getSemester",
method: "get",
});
}
<template>
<div>
<!-- 搜索条件 -->
<el-form
:model="queryForm"
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
style="margin-left: 15px; margin-top: 10px"
>
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="68px"
style="margin-left: 15px; margin-top: 10px">
<el-form-item label="申请人">
<el-input
v-model="queryForm.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="queryForm.name" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="借用学科">
<el-select
v-model="queryForm.name"
placeholder="请选择"
clearable
>
<el-select v-model="queryForm.name" placeholder="请选择" clearable>
<el-option> </el-option>
</el-select>
</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-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-row style="margin-left: 10px" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
@click="handAdd()"
v-hasPermi="['system:student:add']"
>新增
<el-button type="primary" size="mini" @click="handAdd()" v-hasPermi="['system:student:add']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
size="mini"
:disabled="single"
@click="handleDelete"
>删除
<el-button type="danger" size="mini" :disabled="single" @click="handleDelete">删除
</el-button>
</el-col>
</el-row>
<!-- 表格 -->
<el-table
stripe
:data="tableData"
border
style="width: 98%; margin-left: 15px"
@selection-change="handleSelectionChange"
>
<el-table stripe :data="tableData" border style="width: 98%; margin-left: 15px"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column
align="center"
type="index"
label="序号"
width="55"
/>
<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="借用明细" />
......@@ -90,48 +45,25 @@
<el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
@click="handleLook(scope.row)"
type="text"
size="small"
>详情</el-button
>
<el-button @click="handleLook(scope.row)" type="text" size="small">详情</el-button>
<el-button
@click="handleDelete(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="40%"
show-close
>
<el-dialog :title="title" :visible.sync="dialogTableVisible" width="40%" show-close>
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-row>
<el-col :span="12">
<el-form-item label="申请人">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="借用状态">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
>
<el-input v-model="form.name" placeholder="请输入" clearable>
</el-input>
</el-form-item>
</el-col>
......@@ -139,41 +71,25 @@
<el-row>
<el-col :span="12">
<el-form-item label="借用学科">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请时间">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="借用时间">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归还时间">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -181,27 +97,10 @@
<el-col>
<el-form-item label="借用明细">
<el-table stripe :data="tableData" border>
<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" 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>
</el-form-item>
</el-col>
......@@ -209,50 +108,28 @@
<el-row>
<el-col>
<el-form-item label="备注">
<el-input
v-model="form.name"
placeholder="请输入"
type="textarea"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" type="textarea" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<!-- 新增弹窗 -->
<el-dialog
:title="title"
:visible.sync="dialogTableOpen"
width="40%"
show-close
>
<el-dialog :title="title" :visible.sync="dialogTableOpen" width="40%" show-close>
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-row>
<el-col>
<el-form-item label="借用人">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="借用学科">
<el-select
v-model="name"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="(option, index) in options"
:key="index"
:label="option"
:value="option"
></el-option>
<el-select v-model="name" placeholder="请选择" style="width: 100%">
<el-option v-for="(option, index) in options" :key="index" :label="option"
:value="option"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -262,38 +139,15 @@
<el-col>
<el-form-item label="借用明细">
<el-col :span="1.5" style="margin-bottom: 5px">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handOpenAdd()"
v-hasPermi="['system:student:add']"
>新增
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handOpenAdd()"
v-hasPermi="['system:student:add']">新增
</el-button>
</el-col>
<el-table stripe :data="tableData" border>
<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" 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>
</el-form-item>
</el-col>
......@@ -301,57 +155,33 @@
<el-row>
<el-col>
<el-form-item label="备注">
<el-input
v-model="form.name"
placeholder="请输入"
type="textarea"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" type="textarea" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" @click="submitparentForm"
>确定</el-button
>
<el-button type="primary" @click="submitparentForm">确定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 借用明细弹窗 -->
<el-dialog
:title="title"
:visible.sync="dialogTableOpenAdd"
@selection-change="handleSelectionChange"
width="40%"
show-close
>
<el-dialog :title="title" :visible.sync="dialogTableOpenAdd" @selection-change="handleSelectionChange" width="40%"
show-close>
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-row>
<el-col :span="10">
<el-form-item label="仪器名称">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="仪器分类">
<el-select
v-model="name"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="(option, index) in AAA"
:key="index"
:label="option"
:value="option"
></el-option>
<el-select v-model="name" placeholder="请选择" style="width: 100%">
<el-option v-for="(option, index) in AAA" :key="index" :label="option"
:value="option"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -361,36 +191,12 @@
<el-col>
<el-form-item label="借用明细">
<el-table stripe :data="tableData" border>
<el-table-column
type="selection"
width="55"
></el-table-column>
<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 type="selection" width="55"></el-table-column>
<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>
</el-form-item>
</el-col>
......@@ -398,9 +204,7 @@
</el-form>
<div slot="footer">
<el-button type="primary" @click="submiopenForm"
>确定</el-button
>
<el-button type="primary" @click="submiopenForm">确定</el-button>
<el-button @click="cancelAdd">取 消</el-button>
</div>
</el-dialog>
......@@ -448,16 +252,16 @@ export default {
},
methods: {
// 搜索
getList() {},
getList() { },
// 重置
resetQuery() {},
resetQuery() { },
// 新增
handAdd() {
this.dialogTableOpen = true
this.title = '教师借用新增'
},
// 删除
handleDelete() {},
handleDelete() { },
// 详情
handleLook() {
this.dialogTableVisible = true
......@@ -491,5 +295,4 @@ export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div>
<!-- 搜索条件 -->
<el-form
:model="queryForm"
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<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-input v-model="queryForm.name" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="仪器分类">
<el-select
v-model="queryForm.name"
placeholder="请选择"
clearable
>
<el-select v-model="queryForm.name" placeholder="请选择" clearable>
<el-option> </el-option>
</el-select>
</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-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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handAdd()"
v-hasPermi="['system:student:add']"
>新增
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handAdd()"
v-hasPermi="['system:student:add']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:student:edit']"
>编辑
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['system:student:edit']">编辑
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
size="mini"
icon="el-icon-view"
:disabled="single"
@click="handleDelete"
>删除
<el-button type="danger" size="mini" icon="el-icon-view" :disabled="single" @click="handleDelete">删除
</el-button>
</el-col>
</el-row>
<!-- 表格 -->
<el-table
:data="tableData"
style="width: 100%"
row-key="name"
border
lazy
:load="load"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
v-model="selectedRows"
@selection-change="handleSelectionChange"
>
<el-table :data="tableData" style="width: 100%" row-key="name" border lazy :load="load"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" v-model="selectedRows"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
align="center"
type="index"
label="序号"
width="55"
/>
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column prop="name" label="仪器名称" width="180" />
<el-table-column prop="name" label="排序" width="180" />
<el-table-column prop="name" label="是否为消耗品" />
......@@ -105,50 +48,27 @@
<el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
@click="handleUpdate(scope.row)"
type="text"
size="small"
>编辑</el-button
>
<el-button @click="handleUpdate(scope.row)" type="text" size="small">编辑</el-button>
<el-button
@click="handleDelete(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="30%"
show-close
>
<el-dialog :title="title" :visible.sync="dialogTableVisible" width="30%" show-close>
<el-form :model="form" ref="form" size="small" label-width="108px">
<el-row>
<el-col :span="20">
<el-form-item label="上级分类">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="仪器名称">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
>
<el-input v-model="form.name" placeholder="请输入" clearable>
</el-input>
</el-form-item>
</el-col>
......@@ -156,11 +76,7 @@
<el-row>
<el-col :span="20">
<el-form-item label="排序">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -177,33 +93,21 @@
<el-row>
<el-col :span="20">
<el-form-item label="备注">
<el-input
v-model="form.name"
placeholder="请输入"
type="textarea"
clearable
></el-input>
<el-input v-model="form.name" placeholder="请输入" type="textarea" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" @click="submitparentForm"
>确定</el-button
>
<el-button type="primary" @click="submitparentForm">确定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 分页 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryForm.pageNum"
:limit.sync="queryForm.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize"
@pagination="getList" />
</div>
</template>
......@@ -247,9 +151,9 @@ export default {
},
methods: {
// 搜索
getList() {},
getList() { },
// 重置
resetQuery() {},
resetQuery() { },
//
load(tree, treeNode, resolve) {
setTimeout(() => {
......@@ -274,7 +178,7 @@ export default {
this.title = '仪器药品编辑'
},
// 删除
handleDelete() {},
handleDelete() { },
// 确定
submitparentForm() {
......@@ -299,6 +203,7 @@ export default {
margin-top: 15px;
margin-left: 10px;
}
.el-table {
margin-left: 10px;
}
......
<template>
<div>
<el-form
:model="queryForm"
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="78px">
<el-form-item label="仪器名称">
<el-input
v-model="queryForm.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="queryForm.instrumentName" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="仪器分类">
<el-input
v-model="queryForm.name"
placeholder="请输入实验名称"
clearable
></el-input>
<el-input v-model="queryForm.instrumentTypeId" 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-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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handAdd()"
v-hasPermi="['system:student:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:student:edit']"
>编辑
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
size="mini"
plain
icon="el-icon-view"
:disabled="single"
@click="handleLook"
>详情
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleOut"
v-hasPermi="['system:student:edit']"
>出库
</el-button>
<el-row class="mb8" :gutter="8">
<el-col :span="1.5" :offset="2.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handAdd()">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
size="mini"
plain
icon="el-icon-view"
:disabled="single"
@click="handleIn"
>入库
</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
@click="handleOut">出库</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
size="mini"
icon="el-icon-view"
:disabled="single"
@click="handleDelete"
>删除
</el-button>
<el-button type="info" size="mini" plain icon="el-icon-view" :disabled="single"
@click="handleIn">入库</el-button>
</el-col>
</el-row>
<!-- 表格 -->
<el-table
stripe
:data="tableData"
border
style="width: 98%"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<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 stripe :data="tableData" border style="width: 98%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="instrumentName" label="仪器名称" />
<el-table-column align="center" prop="instrumentTypeName" label="仪器分类" />
<el-table-column align="center" prop="instrumentModel" label="仪器型号" />
<el-table-column align="center" prop="instrumentNum" label="仪器数量" />
<el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
@click="handleLook(scope.row)"
type="text"
size="small"
>详情</el-button
><el-button
@click="handleUpdate(scope.row)"
type="text"
size="small"
>编辑</el-button
>
<el-button
@click="handleOut(scope.row)"
type="text"
size="small"
>出库</el-button
><el-button
@click="handleIn(scope.row)"
type="text"
size="small"
>入库</el-button
>
<el-button
@click="handleDelete(scope.row)"
type="text"
size="small"
>删除</el-button
>
<el-button @click="handleLook(scope.row)" type="text" size="small">详情</el-button>
<el-button @click="handleUpdate(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="handleOut(scope.row)" type="text" size="small">出库</el-button>
<el-button @click="handleIn(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="30%"
show-close
>
<!--仪器新增 弹窗 -->
<el-dialog :title="title" :visible.sync="dialogTableVisible" width="30%" show-close>
<el-form :model="form" ref="form" size="small" label-width="108px">
<el-row>
<el-col :span="20">
<el-form-item label="仪器名称">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.instrumentName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="仪器分类">
<el-select
v-model="form.name"
placeholder="请输入"
clearable
style="width: 100%"
>
<el-option> </el-option>
</el-select>
<el-col :span="16">
<el-form-item label="父分类编码" prop="parentId">
<treeselect v-model="postForm.parentId" :options="assetsList" :normalizer="normalizer"
placeholder="选择分类编码" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="仪器型号">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="form.instrumentModel" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="备注">
<el-input
v-model="form.name"
placeholder="请输入"
type="textarea"
clearable
></el-input>
<el-input v-model="form.remark" placeholder="请输入" type="textarea" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" @click="submitparentForm"
>确定</el-button
>
<el-button type="primary" @click="submitparentForm">确定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 仪器查看弹窗 -->
<el-dialog
title="仪器查看"
:visible.sync="dialogTablesee"
width="30%"
show-close
>
<el-form :model="form" ref="form" size="small" label-width="108px">
<el-row>
<el-col :span="20">
<el-form-item label="仪器名称">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="仪器分类">
<el-select
v-model="form.name"
placeholder="请输入"
clearable
style="width: 100%"
>
<el-option> </el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="仪器型号">
<el-input
v-model="form.name"
placeholder="请输入"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="备注">
<el-input
v-model="form.name"
placeholder="请输入"
type="textarea"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<!-- 仪器库存修改弹窗 -->
<el-dialog
title="仪器库存"
:visible.sync="dialogTableInventory"
width="30%"
show-close
>
<el-dialog title="仪器库存" :visible.sync="dialogTableInventory" width="30%" show-close>
<el-form :model="form" ref="form" size="small" label-width="108px">
<el-row>
<el-col :span="20">
<el-form-item label="仪器名称">
<el-input v-model="form.name"></el-input>
<el-input v-model="form.instrumentId"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="旧库存数量">
<el-input v-model="form.name"> </el-input>
<el-input v-model="form.oldStockNum"> </el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="变动类型">
<el-input
v-model="form.name"
placeholder="请输入"
></el-input>
<el-input v-model="form.variationType" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="变动数量">
<el-input v-model="form.name"></el-input>
<el-input v-model="form.variationType"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="新库存数量">
<el-input v-model="form.name"></el-input>
<el-input v-model="form.newStockNum"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="备注">
<el-input
v-model="form.name"
placeholder="请输入"
type="textarea"
clearable
></el-input>
<el-input v-model="form.remark" placeholder="请输入" type="textarea" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" @click="submitInventory"
>确定</el-button
>
<el-button type="primary" @click="submitInventory">确定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 分页 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryForm.pageNum"
:limit.sync="queryForm.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize"
@pagination="getList" />
</div>
</template>
<script>
import {
addInst,//新增仪器
editInst,//修改仪器
getList,//查看仪器列表
getInstxq,
deleteInst,
getListrk,
getInstrumentDetail
} from '@/api/smartSchool/InstrumentDrugAdministration/instrumentManagement'
import {
getProductCategory,//获取设备分类下拉框
} from '@/api/smartSchool/schoolProperty/classiFication.js'
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: 'instrumentManagement',
components: { Treeselect },
data() {
return {
queryForm: {
......@@ -379,10 +178,9 @@ export default {
},
//表格数据
tableData: [
{
name: 111222
}
],
sbflOptions: {},
title: '',
// 弹窗
form: {},
......@@ -400,11 +198,38 @@ export default {
multiple: true
}
},
created() {
this.getList();
this.enuqLeader();
},
methods: {
// 搜索
getList() {},
getList() {
this.loading = true
getList({ ...this.queryForm }).then(res => {
if (res.code == 200) {
this.total = res.total
this.tableData = res.rows;
console.log(this.tableData);
this.loading = false
}
})
},
//设备分类下拉框
enuqLeader() {
getProductCategory().then(((res) => {
if (res.code == 200) {
this.sbflOptions = res.data;
// console.log('this.sbflOptions', this.sbflOptions);
}
}))
},
// 重置
resetQuery() {},
resetQuery() {
this.getList();
},
// 详情
handleLook(row) {
this.dialogTablesee = true
......@@ -441,26 +266,22 @@ export default {
this.dialogTableInventory = false
},
//删除按钮操作
handleDelete(id) {
this.$confirm('此操作将永久删除该数据,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
handleDelete(row) {
console.log(row);
this.$modal.confirm('是否确认删除选中数据?').then(() => {
this.$modal.loading('正在处理数据,请稍等...');
return deleteInst(row);
}).then(response => {
this.$modal.closeLoading();
this.$modal.msgSuccess("删除班级成功");
this.getList();
}).catch(error => {
this.$modal.closeLoading();
})
.then(() => {})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除!'
})
})
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
}
}
}
</script>
......@@ -470,9 +291,11 @@ export default {
margin-top: 15px;
margin-left: 10px;
}
.el-table {
margin-left: 10px;
}
.el-row {
margin-left: 10px;
}
......
......@@ -4,17 +4,12 @@
<el-form-item label="实验名称">
<el-input v-model="queryForm.experimentName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="计划开始时间" prop="plannedStartTime">
<el-date-picker v-model="form.startTime" type="month" placeholder="选择月" value-format="yyyy-MM">
<el-form-item label="计划开始时间">
<el-date-picker v-model="queryForm.startTime" type="date" placeholder="选择" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="计划结束时间" prop="plannedEndTime">
<el-date-picker v-model="form.endTime" type="month" placeholder="选择月" value-format="yyyy-MM">
<el-date-picker v-model="queryForm.endTime" type="date" placeholder="选择月" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="申报状态">
<el-select v-model="queryForm.applyState" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.declare_state" :key="dict.value" :label="dict.label"
......@@ -28,7 +23,11 @@
</el-form>
<el-table :data="tableData" border style="width: 100%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="sub" label="学科" />
<el-table-column align="center" prop="sub" label="学科">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.lab_sub, row.sub) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="schoolYearSemester" label="学年" />
<el-table-column align="center" prop="className" label="班级" />
<el-table-column align="center" prop="experimentTime" label="实验时间" />
......@@ -49,22 +48,41 @@
</template>
</el-table-column>
<el-table-column align="center" prop="applyState" label="申报状态" />
<el-table-column align="center" prop="applyState" label="申报状态">
<template slot-scope="{ row }">
<div v-if="row.applyState === '1'">已确认</div>
<div v-else-if="row.applyState === '0'">未确认</div>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
<el-button size="small" type="text" @click="upload.open = true">导入</el-button>
<template v-if="scope.row.applyState === '0'">
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
</template>
<template v-else-if="scope.row.applyState === '1' && scope.row.state === '0'">
<div>
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
<el-button size="small" type="text" @click="upload.open = true">上传附件</el-button>
</div>
</template>
<template v-else>
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
</template>
</template>
</el-table-column>
</el-table>
<!-- 查看弹窗 -->
<el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="60%">
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-form :model="form" ref="form" size="small" label-width="110px" :disabled="isEdit">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
......@@ -105,7 +123,10 @@
</el-col>
<el-col :span="10">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
......@@ -134,7 +155,7 @@
</el-col>
<el-col :span="10">
<el-form-item label="申报状态">
<el-input v-model="form.state" placeholder="请输入" clearable />
<el-input :value="getStatusText(form.applyState)" disabled placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
......@@ -180,7 +201,12 @@ export default {
return {
baseUrl: process.env.VUE_APP_BASE_API,
queryForm: {
pageNum: 1,
pageSize: 10,
experimentName: "",
applyState: "",
startTime: "",
endTime: "",
},
accessoryUrl: '',
accessoryName: '',
......@@ -212,6 +238,8 @@ export default {
url:
process.env.VUE_APP_BASE_API + "/common/upload",
},
applyState: '', // 表单是否可以修改、
isEdit: true,
total: 0,
dialogTableVisible: false,
}
......@@ -220,11 +248,19 @@ export default {
this.getList();
},
methods: {
getStatusText(applyState) {
if (applyState === '0') {
return "未确认";
} else if (applyState === '1') {
return "已确认";
}
},
//表单查询
getList() {
getTeacherlabList().then(res => {
getTeacherlabList(this.queryForm).then(res => {
if (res.code == 200) {
this.tableData = res.rows;
this.total = res.total;
this.tableData = res.rows.map(item => {
item.accessoryList = item.schoolAccessoryList; // 将附件信息赋值给accessoryList属性
return item;
......@@ -241,11 +277,20 @@ export default {
getTeacherLab(id).then(response => {
this.form = response.data;
this.fileList = response.data.schoolAccessoryList;
this.isEdit = true;
})
},
resetQuery() {
this.getList();
this.queryForm = {
pageNum: 1,
pageSize: 10,
experimentName: "",
applyState: "",
startTime: "",
endTime: "",
},
this.getList();
},
//提交按钮
submitFileForm(data) {
......
......@@ -25,17 +25,21 @@
</el-form>
<el-table :data="tableData" border style="width: 100%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="sub" label="学科" />
<el-table-column align="center" prop="grade" label="级部" />
<el-table-column align="center" prop="schoolYearSemester" label="学期" />
<el-table-column align="center" prop="plannedTime" label="实验时间" />
<el-table-column align="center" prop="experimentName" label="实验名称" />
<el-table-column align="center" prop="experimentClassify" label="实验分类">
<el-table-column align="center" prop="sub" label="学科" width="60">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.lab_sub, row.sub) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="grade" label="级部" width="100" />
<el-table-column align="center" prop="schoolYearSemester" label="学期" width="120" />
<el-table-column align="center" prop="plannedTime" label="实验时间" width="200" />
<el-table-column align="center" prop="experimentName" label="实验名称" show-overflow-tooltip />
<el-table-column align="center" prop="experimentClassify" label="实验分类" width="90">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.experiment_classify, row.experimentClassify) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="chapterContent" label="章节内容" />
<el-table-column align="center" prop="chapterContent" label="章节内容" show-overflow-tooltip />
<el-table-column align="center" prop="schoolLabClassYearRelationList" label="实验室">
<template slot-scope="scope">
<div v-if="scope.row.schoolLabClassYearRelationList">
......@@ -43,7 +47,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="experimentUseGoods" label="实验用品" />
<el-table-column align="center" prop="experimentUseGoods" label="实验用品" show-overflow-tooltip />
<el-table-column align="center" fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button @click="handleApply(scope.row)" type="text" size="small">申请</el-button>
......@@ -52,46 +56,60 @@
</el-table>
<!-- 分配实验室弹窗 -->
<el-dialog title="教师实验室申请" :visible.sync="dialogTableVisible" width="70%">
<el-form :model="form" ref="form" size="small" label-width="100px">
<el-form :model="form" ref="form" size="small" :rules="rules" label-width="100px">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="实验名称">
<el-form-item label="实验名称" prop="experimentName">
<el-input v-model="form.experimentName" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="实验内容">
<el-form-item label="实验内容" prop="chapterContent">
<el-input v-model="form.chapterContent" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="级部">
<el-form-item label="级部" prop="grade">
<el-input v-model="form.grade" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学年">
<el-form-item label="学年" prop="schoolYear">
<el-input v-model="form.schoolYear" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="班级">
<el-form-item label="学期" prop="semester">
<el-select v-model="form.semester" placeholder="请选择学期" style="width: 100%;">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="班级" prop="classId">
<el-select v-model="form.classId" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="(item, index) in classData" :key="index" :label="item.className"
:value="item.classId"></el-option>
......@@ -99,27 +117,25 @@
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="节次">
<el-form-item label="节次" prop="section">
<el-select v-model="form.section" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.course_arrange" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="20">
<el-col :span="10">
<el-form-item label="申请时间" prop="experimentTime">
<el-date-picker v-model="form.experimentTime" type="date" placeholder="选择"
value-format="yyyy-MM-dd" style="width: 100%;" @change="getTeacherLab">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="20" style="display: flex;">
<el-form-item label="实验室选择">
<el-form-item label="实验室选择" prop="selectedLabId">
<el-radio-group v-model="form.selectedLabId">
<el-radio v-for="classItem in labList" :key="classItem.labId" :label="classItem.labId">
{{ classItem.labName }} - {{ classItem.useState }}
......@@ -131,7 +147,7 @@
</el-row>
<el-row :gutter="30">
<el-col :span="24">
<el-form-item label="备注">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
......@@ -163,17 +179,20 @@ import {
getLabplanxlk,//获取实验名称下拉框
} from '@/api/smartSchool/gradeWork/laboratoryManagement/laboratoryAppointment';
export default {
dicts: ['experiment_classify', 'course_arrange'],
dicts: ['experiment_classify', 'lab_sub', 'course_arrange', 'declare_state'],
name: 'index',
data() {
return {
queryForm: {
pageNum: 1,
pageSize: 10,
declareState: "",
schoolYear: "",
semester: "",
experimentClassify: "",
experimentName: "",
},
//班级
classData: [],
//实验名称
......@@ -196,6 +215,41 @@ export default {
experimentTime: "",
section: "",
},
rules: {
experimentName: [
{ required: true, message: "实验名称不能为空", trigger: "blur" }
],
experimentClassify: [
{ required: true, message: "实验分类不能为空", trigger: "blur" }
],
chapterContent: [
{ required: true, message: "章节内容不能为空", trigger: "blur" }
],
sub: [
{ required: true, message: "学科不能为空", trigger: "blur" }
],
grade: [
{ required: true, message: "级部不能为空", trigger: "blur" }
],
schoolYear: [
{ required: true, message: "学年不能为空", trigger: "blur" }
],
semester: [
{ required: true, message: "学期不能为空", trigger: "blur" }
],
classId: [
{ required: true, message: "班级不能为空", trigger: "blur" }
],
section: [
{ required: true, message: "节次不能为空", trigger: "blur" }
],
experimentTime: [
{ required: true, message: "实验时间不能为空", trigger: "blur" }
],
selectedLabId: [
{ required: true, message: "实验室不能为空", trigger: "blur" }
],
},
total: 0,
dialogTableVisible: false,
}
......@@ -285,32 +339,34 @@ export default {
console.log('response', response);
this.loading = false;
this.getClasslist();
this.dialogTableVisible = true;
});
},
// 表单重置
reset() {
this.form = {
labClassYearId: "",
experimentPlanId: "",
experimentName: "",
chapterContent: "",
experimentClassify: "",
sub: "",
gradeId: "",
grade: "",
schoolYea: "",
this.queryForm = {
pageNum: 1,
pageSize: 10,
declareState: "",
schoolYear: "",
semester: "",
classId: "",
section: "",
experimentTime: "",
labId: "",
remark: "",
};
this.resetForm("form");
experimentClassify: "",
experimentName: "",
},
this.resetForm("queryForm");
},
resetQuery() {
this.getList();
this.queryForm = {
pageNum: 1,
pageSize: 10,
declareState: "",
schoolYear: "",
semester: "",
experimentClassify: "",
experimentName: "",
},
this.getList();
},
/** 提交按钮 */
submitForm() {
......
......@@ -3,7 +3,7 @@
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="88px">
<el-form-item label="实验级部">
<el-select v-model="queryForm.gradeId" placeholder="请选择级部" clearable>
<el-option v-for="(item, index) in gradeList" :key="index" :label="item.gradeName"
<el-option v-for="(item, index) in gradeLists" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -29,53 +29,85 @@
</el-form>
<el-table :data="tableData" border style="width: 100%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="sub" label="学科" />
<el-table-column align="center" prop="sub" label="学科">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.lab_sub, row.sub) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="grade" label="级部" />
<el-table-column align="center" prop="schoolYear" label="学年" />
<el-table-column align="center" prop="plannedTime" label="规划时间" />
<el-table-column align="center" prop="plannedTime" label="规划时间" width="200" />
<el-table-column align="center" prop="experimentName" label="实验名称" />
<el-table-column align="center" prop="experimentClassify" label="实验分类" />
<el-table-column align="center" prop="experimentClassify" label="实验分类">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.experiment_classify, row.experimentClassify) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="experimentUseGoods" label="实验用品" />
<el-table-column align="center" prop="schoolTeacherExperimentApplyLabsList" label="实验室" />
<el-table-column align="center" prop="schoolTeacherExperimentApplyLabsList" label="实验室">
<template slot-scope="scope">
<div v-if="scope.row.schoolTeacherExperimentApplyLabsList">
{{ scope.row.schoolTeacherExperimentApplyLabsList.map(lab => lab.labName).join(", ") }}
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="schoolAccessoryList" label="实验结果" />
<el-table-column align="center" prop="declareState" label="申报状态" />
<el-table-column align="center" prop="declareState" label="申报状态">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.declare_state, row.declareState) }}</div>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="180">
<template slot-scope="{ row }">
<div>
<div v-if="row.declareState === '0'">
<el-button type="text" size="small" @click="handleOption(2, row)">查看</el-button>
<el-button type="text" size="small" @click="handleOption(1, row)">修改</el-button>
<el-button type="text" size="small" @click="handleDelete(row.id)">删除</el-button>
<el-button @click="handleResult(scope.row)" type="text" size="small">实验结果</el-button>
</div>
<div v-else-if="['3', '2', '1'].includes(row.declareState) && row.state === '1'">
<el-button type="text" size="small" @click="handleOption(2, row)">查看</el-button>
</div>
<div v-else-if="['3', '2', '1'].includes(row.declareState) && row.state === '0'">
<el-button type="text" size="small" @click="handleOption(2, row)">查看</el-button>
<el-button @click="handleResult(row)" type="text" size="small">实验结果</el-button>
</div>
</template>
</el-table-column>
</el-table>
<!-- 弹窗 -->
<el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="60%">
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-form :model="form" ref="form" size="small" :rules="rules" label-width="110px">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="级部">
<el-input v-model="form.grade" placeholder="请输入" clearable />
<el-form-item label="级部" prop="gradeId">
<el-select v-model="form.gradeId" placeholder="请选择级部" clearable style="width: 100%;">
<el-option v-for="(item, index) in gradeList" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="学年">
<el-form-item label="学年" prop="schoolYear">
<el-date-picker v-model="form.schoolYear" type="year" value-format="yyyy" placeholder="选择年"
style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学期">
<el-form-item label="学期" prop="semester">
<el-select v-model="form.semester" placeholder="请选择学期" style="width: 100%;">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
......@@ -102,37 +134,49 @@
</el-row>
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="实验名称">
<el-form-item label="实验名称" prop="experimentName">
<el-input v-model="form.experimentName" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="实验用品">
<el-form-item label="实验用品" prop="experimentUseGoods">
<el-input v-model="form.experimentUseGoods" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="cancle">取 消</el-button>
</div>
<div class="dialog-footer" style="text-align: center;">
<div class="dialog-footer" style="text-align: center;">
<el-button v-if="nowType === 0" type="primary" @click="save">保 存</el-button>
<el-button v-if="nowType === 0 || nowType === 1" type="primary" @click="submitForm">提 交</el-button>
<el-button v-if="nowType === 1" type="primary" @click="savexg">保 存</el-button>
<el-button type="primary" v-if="nowType === 2" @click="cancel">确 定</el-button>
<el-button v-if="nowType === 2" @click="cancel">取 消</el-button>
</div>
</div>
</el-dialog>
<!--查看弹窗 -->
<el-dialog title="申请信息" :visible.sync="open" width="60%">
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-form :model="form" ref="form" size="small" label-width="110px" :disabled="isEdit">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
......@@ -197,7 +241,10 @@
</el-col>
<el-col :span="10">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
......@@ -211,11 +258,18 @@
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="cancle">取 消</el-button>
<el-button type="primary" @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 导入弹出框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<FileUploadlab @input="getFileList" :limit="1" :value="fileList"></FileUploadlab>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm">确 定</el-button>
<el-button @click="upload.open = false">取 消</el-button>
</div>
</el-dialog>
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize"
@pagination="getList" />
</div>
......@@ -225,26 +279,40 @@
import {
getNewYear,//获取学年+学期
getGrade,// 查询级部
getGradelist,//级部搜索
addExperimentPlan,//新增个人实验申请
updateExperimentPlan,// 修改个人实验申请
deleteExperimentPlan,// 删除个人实验申请
getExperimentPlan,// 查询实验计划列表
getApplylist,// 查询个人实验申请列表
getListxq,//查看详情
getResult,//附件
} from '@/api/smartSchool/classTeacherWork/laboratoryManagement/personalLaboratoryapp';
import FileUploadlab from '@/components/FileUploadlab';
import { getToken } from '@/utils/auth';
export default {
name: 'index',
dicts: ['experiment_classify', 'lab_sub', 'declare_state'],
components: {
FileUploadlab
},
data() {
return {
baseUrl: process.env.VUE_APP_BASE_API,
queryForm: {
pageNum: 1,
pageSize: 10,
gradeId: "",
experimentName: "",
plannedStartTime: "",
plannedEndTime: "",
},
//表格数据
tableData: [
],
fileList: [],
nowType: 0, // 0新增、1编辑、2查看
isEdit: false,
form: {
id: '',
sub: "",
......@@ -258,40 +326,72 @@ export default {
experimentClassify: "",
experimentUseGoods: "",
declareState: "",
state: "",
},
upload: {
// 是否显示弹出层(学生导入)
open: false,
// 弹出层标题(学生导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的学生数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/school/student/importData'
},
schoolTeacherExperimentApplyLabsList: [],
//级部
gradeList: [],
gradeLists: [],
total: 0,
dialogTableVisible: false,
open: false,
rules: {
sub: [
{ required: true, message: "学科不能为空", trigger: "blur" }
],
gradeId: [
{ required: true, message: "级部不能为空", trigger: "blur" }
],
schoolYear: [
{ required: true, message: "学年不能为空", trigger: "blur" }
],
semester: [
{ required: true, message: "学期不能为空", trigger: "blur" }
],
experimentClassify: [
{ required: true, message: "实验分类不能为空", trigger: "blur" }
],
experimentName: [
{ required: true, message: "实验名称不能为空", trigger: "blur" }
],
experimentUseGoods: [
{ required: true, message: "实验用品不能为空", trigger: "blur" }
],
plannedStartTime: [
{ required: true, message: "开始时间不能为空", trigger: "blur" }
],
plannedEndTime: [
{ required: true, message: "结束时间不能为空", trigger: "blur" }
],
},
}
},
created() {
this.getSemesterAndList();
this.getList();
this.getGradelist();
this.getGrade();
},
methods: {
async getSemesterAndList() {
await this.getSemester(); // 等待获取学年和学期信息
this.getList(); // 获取数据列表
},
getSemester() {
return new Promise((resolve, reject) => {
getNewYear()
.then(response => {
this.form.semester = response.semester;
this.form.schoolYear = response.schoolYear + '';
resolve(); // 成功获取学年和学期信息
})
.catch(error => {
console.log(error);
reject(error);
});
});
},
getList() {
getApplylist(this.queryParams)
getApplylist(this.queryForm)
.then(response => {
this.tableData = response.rows;
console.log('response', response);
......@@ -312,6 +412,15 @@ export default {
});
},
//查询级部搜索
getGradelist() {
getGradelist().then(response => {
this.loading = false;
this.gradeLists = response.data;
console.log("this.gradeList", this.gradeList);
});
},
// 0新增、1修改、2查看
handleOption(type, row) {
this.form = {
......@@ -327,8 +436,10 @@ export default {
experimentClassify: "",
experimentUseGoods: "",
declareState: "",
schoolTeacherExperimentApplyLabsList: [],
state: "",
schoolTeacherExperimentApplyLabsList: [], // 添加默认的 schoolTeacherExperimentApplyLabsList 列表
}
this.getSemester();
this.nowType = type;
if (type === 2) {
const id = row.id;
......@@ -346,7 +457,6 @@ export default {
) {
this.schoolTeacherExperimentApplyLabsList = response.data.schoolTeacherExperimentApplyLabsList;
console.log('this.form.schoolTeacherExperimentApplyLabsList', this.schoolTeacherExperimentApplyLabsList);
this.form.schoolTeacherExperimentApplyLabsList = [];
for (let i = 0; i < this.schoolTeacherExperimentApplyLabsList.length; i++) {
const labId = this.schoolTeacherExperimentApplyLabsList[i].labId;
......@@ -356,7 +466,8 @@ export default {
}
}
this.dialogTableVisible = true;
this.open = true;
this.isEdit = true;
}
});
} else if (type === 1) {
......@@ -371,11 +482,63 @@ export default {
});
}
});
this.open = true;
this.dialogTableVisible = true;
}
else if (type === 0) {
this.dialogTableVisible = true;
}
},
getSemester() {
getNewYear()
.then(response => {
this.form.semester = response.semester;
this.form.schoolYear = response.schoolYear + '';
})
},
//上传按钮
getFileList(data) {
console.log('data', data);
this.fileList = data;
if (this.fileList.length !== 0) {
const file = data[0]; // 获取第一个文件的信息
console.log('file', file);
this.accessoryUrl = file.accessoryUrl;
this.accessoryName = file.accessoryName;
setTimeout(() => {
console.log(this.accessoryUrl, this.accessoryName);
}, 100); // 等待100毫秒后再打印
} else {
this.form.accessoryUrl = '';
this.form.accessoryName = '';
}
},
//提交按钮
submitFileForm(data) {
console.log("getFileList", data);
// 将 fileList 中的数据转换成 schoolAccessoryList 格式的数组
const schoolAccessoryList = this.fileList.map(item => ({
accessoryUrl: item.originalFilename,
accessoryName: item.url
}));
// 定义请求的参数对象
const params = {
id: this.form.id,
schoolAccessoryList: schoolAccessoryList
};
// 发送上传文件列表请求
getResult(params).then(response => {
console.log(params);
console.log("schoolAccessoryList", schoolAccessoryList);
});
},
//删除按钮操作
handleDelete(id) {
this.$confirm("此操作将永久删除该数据,是否继续?", '提示', {
......@@ -383,7 +546,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteSchoolLab(id).then(res => {
deleteExperimentPlan(id).then(res => {
if (res.code == 200) {
this.$message.success("删除成功!")
}
......@@ -398,18 +561,139 @@ export default {
},
resetQuery() {
this.getList();
this.queryForm = {
pageNum: 1,
pageSize: 10,
gradeId: "",
experimentName: "",
plannedStartTime: "",
plannedEndTime: "",
},
this.getList();
},
//提交按钮
submitForm() {
// 保存按钮
save() {
const gradeId = this.form.gradeId;
this.form.grade = gradeId == '' ? '' : this.gradeList.find(item => item.id == gradeId).gradeName
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id === "") {
console.log('新增', this.form);
const params = {
sub: this.form.sub,
grade: this.form.grade,
gradeId: this.form.gradeId,
schoolYear: this.form.schoolYear,
semester: this.form.semester,
plannedStartTime: this.form.plannedStartTime,
plannedEndTime: this.form.plannedEndTime,
experimentName: this.form.experimentName,
experimentClassify: this.form.experimentClassify,
experimentUseGoods: this.form.experimentUseGoods,
declareState: '0',
};
addExperimentPlan(params).then(response => {
this.$modal.msgSuccess('保存成功');
this.dialogTableVisible = false;
this.getList();
});
}
}
});
},
// 保存按钮
savexg() {
const gradeId = this.form.gradeId;
this.form.grade = gradeId == '' ? '' : this.gradeList.find(item => item.id == gradeId).gradeName
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id !== "") {
const params = {
id: this.form.id,
sub: this.form.sub,
grade: this.form.grade,
gradeId: this.form.gradeId,
schoolYear: this.form.schoolYear,
semester: this.form.semester,
plannedStartTime: this.form.plannedStartTime,
plannedEndTime: this.form.plannedEndTime,
experimentName: this.form.experimentName,
experimentClassify: this.form.experimentClassify,
experimentUseGoods: this.form.experimentUseGoods,
declareState: '0',
};
updateExperimentPlan(params).then(response => {
this.$modal.msgSuccess('保存成功');
this.dialogTableVisible = false;
this.getList();
});
}
}
});
},
/** 提交按钮 */
submitForm() {
const gradeId = this.form.gradeId;
this.form.grade = gradeId == '' ? '' : this.gradeList.find(item => item.id == gradeId).gradeName
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id !== "") {
// 修改已有数据的逻辑
const params = {
id: this.form.id,
sub: this.form.sub,
grade: this.form.grade,
gradeId: this.form.gradeId,
schoolYear: this.form.schoolYear,
semester: this.form.semester,
plannedStartTime: this.form.plannedStartTime,
plannedEndTime: this.form.plannedEndTime,
experimentName: this.form.experimentName,
experimentClassify: this.form.experimentClassify,
experimentUseGoods: this.form.experimentUseGoods,
declareState: '1',
};
updateExperimentPlan(params).then(response => {
this.$modal.msgSuccess('提交成功');
this.dialogTableVisible = false;
this.getList();
});
} else {
// 新增数据的逻辑
const params = {
sub: this.form.sub,
grade: this.form.grade,
gradeId: this.form.gradeId,
schoolYear: this.form.schoolYear,
semester: this.form.semester,
plannedStartTime: this.form.plannedStartTime,
plannedEndTime: this.form.plannedEndTime,
experimentName: this.form.experimentName,
experimentClassify: this.form.experimentClassify,
experimentUseGoods: this.form.experimentUseGoods,
declareState: '1',
};
addExperimentPlan(params).then(response => {
this.$modal.msgSuccess("提交成功");
this.dialogTableVisible = false;
this.getList();
});
}
}
});
},
//上传附件按钮操作
handleResult() {
this.upload.title = '实验结果'
this.upload.open = true
},
//取消按钮
cancle() {
cancel() {
this.dialogTableVisible = false;
this.open = false;
},
......
<template>
<div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="教师">
<el-input v-model="queryForm.teacher" placeholder="请输入教师" clearable></el-input>
<el-form-item label="实验级部">
<el-select v-model="queryForm.gradeId" placeholder="请选择级部" clearable>
<el-option v-for="(item, index) in gradeLists" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="班级">
<el-input v-model="queryForm.className" placeholder="请选择级部" clearable></el-input>
</el-form-item>
<el-form-item label="学期">
<el-date-picker v-model="queryForm.semester" type="year" value-format="yyyy" placeholder="选择年">
<el-date-picker v-model="queryForm.schoolYear" type="year" value-format="yyyy" placeholder="选择年">
</el-date-picker>
<el-select v-model="queryForm.semester" placeholder="请选择学期">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
......@@ -14,18 +25,45 @@
</el-form-item>
</el-form>
<el-table :data="tableData" border style="width: 100%">
<el-table-column align="center" prop="applyName" label="教师" />
<el-table-column align="center" prop="schoolYear" label="学年" />
<el-table-column align="center" prop="fzcount" label="分组实验" />
<el-table-column align="center" prop="sycount" label="演示实验" />
<el-table-column align="center" prop="sjcount" label="探究实验" />
<el-table-column align="center" prop="ywccount" label="已完成实验数" />
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="grade" label="级部" />
<el-table-column align="center" prop="schoolYearSemester" label="学期" />
<el-table-column align="center" prop="className" label="班级" />
<el-table-column align="center" prop="jhsys" label="计划实验数" />
<el-table-column align="center" prop="ywcsys" label="已完成实验数" />
<el-table-column align="center" prop="ratio" label="完成比列" />
<el-table-column align="center" fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">查看班级完成详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize"
@pagination="getList" />
<!-- 查看弹窗 -->
<el-dialog title="实验名称:物理研究" :visible.sync="dialogTableVisible" width="80%" height="1000px">
<el-table :data="ExperimentalData" border>
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="experimentClassify" label="实验分类">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.experiment_classify, row.experimentClassify) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="className" label="学期" />
<el-table-column align="center" prop="className" label="级部" />
<el-table-column align="center" prop="className" label="班级" />
<el-table-column align="center" prop="experimentTime" label="实验时间" />
<el-table-column align="center" prop="section" label="节次" />
<el-table-column align="center" prop="className" label="实验名称" />
<el-table-column align="center" prop="className" label="实验分类" />
<el-table-column align="center" prop="section" label="章节内容" />
</el-table>
</el-dialog>
</div>
</template>
......@@ -33,37 +71,47 @@
<script>
import {
getList,
getTeacherxq,
getSemester
} from '@/api/smartSchool/laboratoryManagement/leadlaboratoryRecords'
getSemester,
getGradelist,
getClassDetailsxq,
} from '@/api/smartSchool/gradeWork/laboratoryManagement/classDetails'
export default {
dicts: ['experiment_classify', 'lab_sub'],
name: 'index',
data() {
return {
queryForm: {
schoolYear: "",
semester: "",
gradeId: "",
className: "",
pageNum: 1,
pageSize: 10,
},
//表格数据
tableData: [
{
}
],
gradeLists: [],
ExperimentalData: [],
dialogTableVisible: false,
total: 0,
}
},
created() {
this.getSemesterAndList();
this.getGradelist();
this.getSemester();
},
methods: {
async getSemesterAndList() {
await this.getSemester(); // 等待获取学年信息
this.getList(); // 获取默认数据
},
getList() {
const params = {
schoolYear: this.queryForm.schoolYear,
applyName: this.queryForm.applyName,
};
getList(params)
getList(this.queryForm)
.then(response => {
this.tableData = response.rows;
console.log('response', response);
......@@ -79,6 +127,7 @@ export default {
return new Promise((resolve, reject) => {
getSemester()
.then(response => {
this.queryForm.semester = response.semester;
this.queryForm.schoolYear = response.schoolYear + '';
resolve(); // 成功获取学年信息
})
......@@ -88,6 +137,35 @@ export default {
});
});
},
//查询级部搜索
getGradelist() {
getGradelist().then(response => {
this.loading = false;
this.gradeLists = response.data;
});
},
//查看按钮
handleLook(row) {
console.log(row);
// 设置 dialogTableVisible 为 true,显示弹窗
this.dialogTableVisible = true;
// 根据 row 的数据构建请求参数
const params = {
schoolYear: row.schoolYear,
semester: row.semester,
gradeId: row.gradeId,
classId: row.classId
};
console.log(params);
getClassDetailsxq(params).then(response => {
console.log(params);
this.ExperimentalData = response.rows;
this.loading = false;
}).catch(error => {
});
},
resetQuery() {
this.queryForm = {
......
<template>
<div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="学科分类">
<el-select v-model="queryForm.sub" placeholder="请选择" clearable>
<el-option v-for="(item, index) in subList" :key="index" :label="item.dictLabel"
:value="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验级部">
<el-select v-model="queryForm.gradeId" placeholder="请选择">
<el-option v-for="item in gradeList" :key="item.id" :label="item.gradeName" :value="item.id">
</el-option>
<el-form-item label="学期">
<el-date-picker v-model="queryForm.schoolYear" type="year" value-format="yyyy" placeholder="选择年">
</el-date-picker>
<el-select v-model="queryForm.semester" placeholder="请选择学期">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验分类">
<el-select v-model="queryForm.experimentClassify" placeholder="请选择" clearable>
......@@ -19,6 +17,9 @@
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="实验名称">
<el-input v-model="queryForm.experimentName" 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>
......@@ -28,8 +29,6 @@
<el-col :span="1.5">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="handleOption(0)"> 新增
</el-button>
<el-button size="mini" type="success" icon="el-icon-download" @click="handleImport">导入
</el-button>
</el-col>
</el-row>
<el-table :data="tableData" border style="width: 100%">
......@@ -49,14 +48,24 @@
</template>
</el-table-column>
<el-table-column align="center" prop="chapterContent" label="章节内容" />
<el-table-column align="center" prop="isAppointment" label="是否已预约" />
<el-table-column align="center" prop="isAppointment" label="是否已预约">
<template slot-scope="scope">
<span v-if="scope.row.isAppointment === '0'">未预约</span>
<span v-else-if="scope.row.isAppointment === '1'">已预约</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="150">
<template slot-scope="{ row }">
<div>
<div v-if="row.isAppointment === '0'">
<el-button type="text" size="small" @click="handleOption(2, row)">查看</el-button>
<el-button type="text" size="small" @click="handleOption(1, row)">修改</el-button>
<el-button type="text" size="small" @click="handleDelete(row.id)">删除</el-button>
</div>
<div v-else>
<el-button type="text" size="small" @click="handleOption(2, row)">查看</el-button>
</div>
</template>
</el-table-column>
</el-table>
......@@ -196,11 +205,12 @@ export default {
data() {
return {
queryForm: {
sub: '',
gradeId: '',
experimentClassify: '',
schoolYear: "",
semester: "",
experimentClassify: "",
pageNum: 1,
pageSize: 10,
},
classList: [], // 班级列表数据
subList: [],// 学科列表
......@@ -208,9 +218,7 @@ export default {
gradeList: [],
//表格数据
tableData: [
{
}
],
//查看弹窗表格
ExperimentalData: [],
......@@ -281,21 +289,40 @@ export default {
}
},
created() {
this.getList();
this.getListWithSemester();
this.getGrade();
},
methods: {
getListWithSemester() {
this.getSemester(() => {
this.getList();
});
},
getSemester(callback) {
getSemester().then((res) => {
this.form.semester = res.semester;
this.form.schoolYear = res.schoolYear + '';
this.queryForm.semester = res.semester;
this.queryForm.schoolYear = res.schoolYear + '';
console.log(this.form.semester, typeof this.form.semester);
if (callback && typeof callback === 'function') {
callback();
}
});
},
getList() {
getExperimentPlan(this.queryForm).then(response => {
this.tableData = response.rows;
console.log('this.tableData', this.tableData);
this.total = response.total
this.loading = false
})
this.total = response.total;
this.loading = false;
});
},
//选择级部自动获取年级
onGradeChange() {
const selectedGrade = this.gradeList.find(grade => grade.id === this.form.gradeId);
......@@ -337,21 +364,8 @@ export default {
},
//获得当前年份
newYear() {
getNewYear().then((res) => {
this.form.schoolYear = res.schoolYear;
console.log(this.form.schoolYear, typeof this.form.schoolYear);
});
},
//获取当前学期
getSemester() {
getSemester().then((res) => {
this.form.semester = res.semester;
console.log(this.form.semester, typeof this.form.semester);
});
},
//查询级部
getGrade() {
getGrade().then(response => {
......@@ -384,11 +398,14 @@ export default {
//重置按钮
resetQuery() {
this.queryForm.sub = '';
this.queryForm.gradeId = '';
this.queryForm.experimentClassify = '';
// this.resetForm("queryForm");
this.getList();
this.queryForm = {
schoolYear: "",
semester: "",
experimentClassify: "",
pageNum: 1,
pageSize: 10,
},
this.getList();
},
// 0新增、1修改、2查看
......@@ -411,7 +428,6 @@ export default {
schoolExperimentPlanClassList: [],
}
this.nowType = type;
this.newYear();
this.getSemester();
if (type != 0) {
const id = row.id
......
......@@ -5,8 +5,8 @@
<el-date-picker v-model="queryForm.schoolYear" type="year" value-format="yyyy" placeholder="选择年" clearable>
</el-date-picker>
<el-select v-model="queryForm.semester" placeholder="请选择学期" clearable>
<el-option label="上学期" value="0"></el-option>
<el-option label="下学期" value="1"></el-option>
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验分类">
......@@ -120,7 +120,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="学科" prop="sub">
<el-input v-model="form.sub" placeholder="请输入" clearable @input="handleChangeSub"
<el-input v-model="form.sub" placeholder="请输入" clearable
:disabled="nowType === 1 || nowType === 2 || nowType === 0" />
</el-form-item>
</el-col>
......@@ -262,16 +262,12 @@ export default {
}
},
created() {
this.getList();
this.getSchholyear();
this.getExperimentName();
},
methods: {
handleChangeSub() {
this.form.sub = this.selectDictLabel(this.dict.type.lab_sub, this.form.sub);
console.log('this.form.sub', this.form.sub);
},
//表单查询
getList() {
getLabplanlist(this.queryForm).then(response => {
......@@ -286,7 +282,6 @@ export default {
getLabplanxlk().then(response => {
this.tableList = response.data;
console.log('this.tableList', this.tableList);
this.loading = false
})
......@@ -321,12 +316,14 @@ export default {
//获取当前学年+学期
getSchholyear() {
getSemester().then(response => {
console.log(this.form);
// this.form.schoolYear = response.schoolYear;
console.log(response.schoolYear);
this.form.schoolYear = response.schoolYear;
this.form.semester = response.semester;
this.queryForm.schoolYear = response.schoolYear + '';
this.queryForm.semester = response.semester;
})
// 在获取到学年和学期后,调用getList方法进行表单查询
this.getList();
});
},
//删除按钮操作
......@@ -388,7 +385,15 @@ export default {
resetQuery() {
this.getList();
this.queryForm = {
pageNum: 1,
pageSize: 10,
schoolYear: '',
semester: '',
experimentClassify: '',
experimentName: '',
},
this.getList();
},
// 保存按钮
......
<template>
<div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="级部">
<el-input v-model="queryForm.grade" placeholder="请输入级部" clearable></el-input>
<el-form-item label="实验级部">
<el-select v-model="queryForm.gradeId" placeholder="请选择级部" clearable>
<el-option v-for="(item, index) in gradeLists" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验名称">
<el-input v-model="queryForm.name" placeholder="请输入实验名称" clearable></el-input>
<el-input v-model="queryForm.experimentName" placeholder="请输入实验名称" clearable></el-input>
</el-form-item>
<el-form-item label="学期">
<el-date-picker v-model="queryForm.year" type="year" value-format="yyyy" placeholder="选择年">
<el-date-picker v-model="queryForm.schoolYear" type="year" value-format="yyyy" placeholder="选择年">
</el-date-picker>
<el-select v-model="queryForm.semester" placeholder="请选择学期">
<el-option label="上学期" value="0"></el-option>
<el-option label="下学期" value="1"></el-option>
<el-select v-model="queryForm.semester" placeholder="请选择学期">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
</el-form-item>
......@@ -41,12 +44,6 @@
<!-- 查看弹窗 -->
<el-dialog title="实验名称:物理研究" :visible.sync="dialogTableVisible" width="80%">
<el-form :model="form" ref="form" size="small" :inline="true" label-width="88px">
<el-form-item label="实验分类">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="班级">
<el-input v-model="form.className" placeholder="请输入班级" clearable></el-input>
</el-form-item>
......@@ -94,36 +91,44 @@
import {
getList,
getSemester,
getTeacherxq
} from '@/api/smartSchool/laboratoryManagement/leadlaboratoryCompletion'
getGradelist,
getClassDetailsxq,
} from '@/api/smartSchool/gradeWork/laboratoryManagement/laboratoryDetails'
export default {
name: 'index',
dicts: ['experiment_classify', 'lab_sub'],
data() {
return {
queryForm: {
pageNum: 1,
pageSize: 10,
schoolYear: "",
semester: "",
gradeId: "",
experimentName: "",
},
gradeLists: [],
//表格数据
tableData: [
{
}
],
//查看弹窗表格
ExperimentalData: [],
form: {
},
//实验分类下拉框
options: {
},
//弹窗
dialogTableVisible: false,
total: 0,
}
},
created() {
this.getSemesterAndList();
this.getGradelist();
this.getSemester();
},
methods: {
async getSemesterAndList() {
await this.getSemester(); // 等待获取学年和学期信息
......@@ -157,6 +162,15 @@ export default {
console.log(error);
});
},
//查询级部搜索
getGradelist() {
getGradelist().then(response => {
this.loading = false;
this.gradeLists = response.data;
console.log("this.gradeList", this.gradeList);
});
},
//查看按钮
handleLook(row) {
console.log(row);
......@@ -166,14 +180,12 @@ export default {
// 根据 row 的数据构建请求参数
const params = {
experimentPlanId: row.id,
experimentClassify: this.form.experimentClassify,
className: this.form.className,
startTime: this.form.startTime,
endTime: this.form.endTime,
};
getTeacherxq(params).then(response => {
getClassDetailsxq(params).then(response => {
this.ExperimentalData = response.rows;
this.total = response.total;
this.loading = false;
}).catch(error => {
......@@ -187,22 +199,20 @@ export default {
pageSize: 10,
schoolYear: "",
semester: "",
sub: "",
grade: "",
gradeId: "",
experimentName: "",
};
this.getList();
},
this.getList();
},
//弹窗获取表单
getListtc() {
const params = {
experimentPlanId: this.form.id,
experimentClassify: this.form.experimentClassify,
className: this.form.className,
startTime: this.form.startTime,
endTime: this.form.endTime,
};
getTeacherxq(params).then(response => {
getClassDetailsxq(params).then(response => {
this.ExperimentalData = response.rows;
}).catch(error => {
......@@ -214,12 +224,9 @@ export default {
pageNum: 1,
pageSize: 10,
experimentPlanId: "",
experimentClassify: "",
className: "",
startTime: "",
endTime: "",
};
this.getListtc();
},
......
......@@ -11,7 +11,10 @@
<el-input v-model="queryForm.applyName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="实验级部">
<el-input v-model="queryForm.grade" placeholder="请输入"></el-input>
<el-select v-model="queryForm.gradeId" placeholder="请选择级部" clearable>
<el-option v-for="(item, index) in gradeLists" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
......@@ -20,7 +23,11 @@
</el-form>
<el-table :data="tableData" border style="width: 100%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="sub" label="学科" />
<el-table-column align="center" prop="sub" label="学科" width="60">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.lab_sub, row.sub) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="grade" label="级部" />
<el-table-column align="center" prop="plannedTime" label="实验时间" />
<el-table-column align="center" prop="experimentName" label="实验名称" />
......@@ -45,41 +52,51 @@
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="handleAllocation(scope.row)" type="text" size="small">分配实验室</el-button>
<el-button v-if="scope.row.declareState === '1' || scope.row.declareState === '2'"
@click="handleLook(scope.row)" type="text" size="small">查看</el-button>
<el-button v-if="scope.row.declareState === '1' || scope.row.declareState === '2'"
@click="handleAllocation(scope.row)" type="text" size="small">分配实验室</el-button>
<el-button v-if="scope.row.declareState === '3'" @click="handleLook(scope.row)" type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分配实验室弹窗 -->
<el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="75%">
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-form :model="form" ref="form" size="small" label-width="110px" >
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;" :disabled="isEdit">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实验名称">
<el-input v-model="form.experimentName" placeholder="请输入" clearable />
<el-input v-model="form.experimentName" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;" :disabled="isEdit">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="学年">
<el-input v-model="form.schoolYear" placeholder="请输入" clearable />
<el-input v-model="form.schoolYear" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="学期">
<el-select v-model="form.semester" placeholder="请选择学期" style="width: 100%;">
<el-select v-model="form.semester" placeholder="请选择学期" style="width: 100%;" :disabled="isEdit">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
......@@ -87,7 +104,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="级部">
<el-input v-model="form.grade" placeholder="请输入" clearable />
<el-input v-model="form.grade" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
......@@ -95,7 +112,7 @@
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="申请老师">
<el-input v-model="form.applyName" placeholder="请输入" clearable />
<el-input v-model="form.applyName" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -142,11 +159,14 @@
</el-dialog>
<!-- 查看 -->
<el-dialog title="申请信息" :visible.sync="open" width="75%">
<el-form :model="form" ref="form" size="small" label-width="110px">
<el-form :model="form" ref="form" size="small" label-width="110px" :disabled="isEdit">
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -155,8 +175,11 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
......@@ -244,6 +267,9 @@ import {
getExperimentLabs,// 分配实验室
getTeacherapplyxq// 查看详情
} from '@/api/smartSchool/laboratoryManagement/experimentApproval'
import {
getGradelist
} from '@/api/smartSchool/laboratoryManagement/leadlaboratoryCompletion'
export default {
name: 'index',
dicts: ['experiment_classify', 'lab_sub', 'declare_state'],
......@@ -263,6 +289,7 @@ export default {
form: {
},
isEdit: false,
labs: [],
schoolTeacherExperimentApplyLabsList: [],
total: 0,
......@@ -272,6 +299,7 @@ export default {
},
created() {
this.getList();
this.getGradelist();
},
methods: {
//表单查询
......@@ -283,6 +311,15 @@ export default {
this.loading = false
})
},
//查询级部搜索
getGradelist() {
getGradelist().then(response => {
this.loading = false;
this.gradeLists = response.data;
console.log("this.gradeList", this.gradeList);
});
},
//分配实验室
handleAllocation(row) {
this.loading = true;
......@@ -341,10 +378,18 @@ export default {
}
console.log('this.form', this.form);
this.loading = false
this.isEdit = true;
})
},
resetQuery() {
this.getList();
this.queryForm = {
pageNum: 1,
pageSize: 10,
experimentClassify: "",
applyName: "",
grade: "",
},
this.getList();
},
// 保存按钮
save() {
......
......@@ -123,6 +123,8 @@
import {
getExperimentPlan,
getExperimentPlaxq,
getSemester
} from '@/api/smartSchool/laboratoryManagement/experimentalPlan'
export default {
name: 'index',
......@@ -159,16 +161,43 @@ export default {
created() {
this.getList();
this.getSemesterAndList();
},
methods: {
async getSemesterAndList() {
await this.getSemester(); // 等待获取学年和学期信息
this.getList(); // 获取数据列表
},
getSemester() {
return new Promise((resolve, reject) => {
getSemester()
.then(response => {
this.queryForm.semester = response.semester;
this.queryForm.schoolYear = response.schoolYear + '';
resolve(); // 成功获取学年和学期信息
})
.catch(error => {
console.log(error);
reject(error);
});
});
},
getList() {
getExperimentPlan(this.queryForm).then(response => {
this.tableData = response.rows;
console.log('response', response);
this.total = response.total
this.loading = false
})
getExperimentPlan(this.queryForm)
.then(response => {
this.tableData = response.rows;
console.log('response', response);
this.total = response.total;
this.loading = false;
})
.catch(error => {
this.loading = false;
console.log(error);
});
},
resetQuery() {
this.queryForm = {
pageNum: 1,
......
......@@ -24,7 +24,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableData" stripe>
<el-table border v-loading="loading" :data="tableData" stripe>
<el-table-column fixed="left" label="序号" type="index" width="55" align="center" />
<el-table-column label="学科" align="center" prop="sub">
<template slot-scope="{ row }">
......@@ -65,7 +65,7 @@
<script>
import {
getList,
} from '@/api/smartSchool/laboratoryManagement/leadlaboratoryRecords'
} from '@/api/smartSchool/laboratoryManagement/experimentalRecords'
export default {
dicts: ['experiment_classify', 'lab_sub'],
data() {
......
<template>
<div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="实验级部">
<el-input v-model="queryForm.grade" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="实验室名称">
<el-input v-model="queryForm.experimentName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预约时间段">
<el-date-picker v-model="queryForm.time" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="yyyy-MM-dd"
:value="[queryForm.plannedStartTime, queryForm.plannedEndTime]">
</el-date-picker>
</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 :data="tableData" border style="width: 100%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="sub" label="学科">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.lab_sub, row.sub) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="grade" label="级部" />
<el-table-column align="center" prop="schoolYear" label="学年" />
<el-table-column align="center" prop="plannedTime" label="计划时间" />
<el-table-column align="center" prop="experimentName" label="实验名称" />
<el-table-column align="center" prop="experimentClassify" label="实验分类">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.experiment_classify, row.experimentClassify) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="experimentUseGoods" label="实验用品" />
<el-table-column align="center" label="实验室">
<template slot-scope="scope">
<div v-if="scope.row.schoolLabClassYearRelationList">
{{ scope.row.schoolLabClassYearRelationList.map(lab => lab.labName).join(", ") }}
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="declareState" label="申报状态">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.declare_state, row.declareState) }}</div>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="handleAllocation(scope.row)" type="text" size="small">分配实验室</el-button>
</template>
</el-table-column>
</el-table>
<!-- 查看 -->
<el-dialog title="申请信息" :visible.sync="open" width="50%">
<el-form :model="form" ref="form" size="small" label-width="100px">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="申请老师">
<el-input v-model="form.applyName" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="实验分类">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="实验名称">
<el-input v-model="form.experimentName" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学科">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="章节内容">
<el-input v-model="form.chapterContent" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="级部">
<el-input v-model="form.grade" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学年">
<el-input v-model="form.schoolYear" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="实验用品">
<el-input v-model="form.experimentUseGoods" type="textarea" placeholder="请输入"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="计划开始时间" prop="plannedStartTime">
<el-date-picker v-model="form.plannedStartTime" type="date" placeholder="选择"
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="计划结束时间" prop="plannedEndTime">
<el-date-picker v-model="form.plannedEndTime" type="date" placeholder="选择"
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="实验室选择">
<el-checkbox-group v-model="form.schoolLabClassYearRelationList">
<el-checkbox v-for="classItem in schoolLabClassYearRelationList" :key="classItem.labId"
:label="classItem.labId">
{{ classItem.labName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel"> 保 存 </el-button>
</div>
</el-dialog>
<!-- 分配实验室弹窗 -->
<el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="50%">
<el-form :model="postForm" ref="postForm" size="small" label-width="100px">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="申请老师">
<el-input v-model="postForm.applyName" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="实验分类">
<el-select v-model="postForm.experimentClassify" placeholder="请选择" clearable
style="width: 100%;">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="实验名称">
<el-input v-model="postForm.experimentName" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学科">
<el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="章节内容">
<el-input v-model="postForm.chapterContent" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="级部">
<el-input v-model="postForm.grade" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学年">
<el-input v-model="postForm.schoolYear" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="实验用品">
<el-input v-model="postForm.experimentUseGoods" type="textarea" placeholder="请输入"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="计划开始时间" prop="plannedStartTime">
<el-date-picker v-model="postForm.plannedStartTime" type="date" placeholder="选择"
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="计划结束时间" prop="plannedEndTime">
<el-date-picker v-model="postForm.plannedEndTime" type="date" placeholder="选择"
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="实验室选择">
<el-checkbox-group v-model="postForm.schoolLabClassYearRelationList">
<el-checkbox v-for="classItem in labs" :key="classItem.labId" :label="classItem.labId">
{{ classItem.labName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="submitForm"> 保 存 </el-button>
<el-button type="primary" @click="submitForm">提 交</el-button>
</div>
</el-dialog>
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize"
@pagination="getList" />
</div>
</template>
<script>
import {
getLabClassYear,
getLabList,
getAllocationLab,
getLabClassYearxq,
} from '@/api/smartSchool/laboratoryManagement/gradeExperimentapp'
export default {
name: 'index',
dicts: ['experiment_classify', 'lab_sub', 'declare_state'],
data() {
return {
queryForm: {
pageNum: 1,
pageSize: 10,
grade: '',
experimentName: '',
plannedStartTime: '',
plannedEndTime: '',
},
//实验室
labs: [],
schoolLabClassYearRelationList: [],
//表格数据
tableData: [
],
//学科分类
options: {
},
postForm: {
applyName: '',
experimentClassify: '',
experimentName: '',
sub: '',
chapterContent: '',
grade: '',
schoolYear: '',
experimentUseGoods: '',
plannedStartTime: '',
plannedEndTime: '',
schoolLabClassYearRelationList: [],
},
form: {
applyName: '',
experimentClassify: '',
experimentName: '',
sub: '',
chapterContent: '',
grade: '',
schoolYear: '',
experimentUseGoods: '',
plannedStartTime: '',
plannedEndTime: '',
schoolLabClassYearRelationList: [],
},
total: 0,
dialogTableVisible: false,
open: false,
}
},
created() {
this.getList();
},
methods: {
//表单查询
getList() {
getLabClassYear(this.queryForm).then(response => {
this.tableData = response.rows
this.total = response.total
this.loading = false
})
},
//分配实验室
handleAllocation(row) {
this.loading = true;
const id = row.id || this.ids;
getLabClassYearxq(id).then(response => {
this.postForm = response.data;
console.log('this.form', this.form);
this.postForm.applyName = response.data.applyName;
this.postForm.experimentClassify = response.data.experimentClassify;
this.postForm.experimentName = response.data.experimentName;
this.postForm.sub = response.data.sub;
this.postForm.chapterContent = response.data.chapterContent;
this.postForm.grade = response.data.grade;
this.postForm.schoolYear = response.data.schoolYear;
this.postForm.experimentUseGoods = response.data.experimentUseGoods;
this.postForm.plannedStartTime = response.data.plannedStartTime;
this.postForm.plannedEndTime = response.data.plannedEndTime;
this.loading = false;
const plannedStartTime = this.postForm.plannedStartTime
const plannedEndTime = this.postForm.plannedEndTime
getLabList(plannedStartTime, plannedEndTime).then(response => {
this.labs = response.data;
console.log(this.labs, 'this.labs');
this.loading = false;
});
});
this.dialogTableVisible = true;
},
//查看按钮操作
handleLook(row) {
this.open = true;
const id = row.id || this.ids;
getLabClassYearxq(id).then(response => {
this.form = response.data;
if (response.data.schoolLabClassYearRelationList) { // 判断 schoolLabClassYearRelationList 存在且不为空
this.schoolLabClassYearRelationList = response.data.schoolLabClassYearRelationList;
console.log('this.form.schoolLabClassYearRelationList', this.form.schoolLabClassYearRelationList);
}
console.log('this.form.schoolLabClassYearRelationList', this.form.schoolLabClassYearRelationList);
this.form.schoolLabClassYearRelationList = [];
for (let i = 0; i < this.schoolLabClassYearRelationList.length; i++) {
const labId = this.schoolLabClassYearRelationList[i].labId;
if (this.form.schoolLabClassYearRelationList) { // 判断 schoolLabClassYearRelationList 存在且不为空
this.form.schoolLabClassYearRelationList.push(labId);
console.log(this.form.schoolLabClassYearRelationList, '查看 ');
}
}
console.log('this.form', this.form);
this.loading = false
})
},
resetQuery() {
this.getList();
},
/** 保存按钮 */
submitForm() {
this.$refs['postForm'].validate(valid => {
if (valid) {
if (this.postForm.id != null) {
const params = {
id: this.postForm.id,
plannedStartTime: this.postForm.plannedStartTime,
plannedEndTime: this.postForm.plannedEndTime,
experimentUseGoods: this.postForm.experimentUseGoods,
declareState: '2',
schoolLabClassYearRelationList: [],
};
// 将已选择的实验室ID添加到params对象中
for (let i = 0; i < this.postForm.schoolLabClassYearRelationList.length; i++) {
const labId = this.postForm.schoolLabClassYearRelationList[i];
params.schoolLabClassYearRelationList.push({ labId: labId });
}
getAllocationLab(params).then(response => {
console.log(params, params);
this.$modal.msgSuccess('保存成功');
this.open = false;
this.getList();
});
}
}
});
},
// 取消按钮
cancel() {
this.dialogTableVisible = false;
},
},
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="88px">
<el-form-item label="实验级部">
<el-input v-model="queryForm.grade" placeholder="请输入"></el-input>
<el-form-item label="学期">
<el-date-picker v-model="queryForm.schoolYear" type="year" value-format="yyyy" placeholder="选择年">
</el-date-picker>
<el-select v-model="queryForm.semester" placeholder="请选择学期">
<el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验室名称">
<el-input v-model="queryForm.experimentName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预约时间段">
<el-date-picker v-model="queryForm.time" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="yyyy-MM-dd"
:value="[queryForm.plannedStartTime, queryForm.plannedEndTime]">
</el-date-picker>
<el-form-item label="实验分类">
<el-select v-model="queryForm.experimentClassify" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
......@@ -59,7 +64,7 @@
</el-table>
<!-- 查看 -->
<el-dialog title="申请信息" :visible.sync="open" width="50%">
<el-form :model="form" ref="form" size="small" label-width="100px">
<el-form :model="form" ref="form" size="small" label-width="100px" :disabled="isEdit">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="申请老师">
......@@ -165,13 +170,13 @@
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="申请老师">
<el-input v-model="postForm.applyName" placeholder="请输入" clearable />
<el-input v-model="postForm.applyName" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="实验分类">
<el-select v-model="postForm.experimentClassify" placeholder="请选择" clearable
style="width: 100%;">
style="width: 100%;" :disabled="isEdit">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
......@@ -182,12 +187,12 @@
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="实验名称">
<el-input v-model="postForm.experimentName" placeholder="请输入" clearable />
<el-input v-model="postForm.experimentName" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学科">
<el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;">
<el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;" :disabled="isEdit">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
......@@ -199,7 +204,7 @@
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="章节内容">
<el-input v-model="postForm.chapterContent" placeholder="请输入" clearable></el-input>
<el-input v-model="postForm.chapterContent" placeholder="请输入" clearable :disabled="isEdit"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -208,12 +213,12 @@
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="级部">
<el-input v-model="postForm.grade" placeholder="请输入" clearable />
<el-input v-model="postForm.grade" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学年">
<el-input v-model="postForm.schoolYear" placeholder="请输入" clearable />
<el-input v-model="postForm.schoolYear" placeholder="请输入" clearable :disabled="isEdit"/>
</el-form-item>
</el-col>
</el-row>
......@@ -277,6 +282,11 @@ import {
getLabClassYearxq,
} from '@/api/smartSchool/laboratoryManagement/gradeExperimentapp'
import {
getSemester
} from '@/api/smartSchool/laboratoryManagement/experimentalPlan'
export default {
name: 'index',
dicts: ['experiment_classify', 'lab_sub', 'declare_state'],
......@@ -285,10 +295,10 @@ export default {
queryForm: {
pageNum: 1,
pageSize: 10,
grade: '',
experimentName: '',
plannedStartTime: '',
plannedEndTime: '',
schoolYear: "",
semester: "",
experimentName: "",
experimentClassify: "",
},
//实验室
......@@ -298,10 +308,7 @@ export default {
tableData: [
],
//学科分类
options: {
},
isEdit: false,
postForm: {
applyName: '',
experimentClassify: '',
......@@ -334,17 +341,40 @@ export default {
}
},
created() {
this.getList();
this.getSemesterAndList();
},
methods: {
//表单查询
getList() {
getLabClassYear(this.queryForm).then(response => {
this.tableData = response.rows
this.total = response.total
this.loading = false
})
async getSemesterAndList() {
await this.getSemester(); // 等待获取学年和学期信息
this.getList(); // 获取数据列表
},
getSemester() {
return new Promise((resolve, reject) => {
getSemester()
.then(response => {
this.queryForm.semester = response.semester;
this.queryForm.schoolYear = response.schoolYear + '';
resolve(); // 成功获取学年和学期信息
})
.catch(error => {
console.log(error);
reject(error);
});
});
},
getList() {
getLabClassYear(this.queryForm)
.then(response => {
this.tableData = response.rows;
console.log('response', response);
this.total = response.total;
this.loading = false;
})
.catch(error => {
this.loading = false;
console.log(error);
});
},
//分配实验室
......@@ -405,12 +435,21 @@ export default {
console.log(this.form.schoolLabClassYearRelationList, '查看 ');
}
console.log('this.form', this.form);
this.isEdit = true;
this.loading = false
})
},
resetQuery() {
this.getList();
this.queryForm = {
pageNum: 1,
pageSize: 10,
schoolYear: "",
semester: "",
experimentName: "",
experimentClassify: "",
},
this.getList();
},
// 保存按钮
save() {
......
......@@ -21,18 +21,31 @@
</el-col>
</el-row>
<el-table v-loading="loading" :data="competitionData" stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table border v-loading="loading" :data="competitionData" stripe>
<el-table-column fixed="left" label="序号" type="index" width="55" align="center" />
<el-table-column label="学年" align="center" prop="schoolYear" />
<el-table-column label="参赛教师" align="center" prop="teacherName" />
<el-table-column label="参赛课题" align="center" prop="entrySubject" />
<el-table-column label="比赛项目名称" align="center" prop="competitionName" />
<el-table-column label="比赛类型" align="center" prop="competitionType" />
<el-table-column label="比赛级别" align="center" prop="competitionLevel" />
<el-table-column align="center" prop="competitionType" label="比赛类型">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.competition_type, row.competitionType) }}</div>
</template>
</el-table-column>
<el-table-column label="比赛级别" align="center" prop="competitionLevel">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.competition_level, row.competitionLevel) }}</div>
</template>
</el-table-column>
<el-table-column label="证书照片" align="center" prop="schoolAccessoryList">
<template slot-scope="scope">
<!-- <template slot-scope="scope">
<ListImage :image-url="pev + scope.row.accessoryUrl"></ListImage>
</template> -->
<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="备注1" align="center" prop="remark1" />
......@@ -40,9 +53,9 @@
<el-table-column label="备注3" align="center" prop="remark3" />
<el-table-column fixed="right" label="操作" align="center" prop="orgname" width="150">
<template slot-scope="{ row }">
<el-button type="text" size="small" @click="handleDelete(row.id)">删除</el-button>
<el-button type="text" size="small" @click="handleOption(1, row)">编辑</el-button>
<el-button type="text" size="small" @click="handleOption(2, row)">查看</el-button>
<el-button type="text" size="small" @click="handleDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -51,35 +64,43 @@
<!-- 新增、编辑、查看弹窗 -->
<el-dialog title="详细信息" :visible.sync="dialogVisible" width="50%">
<el-form :model="form" ref="form" size="small" label-width="108px">
<el-form :model="form" ref="form" size="small" label-width="108px" :disabled="isEdit">
<el-row>
<el-col :span="10">
<el-form-item label="学年">
<el-input v-model="form.schoolYear" placeholder="请输入" clearable></el-input>
<el-input v-model="form.schoolYear" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="参赛老师">
<el-input v-model="form.teacherName" placeholder="请输入" clearable></el-input>
<el-select v-model="form.teacherName" placeholder="请选择级部" clearable style="width: 100%;"
:disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in teacherList" :key="index" :label="item.userName"
:value="item.userId"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="参赛课题" prop="entrySubject">
<el-input v-model="form.entrySubject" placeholder="请输入" clearable></el-input>
<el-input v-model="form.entrySubject" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="比赛项目名称" prop="competitionName">
<el-input v-model="form.competitionName" placeholder="请输入" clearable></el-input>
<el-input v-model="form.competitionName" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="比赛类型" prop="competitionType">
<el-select v-model="form.competitionType" placeholder="请选择" clearable style="width: 100%;">
<el-select v-model="form.competitionType" placeholder="请选择" clearable style="width: 100%;"
:disabled="nowType == 2 ? true : false">
<el-option v-for="dict in dict.type.competition_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
......@@ -87,7 +108,8 @@
</el-col>
<el-col :span="10">
<el-form-item label="比赛级别">
<el-select v-model="form.competitionLevel" placeholder="请选择" clearable style="width: 100%;">
<el-select v-model="form.competitionLevel" placeholder="请选择" clearable style="width: 100%;"
:disabled="nowType == 2 ? true : false">
<el-option v-for="dict in dict.type.competition_level" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
......@@ -99,7 +121,7 @@
<el-form-item label="证书照片">
<el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"
:show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"
:http-request="uploadImage">
:http-request="uploadImage" :disabled="nowType == 2 ? true : false">
<img v-if="imageUrl" :src="imageUrl" style="width: 178px; height: 178px;" class="avatar" alt="" />
<!-- :preview-src-list="[imageUrl]"-->
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
......@@ -108,19 +130,22 @@
</el-col>
<el-col :span="10">
<el-form-item label="备注1">
<el-input v-model="form.remark1" placeholder="请输入" clearable></el-input>
<el-input v-model="form.remark1" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="备注2">
<el-input v-model="form.remark2" placeholder="请输入" clearable></el-input>
<el-input v-model="form.remark2" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="备注3">
<el-input v-model="form.remark3" placeholder="请输入" clearable></el-input>
<el-input v-model="form.remark3" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -141,13 +166,16 @@ import {
updateCompetition,
getCompetition,
getCompetitionxq,
deleteCompetition
deleteCompetition,
getTeacher
} from '@/api/smartSchool/laboratoryManagement/laboratoryCompetition'
import ListImage from "@/components/ListImage";
import { uploadImage as commonUpload } from '@/api/common'
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
export default {
dicts: ['competition_type', 'competition_type',
'competition_level'],
components: { picAvatar },
data() {
return {
// 图片路径
......@@ -157,6 +185,11 @@ export default {
pageNum: 1,
pageSize: 10,
},
//获取子组件传来的信息
pic: [],
// 图片路径
imageUrl: undefined,
isEdit: false,
nowType: 0, // 0新增、1修改、2查看
uploadLoading: false,
loading: false,
......@@ -180,11 +213,23 @@ export default {
schoolAccessoryList: '',
},
rules: {}
teacherList: [],
rules: {},
nowType: 0, // 0新增、1编辑、2查看
}
},
watch: {
pic: {
handler(newValue, oldValue) {
console.log('watch----oldValue', oldValue)
console.log('watch----newValue', newValue)
this.isUploadPic = newValue[3]
}
}
},
mounted() {
this.getList();
this.getTeacher();
},
methods: {
//获取列表数据
......@@ -196,7 +241,10 @@ export default {
this.loading = false
})
},
//获取图片信息
getSchoolInfoPic(val) {
this.pic = val
},
// 移除图片
handleRemove() {
this.imageUrl = undefined
......@@ -286,15 +334,22 @@ export default {
Object.keys(this.form).forEach(key => {
if (response.data[key]) {
this.$set(this.form, key, response.data[key]);
}
})
}
})
}
this.dialogVisible = true;
},
//查询老师
getTeacher() {
getTeacher().then(response => {
this.loading = false;
this.teacherList = response.data;
this.dialogVisible = true;
});
},
/** 提交按钮 */
submitForm: function () {
......@@ -338,9 +393,7 @@ export default {
this.dialogVisible = false;
},
handleSelectionChange(val) {
this.isMultiple = val.length == 0 ? false : true
}
},
}
</script>
......
......@@ -24,7 +24,6 @@
</el-form>
<el-table v-loading="loading" :data="tableData" stripe>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column fixed="left" label="序号" type="index" width="55" align="center" />
<el-table-column label="级部" align="center" prop="grade" />
<el-table-column label="实验名称" align="center" prop="experimentName" />
......@@ -64,7 +63,6 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getListtc">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuerytc">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="ExperimentalData" border style="width: 100%">
......
......@@ -55,10 +55,17 @@
<el-dialog title="详细信息" :visible.sync="dialogTableVisible" width="60%">
<el-form :model="form" ref="form" size="small" :rules="rules" label-width="98px">
<el-row :gutter="30">
<el-col :span="10">
<el-form-item label="实验名称" prop="labName">
<el-input v-model="form.labName" placeholder="请输入" clearable
:disabled="nowType === 2"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="学科" prop="labSub">
<el-select v-model="form.labSub" placeholder="请选择" clearable style="width: 100%;">
<el-select v-model="form.labSub" placeholder="请选择" clearable style="width: 100%;"
:disabled="nowType === 2">
<el-option v-for="(item, index) in subList" :key="index" :label="item.dictLabel"
:value="item.dictValue"></el-option>
</el-select>
......@@ -117,7 +124,7 @@
</el-select>
</el-form-item>
<el-form-item label="班级">
<el-input v-model="formlook.className" placeholder="请输入"></el-input>
<el-input v-model="formlook.className" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker v-model="formlook.startTime" type="date" placeholder="选择" value-format="yyyy-MM-dd"
......@@ -131,7 +138,6 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getListtc">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuerytc">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="ExperimentalData" border style="width: 100%">
......@@ -147,8 +153,7 @@
<el-table-column align="center" prop="experimentClassify" label="实验分类" />
<el-table-column align="center" prop="experimentTime" label="实验时间" />
</el-table>
<pagination v-show="totaltc > 0" :total="totaltc" v-model="formlook.pageNum" :limit.sync="formlook.pageSize"
@pagination="getListtc" />
</el-dialog>
</div>
</template>
......@@ -237,7 +242,6 @@ export default {
//负责人下拉框
adminList: [],
total: 0,
totaltc: 0,
//级部
gradeList: [],
}
......@@ -298,7 +302,6 @@ export default {
console.log('实验', params);
getClassDetails(params).then(response => {
this.ExperimentalData = response.rows;
this.totaltc = response.total;
this.loading = false;
});
},
......
......@@ -8,7 +8,10 @@
</el-date-picker>
</el-form-item>
<el-form-item label="实验级部">
<el-input v-model="queryForm.gradeId" placeholder="请输入"></el-input>
<el-select v-model="queryForm.gradeId" placeholder="请选择级部" clearable>
<el-option v-for="(item, index) in gradeLists" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="申请老师">
<el-input v-model="queryForm.applyName" placeholder="请输入"></el-input>
......@@ -62,11 +65,14 @@
</el-table>
<!-- 查看实验室记录 -->
<el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="50%">
<el-form :model="form" ref="form" size="small" label-width="100px">
<el-form :model="form" ref="form" size="small" label-width="100px" :disabled="isEdit">
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -104,8 +110,11 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
......@@ -156,52 +165,59 @@
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="实验名称">
<el-input v-model="form.experimentName" placeholder="请输入" clearable />
<el-input v-model="form.experimentName" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="章节内容">
<el-input v-model="form.chapterContent" placeholder="请输入" clearable />
<el-input v-model="form.chapterContent" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实验分类">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable />
<el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable :disabled="isEdit">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="实验室">
<el-input v-model="form.labName" placeholder="请输入" clearable />
<el-input v-model="form.labName" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="学科">
<el-input v-model="form.sub" placeholder="请输入" clearable />
<el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;"
:disabled="isEdit">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="级部">
<el-input v-model="form.grade" placeholder="请输入" clearable />
<el-input v-model="form.grade" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="班级">
<el-input v-model="form.className" placeholder="请输入" clearable />
<el-input v-model="form.className" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="学年">
<el-input v-model="form.schoolYearSemester" placeholder="请输入" clearable />
<el-input v-model="form.schoolYearSemester" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实验时间">
<el-input v-model="form.experimentTime" placeholder="请输入" clearable />
<el-input v-model="form.experimentTime" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item>
</el-col>
......@@ -210,8 +226,8 @@
<el-row :gutter="30">
<el-col :span="24">
<el-form-item label="实验用品">
<el-input v-model="form.experimentUseGoods" type="textarea" placeholder="请输入"
clearable></el-input>
<el-input v-model="form.experimentUseGoods" type="textarea" placeholder="请输入" clearable
:disabled="isEdit"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -232,6 +248,9 @@ import {
getTeacherxq,
updateState,
} from '@/api/smartSchool/laboratoryManagement/teacherApplication'
import {
getGradelist
} from '@/api/smartSchool/gradeWork/laboratoryManagement/classDetails'
export default {
name: 'index',
dicts: ['experiment_classify', 'lab_sub'],
......@@ -243,6 +262,7 @@ export default {
gradeId: "",
applyName: "",
},
gradeLists: [],
schoolAccessoryList: [],
baseUrl: process.env.VUE_APP_BASE_API,
//表格数据
......@@ -257,6 +277,7 @@ export default {
},
total: 0,
isEdit: false,
dialogTableVisible: false,
open: false,
fileList: [],
......@@ -264,6 +285,8 @@ export default {
},
created() {
this.getList();
this.getGradelist();
},
methods: {
//表单查询
......@@ -274,6 +297,14 @@ export default {
this.loading = false
})
},
//查询级部搜索
getGradelist() {
getGradelist().then(response => {
this.loading = false;
this.gradeLists = response.data;
});
},
//查看按钮操作
handleLook(row) {
......@@ -283,7 +314,8 @@ export default {
this.fileList = response.data.schoolAccessoryList;
console.log('this.schoolAccessoryList', this.schoolAccessoryList);
console.log('this.form', this.form);
this.loading = false
this.isEdit = true;
this.loading = false;
})
this.dialogTableVisible = true;
},
......@@ -302,6 +334,7 @@ export default {
getTeacherxq(id).then(response => {
this.form = response.data;
this.fileList = response.data.schoolAccessoryList;
this.isEdit = true;
console.log('this.schoolAccessoryList', this.schoolAccessoryList);
console.log('this.form', this.form);
this.loading = false
......
......@@ -7,8 +7,11 @@
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="级部">
<el-input v-model="queryForm.grade" placeholder="请输入级部" clearable></el-input>
<el-form-item label="实验级部">
<el-select v-model="queryForm.gradeId" placeholder="请选择级部" clearable>
<el-option v-for="(item, index) in gradeLists" :key="index" :label="item.gradeName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验名称">
<el-input v-model="queryForm.experimentName" placeholder="请输入实验名称" clearable></el-input>
......@@ -100,7 +103,8 @@
import {
getList,
getSemester,
getTeacherxq
getTeacherxq,
getGradelist
} from '@/api/smartSchool/laboratoryManagement/leadlaboratoryCompletion'
export default {
name: 'index',
......@@ -116,6 +120,7 @@ export default {
grade: "",
experimentName: "",
},
gradeLists: [],
//表格数据
tableData: [
......@@ -131,10 +136,6 @@ export default {
startTime: "",
endTime: "",
},
//实验分类下拉框
options: {
},
//弹窗
dialogTableVisible: false,
total: 0,
......@@ -143,6 +144,7 @@ export default {
created() {
this.getSemesterAndList();
this.getListtc();
this.getGradelist();
},
methods: {
......@@ -178,6 +180,15 @@ export default {
console.log(error);
});
},
//查询级部搜索
getGradelist() {
getGradelist().then(response => {
this.loading = false;
this.gradeLists = response.data;
console.log("this.gradeList", this.gradeList);
});
},
//查看按钮
handleLook(row) {
console.log(row);
......@@ -194,7 +205,6 @@ export default {
};
getTeacherxq(params).then(response => {
this.ExperimentalData = response.rows;
this.total = response.total;
this.loading = false;
}).catch(error => {
......
......@@ -34,7 +34,6 @@
<script>
import {
getList,
getTeacherxq,
getSemester
} from '@/api/smartSchool/laboratoryManagement/leadlaboratoryRecords'
export default {
......@@ -44,6 +43,7 @@ export default {
queryForm: {
pageNum: 1,
pageSize: 10,
semester: "",
schoolYear: "",
applyName: "",
},
......@@ -60,13 +60,20 @@ export default {
},
methods: {
async getSemesterAndList() {
await this.getSemester(); // 等待获取学年信息
this.getList(); // 获取默认数据
try {
await this.getSemester(); // 等待获取学年信息
this.getList(); // 获取默认数据
} catch (error) {
console.log(error);
// 处理错误情况
}
},
getList() {
const params = {
schoolYear: this.queryForm.schoolYear,
applyName: this.queryForm.applyName,
semester: this.queryForm.semester,
};
getList(params)
.then(response => {
......@@ -78,8 +85,10 @@ export default {
.catch(error => {
this.loading = false;
console.log(error);
// 处理错误情况
});
},
getSemester() {
return new Promise((resolve, reject) => {
getSemester()
......@@ -98,11 +107,13 @@ export default {
this.queryForm = {
pageNum: 1,
pageSize: 10,
semester: "",
schoolYear: "",
applyName: "",
};
this.getList();
},
}
},
}
......
......@@ -2,6 +2,7 @@ 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.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -19,7 +20,9 @@ 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.domain.student.SchoolStudentParent;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentParentService;
import yangtz.cs.liu.campus.vo.organization.MemberListVo;
import java.util.Arrays;
......@@ -38,6 +41,9 @@ public class SchoolOrganizationMemberController extends BaseController
@Autowired
private ISchoolOrganizationMemberService schoolOrganizationMemberService;
@Autowired
private ISchoolStudentParentService schoolStudentParentService;
/**
* 查询社团成员列表
*/
......@@ -71,6 +77,11 @@ public class SchoolOrganizationMemberController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationMember schoolOrganizationMember)
{
//新增社团成员的时候 要根据身份证号查询这个学生对应的userid
LambdaQueryWrapper<SchoolStudentParent> wrapper = Wrappers.lambdaQuery();
wrapper.eq(SchoolStudentParent::getIdCard,schoolOrganizationMember.getCardid());
SchoolStudentParent one = schoolStudentParentService.getOne(wrapper);
schoolOrganizationMember.setUserId(one.getUserId());
return toAjax(schoolOrganizationMemberService.save(schoolOrganizationMember));
}
......
package yangtz.cs.liu.campus.controller.schoolInstrument;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentClassifyService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 仪器药品分类Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolInstrumentClassify")
public class SchoolInstrumentClassifyController extends BaseController {
@Autowired
private ISchoolInstrumentClassifyService schoolInstrumentClassifyService;
/**
* 查询仪器药品分类列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolInstrumentClassify schoolInstrumentClassify)
{
List<SchoolInstrumentClassify> list = schoolInstrumentClassifyService.selectSchoolInstrumentClassifyList(schoolInstrumentClassify);
return getDataTable(list);
}
/**
* 获取仪器药品分类详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolInstrumentClassifyService.selectSchoolInstrumentClassifyById(id));
}
/**
* 新增仪器药品分类
*/
@Log(title = "仪器药品分类", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolInstrumentClassify schoolInstrumentClassify)
{
return toAjax(schoolInstrumentClassifyService.insertSchoolInstrumentClassify(schoolInstrumentClassify));
}
/**
* 修改仪器药品分类
*/
@Log(title = "仪器药品分类", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolInstrumentClassify schoolInstrumentClassify)
{
return toAjax(schoolInstrumentClassifyService.updateSchoolInstrumentClassify(schoolInstrumentClassify));
}
/**
* 删除仪器药品分类
*/
@Log(title = "仪器药品分类", businessType = BusinessType.DELETE)
@PostMapping("/{id}")
public AjaxResult remove(@PathVariable("id") Long id)
{
return toAjax(schoolInstrumentClassifyService.deleteSchoolInstrumentClassifyById(id));
}
}
package yangtz.cs.liu.campus.controller.schoolInstrument;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentService;
import java.util.List;
/**
* 仪器管理Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolInstrument")
public class SchoolInstrumentController extends BaseController {
@Autowired
private ISchoolInstrumentService schoolInstrumentService;
/**
* 查询仪器管理列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolInstrument schoolInstrument)
{
startPage();
List<SchoolInstrument> list = schoolInstrumentService.selectSchoolInstrumentList(schoolInstrument);
return getDataTable(list);
}
/**
* 获取仪器管理详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolInstrumentService.selectSchoolInstrumentById(id));
}
/**
* 新增仪器管理
*/
@Log(title = "仪器管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolInstrument schoolInstrument)
{
return toAjax(schoolInstrumentService.insertSchoolInstrument(schoolInstrument));
}
/**
* 修改仪器管理
*/
@Log(title = "仪器管理", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolInstrument schoolInstrument)
{
return toAjax(schoolInstrumentService.updateSchoolInstrument(schoolInstrument));
}
/**
* 删除仪器管理
*/
@Log(title = "仪器管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolInstrumentService.deleteSchoolInstrumentByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolInstrument;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentDetailService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 仪器出入库明细Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolInstrumentDetail")
public class SchoolInstrumentDetailController extends BaseController {
@Autowired
private ISchoolInstrumentDetailService schoolInstrumentDetailService;
/**
* 查询仪器出入库明细列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolInstrumentDetailVo schoolInstrumentDetailVo)
{
startPage();
List<SchoolInstrumentDetail> list = schoolInstrumentDetailService.selectSchoolInstrumentDetailList(schoolInstrumentDetailVo);
return getDataTable(list);
}
/**
* 获取仪器出入库明细详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolInstrumentDetailService.selectSchoolInstrumentDetailById(id));
}
/**
* 新增仪器出入库明细
*/
@Log(title = "仪器出入库明细", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolInstrumentDetail schoolInstrumentDetail)
{
return toAjax(schoolInstrumentDetailService.insertSchoolInstrumentDetail(schoolInstrumentDetail));
}
/**
* 修改仪器出入库明细
*/
@Log(title = "仪器出入库明细", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolInstrumentDetail schoolInstrumentDetail)
{
return toAjax(schoolInstrumentDetailService.updateSchoolInstrumentDetail(schoolInstrumentDetail));
}
/**
* 删除仪器出入库明细
*/
@Log(title = "仪器出入库明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolInstrumentDetailService.deleteSchoolInstrumentDetailByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolInstrument;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrow;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentService;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolTeacherBorrowService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 教师借用Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolTeacherBorrow")
public class SchoolTeacherBorrowController extends BaseController {
@Autowired
private ISchoolTeacherBorrowService schoolTeacherBorrowService;
@Autowired
private ISchoolInstrumentService schoolInstrumentService;
/**
* 查询教师借用列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
startPage();
List<SchoolTeacherBorrowVo> list = schoolTeacherBorrowService.selectSchoolTeacherBorrowList(schoolTeacherBorrowVo);
return getDataTable(list);
}
/**
* 获取教师借用详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolTeacherBorrowService.selectSchoolTeacherBorrowById(id));
}
/**
* 新增教师借用
*/
@Log(title = "教师借用", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
return toAjax(schoolTeacherBorrowService.insertSchoolTeacherBorrow(schoolTeacherBorrowVo));
}
/**
* 办理教师借用
*/
@Log(title = "教师借用", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
return toAjax(schoolTeacherBorrowService.updateSchoolTeacherBorrow(schoolTeacherBorrowVo));
}
/**
* 删除教师借用
*/
@Log(title = "教师借用", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolTeacherBorrowService.deleteSchoolTeacherBorrowByIds(ids));
}
/**
* 借用明细列表
*/
@GetMapping("/selectInstrumentList")
public TableDataInfo selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo)
{
return getDataTable(schoolInstrumentService.selectInstrumentList(schoolInstrumentVo));
}
/**
* 仓库借用管理列表
*/
@GetMapping("/selectBorrowInstrumentList")
public TableDataInfo selectBorrowInstrumentList(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
startPage();
List<SchoolTeacherBorrowVo> list = schoolTeacherBorrowService.selectBorrowInstrumentList(schoolTeacherBorrowVo);
return getDataTable(list);
}
/**
* 归还教师借出仪器
*/
@PostMapping("/returnInstrument")
public AjaxResult returnInstrument(@RequestBody SchoolTeacherBorrowVo schoolTeacherBorrowVo){
return toAjax(schoolTeacherBorrowService.returnInstrument(schoolTeacherBorrowVo));
}
}
......@@ -527,6 +527,8 @@ public class SchoolExperimentPlanController extends BaseController
*/
@GetMapping("/getGradeClassDetails")
public TableDataInfo getGradeClassDetails(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){
//查询完成的班级实验信息
schoolTeacherLabApplyVo.setState("1");
return getDataTable(schoolTeacherLabApplyService.getGradeClassDetails(schoolTeacherLabApplyVo));
}
}
......@@ -2,6 +2,8 @@ package yangtz.cs.liu.campus.controller.schoolLab;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -95,4 +97,12 @@ public class SchoolLabCompetitionController extends BaseController
{
return toAjax(schoolLabCompetitionService.deleteSchoolLabCompetitionByIds(ids));
}
/**
* 获取教师
*/
@GetMapping("/getTeacher")
public AjaxResult getTeacher(SysUser sysUser){
return AjaxResult.success(schoolLabCompetitionService.getTeacher(sysUser));
}
}
......@@ -208,6 +208,8 @@ public class SchoolTeacherLabApplyController extends BaseController
*/
@GetMapping("/getLabUserDetial")
public TableDataInfo getLabUserDetial(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){
//查询已确认的实验室使用记录
schoolTeacherLabApplyVo.setApplyState("1");
startPage();
return getDataTable(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo));
}
......
package yangtz.cs.liu.campus.controller.schoolSecurity;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleInOut;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVehicleInOutService;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVehicleInOutVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 车辆出入登记Controller
*
* @author ruoyi
* @date 2023-09-11
*/
@RestController
@RequestMapping("/schoolVehicleInOut")
public class SchoolVehicleInOutController extends BaseController
{
@Autowired
private ISchoolVehicleInOutService schoolVehicleInOutService;
/**
* 查询车辆出入登记列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolVehicleInOutVo schoolVehicleInOutVo)
{
startPage();
List<SchoolVehicleInOutVo> list = schoolVehicleInOutService.selectSchoolVehicleInOutList(schoolVehicleInOutVo);
return getDataTable(list);
}
/**
* 导出车辆出入登记列表
*/
@Log(title = "车辆出入登记", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolVehicleInOutVo schoolVehicleInOutVo)
{
List<SchoolVehicleInOutVo> list = schoolVehicleInOutService.selectSchoolVehicleInOutList(schoolVehicleInOutVo);
ExcelUtil<SchoolVehicleInOutVo> util = new ExcelUtil<SchoolVehicleInOutVo>(SchoolVehicleInOutVo.class);
util.exportExcel(response, list, "车辆出入登记数据");
}
/**
* 获取车辆出入登记详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolVehicleInOutService.selectSchoolVehicleInOutById(id));
}
/**
* 新增车辆出入登记
*/
@Log(title = "车辆出入登记", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolVehicleInOutVo schoolVehicleInOutVo)
{
return toAjax(schoolVehicleInOutService.insertSchoolVehicleInOut(schoolVehicleInOutVo));
}
/**
* 修改车辆出入登记
*/
@Log(title = "车辆出入登记", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolVehicleInOutVo schoolVehicleInOutVo)
{
return toAjax(schoolVehicleInOutService.updateSchoolVehicleInOut(schoolVehicleInOutVo));
}
/**
* 删除车辆出入登记
*/
@Log(title = "车辆出入登记", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolVehicleInOutService.deleteSchoolVehicleInOutByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolSecurity;
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.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 yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleRegistration;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVehicleRegistrationService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 车辆登记Controller
*
* @author ruoyi
* @date 2023-09-11
*/
@RestController
@RequestMapping("/schoolVehicleRegistration/schoolVehicleRegistration")
public class SchoolVehicleRegistrationController extends BaseController
{
@Autowired
private ISchoolVehicleRegistrationService schoolVehicleRegistrationService;
/**
* 查询车辆登记列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolVehicleRegistration schoolVehicleRegistration)
{
startPage();
List<SchoolVehicleRegistration> list = schoolVehicleRegistrationService.selectSchoolVehicleRegistrationList(schoolVehicleRegistration);
return getDataTable(list);
}
/**
* 导出车辆登记列表
*/
@Log(title = "车辆登记", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolVehicleRegistration schoolVehicleRegistration)
{
List<SchoolVehicleRegistration> list = schoolVehicleRegistrationService.selectSchoolVehicleRegistrationList(schoolVehicleRegistration);
ExcelUtil<SchoolVehicleRegistration> util = new ExcelUtil<SchoolVehicleRegistration>(SchoolVehicleRegistration.class);
util.exportExcel(response, list, "车辆登记数据");
}
/**
* 获取车辆登记详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolVehicleRegistrationService.selectSchoolVehicleRegistrationById(id));
}
/**
* 新增车辆登记
*/
@Log(title = "车辆登记", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolVehicleRegistration schoolVehicleRegistration)
{
return toAjax(schoolVehicleRegistrationService.insertSchoolVehicleRegistration(schoolVehicleRegistration));
}
/**
* 修改车辆登记
*/
@Log(title = "车辆登记", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolVehicleRegistration schoolVehicleRegistration)
{
return toAjax(schoolVehicleRegistrationService.updateSchoolVehicleRegistration(schoolVehicleRegistration));
}
/**
* 删除车辆登记
*/
@Log(title = "车辆登记", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolVehicleRegistrationService.deleteSchoolVehicleRegistrationByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolSecurity;
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.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 yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsult;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVideoConsultService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultVo;
/**
* 监控录像调用(内部)Controller
*
* @author ruoyi
* @date 2023-09-11
*/
@RestController
@RequestMapping("/schoolVideoConsult")
public class SchoolVideoConsultController extends BaseController
{
@Autowired
private ISchoolVideoConsultService schoolVideoConsultService;
/**
* 查询监控录像调用(内部)列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolVideoConsultVo schoolVideoConsultVo)
{
startPage();
List<SchoolVideoConsultVo> list = schoolVideoConsultService.selectSchoolVideoConsultList(schoolVideoConsultVo);
return getDataTable(list);
}
/**
* 导出监控录像调用(内部)列表
*/
@Log(title = "监控录像调用(内部)", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolVideoConsultVo schoolVideoConsultVo)
{
List<SchoolVideoConsultVo> list = schoolVideoConsultService.selectSchoolVideoConsultList(schoolVideoConsultVo);
ExcelUtil<SchoolVideoConsultVo> util = new ExcelUtil<SchoolVideoConsultVo>(SchoolVideoConsultVo.class);
util.exportExcel(response, list, "监控录像调用(内部)数据");
}
/**
* 获取监控录像调用(内部)详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolVideoConsultService.selectSchoolVideoConsultById(id));
}
/**
* 新增监控录像调用(内部)
*/
@Log(title = "监控录像调用(内部)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolVideoConsultVo schoolVideoConsultVo)
{
return toAjax(schoolVideoConsultService.insertSchoolVideoConsult(schoolVideoConsultVo));
}
/**
* 修改监控录像调用(内部)
*/
@Log(title = "监控录像调用(内部)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolVideoConsultVo schoolVideoConsultVo)
{
return toAjax(schoolVideoConsultService.updateSchoolVideoConsult(schoolVideoConsultVo));
}
/**
* 删除监控录像调用(内部)
*/
@Log(title = "监控录像调用(内部)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolVideoConsultService.deleteSchoolVideoConsultByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolSecurity;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsultExternal;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVideoConsultExternalService;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultExternalVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 监控调阅(外部)Controller
*
* @author ruoyi
* @date 2023-09-11
*/
@RestController
@RequestMapping("/schoolVideoConsultExternal")
public class SchoolVideoConsultExternalController extends BaseController
{
@Autowired
private ISchoolVideoConsultExternalService schoolVideoConsultExternalService;
/**
* 查询监控调阅(外部)列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
startPage();
List<SchoolVideoConsultExternalVo> list = schoolVideoConsultExternalService.selectSchoolVideoConsultExternalList(schoolVideoConsultExternalVo);
return getDataTable(list);
}
/**
* 导出监控调阅(外部)列表
*/
@Log(title = "监控调阅(外部)", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
List<SchoolVideoConsultExternalVo> list = schoolVideoConsultExternalService.selectSchoolVideoConsultExternalList(schoolVideoConsultExternalVo);
ExcelUtil<SchoolVideoConsultExternalVo> util = new ExcelUtil<SchoolVideoConsultExternalVo>(SchoolVideoConsultExternalVo.class);
util.exportExcel(response, list, "监控调阅(外部)数据");
}
/**
* 获取监控调阅(外部)详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolVideoConsultExternalService.selectSchoolVideoConsultExternalById(id));
}
/**
* 新增监控调阅(外部)
*/
@Log(title = "监控调阅(外部)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
return toAjax(schoolVideoConsultExternalService.insertSchoolVideoConsultExternal(schoolVideoConsultExternalVo));
}
/**
* 修改监控调阅(外部)
*/
@Log(title = "监控调阅(外部)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
return toAjax(schoolVideoConsultExternalService.updateSchoolVideoConsultExternal(schoolVideoConsultExternalVo));
}
/**
* 删除监控调阅(外部)
*/
@Log(title = "监控调阅(外部)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolVideoConsultExternalService.deleteSchoolVideoConsultExternalByIds(ids));
}
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 仪器管理对象 school_instrument
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrument extends OurBaseEntity {
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 仪器型号 */
@Excel(name = "仪器型号")
private String instrumentModel;
/** 仪器数量 */
@Excel(name = "仪器数量")
private Integer instrumentNum;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 仪器药品分类对象 school_instrument_classify
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrumentClassify extends OurBaseEntity {
/** 仪器类名 */
@Excel(name = "仪器类名")
private String instrumentTypeName;
/** 上级分类id */
@Excel(name = "上级分类id")
private Long parentId;
/** 祖级列表 */
@Excel(name = "祖级列表")
private String ancestors;
/** 排序 */
@Excel(name = "排序")
private Integer orderNum;
/** 是否为消耗品(1是,0否) */
@Excel(name = "是否为消耗品",readConverterExp = ("1=是,0=否"))
private String isConsumables;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 仪器出入库明细对象 school_instrument_detail
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrumentDetail extends OurBaseEntity {
/** 仪器id */
@Excel(name = "仪器id")
private Long instrumentId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 变动类型(1出库,2入库) */
@Excel(name = "变动类型", readConverterExp = "1=出库,2入库")
private String variationType;
/** 变动数量 */
@Excel(name = "变动数量")
private Integer variationNum;
/** 旧库存数量 */
@Excel(name = "旧库存数量")
private Integer oldStockNum;
/** 新库存数量 */
@Excel(name = "新库存数量")
private Integer newStockNum;
/** 变更时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date variationTime;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 教师借用对象 school_teacher_borrow
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolTeacherBorrow extends OurBaseEntity {
/** 借用人id */
@Excel(name = "借用人id")
private Long borrowById;
/** 借用人 */
@Excel(name = "借用人")
private String borrowBy;
/** 借用学科(1物理,2化学,3生物) */
@Excel(name = "借用学科(1物理,2化学,3生物)")
private String borrowSub;
/** 借用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "借用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date borrowTime;
/** 借用状态(0未归还,1已归还,2已申请) */
@Excel(name = "借用状态(0未归还,1已归还,2已申请)")
private String borrowState;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 归还时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date returnTime;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 教师借用明细对象 school_teacher_borrow_detail
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolTeacherBorrowDetail {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 教师借用主键id */
@Excel(name = "教师借用主键id")
private Long teacherBorrowId;
/** 仪器id */
@Excel(name = "仪器id")
private Long instrumentId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器型号 */
@Excel(name = "仪器型号")
private String instrumentModel;
/** 仪器数量 */
@Excel(name = "仪器数量")
private Integer instrumentNum;
/** 借用数量 */
@Excel(name = "借用数量")
private Integer borrowNum;
/** 损坏数量 */
private Integer damageNum;
private String delFlag;
}
package yangtz.cs.liu.campus.domain.schoolSecurity;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 车辆出入登记对象 school_vehicle_in_out
*
* @author ruoyi
* @date 2023-09-11
*/
@Data
public class SchoolVehicleInOut extends OurBaseEntity
{
/** 流程实例id */
private String instanceId;
/** 用户id */
private Long userId;
/** 用户名称 */
private String userName;
/** 联系电话 */
private Long phone;
/** 工作性质(1在编,2合同制,3代课,4其他) */
private String jobNature;
/** 预计在校工作开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date workStartTime;
/** 预计在校工作结束时间 */
private String workEndTime;
/** 现申请登记车号 */
private String applyLicenseNumber;
/** 车辆品牌 */
private String brand;
/** 车型 */
private String carType;
/** 已登记车辆车号 */
private String oldLicenseNumber;
/** 已登记车辆是否保留(1是,0否) */
private String isRetain;
/** 申请人id */
private Long applyUserId;
/** 申请人 */
private String applyUser;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请人类型((0教工 1职工)) */
private String applyType;
/** 状态(0未提交,1级部/处室审核,2分管领导审核,3已结束) */
private String state;
/** 申请人级部/处室id */
private Long applyOrgid;
/** 申请人级部/处室 */
private String applyOrgname;
/** 审批人id1 */
private Long handUserId1;
/** 审批人1 */
private String handUserName1;
/** 审批人1意见 */
private String handUserOpinion1;
/** 审批人1签名是否显示(1是,0否) */
private String isSign1;
/** 审批人id2 */
private Long handUserId2;
/** 审批人2 */
private String handUserName2;
/** 审批人2意见 */
private String handUserOpinion2;
/** 审批人2签名是否显示(1是,0否) */
private String isSign2;
}
package yangtz.cs.liu.campus.domain.schoolSecurity;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 车辆登记对象 school_vehicle_registration
*
* @author ruoyi
* @date 2023-09-11
*/
@Data
public class SchoolVehicleRegistration extends OurBaseEntity
{
/** 用户id */
private Long userId;
/** 用户名称 */
private String userName;
/** 工作性质(1在编,2合同制,3代课,4其他) */
private String jobNature;
/** 常用车号 */
private String licenseNumber;
/** 品牌及车型 */
private String brand;
/** 联系电话 */
private Long phone;
/** 备注1 */
private String remark1;
/** 备注2 */
private String remark2;
/** 备注3 */
private String remark3;
/** 备注4 */
private String remark4;
/** 备注5 */
private String remark5;
}
package yangtz.cs.liu.campus.domain.schoolSecurity;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 监控录像调用(内部)对象 school_video_consult
*
* @author ruoyi
* @date 2023-09-11
*/
@Data
public class SchoolVideoConsult extends OurBaseEntity
{
/** 流程实例id */
private String instanceId;
/** 用户id */
private Long userId;
/** 用户名称 */
private String userName;
/** 联系电话 */
private Long phone;
/** 所在部门id */
private Long orgid;
/** 所在部门 */
private String orgname;
/** 录像调用开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoStartTime;
/** 录像调用结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoEndTime;
/** 调阅位置 */
private String location;
/** 申请事由 */
private String applyReason;
/** 状态(0未提交,1级部/处室审核,2信息技术中心负责人审核,3安全管理中心负责人审核,4分管领导审核,5结束) */
private String state;
/** 申请人id */
private Long applyUserId;
/** 申请人 */
private String applyUser;
/** 申请部门id */
private Long applyOrgid;
/** 申请部门 */
private String applyOrgname;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请人类型(0教工 1职工) */
private String applyType;
/** 审批人id1 */
private Long handUserId1;
/** 审批人1 */
private String handUserName1;
/** 审批人1意见 */
private String handUserOpinion1;
/** 审批人1签名是否显示(1是,0否) */
private String isSign1;
/** 审批人id2 */
private Long handUserId2;
/** 审批人2 */
private String handUserName2;
/** 审批人2意见 */
private String handUserOpinion2;
/** 审批人2签名是否显示(1是,0否) */
private String isSign2;
/** 审批人id3 */
private Long handUserId3;
/** 审批人3 */
private String handUserName3;
/** 审批人3意见 */
private String handUserOpinion3;
/** 审批人3签名是否显示(1是,0否) */
private String isSign3;
/** 审批人id4 */
private Long handUserId4;
/** 审批人4 */
private String handUserName4;
/** 审批人4意见 */
private String handUserOpinion4;
/** 审批人4签名是否显示(1是,0否) */
private String isSign4;
/** 调取结果1 */
private String fetchResult1;
/** 调取结果2 */
private String fetchResult2;
}
package yangtz.cs.liu.campus.domain.schoolSecurity;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 监控调阅(外部)对象 school_video_consult_external
*
* @author ruoyi
* @date 2023-09-11
*/
@Data
public class SchoolVideoConsultExternal extends OurBaseEntity
{
/** 流程实例id */
private String instanceId;
/** 用户id */
private Long userId;
/** 姓名 */
private String userName;
/** 联系电话 */
private Long phone;
/** 身份证号 */
private String idCard;
/** 录像调用开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoStartTime;
/** 录像调用结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoEndTime;
/** 调阅位置 */
private String location;
/** 申请事由 */
private String applyReason;
/** 状态(0未提交,1信息技术中心负责人审核,2安保负责人审核,3安全管理中心负责人审核,4分管领导审核,5结束) */
private String state;
/** 申请人id */
private Long applyUserId;
/** 申请人 */
private String applyUser;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 审批人id1 */
private Long handUserId1;
/** 审批人1 */
private String handUserName1;
/** 审批人1意见 */
private String handUserOpinion1;
/** 审批人1签名是否显示(1是,0否) */
private String isSign1;
/** 审批人id2 */
private Long handUserId2;
/** 审批人2 */
private String handUserName2;
/** 审批人2意见 */
private String handUserOpinion2;
/** 审批人2签名是否显示(1是,0否) */
private String isSign2;
/** 审批人id3 */
private Long handUserId3;
/** 审批人3 */
private String handUserName3;
/** 审批人3意见 */
private String handUserOpinion3;
/** 审批人3签名是否显示(1是,0否) */
private String isSign3;
/** 审批人id4 */
private Long handUserId4;
/** 审批人4 */
private String handUserName4;
/** 审批人4意见 */
private String handUserOpinion4;
/** 审批人4签名是否显示(1是,0否) */
private String isSign4;
/** 调取结果 */
private String fetchResult;
}
......@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.domain.teacher;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
......@@ -33,7 +34,8 @@ public class TeacherJy extends OurBaseEntity {
//借用日期
@Excel(name = "借用日期")
private String borrowTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date borrowTime;
//借用人
@Excel(name = "借用人")
......
package yangtz.cs.liu.campus.domain.teacher;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
@Data
public class TeacherLy extends OurBaseEntity {
private static final long serialVersionUID = 1L;
......@@ -28,7 +31,8 @@ public class TeacherLy extends OurBaseEntity {
//领用日期
@Excel(name = "领用日期")
private String recipientTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date recipientTime;
private Long recipientById;
//领用人
......
......@@ -27,7 +27,7 @@ public interface EquipmentLedgerMapper extends BaseMapper<SchoolEquipmentLedger>
* 获取用户
* @return
*/
List<Map<String, String>> getUser(SysUser sysUser);
List<Map<String, Object>> getUser(SysUser sysUser);
/**
* 查看个人设备台账列表
......
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import java.util.List;
/**
* 仪器药品分类Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolInstrumentClassifyMapper extends BaseMapper<SchoolInstrumentClassify> {
/**
* 查询仪器药品分类
*
* @param id 仪器药品分类主键
* @return 仪器药品分类
*/
public SchoolInstrumentClassify selectSchoolInstrumentClassifyById(Long id);
/**
* 查询仪器药品分类列表
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 仪器药品分类集合
*/
public List<SchoolInstrumentClassify> selectSchoolInstrumentClassifyList(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 新增仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int insertSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 修改仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int updateSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 删除仪器药品分类
*
* @param id 仪器药品分类主键
* @return 结果
*/
public int deleteSchoolInstrumentClassifyById(Long id);
/**
* 批量删除仪器药品分类
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolInstrumentClassifyByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import java.util.List;
/**
* 仪器出入库明细Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolInstrumentDetailMapper extends BaseMapper<SchoolInstrumentDetail> {
/**
* 查询仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 仪器出入库明细
*/
public SchoolInstrumentDetail selectSchoolInstrumentDetailById(Long id);
/**
* 查询仪器出入库明细列表
*
* @param schoolInstrumentDetailVo 仪器出入库明细
* @return 仪器出入库明细集合
*/
public List<SchoolInstrumentDetail> selectSchoolInstrumentDetailList(SchoolInstrumentDetailVo schoolInstrumentDetailVo);
/**
* 新增仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int insertSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 修改仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int updateSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 删除仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 结果
*/
public int deleteSchoolInstrumentDetailById(Long id);
/**
* 批量删除仪器出入库明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolInstrumentDetailByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import java.util.List;
/**
* 仪器管理Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolInstrumentMapper extends BaseMapper<SchoolInstrument> {
/**
* 查询仪器管理
*
* @param id 仪器管理主键
* @return 仪器管理
*/
public SchoolInstrument selectSchoolInstrumentById(Long id);
/**
* 查询仪器管理列表
*
* @param schoolInstrument 仪器管理
* @return 仪器管理集合
*/
public List<SchoolInstrument> selectSchoolInstrumentList(SchoolInstrument schoolInstrument);
/**
* 新增仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int insertSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 修改仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int updateSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 删除仪器管理
*
* @param id 仪器管理主键
* @return 结果
*/
public int deleteSchoolInstrumentById(Long id);
/**
* 批量删除仪器管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolInstrumentByIds(Long[] ids);
/**
* 教师借用-明细列表
* @param schoolInstrumentVo
* @return
*/
List<SchoolInstrument> selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo);
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
/**
* 教师借用明细Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolTeacherBorrowDetailMapper extends BaseMapper<SchoolTeacherBorrowDetail> {
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrow;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import java.util.List;
/**
* 教师借用Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolTeacherBorrowMapper extends BaseMapper<SchoolTeacherBorrow> {
/**
* 查询教师借用
*
* @param id 教师借用主键
* @return 教师借用
*/
public SchoolTeacherBorrowVo selectSchoolTeacherBorrowById(Long id);
/**
* 查询教师借用列表
*
* @param schoolTeacherBorrowVo 教师借用
* @return 教师借用集合
*/
public List<SchoolTeacherBorrowVo> selectSchoolTeacherBorrowList(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 新增教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int insertSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 修改教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int updateSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 删除教师借用
*
* @param id 教师借用主键
* @return 结果
*/
public int deleteSchoolTeacherBorrowById(Long id);
/**
* 批量删除教师借用
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherBorrowByIds(Long[] ids);
/**
* 批量删除教师借用明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherBorrowDetailByTeacherBorrowIds(Long[] ids);
/**
* 批量新增教师借用明细
*
* @param schoolTeacherBorrowDetailList 教师借用明细列表
* @return 结果
*/
public int batchSchoolTeacherBorrowDetail(List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList);
/**
* 通过教师借用主键删除教师借用明细信息
*
* @param id 教师借用ID
* @return 结果
*/
public int deleteSchoolTeacherBorrowDetailByTeacherBorrowId(Long id);
/**
* 批量修改归还教师借用明细
* @param list
* @return
*/
int updateSchoolTeacherBorrowDetails(@Param("list") List<SchoolTeacherBorrowDetail> list);
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabCompetitionVo;
import java.util.List;
import java.util.Map;
/**
* 实验室竞赛Mapper接口
......@@ -84,4 +86,11 @@ public interface SchoolLabCompetitionMapper extends BaseMapper<SchoolLabCompetit
* @return
*/
int deleteSchoolAccessoryByBusinessId(Long id);
/**
* 获取教师
* @param sysUser
* @return
*/
List<Map<String, Object>> getTeacher(SysUser sysUser);
}
......@@ -75,7 +75,7 @@ public interface SchoolLabMapper extends BaseMapper<SchoolLab>
* 查询指定实验室管理员
* @return
*/
public Map<String,String> getLabAdmin(@Param("roleKey") String roleKey);
public Map<String,String> getLabAdmin(@Param("roleKey") String roleKey,@Param("userId") Long userId);
/**
* 查询全部学科
......
package yangtz.cs.liu.campus.mapper.schoolSecurity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleInOut;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVehicleInOutVo;
import java.util.List;
/**
* 车辆出入登记Mapper接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface SchoolVehicleInOutMapper extends BaseMapper<SchoolVehicleInOut>
{
/**
* 查询车辆出入登记
*
* @param id 车辆出入登记主键
* @return 车辆出入登记
*/
public SchoolVehicleInOutVo selectSchoolVehicleInOutById(Long id);
/**
* 查询车辆出入登记列表
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 车辆出入登记集合
*/
public List<SchoolVehicleInOutVo> selectSchoolVehicleInOutList(SchoolVehicleInOutVo schoolVehicleInOutVo);
/**
* 新增车辆出入登记
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 结果
*/
public int insertSchoolVehicleInOut(SchoolVehicleInOutVo schoolVehicleInOutVo);
/**
* 修改车辆出入登记
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 结果
*/
public int updateSchoolVehicleInOut(SchoolVehicleInOutVo schoolVehicleInOutVo);
/**
* 删除车辆出入登记
*
* @param id 车辆出入登记主键
* @return 结果
*/
public int deleteSchoolVehicleInOutById(Long id);
/**
* 批量删除车辆出入登记
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolVehicleInOutByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolSecurity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleRegistration;
import java.util.List;
/**
* 车辆登记Mapper接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface SchoolVehicleRegistrationMapper extends BaseMapper<SchoolVehicleRegistration>
{
/**
* 查询车辆登记
*
* @param id 车辆登记主键
* @return 车辆登记
*/
public SchoolVehicleRegistration selectSchoolVehicleRegistrationById(Long id);
/**
* 查询车辆登记列表
*
* @param schoolVehicleRegistration 车辆登记
* @return 车辆登记集合
*/
public List<SchoolVehicleRegistration> selectSchoolVehicleRegistrationList(SchoolVehicleRegistration schoolVehicleRegistration);
/**
* 新增车辆登记
*
* @param schoolVehicleRegistration 车辆登记
* @return 结果
*/
public int insertSchoolVehicleRegistration(SchoolVehicleRegistration schoolVehicleRegistration);
/**
* 修改车辆登记
*
* @param schoolVehicleRegistration 车辆登记
* @return 结果
*/
public int updateSchoolVehicleRegistration(SchoolVehicleRegistration schoolVehicleRegistration);
/**
* 删除车辆登记
*
* @param id 车辆登记主键
* @return 结果
*/
public int deleteSchoolVehicleRegistrationById(Long id);
/**
* 批量删除车辆登记
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolVehicleRegistrationByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolSecurity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsultExternal;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultExternalVo;
import java.util.List;
/**
* 监控调阅(外部)Mapper接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface SchoolVideoConsultExternalMapper extends BaseMapper<SchoolVideoConsultExternal>
{
/**
* 查询监控调阅(外部)
*
* @param id 监控调阅(外部)主键
* @return 监控调阅(外部)
*/
public SchoolVideoConsultExternalVo selectSchoolVideoConsultExternalById(Long id);
/**
* 查询监控调阅(外部)列表
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 监控调阅(外部)集合
*/
public List<SchoolVideoConsultExternalVo> selectSchoolVideoConsultExternalList(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo);
/**
* 新增监控调阅(外部)
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 结果
*/
public int insertSchoolVideoConsultExternal(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo);
/**
* 修改监控调阅(外部)
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 结果
*/
public int updateSchoolVideoConsultExternal(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo);
/**
* 删除监控调阅(外部)
*
* @param id 监控调阅(外部)主键
* @return 结果
*/
public int deleteSchoolVideoConsultExternalById(Long id);
/**
* 批量删除监控调阅(外部)
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolVideoConsultExternalByIds(Long[] ids);
/**
* 批量删除附件信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolAccessoryByBusinessIds(Long[] ids);
/**
* 批量新增附件信息
*
* @param schoolAccessoryList 附件信息列表
* @return 结果
*/
public int batchSchoolAccessory(List<SchoolAccessory> schoolAccessoryList);
/**
* 通过监控调阅(外部)主键删除附件信息信息
*
* @param id 监控调阅(外部)ID
* @return 结果
*/
public int deleteSchoolAccessoryByBusinessId(Long id);
}
package yangtz.cs.liu.campus.mapper.schoolSecurity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsult;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultVo;
import java.util.List;
/**
* 监控录像调用(内部)Mapper接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface SchoolVideoConsultMapper extends BaseMapper<SchoolVideoConsult>
{
/**
* 查询监控录像调用(内部)
*
* @param id 监控录像调用(内部)主键
* @return 监控录像调用(内部)
*/
public SchoolVideoConsultVo selectSchoolVideoConsultById(Long id);
/**
* 查询监控录像调用(内部)列表
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 监控录像调用(内部)集合
*/
public List<SchoolVideoConsultVo> selectSchoolVideoConsultList(SchoolVideoConsultVo schoolVideoConsultVo);
/**
* 新增监控录像调用(内部)
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 结果
*/
public int insertSchoolVideoConsult(SchoolVideoConsultVo schoolVideoConsultVo);
/**
* 修改监控录像调用(内部)
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 结果
*/
public int updateSchoolVideoConsult(SchoolVideoConsultVo schoolVideoConsultVo);
/**
* 删除监控录像调用(内部)
*
* @param id 监控录像调用(内部)主键
* @return 结果
*/
public int deleteSchoolVideoConsultById(Long id);
/**
* 批量删除监控录像调用(内部)
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolVideoConsultByIds(Long[] ids);
}
......@@ -51,26 +51,21 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolCirculationVo> selectSchoolCirculationVoList(SchoolCirculationVo schoolCirculationVo) {
List<SchoolCirculationVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
break;
return circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolCirculationVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = circulationMapper.selectSchoolCirculationVoListGr(schoolCirculationVo);
return circulationMapper.selectSchoolCirculationVoListGr(schoolCirculationVo);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
}
if (user.isAdmin()){
return circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
}
return list;
return new ArrayList<>();
}
public List<SchoolCirculationVo> selectVxSchoolCirculationVoList(
SchoolReceiveQuery schoolReceiveQuery) {
......
......@@ -46,26 +46,21 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolEquipmentLedger> selectSchoolEquipmentLedgerList(SchoolEquipmentLedgerVo schoolEquipmentLedgerVo) {
List<SchoolEquipmentLedger> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
break;
return equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolEquipmentLedgerVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = equipmentLedgerMapper.selectSchoolEquipmentLedgerListGr(schoolEquipmentLedgerVo);
return equipmentLedgerMapper.selectSchoolEquipmentLedgerListGr(schoolEquipmentLedgerVo);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
}
if (user.isAdmin()){
return equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
}
return list;
return new ArrayList<>();
}
/**
......@@ -278,7 +273,7 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
* @return
*/
@Override
public List<Map<String, String>> getUser(SysUser sysUser) {
public List<Map<String, Object>> getUser(SysUser sysUser) {
return equipmentLedgerMapper.getUser(sysUser);
}
}
......@@ -37,26 +37,21 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolEquipmentRepairVo> selectSchoolEquipmentRepairVoList(SchoolEquipmentRepairVo schoolEquipmentRepairVo) {
List<SchoolEquipmentRepairVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
break;
return equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolEquipmentRepairVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = equipmentRepairMapper.selectSchoolEquipmentRepairVoListGr(schoolEquipmentRepairVo);
return equipmentRepairMapper.selectSchoolEquipmentRepairVoListGr(schoolEquipmentRepairVo);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
}
if (user.isAdmin()){
return equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
}
return list;
return new ArrayList<>();
}
/**
......
......@@ -27,26 +27,21 @@ public class InStockServiceImpl extends ServiceImpl<InStockMapper, SchoolInStock
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolInStockVo> selectSchoolInStockVoList(SchoolInStockVo schoolInStockVo) {
List<SchoolInStockVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
break;
return inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolInStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = inStockMapper.selectSchoolInStockVoListGr(schoolInStockVo);
return inStockMapper.selectSchoolInStockVoListGr(schoolInStockVo);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
}
if (user.isAdmin()){
return inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
}
return list;
return new ArrayList<>();
}
/**
......
......@@ -27,26 +27,21 @@ public class OutStockServiceImpl extends ServiceImpl<OutStockMapper, SchoolOutSt
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolOutStockVo> selectSchoolOutStockVoList(SchoolOutStockVo schoolOutStockVo) {
List<SchoolOutStockVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
break;
return outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolOutStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = outStockMapper.selectSchoolOutStockVoListGr(schoolOutStockVo);
return outStockMapper.selectSchoolOutStockVoListGr(schoolOutStockVo);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
}
if (user.isAdmin()){
return outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
}
return list;
return new ArrayList<>();
}
/**
......
......@@ -36,26 +36,21 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolProductCategory> selectSchoolProductCateGory(SchoolProductCategory schoolProductCategory) {
List<SchoolProductCategory> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
break;
return productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolProductCategory.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = productCategoryMapper.selectSchoolProductCateGoryGr(schoolProductCategory);
return productCategoryMapper.selectSchoolProductCateGoryGr(schoolProductCategory);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
}
if (user.isAdmin()){
return productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
}
return list;
return new ArrayList<>();
}
/**
......
......@@ -37,26 +37,21 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive
* @return
*/
@Override
// @DataScope(userAlias = "u")
public List<SchoolReceiveVo> selectSchoolReceiveVoList(SchoolReceiveVo schoolReceiveVo) {
List<SchoolReceiveVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
list = receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
break;
return receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
}else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolReceiveVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = receiveMapper.selectSchoolReceiveVoListGr(schoolReceiveVo);
return receiveMapper.selectSchoolReceiveVoListGr(schoolReceiveVo);
}
}
if (roles.size() <= 0){
if (user.isAdmin()){
list = receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
}
if (user.isAdmin()){
return receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
}
return list;
return new ArrayList<>();
}
/**
......
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentClassifyMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentClassifyService;
import java.util.List;
/**
* 仪器药品分类Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolInstrumentClassifyServiceImpl extends ServiceImpl<SchoolInstrumentClassifyMapper, SchoolInstrumentClassify> implements ISchoolInstrumentClassifyService {
@Autowired
private SchoolInstrumentClassifyMapper schoolInstrumentClassifyMapper;
/**
* 查询仪器药品分类
*
* @param id 仪器药品分类主键
* @return 仪器药品分类
*/
@Override
public SchoolInstrumentClassify selectSchoolInstrumentClassifyById(Long id)
{
return schoolInstrumentClassifyMapper.selectSchoolInstrumentClassifyById(id);
}
/**
* 查询仪器药品分类列表
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 仪器药品分类
*/
@Override
public List<SchoolInstrumentClassify> selectSchoolInstrumentClassifyList(SchoolInstrumentClassify schoolInstrumentClassify)
{
return schoolInstrumentClassifyMapper.selectSchoolInstrumentClassifyList(schoolInstrumentClassify);
}
/**
* 新增仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
@Override
public int insertSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify)
{
//获取登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//父id
if (StringUtils.isNotNull(schoolInstrumentClassify.getParentId())){
SchoolInstrumentClassify instrumentClassify = schoolInstrumentClassifyMapper.selectById(schoolInstrumentClassify.getParentId());
schoolInstrumentClassify.setAncestors(instrumentClassify.getAncestors() + "," + schoolInstrumentClassify.getParentId());
}else {
schoolInstrumentClassify.setParentId((long)0);
schoolInstrumentClassify.setAncestors("0");
}
schoolInstrumentClassify.setCreateBy(user.getUserName());
schoolInstrumentClassify.setCreateTime(DateUtils.getNowDate());
return schoolInstrumentClassifyMapper.insert(schoolInstrumentClassify);
}
/**
* 修改仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
@Override
public int updateSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify)
{
//获取登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//父id
if (StringUtils.isNotNull(schoolInstrumentClassify.getParentId())){
SchoolInstrumentClassify instrumentClassify = schoolInstrumentClassifyMapper.selectById(schoolInstrumentClassify.getParentId());
schoolInstrumentClassify.setAncestors(instrumentClassify.getAncestors() + "," + schoolInstrumentClassify.getParentId());
}else {
schoolInstrumentClassify.setParentId((long)0);
schoolInstrumentClassify.setAncestors("0");
}
schoolInstrumentClassify.setUpdateBy(user.getUserName());
schoolInstrumentClassify.setUpdateTime(DateUtils.getNowDate());
return schoolInstrumentClassifyMapper.updateById(schoolInstrumentClassify);
}
/**
* 批量删除仪器药品分类
*
* @param ids 需要删除的仪器药品分类主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentClassifyByIds(Long[] ids)
{
return schoolInstrumentClassifyMapper.deleteSchoolInstrumentClassifyByIds(ids);
}
/**
* 删除仪器药品分类信息
*
* @param id 仪器药品分类主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentClassifyById(Long id)
{
return schoolInstrumentClassifyMapper.deleteSchoolInstrumentClassifyById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentDetailMapper;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentDetailService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import java.util.List;
/**
* 仪器出入库明细Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolInstrumentDetailServiceImpl extends ServiceImpl<SchoolInstrumentDetailMapper, SchoolInstrumentDetail> implements ISchoolInstrumentDetailService {
@Autowired
private SchoolInstrumentDetailMapper schoolInstrumentDetailMapper;
@Autowired
private SchoolInstrumentMapper schoolInstrumentMapper;
/**
* 查询仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 仪器出入库明细
*/
@Override
public SchoolInstrumentDetail selectSchoolInstrumentDetailById(Long id)
{
return schoolInstrumentDetailMapper.selectSchoolInstrumentDetailById(id);
}
/**
* 查询仪器出入库明细列表
*
* @param schoolInstrumentDetailVo 仪器出入库明细
* @return 仪器出入库明细
*/
@Override
public List<SchoolInstrumentDetail> selectSchoolInstrumentDetailList(SchoolInstrumentDetailVo schoolInstrumentDetailVo)
{
return schoolInstrumentDetailMapper.selectSchoolInstrumentDetailList(schoolInstrumentDetailVo);
}
/**
* 新增仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
@Override
public int insertSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//修改仪器库存
//仪器id
Long instrumentId = schoolInstrumentDetail.getInstrumentId();
//新库存数量
Integer newStockNum = schoolInstrumentDetail.getNewStockNum();
SchoolInstrument schoolInstrument = new SchoolInstrument();
schoolInstrument.setId(instrumentId);
schoolInstrument.setInstrumentNum(newStockNum);
schoolInstrumentMapper.updateById(schoolInstrument);
SchoolInstrument instrument = schoolInstrumentMapper.selectById(instrumentId);
schoolInstrumentDetail.setInstrumentName(instrument.getInstrumentName());
schoolInstrumentDetail.setInstrumentTypeId(instrument.getInstrumentTypeId());
schoolInstrumentDetail.setInstrumentTypeName(instrument.getInstrumentTypeName());
schoolInstrumentDetail.setVariationTime(DateUtils.getNowDate());
schoolInstrumentDetail.setCreateBy(user.getUserName());
schoolInstrumentDetail.setCreateTime(DateUtils.getNowDate());
return schoolInstrumentDetailMapper.insertSchoolInstrumentDetail(schoolInstrumentDetail);
}
/**
* 修改仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
@Override
public int updateSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolInstrumentDetail.setUpdateBy(user.getUserName());
schoolInstrumentDetail.setUpdateTime(DateUtils.getNowDate());
return schoolInstrumentDetailMapper.updateSchoolInstrumentDetail(schoolInstrumentDetail);
}
/**
* 批量删除仪器出入库明细
*
* @param ids 需要删除的仪器出入库明细主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentDetailByIds(Long[] ids)
{
return schoolInstrumentDetailMapper.deleteSchoolInstrumentDetailByIds(ids);
}
/**
* 删除仪器出入库明细信息
*
* @param id 仪器出入库明细主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentDetailById(Long id)
{
return schoolInstrumentDetailMapper.deleteSchoolInstrumentDetailById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import java.util.List;
/**
* 仪器管理Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolInstrumentServiceImpl extends ServiceImpl<SchoolInstrumentMapper, SchoolInstrument> implements ISchoolInstrumentService {
@Autowired
private SchoolInstrumentMapper schoolInstrumentMapper;
/**
* 查询仪器管理
*
* @param id 仪器管理主键
* @return 仪器管理
*/
@Override
public SchoolInstrument selectSchoolInstrumentById(Long id)
{
return schoolInstrumentMapper.selectSchoolInstrumentById(id);
}
/**
* 查询仪器管理列表
*
* @param schoolInstrument 仪器管理
* @return 仪器管理
*/
@Override
public List<SchoolInstrument> selectSchoolInstrumentList(SchoolInstrument schoolInstrument)
{
return schoolInstrumentMapper.selectSchoolInstrumentList(schoolInstrument);
}
/**
* 新增仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
@Override
public int insertSchoolInstrument(SchoolInstrument schoolInstrument)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolInstrument.setCreateBy(user.getUserName());
schoolInstrument.setCreateTime(DateUtils.getNowDate());
return schoolInstrumentMapper.insertSchoolInstrument(schoolInstrument);
}
/**
* 修改仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
@Override
public int updateSchoolInstrument(SchoolInstrument schoolInstrument)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolInstrument.setUpdateBy(user.getUserName());
schoolInstrument.setUpdateTime(DateUtils.getNowDate());
return schoolInstrumentMapper.updateSchoolInstrument(schoolInstrument);
}
/**
* 批量删除仪器管理
*
* @param ids 需要删除的仪器管理主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentByIds(Long[] ids)
{
return schoolInstrumentMapper.deleteSchoolInstrumentByIds(ids);
}
/**
* 删除仪器管理信息
*
* @param id 仪器管理主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentById(Long id)
{
return schoolInstrumentMapper.deleteSchoolInstrumentById(id);
}
@Override
public List<SchoolInstrument> selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo) {
if (schoolInstrumentVo.getIds().size() <= 0){
schoolInstrumentVo.setIds(null);
}
return schoolInstrumentMapper.selectInstrumentList(schoolInstrumentVo);
}
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolTeacherBorrowDetailMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolTeacherBorrowDetailService;
/**
* 教师借用明细Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolTeacherBorrowDetailServiceImpl extends ServiceImpl<SchoolTeacherBorrowDetailMapper, SchoolTeacherBorrowDetail> implements ISchoolTeacherBorrowDetailService {
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolInstrument.*;
import yangtz.cs.liu.campus.mapper.schoolInstrument.*;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolTeacherBorrowService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import java.util.ArrayList;
import java.util.List;
/**
* 教师借用Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolTeacherBorrowServiceImpl extends ServiceImpl<SchoolTeacherBorrowMapper, SchoolTeacherBorrow> implements ISchoolTeacherBorrowService {
@Autowired
private SchoolTeacherBorrowMapper schoolTeacherBorrowMapper;
@Autowired
private SchoolTeacherBorrowDetailMapper schoolTeacherBorrowDetailMapper;
@Autowired
private SchoolInstrumentMapper schoolInstrumentMapper;
@Autowired
private SchoolInstrumentClassifyMapper schoolInstrumentClassifyMapper;
@Autowired
private SchoolInstrumentDetailMapper schoolInstrumentDetailMapper;
/**
* 查询教师借用
*
* @param id 教师借用主键
* @return 教师借用
*/
@Override
public SchoolTeacherBorrowVo selectSchoolTeacherBorrowById(Long id)
{
SchoolTeacherBorrowVo schoolTeacherBorrowVo = schoolTeacherBorrowMapper.selectSchoolTeacherBorrowById(id);
LambdaQueryWrapper<SchoolTeacherBorrowDetail> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolTeacherBorrowDetail::getTeacherBorrowId,schoolTeacherBorrowVo.getId());
List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetails = schoolTeacherBorrowDetailMapper.selectList(wrapper);
if (schoolTeacherBorrowDetails.size() > 0){
schoolTeacherBorrowVo.setSchoolTeacherBorrowDetailList(schoolTeacherBorrowDetails);
}
return schoolTeacherBorrowVo;
}
/**
* 查询教师借用列表
*
* @param schoolTeacherBorrowVo 教师借用
* @return 教师借用
*/
@Override
public List<SchoolTeacherBorrowVo> selectSchoolTeacherBorrowList(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
schoolTeacherBorrowVo.setBorrowById(SecurityUtils.getLoginUser().getUser().getUserId());
List<SchoolTeacherBorrowVo> schoolTeacherBorrowVos = schoolTeacherBorrowMapper.selectSchoolTeacherBorrowList(schoolTeacherBorrowVo);
for (SchoolTeacherBorrowVo schoolTeacherBorrowVo1 : schoolTeacherBorrowVos) {
LambdaQueryWrapper<SchoolTeacherBorrowDetail> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolTeacherBorrowDetail::getTeacherBorrowId,schoolTeacherBorrowVo1.getId());
List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetails = schoolTeacherBorrowDetailMapper.selectList(wrapper);
if (schoolTeacherBorrowDetails.size() > 0){
schoolTeacherBorrowVo1.setSchoolTeacherBorrowDetailList(schoolTeacherBorrowDetails);
}
}
return schoolTeacherBorrowVos;
}
/**
* 新增教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
@Transactional
@Override
public int insertSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolTeacherBorrowVo.setBorrowById(user.getUserId());
schoolTeacherBorrowVo.setBorrowBy(user.getUserName());
schoolTeacherBorrowVo.setBorrowTime(DateUtils.getNowDate());
schoolTeacherBorrowVo.setApplyTime(DateUtils.getNowDate());
schoolTeacherBorrowVo.setCreateBy(user.getUserName());
schoolTeacherBorrowVo.setCreateTime(DateUtils.getNowDate());
int rows = schoolTeacherBorrowMapper.insertSchoolTeacherBorrow(schoolTeacherBorrowVo);
insertSchoolTeacherBorrowDetail(schoolTeacherBorrowVo);
return rows;
}
/**
* 办理教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
@Transactional
@Override
public int updateSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
schoolTeacherBorrowVo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolTeacherBorrowVo.setUpdateTime(DateUtils.getNowDate());
//修改状态为未归还
schoolTeacherBorrowVo.setBorrowState("0");
schoolTeacherBorrowMapper.deleteSchoolTeacherBorrowDetailByTeacherBorrowId(schoolTeacherBorrowVo.getId());
insertSchoolTeacherBorrowDetailSp(schoolTeacherBorrowVo);
return schoolTeacherBorrowMapper.updateSchoolTeacherBorrow(schoolTeacherBorrowVo);
}
/**
* 批量删除教师借用
*
* @param ids 需要删除的教师借用主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolTeacherBorrowByIds(Long[] ids)
{
schoolTeacherBorrowMapper.deleteSchoolTeacherBorrowDetailByTeacherBorrowIds(ids);
return schoolTeacherBorrowMapper.deleteSchoolTeacherBorrowByIds(ids);
}
/**
* 删除教师借用信息
*
* @param id 教师借用主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolTeacherBorrowById(Long id)
{
schoolTeacherBorrowMapper.deleteSchoolTeacherBorrowDetailByTeacherBorrowId(id);
return schoolTeacherBorrowMapper.deleteSchoolTeacherBorrowById(id);
}
/**
* 仓库借用管理列表
* @param schoolTeacherBorrowVo
* @return
*/
@Override
public List<SchoolTeacherBorrowVo> selectBorrowInstrumentList(SchoolTeacherBorrowVo schoolTeacherBorrowVo) {
List<SchoolTeacherBorrowVo> schoolTeacherBorrowVos = schoolTeacherBorrowMapper.selectSchoolTeacherBorrowList(schoolTeacherBorrowVo);
for (SchoolTeacherBorrowVo schoolTeacherBorrowVo1 : schoolTeacherBorrowVos) {
LambdaQueryWrapper<SchoolTeacherBorrowDetail> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolTeacherBorrowDetail::getTeacherBorrowId,schoolTeacherBorrowVo1.getId());
List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetails = schoolTeacherBorrowDetailMapper.selectList(wrapper);
if (schoolTeacherBorrowDetails.size() > 0){
schoolTeacherBorrowVo1.setSchoolTeacherBorrowDetailList(schoolTeacherBorrowDetails);
}
}
return schoolTeacherBorrowVos;
}
/**
* 归还教师借出仪器
* @param schoolTeacherBorrowVo
* @return
*/
@Override
public int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo) {
schoolTeacherBorrowVo.setReturnTime(DateUtils.getNowDate());
SchoolTeacherBorrow schoolTeacherBorrow = new SchoolTeacherBorrow();
BeanUtils.copyProperties(schoolTeacherBorrowVo,schoolTeacherBorrow);
updateSchoolTeacherBorrowDetail(schoolTeacherBorrowVo);
return schoolTeacherBorrowMapper.updateById(schoolTeacherBorrow);
}
/**
* 批量修改归还仪器信息
* @param schoolTeacherBorrowVo
*/
public void updateSchoolTeacherBorrowDetail(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList = schoolTeacherBorrowVo.getSchoolTeacherBorrowDetailList();
if (StringUtils.isNotNull(schoolTeacherBorrowDetailList))
{
List<SchoolTeacherBorrowDetail> list = new ArrayList<SchoolTeacherBorrowDetail>();
for (SchoolTeacherBorrowDetail schoolTeacherBorrowDetail : schoolTeacherBorrowDetailList)
{
SchoolTeacherBorrowDetail schoolTeacherBorrowDetail1 = schoolTeacherBorrowDetailMapper.selectById(schoolTeacherBorrowDetail.getId());
//判断借用数量是否大于设备数量
if (schoolTeacherBorrowDetail1.getBorrowNum() < schoolTeacherBorrowDetail.getDamageNum()){
throw new ServiceException("损坏数量大于借用数量,请您重新输入");
}
//根据仪器id获取仪器信息
Long instrumentId = schoolTeacherBorrowDetail1.getInstrumentId();
SchoolInstrument schoolInstrument = schoolInstrumentMapper.selectById(instrumentId);
//如借出消耗品,不需归还
Long instrumentTypeId = schoolInstrument.getInstrumentTypeId();
SchoolInstrumentClassify schoolInstrumentClassify = schoolInstrumentClassifyMapper.selectById(instrumentTypeId);
if (schoolInstrumentClassify.getIsConsumables().equals("1")) {
schoolInstrument.setInstrumentNum(schoolInstrument.getInstrumentNum());
}else {
//损坏数量
Integer damageNum = schoolTeacherBorrowDetail.getDamageNum();
//借用数量
Integer borrowNum = schoolTeacherBorrowDetail1.getBorrowNum();
//归还数量
Integer returnNum = borrowNum - damageNum;
//损坏的仪器,自动出库
if (damageNum > 0){
SchoolInstrumentDetail schoolInstrumentDetail = new SchoolInstrumentDetail();
schoolInstrumentDetail.setInstrumentId(instrumentId);
schoolInstrumentDetail.setInstrumentName(schoolInstrument.getInstrumentName());
schoolInstrumentDetail.setInstrumentTypeId(instrumentTypeId);
schoolInstrumentDetail.setInstrumentTypeName(schoolInstrumentClassify.getInstrumentTypeName());
schoolInstrumentDetail.setVariationType("1");
schoolInstrumentDetail.setVariationNum(damageNum);
schoolInstrumentDetail.setOldStockNum(schoolInstrument.getInstrumentNum());
schoolInstrumentDetail.setNewStockNum(schoolInstrument.getInstrumentNum() + returnNum);
schoolInstrumentDetail.setVariationTime(DateUtils.getNowDate());
schoolInstrumentDetail.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolInstrumentDetail.setCreateTime(DateUtils.getNowDate());
schoolInstrumentDetailMapper.insert(schoolInstrumentDetail);
}
//修改新库存数量
schoolInstrument.setInstrumentNum(schoolInstrument.getInstrumentNum() + returnNum);
}
schoolInstrumentMapper.updateById(schoolInstrument);
list.add(schoolTeacherBorrowDetail);
}
if (list.size() > 0)
{
schoolTeacherBorrowMapper.updateSchoolTeacherBorrowDetails(list);
}
}
}
/**
* 新增教师借用明细信息
*
* @param schoolTeacherBorrowVo 教师借用对象
*/
public void insertSchoolTeacherBorrowDetail(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList = schoolTeacherBorrowVo.getSchoolTeacherBorrowDetailList();
Long id = schoolTeacherBorrowVo.getId();
if (StringUtils.isNotNull(schoolTeacherBorrowDetailList))
{
List<SchoolTeacherBorrowDetail> list = new ArrayList<SchoolTeacherBorrowDetail>();
for (SchoolTeacherBorrowDetail schoolTeacherBorrowDetail : schoolTeacherBorrowDetailList)
{
//根据仪器id获取仪器信息
Long instrumentId = schoolTeacherBorrowDetail.getInstrumentId();
SchoolInstrument schoolInstrument = schoolInstrumentMapper.selectById(instrumentId);
//判断借用数量是否大于设备数量
if (schoolTeacherBorrowDetail.getBorrowNum() > schoolInstrument.getInstrumentNum()){
throw new ServiceException("借用数量大于仪器可借用数量,请您重新输入");
}
schoolTeacherBorrowDetail.setInstrumentName(schoolInstrument.getInstrumentName());
schoolTeacherBorrowDetail.setInstrumentModel(schoolInstrument.getInstrumentModel());
schoolTeacherBorrowDetail.setInstrumentNum(schoolInstrument.getInstrumentNum());
schoolTeacherBorrowDetail.setTeacherBorrowId(id);
list.add(schoolTeacherBorrowDetail);
}
if (list.size() > 0)
{
schoolTeacherBorrowMapper.batchSchoolTeacherBorrowDetail(list);
}
}
}
/**
* 审批-新增教师借用明细信息
*
* @param schoolTeacherBorrowVo 教师借用对象
*/
public void insertSchoolTeacherBorrowDetailSp(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList = schoolTeacherBorrowVo.getSchoolTeacherBorrowDetailList();
Long id = schoolTeacherBorrowVo.getId();
if (StringUtils.isNotNull(schoolTeacherBorrowDetailList))
{
List<SchoolTeacherBorrowDetail> list = new ArrayList<SchoolTeacherBorrowDetail>();
for (SchoolTeacherBorrowDetail schoolTeacherBorrowDetail : schoolTeacherBorrowDetailList)
{
//根据仪器id获取仪器信息
Long instrumentId = schoolTeacherBorrowDetail.getInstrumentId();
SchoolInstrument schoolInstrument = schoolInstrumentMapper.selectById(instrumentId);
//判断借用数量是否大于设备数量
if (schoolTeacherBorrowDetail.getBorrowNum() > schoolInstrument.getInstrumentNum()){
throw new ServiceException("借用数量大于仪器可借用数量,请您重新输入");
}
//如借出消耗品,自动出库,不需归还
Long instrumentTypeId = schoolInstrument.getInstrumentTypeId();
SchoolInstrumentClassify schoolInstrumentClassify = schoolInstrumentClassifyMapper.selectById(instrumentTypeId);
if (schoolInstrumentClassify.getIsConsumables().equals("1")){
SchoolInstrumentDetail schoolInstrumentDetail = new SchoolInstrumentDetail();
schoolInstrumentDetail.setInstrumentId(instrumentId);
schoolInstrumentDetail.setInstrumentName(schoolInstrument.getInstrumentName());
schoolInstrumentDetail.setInstrumentTypeId(instrumentTypeId);
schoolInstrumentDetail.setInstrumentTypeName(schoolInstrumentClassify.getInstrumentTypeName());
schoolInstrumentDetail.setVariationType("1");
schoolInstrumentDetail.setVariationNum(schoolTeacherBorrowDetail.getBorrowNum());
schoolInstrumentDetail.setOldStockNum(schoolInstrument.getInstrumentNum());
schoolInstrumentDetail.setNewStockNum(schoolInstrument.getInstrumentNum() - schoolTeacherBorrowDetail.getBorrowNum());
schoolInstrumentDetail.setVariationTime(DateUtils.getNowDate());
schoolInstrumentDetail.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolInstrumentDetail.setCreateTime(DateUtils.getNowDate());
schoolInstrumentDetailMapper.insert(schoolInstrumentDetail);
}
schoolTeacherBorrowDetail.setInstrumentName(schoolInstrument.getInstrumentName());
schoolTeacherBorrowDetail.setInstrumentModel(schoolInstrument.getInstrumentModel());
schoolTeacherBorrowDetail.setInstrumentNum(schoolInstrument.getInstrumentNum());
schoolTeacherBorrowDetail.setTeacherBorrowId(id);
list.add(schoolTeacherBorrowDetail);
//修改仪器数量
SchoolInstrument instrument = new SchoolInstrument();
instrument.setId(instrumentId);
instrument.setInstrumentNum(schoolInstrument.getInstrumentNum() - schoolTeacherBorrowDetail.getBorrowNum());
schoolInstrumentMapper.updateById(instrument);
}
if (list.size() > 0)
{
schoolTeacherBorrowMapper.batchSchoolTeacherBorrowDetail(list);
}
}
}
}
......@@ -170,7 +170,6 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
@Override
public int updateSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear)
{
schoolLabClassYear.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolLabClassYear.setUpdateTime(DateUtils.getNowDate());
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(schoolLabClassYear.getId());
insertSchoolLabClassYearRelation(schoolLabClassYear);
......@@ -307,7 +306,7 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
public int updateLabClassYear(SchoolLabClassYearVo schoolLabClassYearVo) {
List<SchoolLabClassYearRelation> schoolLabClassYearRelationList = schoolLabClassYearVo.getSchoolLabClassYearRelationList();
Long id = schoolLabClassYearVo.getId();
if (StringUtils.isNull(schoolLabClassYearRelationList)){
if (schoolLabClassYearRelationList.size() <= 0){
throw new ServiceException("您未选择实验室");
}
List<SchoolLabClassYearRelation> list = new ArrayList<SchoolLabClassYearRelation>();
......@@ -325,7 +324,6 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id);
schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list);
}
schoolLabClassYearVo.setDeclareState("3");
SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear();
BeanUtils.copyProperties(schoolLabClassYearVo,schoolLabClassYear);
return schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear);
......
......@@ -2,9 +2,11 @@ package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
......@@ -138,6 +140,16 @@ public class SchoolLabCompetitionServiceImpl extends ServiceImpl<SchoolLabCompet
}
/**
* 获取教师
* @param sysUser
* @return
*/
@Override
public List<Map<String, Object>> getTeacher(SysUser sysUser) {
return schoolLabCompetitionMapper.getTeacher(sysUser);
}
/**
* 新增证书照片
* @param
*/
......
......@@ -7,7 +7,6 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
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.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
......@@ -33,6 +32,7 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
private SchoolLabMapper schoolLabMapper;
@Autowired
private SysUserMapper sysUserMapper;
/**
* 查询实验室
*
......@@ -60,9 +60,8 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
if (null == userId){
user = SecurityUtils.getLoginUser().getUser();
}else {
user = sysUserMapper.selectUserById(userId);
user = sysUserMapper.selectUserById(userId);
}
//获取用户角色集合
List<SysRole> roles = user.getRoles();
......@@ -159,11 +158,11 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
if (role.getRoleKey().equals("admin")){
return schoolLabMapper.getLabAdminAll();
}else if (role.getRoleKey().equals("phy_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey()));
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey(), user.getUserId()));
}else if (role.getRoleKey().equals("che_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey()));
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey(),user.getUserId()));
}else if (role.getRoleKey().equals("bio_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey()));
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey(),user.getUserId()));
}
}
if (user.isAdmin()){
......
......@@ -442,6 +442,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
throw new ServiceException("请选择实验室");
}
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolTeacherLabApplyVo.setChapterContent(schoolLabClassYear.getChapterContent());
schoolTeacherLabApplyVo.setApplyId(user.getUserId());
schoolTeacherLabApplyVo.setApplyName(user.getUserName());
schoolTeacherLabApplyVo.setApplyTime(DateUtils.getNowDate());
......
package yangtz.cs.liu.campus.service.impl.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleInOut;
import yangtz.cs.liu.campus.mapper.schoolSecurity.SchoolVehicleInOutMapper;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVehicleInOutService;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVehicleInOutVo;
import java.util.List;
/**
* 车辆出入登记Service业务层处理
*
* @author ruoyi
* @date 2023-09-11
*/
@Service
public class SchoolVehicleInOutServiceImpl extends ServiceImpl<SchoolVehicleInOutMapper,SchoolVehicleInOut> implements ISchoolVehicleInOutService
{
@Autowired
private SchoolVehicleInOutMapper schoolVehicleInOutMapper;
/**
* 查询车辆出入登记
*
* @param id 车辆出入登记主键
* @return 车辆出入登记
*/
@Override
public SchoolVehicleInOutVo selectSchoolVehicleInOutById(Long id)
{
return schoolVehicleInOutMapper.selectSchoolVehicleInOutById(id);
}
/**
* 查询车辆出入登记列表
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 车辆出入登记
*/
@Override
public List<SchoolVehicleInOutVo> selectSchoolVehicleInOutList(SchoolVehicleInOutVo schoolVehicleInOutVo)
{
return schoolVehicleInOutMapper.selectSchoolVehicleInOutList(schoolVehicleInOutVo);
}
/**
* 新增车辆出入登记
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 结果
*/
@Override
public int insertSchoolVehicleInOut(SchoolVehicleInOutVo schoolVehicleInOutVo)
{
schoolVehicleInOutVo.setCreateTime(DateUtils.getNowDate());
return schoolVehicleInOutMapper.insertSchoolVehicleInOut(schoolVehicleInOutVo);
}
/**
* 修改车辆出入登记
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 结果
*/
@Override
public int updateSchoolVehicleInOut(SchoolVehicleInOutVo schoolVehicleInOutVo)
{
schoolVehicleInOutVo.setUpdateTime(DateUtils.getNowDate());
return schoolVehicleInOutMapper.updateSchoolVehicleInOut(schoolVehicleInOutVo);
}
/**
* 批量删除车辆出入登记
*
* @param ids 需要删除的车辆出入登记主键
* @return 结果
*/
@Override
public int deleteSchoolVehicleInOutByIds(Long[] ids)
{
return schoolVehicleInOutMapper.deleteSchoolVehicleInOutByIds(ids);
}
/**
* 删除车辆出入登记信息
*
* @param id 车辆出入登记主键
* @return 结果
*/
@Override
public int deleteSchoolVehicleInOutById(Long id)
{
return schoolVehicleInOutMapper.deleteSchoolVehicleInOutById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleRegistration;
import yangtz.cs.liu.campus.mapper.schoolSecurity.SchoolVehicleRegistrationMapper;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVehicleRegistrationService;
import java.util.List;
/**
* 车辆登记Service业务层处理
*
* @author ruoyi
* @date 2023-09-11
*/
@Service
public class SchoolVehicleRegistrationServiceImpl extends ServiceImpl<SchoolVehicleRegistrationMapper,SchoolVehicleRegistration> implements ISchoolVehicleRegistrationService
{
@Autowired
private SchoolVehicleRegistrationMapper schoolVehicleRegistrationMapper;
/**
* 查询车辆登记
*
* @param id 车辆登记主键
* @return 车辆登记
*/
@Override
public SchoolVehicleRegistration selectSchoolVehicleRegistrationById(Long id)
{
return schoolVehicleRegistrationMapper.selectSchoolVehicleRegistrationById(id);
}
/**
* 查询车辆登记列表
*
* @param schoolVehicleRegistration 车辆登记
* @return 车辆登记
*/
@Override
public List<SchoolVehicleRegistration> selectSchoolVehicleRegistrationList(SchoolVehicleRegistration schoolVehicleRegistration)
{
return schoolVehicleRegistrationMapper.selectSchoolVehicleRegistrationList(schoolVehicleRegistration);
}
/**
* 新增车辆登记
*
* @param schoolVehicleRegistration 车辆登记
* @return 结果
*/
@Override
public int insertSchoolVehicleRegistration(SchoolVehicleRegistration schoolVehicleRegistration)
{
schoolVehicleRegistration.setCreateTime(DateUtils.getNowDate());
return schoolVehicleRegistrationMapper.insertSchoolVehicleRegistration(schoolVehicleRegistration);
}
/**
* 修改车辆登记
*
* @param schoolVehicleRegistration 车辆登记
* @return 结果
*/
@Override
public int updateSchoolVehicleRegistration(SchoolVehicleRegistration schoolVehicleRegistration)
{
schoolVehicleRegistration.setUpdateTime(DateUtils.getNowDate());
return schoolVehicleRegistrationMapper.updateSchoolVehicleRegistration(schoolVehicleRegistration);
}
/**
* 批量删除车辆登记
*
* @param ids 需要删除的车辆登记主键
* @return 结果
*/
@Override
public int deleteSchoolVehicleRegistrationByIds(Long[] ids)
{
return schoolVehicleRegistrationMapper.deleteSchoolVehicleRegistrationByIds(ids);
}
/**
* 删除车辆登记信息
*
* @param id 车辆登记主键
* @return 结果
*/
@Override
public int deleteSchoolVehicleRegistrationById(Long id)
{
return schoolVehicleRegistrationMapper.deleteSchoolVehicleRegistrationById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsultExternal;
import yangtz.cs.liu.campus.mapper.schoolSecurity.SchoolVideoConsultExternalMapper;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVideoConsultExternalService;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultExternalVo;
import java.util.ArrayList;
import java.util.List;
/**
* 监控调阅(外部)Service业务层处理
*
* @author ruoyi
* @date 2023-09-11
*/
@Service
public class SchoolVideoConsultExternalServiceImpl extends ServiceImpl<SchoolVideoConsultExternalMapper,SchoolVideoConsultExternal> implements ISchoolVideoConsultExternalService
{
@Autowired
private SchoolVideoConsultExternalMapper schoolVideoConsultExternalMapper;
/**
* 查询监控调阅(外部)
*
* @param id 监控调阅(外部)主键
* @return 监控调阅(外部)
*/
@Override
public SchoolVideoConsultExternalVo selectSchoolVideoConsultExternalById(Long id)
{
return schoolVideoConsultExternalMapper.selectSchoolVideoConsultExternalById(id);
}
/**
* 查询监控调阅(外部)列表
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 监控调阅(外部)
*/
@Override
public List<SchoolVideoConsultExternalVo> selectSchoolVideoConsultExternalList(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
return schoolVideoConsultExternalMapper.selectSchoolVideoConsultExternalList(schoolVideoConsultExternalVo);
}
/**
* 新增监控调阅(外部)
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 结果
*/
@Transactional
@Override
public int insertSchoolVideoConsultExternal(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
schoolVideoConsultExternalVo.setCreateTime(DateUtils.getNowDate());
int rows = schoolVideoConsultExternalMapper.insertSchoolVideoConsultExternal(schoolVideoConsultExternalVo);
insertSchoolAccessory(schoolVideoConsultExternalVo);
return rows;
}
/**
* 修改监控调阅(外部)
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 结果
*/
@Transactional
@Override
public int updateSchoolVideoConsultExternal(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
schoolVideoConsultExternalVo.setUpdateTime(DateUtils.getNowDate());
schoolVideoConsultExternalMapper.deleteSchoolAccessoryByBusinessId(schoolVideoConsultExternalVo.getId());
insertSchoolAccessory(schoolVideoConsultExternalVo);
return schoolVideoConsultExternalMapper.updateSchoolVideoConsultExternal(schoolVideoConsultExternalVo);
}
/**
* 批量删除监控调阅(外部)
*
* @param ids 需要删除的监控调阅(外部)主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolVideoConsultExternalByIds(Long[] ids)
{
schoolVideoConsultExternalMapper.deleteSchoolAccessoryByBusinessIds(ids);
return schoolVideoConsultExternalMapper.deleteSchoolVideoConsultExternalByIds(ids);
}
/**
* 删除监控调阅(外部)信息
*
* @param id 监控调阅(外部)主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolVideoConsultExternalById(Long id)
{
schoolVideoConsultExternalMapper.deleteSchoolAccessoryByBusinessId(id);
return schoolVideoConsultExternalMapper.deleteSchoolVideoConsultExternalById(id);
}
/**
* 新增附件信息信息
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)对象
*/
public void insertSchoolAccessory(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo)
{
List<SchoolAccessory> schoolAccessoryList = schoolVideoConsultExternalVo.getSchoolAccessoryList();
Long id = schoolVideoConsultExternalVo.getId();
if (StringUtils.isNotNull(schoolAccessoryList))
{
List<SchoolAccessory> list = new ArrayList<SchoolAccessory>();
for (SchoolAccessory schoolAccessory : schoolAccessoryList)
{
schoolAccessory.setBusinessId(id);
list.add(schoolAccessory);
}
if (list.size() > 0)
{
schoolVideoConsultExternalMapper.batchSchoolAccessory(list);
}
}
}
}
package yangtz.cs.liu.campus.service.impl.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsult;
import yangtz.cs.liu.campus.mapper.schoolSecurity.SchoolVideoConsultMapper;
import yangtz.cs.liu.campus.service.schoolSecurity.ISchoolVideoConsultService;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultVo;
import java.util.List;
/**
* 监控录像调用(内部)Service业务层处理
*
* @author ruoyi
* @date 2023-09-11
*/
@Service
public class SchoolVideoConsultServiceImpl extends ServiceImpl<SchoolVideoConsultMapper,SchoolVideoConsult> implements ISchoolVideoConsultService
{
@Autowired
private SchoolVideoConsultMapper schoolVideoConsultMapper;
/**
* 查询监控录像调用(内部)
*
* @param id 监控录像调用(内部)主键
* @return 监控录像调用(内部)
*/
@Override
public SchoolVideoConsultVo selectSchoolVideoConsultById(Long id)
{
return schoolVideoConsultMapper.selectSchoolVideoConsultById(id);
}
/**
* 查询监控录像调用(内部)列表
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 监控录像调用(内部)
*/
@Override
public List<SchoolVideoConsultVo> selectSchoolVideoConsultList(SchoolVideoConsultVo schoolVideoConsultVo)
{
return schoolVideoConsultMapper.selectSchoolVideoConsultList(schoolVideoConsultVo);
}
/**
* 新增监控录像调用(内部)
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 结果
*/
@Override
public int insertSchoolVideoConsult(SchoolVideoConsultVo schoolVideoConsultVo)
{
schoolVideoConsultVo.setCreateTime(DateUtils.getNowDate());
return schoolVideoConsultMapper.insertSchoolVideoConsult(schoolVideoConsultVo);
}
/**
* 修改监控录像调用(内部)
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 结果
*/
@Override
public int updateSchoolVideoConsult(SchoolVideoConsultVo schoolVideoConsultVo)
{
schoolVideoConsultVo.setUpdateTime(DateUtils.getNowDate());
return schoolVideoConsultMapper.updateSchoolVideoConsult(schoolVideoConsultVo);
}
/**
* 批量删除监控录像调用(内部)
*
* @param ids 需要删除的监控录像调用(内部)主键
* @return 结果
*/
@Override
public int deleteSchoolVideoConsultByIds(Long[] ids)
{
return schoolVideoConsultMapper.deleteSchoolVideoConsultByIds(ids);
}
/**
* 删除监控录像调用(内部)信息
*
* @param id 监控录像调用(内部)主键
* @return 结果
*/
@Override
public int deleteSchoolVideoConsultById(Long id)
{
return schoolVideoConsultMapper.deleteSchoolVideoConsultById(id);
}
}
......@@ -68,6 +68,6 @@ public interface IEquipmentLedgerService extends IService<SchoolEquipmentLedger>
* 获取用户
* @return
*/
List<Map<String,String>> getUser(SysUser sysUser);
List<Map<String,Object>> getUser(SysUser sysUser);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import java.util.List;
/**
* 仪器药品分类Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolInstrumentClassifyService extends IService<SchoolInstrumentClassify> {
/**
* 查询仪器药品分类
*
* @param id 仪器药品分类主键
* @return 仪器药品分类
*/
public SchoolInstrumentClassify selectSchoolInstrumentClassifyById(Long id);
/**
* 查询仪器药品分类列表
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 仪器药品分类集合
*/
public List<SchoolInstrumentClassify> selectSchoolInstrumentClassifyList(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 新增仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int insertSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 修改仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int updateSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 批量删除仪器药品分类
*
* @param ids 需要删除的仪器药品分类主键集合
* @return 结果
*/
public int deleteSchoolInstrumentClassifyByIds(Long[] ids);
/**
* 删除仪器药品分类信息
*
* @param id 仪器药品分类主键
* @return 结果
*/
public int deleteSchoolInstrumentClassifyById(Long id);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import java.util.List;
/**
* 仪器出入库明细Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolInstrumentDetailService extends IService<SchoolInstrumentDetail> {
/**
* 查询仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 仪器出入库明细
*/
public SchoolInstrumentDetail selectSchoolInstrumentDetailById(Long id);
/**
* 查询仪器出入库明细列表
*
* @param schoolInstrumentDetailVo 仪器出入库明细
* @return 仪器出入库明细集合
*/
public List<SchoolInstrumentDetail> selectSchoolInstrumentDetailList(SchoolInstrumentDetailVo schoolInstrumentDetailVo);
/**
* 新增仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int insertSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 修改仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int updateSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 批量删除仪器出入库明细
*
* @param ids 需要删除的仪器出入库明细主键集合
* @return 结果
*/
public int deleteSchoolInstrumentDetailByIds(Long[] ids);
/**
* 删除仪器出入库明细信息
*
* @param id 仪器出入库明细主键
* @return 结果
*/
public int deleteSchoolInstrumentDetailById(Long id);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import java.util.List;
/**
* 仪器管理Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolInstrumentService extends IService<SchoolInstrument> {
/**
* 查询仪器管理
*
* @param id 仪器管理主键
* @return 仪器管理
*/
public SchoolInstrument selectSchoolInstrumentById(Long id);
/**
* 查询仪器管理列表
*
* @param schoolInstrument 仪器管理
* @return 仪器管理集合
*/
public List<SchoolInstrument> selectSchoolInstrumentList(SchoolInstrument schoolInstrument);
/**
* 新增仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int insertSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 修改仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int updateSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 批量删除仪器管理
*
* @param ids 需要删除的仪器管理主键集合
* @return 结果
*/
public int deleteSchoolInstrumentByIds(Long[] ids);
/**
* 删除仪器管理信息
*
* @param id 仪器管理主键
* @return 结果
*/
public int deleteSchoolInstrumentById(Long id);
/**
* 教师借用明细列表
* @param schoolInstrumentVo
* @return
*/
List<SchoolInstrument> selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
/**
* 教师借用明细Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolTeacherBorrowDetailService extends IService<SchoolTeacherBorrowDetail> {
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrow;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import java.util.List;
/**
* 教师借用Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolTeacherBorrowService extends IService<SchoolTeacherBorrow> {
/**
* 查询教师借用
*
* @param id 教师借用主键
* @return 教师借用
*/
public SchoolTeacherBorrowVo selectSchoolTeacherBorrowById(Long id);
/**
* 查询教师借用列表
*
* @param schoolTeacherBorrowVo 教师借用
* @return 教师借用集合
*/
public List<SchoolTeacherBorrowVo> selectSchoolTeacherBorrowList(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 新增教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int insertSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 修改教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int updateSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 批量删除教师借用
*
* @param ids 需要删除的教师借用主键集合
* @return 结果
*/
public int deleteSchoolTeacherBorrowByIds(Long[] ids);
/**
* 删除教师借用信息
*
* @param id 教师借用主键
* @return 结果
*/
public int deleteSchoolTeacherBorrowById(Long id);
/**
* 仓库借用管理列表
* @param schoolTeacherBorrowVo
* @return
*/
List<SchoolTeacherBorrowVo> selectBorrowInstrumentList(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 归还教师借出仪器
* @param schoolTeacherBorrowVo
* @return
*/
int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
}
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.entity.SysUser;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabCompetitionVo;
import java.util.List;
import java.util.Map;
/**
* 实验室竞赛Service接口
......@@ -61,4 +63,11 @@ public interface ISchoolLabCompetitionService extends IService<SchoolLabCompetit
* @return 结果
*/
public int deleteSchoolLabCompetitionById(Long id);
/**
* 获取教师
* @param sysUser
* @return
*/
List<Map<String,Object>> getTeacher(SysUser sysUser);
}
package yangtz.cs.liu.campus.service.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleInOut;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVehicleInOutVo;
import java.util.List;
/**
* 车辆出入登记Service接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface ISchoolVehicleInOutService extends IService<SchoolVehicleInOut>
{
/**
* 查询车辆出入登记
*
* @param id 车辆出入登记主键
* @return 车辆出入登记
*/
public SchoolVehicleInOutVo selectSchoolVehicleInOutById(Long id);
/**
* 查询车辆出入登记列表
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 车辆出入登记集合
*/
public List<SchoolVehicleInOutVo> selectSchoolVehicleInOutList(SchoolVehicleInOutVo schoolVehicleInOutVo);
/**
* 新增车辆出入登记
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 结果
*/
public int insertSchoolVehicleInOut(SchoolVehicleInOutVo schoolVehicleInOutVo);
/**
* 修改车辆出入登记
*
* @param schoolVehicleInOutVo 车辆出入登记
* @return 结果
*/
public int updateSchoolVehicleInOut(SchoolVehicleInOutVo schoolVehicleInOutVo);
/**
* 批量删除车辆出入登记
*
* @param ids 需要删除的车辆出入登记主键集合
* @return 结果
*/
public int deleteSchoolVehicleInOutByIds(Long[] ids);
/**
* 删除车辆出入登记信息
*
* @param id 车辆出入登记主键
* @return 结果
*/
public int deleteSchoolVehicleInOutById(Long id);
}
package yangtz.cs.liu.campus.service.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVehicleRegistration;
import java.util.List;
/**
* 车辆登记Service接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface ISchoolVehicleRegistrationService extends IService<SchoolVehicleRegistration>
{
/**
* 查询车辆登记
*
* @param id 车辆登记主键
* @return 车辆登记
*/
public SchoolVehicleRegistration selectSchoolVehicleRegistrationById(Long id);
/**
* 查询车辆登记列表
*
* @param schoolVehicleRegistration 车辆登记
* @return 车辆登记集合
*/
public List<SchoolVehicleRegistration> selectSchoolVehicleRegistrationList(SchoolVehicleRegistration schoolVehicleRegistration);
/**
* 新增车辆登记
*
* @param schoolVehicleRegistration 车辆登记
* @return 结果
*/
public int insertSchoolVehicleRegistration(SchoolVehicleRegistration schoolVehicleRegistration);
/**
* 修改车辆登记
*
* @param schoolVehicleRegistration 车辆登记
* @return 结果
*/
public int updateSchoolVehicleRegistration(SchoolVehicleRegistration schoolVehicleRegistration);
/**
* 批量删除车辆登记
*
* @param ids 需要删除的车辆登记主键集合
* @return 结果
*/
public int deleteSchoolVehicleRegistrationByIds(Long[] ids);
/**
* 删除车辆登记信息
*
* @param id 车辆登记主键
* @return 结果
*/
public int deleteSchoolVehicleRegistrationById(Long id);
}
package yangtz.cs.liu.campus.service.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsultExternal;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultExternalVo;
import java.util.List;
/**
* 监控调阅(外部)Service接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface ISchoolVideoConsultExternalService extends IService<SchoolVideoConsultExternal>
{
/**
* 查询监控调阅(外部)
*
* @param id 监控调阅(外部)主键
* @return 监控调阅(外部)
*/
public SchoolVideoConsultExternalVo selectSchoolVideoConsultExternalById(Long id);
/**
* 查询监控调阅(外部)列表
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 监控调阅(外部)集合
*/
public List<SchoolVideoConsultExternalVo> selectSchoolVideoConsultExternalList(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo);
/**
* 新增监控调阅(外部)
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 结果
*/
public int insertSchoolVideoConsultExternal(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo);
/**
* 修改监控调阅(外部)
*
* @param schoolVideoConsultExternalVo 监控调阅(外部)
* @return 结果
*/
public int updateSchoolVideoConsultExternal(SchoolVideoConsultExternalVo schoolVideoConsultExternalVo);
/**
* 批量删除监控调阅(外部)
*
* @param ids 需要删除的监控调阅(外部)主键集合
* @return 结果
*/
public int deleteSchoolVideoConsultExternalByIds(Long[] ids);
/**
* 删除监控调阅(外部)信息
*
* @param id 监控调阅(外部)主键
* @return 结果
*/
public int deleteSchoolVideoConsultExternalById(Long id);
}
package yangtz.cs.liu.campus.service.schoolSecurity;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolSecurity.SchoolVideoConsult;
import yangtz.cs.liu.campus.vo.schoolSecurity.SchoolVideoConsultVo;
import java.util.List;
/**
* 监控录像调用(内部)Service接口
*
* @author ruoyi
* @date 2023-09-11
*/
public interface ISchoolVideoConsultService extends IService<SchoolVideoConsult>
{
/**
* 查询监控录像调用(内部)
*
* @param id 监控录像调用(内部)主键
* @return 监控录像调用(内部)
*/
public SchoolVideoConsultVo selectSchoolVideoConsultById(Long id);
/**
* 查询监控录像调用(内部)列表
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 监控录像调用(内部)集合
*/
public List<SchoolVideoConsultVo> selectSchoolVideoConsultList(SchoolVideoConsultVo schoolVideoConsultVo);
/**
* 新增监控录像调用(内部)
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 结果
*/
public int insertSchoolVideoConsult(SchoolVideoConsultVo schoolVideoConsultVo);
/**
* 修改监控录像调用(内部)
*
* @param schoolVideoConsultVo 监控录像调用(内部)
* @return 结果
*/
public int updateSchoolVideoConsult(SchoolVideoConsultVo schoolVideoConsultVo);
/**
* 批量删除监控录像调用(内部)
*
* @param ids 需要删除的监控录像调用(内部)主键集合
* @return 结果
*/
public int deleteSchoolVideoConsultByIds(Long[] ids);
/**
* 删除监控录像调用(内部)信息
*
* @param id 监控录像调用(内部)主键
* @return 结果
*/
public int deleteSchoolVideoConsultById(Long id);
}
package yangtz.cs.liu.campus.vo.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 仪器出入库明细对象Vo school_instrument_detail
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrumentDetailVo extends OurBaseEntity {
/** 仪器id */
@Excel(name = "仪器id")
private Long instrumentId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 变动类型(1出库,2入库) */
@Excel(name = "变动类型", readConverterExp = "1=出库,2入库")
private String variationType;
/** 变动数量 */
@Excel(name = "变动数量")
private Integer variationNum;
/** 旧库存数量 */
@Excel(name = "旧库存数量")
private Integer oldStockNum;
/** 新库存数量 */
@Excel(name = "新库存数量")
private Integer newStockNum;
/** 变更时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date variationTime;
/** 备注 */
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
}
package yangtz.cs.liu.campus.vo.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.List;
@Data
public class SchoolInstrumentVo extends OurBaseEntity {
private List<Long> ids;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 仪器型号 */
@Excel(name = "仪器型号")
private String instrumentModel;
/** 仪器数量 */
@Excel(name = "仪器数量")
private Integer instrumentNum;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.vo.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
import java.util.Date;
import java.util.List;
@Data
public class SchoolTeacherBorrowVo extends OurBaseEntity {
/** 借用人id */
@Excel(name = "借用人id")
private Long borrowById;
/** 借用人 */
@Excel(name = "借用人")
private String borrowBy;
/** 借用学科(1物理,2化学,3生物) */
@Excel(name = "借用学科(1物理,2化学,3生物)")
private String borrowSub;
/** 借用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "借用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date borrowTime;
/** 借用状态(0未归还,1已归还,2已申请) */
@Excel(name = "借用状态(0未归还,1已归还,2已申请)")
private String borrowState;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 归还时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date returnTime;
/** 备注 */
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/** 教师借用明细信息 */
private List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
import java.util.List;
@Data
public class SchoolExperimentPlanMbVo extends BaseEntity {
/** 实验计划主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期(1上学期,2下学期) */
@Excel(name = "学期", combo = {"上学期","下学期"}, readConverterExp = "1=上学期,2=下学期")
private String semester;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", combo = {"物理","化学","生物"}, readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
private List<String> subs;
/** 级部id */
private Long gradeId;
private List<Long> gradeIds;
/** 学年+学期 */
private String schoolYearSemester;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", combo = {"分组实验","演示实验","探究实验"}, readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 实验名称 */
@Excel(name = "实验名称")
private String experimentName;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 是否已预约 */
private String isAppointment;
/** 计划开始时间 */
@Excel(name = "计划开始时间")
private String plannedStartTime;
/** 计划结束时间 */
@Excel(name = "计划结束时间")
private String plannedEndTime;
/** 计划时间 */
private String plannedTime;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
private Long classId1;
@Excel(name = "班级名称1", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className1;
private Long classId2;
@Excel(name = "班级名称2", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className2;
private Long classId3;
@Excel(name = "班级名称3", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className3;
private Long classId4;
@Excel(name = "班级名称4", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className4;
private Long classId5;
@Excel(name = "班级名称5", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className5;
private Long classId6;
@Excel(name = "班级名称6", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className6;
private Long classId7;
@Excel(name = "班级名称7", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className7;
private Long classId8;
@Excel(name = "班级名称8", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className8;
private Long classId9;
@Excel(name = "班级名称9", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className9;
private Long classId10;
@Excel(name = "班级名称10", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className10;
/** 实验计划与班级关系信息 */
private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList;
}
package yangtz.cs.liu.campus.vo.schoolSecurity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
@Data
public class SchoolVehicleInOutVo extends BaseEntity
{
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 流程实例id */
private String instanceId;
/** 用户id */
private Long userId;
/** 用户名称 */
private String userName;
/** 联系电话 */
private Long phone;
/** 工作性质(1在编,2合同制,3代课,4其他) */
private String jobNature;
/** 预计在校工作开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date workStartTime;
/** 预计在校工作结束时间 */
private String workEndTime;
/** 预计在校工作时间 */
private String workTime;
/** 现申请登记车号 */
private String applyLicenseNumber;
/** 车辆品牌 */
private String brand;
/** 车型 */
private String carType;
/** 已登记车辆车号 */
private String oldLicenseNumber;
/** 已登记车辆是否保留(1是,0否) */
private String isRetain;
/** 申请人id */
private Long applyUserId;
/** 申请人 */
private String applyUser;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请人类型((0教工 1职工)) */
private String applyType;
/** 状态(0未提交,1级部/处室审核,2分管领导审核,3已结束) */
private String state;
/** 申请人级部/处室id */
private Long applyOrgid;
/** 申请人级部/处室 */
private String applyOrgname;
/** 审批人id1 */
private Long handUserId1;
/** 审批人1 */
private String handUserName1;
/** 审批人1意见 */
private String handUserOpinion1;
/** 审批人1签名是否显示(1是,0否) */
private String isSign1;
/** 审批人id2 */
private Long handUserId2;
/** 审批人2 */
private String handUserName2;
/** 审批人2意见 */
private String handUserOpinion2;
/** 审批人2签名是否显示(1是,0否) */
private String isSign2;
}
package yangtz.cs.liu.campus.vo.schoolSecurity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
@Data
public class SchoolVideoConsultExternalVo extends BaseEntity
{
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 流程实例id */
private String instanceId;
/** 用户id */
private Long userId;
/** 姓名 */
private String userName;
/** 联系电话 */
private Long phone;
/** 身份证号 */
private String idCard;
/** 录像调用开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoStartTime;
/** 录像调用结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoEndTime;
/** 调取录像时间 */
private String videoTime;
/** 调阅位置 */
private String location;
/** 申请事由 */
private String applyReason;
/** 状态(0未提交,1信息技术中心负责人审核,2安保负责人审核,3安全管理中心负责人审核,4分管领导审核,5结束) */
private String state;
/** 申请人id */
private Long applyUserId;
/** 申请人 */
private String applyUser;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 审批人id1 */
private Long handUserId1;
/** 审批人1 */
private String handUserName1;
/** 审批人1意见 */
private String handUserOpinion1;
/** 审批人1签名是否显示(1是,0否) */
private String isSign1;
/** 审批人id2 */
private Long handUserId2;
/** 审批人2 */
private String handUserName2;
/** 审批人2意见 */
private String handUserOpinion2;
/** 审批人2签名是否显示(1是,0否) */
private String isSign2;
/** 审批人id3 */
private Long handUserId3;
/** 审批人3 */
private String handUserName3;
/** 审批人3意见 */
private String handUserOpinion3;
/** 审批人3签名是否显示(1是,0否) */
private String isSign3;
/** 审批人id4 */
private Long handUserId4;
/** 审批人4 */
private String handUserName4;
/** 审批人4意见 */
private String handUserOpinion4;
/** 审批人4签名是否显示(1是,0否) */
private String isSign4;
/** 调取结果 */
private String fetchResult;
/** 附件信息集合 */
private List<SchoolAccessory> schoolAccessoryList;
}
package yangtz.cs.liu.campus.vo.schoolSecurity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
@Data
public class SchoolVideoConsultVo extends BaseEntity
{
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 流程实例id */
private String instanceId;
/** 用户id */
private Long userId;
/** 用户名称 */
private String userName;
/** 联系电话 */
private Long phone;
/** 所在部门id */
private Long orgid;
/** 所在部门 */
private String orgname;
/** 录像调用开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoStartTime;
/** 录像调用结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date videoEndTime;
/** 调取录像时间 */
private String videoTime;
/** 调阅位置 */
private String location;
/** 申请事由 */
private String applyReason;
/** 状态(0未提交,1级部/处室审核,2信息技术中心负责人审核,3安全管理中心负责人审核,4分管领导审核,5结束) */
private String state;
/** 申请人id */
private Long applyUserId;
/** 申请人 */
private String applyUser;
/** 申请部门id */
private Long applyOrgid;
/** 申请部门 */
private String applyOrgname;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请人类型(0教工 1职工) */
private String applyType;
/** 审批人id1 */
private Long handUserId1;
/** 审批人1 */
private String handUserName1;
/** 审批人1意见 */
private String handUserOpinion1;
/** 审批人1签名是否显示(1是,0否) */
private String isSign1;
/** 审批人id2 */
private Long handUserId2;
/** 审批人2 */
private String handUserName2;
/** 审批人2意见 */
private String handUserOpinion2;
/** 审批人2签名是否显示(1是,0否) */
private String isSign2;
/** 审批人id3 */
private Long handUserId3;
/** 审批人3 */
private String handUserName3;
/** 审批人3意见 */
private String handUserOpinion3;
/** 审批人3签名是否显示(1是,0否) */
private String isSign3;
/** 审批人id4 */
private Long handUserId4;
/** 审批人4 */
private String handUserName4;
/** 审批人4意见 */
private String handUserOpinion4;
/** 审批人4签名是否显示(1是,0否) */
private String isSign4;
/** 调取结果1 */
private String fetchResult1;
/** 调取结果2 */
private String fetchResult2;
}
......@@ -220,6 +220,4 @@ public class ExperimentLevelController extends BaseController {
public AjaxResult getGrade(@PathVariable("userId") Long userId) {
return AjaxResult.success(schoolGradeService.getGradeId(userId));
}
}
......@@ -9,17 +9,27 @@ 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.SchoolOrganizationFc;
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.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.student.SchoolStudent;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationFcService;
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.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentService;
import yangtz.cs.liu.wechat.vo.organization.SchoolOrganizationInfoListVo;
import yangtz.cs.liu.wechat.vo.organization.SchoolOrganizationInfoVo;
import yangtz.cs.liu.wechat.vo.organization.WxOrganizationSigninVo;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @USER: liul 18266668098
......@@ -40,8 +50,22 @@ public class WxSchoolOrganizationController extends BaseController {
private ISchoolOrganizationMemberService schoolOrganizationMemberService;
@Autowired
private ISchoolOrganizationFcService schoolOrganizationFcService;
@Autowired
private UserInfoUtil userInfoUtil;
@Autowired
private ISchoolStudentService schoolStudent;
@Autowired
private ISchoolClassService schoolClass;
@Autowired
private ISchoolGradeService schoolGrade;
/**
* 查询社团信息列表
*/
......@@ -73,6 +97,22 @@ public class WxSchoolOrganizationController extends BaseController {
}else {
vo.setIsattend("2");
}
//根据社团id获取风采图片
LambdaQueryWrapper<SchoolOrganizationFc> wrapper3 = Wrappers.lambdaQuery();
wrapper3.eq(SchoolOrganizationFc::getCid,id)
.eq(SchoolOrganizationFc::getIsfb,"1")
.eq(SchoolOrganizationFc::getDelFlag,"0");
List<SchoolOrganizationFc> list1 = schoolOrganizationFcService.list(wrapper3);
ArrayList<String> str = new ArrayList<>();
if (list1!=null && list1.size()>0){
for (int k = 0; k < list1.size(); k++) {
String file = list1.get(k).getFile();
str.add(file);
}
String imgs = str.stream().collect(Collectors.joining(","));
vo.setImgs(imgs);
}
myList.add(vo);
}
}
......@@ -85,7 +125,25 @@ public class WxSchoolOrganizationController extends BaseController {
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolOrganizationInfoService.getById(id));
SchoolOrganizationInfo info = schoolOrganizationInfoService.getById(id);
SchoolOrganizationInfoVo vo = new SchoolOrganizationInfoVo();
BeanUtils.copyProperties(info,vo);
//根据社团id获取风采图片
LambdaQueryWrapper<SchoolOrganizationFc> wrapper3 = Wrappers.lambdaQuery();
wrapper3.eq(SchoolOrganizationFc::getCid,id)
.eq(SchoolOrganizationFc::getIsfb,"1")
.eq(SchoolOrganizationFc::getDelFlag,"0");
List<SchoolOrganizationFc> list1 = schoolOrganizationFcService.list(wrapper3);
ArrayList<String> str = new ArrayList<>();
if (list1!=null && list1.size()>0){
for (int k = 0; k < list1.size(); k++) {
String file = list1.get(k).getFile();
str.add(file);
}
String imgs = str.stream().collect(Collectors.joining(","));
vo.setImgs(imgs);
}
return AjaxResult.success(vo);
}
/**
......@@ -99,8 +157,36 @@ public class WxSchoolOrganizationController extends BaseController {
wrapper.eq(SchoolOrganizationSignin::getUserId,userId)
.eq(SchoolOrganizationSignin::getCid,vo.getCid())
.eq(SchoolOrganizationSignin::getDelFlag,"0");
return AjaxResult.success(schoolOrganizationSigninService.getOne(wrapper));
SchoolOrganizationSignin one = schoolOrganizationSigninService.getOne(wrapper);
if (one==null){
//根据studentId 获取当前登录人信息 返回给前端
Long studentId = userInfoUtil.getMpLoginUser().getStudentId();
LambdaQueryWrapper<SchoolStudent> wrapper2 = Wrappers.lambdaQuery();
wrapper2.eq(SchoolStudent::getId,studentId).eq(SchoolStudent::getDelFlag,"0");
SchoolStudent ss = schoolStudent.getOne(wrapper2);
//查询学生班级
LambdaQueryWrapper<SchoolClass> lqw = new LambdaQueryWrapper<>();
Long classId = ss.getClassId();
lqw.eq(SchoolClass::getId,classId).eq(SchoolClass::getDelFlag,"0");
SchoolClass sc = schoolClass.getOne(lqw);
Long gradeId = sc.getGradeId();
//查询级部
LambdaQueryWrapper<SchoolGrade> jb = new LambdaQueryWrapper<>();
jb.eq(SchoolGrade::getId,gradeId).eq(SchoolGrade::getDelFlag,"0");
SchoolGrade grade = schoolGrade.getOne(jb);
SchoolOrganizationSignin sos = new SchoolOrganizationSignin();
sos.setGrade(grade.getGradeName());
sos.setClasses(sc.getClassName());
sos.setName(ss.getStudentName());
String sex = ss.getSex();
if (StringUtils.equals(sex,"0")){
sos.setSex("男");
}else {
sos.setSex("女");
}
return AjaxResult.success(sos);
}
return AjaxResult.success(one);
}
/**
......
......@@ -50,4 +50,7 @@ public class SchoolOrganizationInfoListVo {
//是否参加 (1为已加入 2未加入)
private String isattend;
/** 社团风采图片 */
private String imgs;
}
package yangtz.cs.liu.wechat.vo.organization;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
......@@ -9,5 +10,28 @@ import lombok.Data;
*/
@Data
public class SchoolOrganizationInfoVo {
/** 社团名称 */
@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;
private String imgs;
}
......@@ -61,8 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
c.del_flag = '0'
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="borrowTime != null and borrowTime != ''">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = #{borrowTime}</if>
<if test="borrowById != null and borrowById != ''">and c.borrow_by_id = #{borrowById}</if>
<if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if>
<if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if>
</select>
<select id="selectSchoolCirculationVoListGr" parameterType="SchoolCirculationVo" resultMap="schoolCirculationVoResult">
......@@ -97,8 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
c.del_flag = '0' and u.user_id = #{adminId}
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="borrowTime != null and borrowTime != ''">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = #{borrowTime}</if>
<if test="borrowById != null and borrowById != ''">and c.borrow_by_id = #{borrowById}</if>
<if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if>
<if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if>
</select>
<select id="selectSchoolCirculationVoById" parameterType="Long" resultMap="schoolCirculationVoResult">
......@@ -127,9 +127,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.id = #{id}
</select>
<select id="getReturningEquipmentByadminId" parameterType="SchoolReceiveQuery" resultMap="schoolCirculationVoResult">
SELECT sc.id,sc.equipment_id,el.equipment_name,el.model,el.encode,sc.borrow_by_id,sc.borrow_by,sc.purpose,el.is_lend,sc.received_by_id,sc.received_by,sc.borrow_time,sc.return_state,sc.return_time,sc.deadline,sc.return_equipment_condition ,sc.remark
......@@ -138,8 +135,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
</select>
<update id="deleteSchoolCirculationByIds" parameterType="String">
update school_circulation set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
......
<?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.schoolInstrument.SchoolInstrumentClassifyMapper">
<resultMap type="SchoolInstrumentClassify" id="SchoolInstrumentClassifyResult">
<result property="id" column="id" />
<result property="instrumentTypeName" column="instrument_type_name" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
<result property="orderNum" column="order_num" />
<result property="isConsumables" column="is_consumables" />
<result property="remark" column="remark" />
<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>
<sql id="selectSchoolInstrumentClassifyVo">
select id, instrument_type_name, parent_id, ancestors, order_num, is_consumables, remark, create_by, create_time, update_by, update_time, del_flag from school_instrument_classify
</sql>
<select id="selectSchoolInstrumentClassifyList" parameterType="SchoolInstrumentClassify" resultMap="SchoolInstrumentClassifyResult">
<include refid="selectSchoolInstrumentClassifyVo"/>
<where>
del_flag = '0'
<if test="id != null "> and (id = #{id} or FIND_IN_SET(#{id},ancestors))</if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="isConsumables != null and isConsumables != ''"> and is_consumables = #{isConsumables}</if>
</where>
order by order_num ASC
</select>
<select id="selectSchoolInstrumentClassifyById" parameterType="Long" resultMap="SchoolInstrumentClassifyResult">
<include refid="selectSchoolInstrumentClassifyVo"/>
where id = #{id}
</select>
<insert id="insertSchoolInstrumentClassify" parameterType="SchoolInstrumentClassify" useGeneratedKeys="true" keyProperty="id">
insert into school_instrument_classify
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="parentId != null">parent_id,</if>
<if test="ancestors != null">ancestors,</if>
<if test="orderNum != null">order_num,</if>
<if test="isConsumables != null">is_consumables,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="parentId != null">#{parentId},</if>
<if test="ancestors != null">#{ancestors},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="isConsumables != null">#{isConsumables},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolInstrumentClassify" parameterType="SchoolInstrumentClassify">
update school_instrument_classify
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="ancestors != null">ancestors = #{ancestors},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="isConsumables != null">is_consumables = #{isConsumables},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolInstrumentClassifyById" parameterType="Long">
update school_instrument_classify set del_flag = '1' where id = #{id} or FIND_IN_SET(#{id},ancestors)
</update>
<update id="deleteSchoolInstrumentClassifyByIds" parameterType="String">
update school_instrument_classify set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</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.schoolInstrument.SchoolInstrumentDetailMapper">
<resultMap type="SchoolInstrumentDetail" id="SchoolInstrumentDetailResult">
<result property="id" column="id" />
<result property="instrumentId" column="instrument_id" />
<result property="instrumentName" column="instrument_name" />
<result property="instrumentTypeId" column="instrument_type_id" />
<result property="instrumentTypeName" column="instrument_type_name" />
<result property="variationType" column="variation_type" />
<result property="variationNum" column="variation_num" />
<result property="oldStockNum" column="old_stock_num" />
<result property="newStockNum" column="new_stock_num" />
<result property="variationTime" column="variation_time" />
<result property="remark" column="remark" />
<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>
<sql id="selectSchoolInstrumentDetailVo">
select id, instrument_id, instrument_name, instrument_type_id, instrument_type_name, variation_type, variation_num, old_stock_num, new_stock_num, variation_time, remark, create_by, create_time, update_by, update_time, del_flag from school_instrument_detail
</sql>
<select id="selectSchoolInstrumentDetailList" parameterType="SchoolInstrumentDetailVo" resultMap="SchoolInstrumentDetailResult">
select i.id, i.instrument_id, i.instrument_name, i.instrument_type_id,
i.instrument_type_name, i.variation_type, i.variation_num, i.old_stock_num,
i.new_stock_num, i.variation_time, i.remark, i.create_by, i.create_time, i.update_by,
i.update_time, i.del_flag
from school_instrument_detail i
LEFT JOIN school_instrument_classify ic ON i.instrument_type_id = ic.id
<where>
i.del_flag = '0'
<if test="instrumentId != null "> and i.instrument_id = #{instrumentId}</if>
<if test="instrumentName != null and instrumentName != ''"> and i.instrument_name like concat('%', #{instrumentName}, '%')</if>
<if test="instrumentTypeId != null"> and i.instrument_type_id = #{instrumentTypeId} or FIND_IN_SET(#{instrumentTypeId},ic.ancestors)</if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and i.instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="variationType != null and variationType != ''"> and i.variation_type = #{variationType}</if>
<if test="variationNum != null "> and i.variation_num = #{variationNum}</if>
<if test="oldStockNum != null "> and i.old_stock_num = #{oldStockNum}</if>
<if test="newStockNum != null "> and i.new_stock_num = #{newStockNum}</if>
<if test="startTime != null and endTime != null "> and i.variation_time between #{startTime} and #{endTime}</if>
</where>
order by i.create_time DESC
</select>
<select id="selectSchoolInstrumentDetailById" parameterType="Long" resultMap="SchoolInstrumentDetailResult">
<include refid="selectSchoolInstrumentDetailVo"/>
where id = #{id}
</select>
<insert id="insertSchoolInstrumentDetail" parameterType="SchoolInstrumentDetail" useGeneratedKeys="true" keyProperty="id">
insert into school_instrument_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentId != null">instrument_id,</if>
<if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="variationType != null">variation_type,</if>
<if test="variationNum != null">variation_num,</if>
<if test="oldStockNum != null">old_stock_num,</if>
<if test="newStockNum != null">new_stock_num,</if>
<if test="variationTime != null">variation_time,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentId != null">#{instrumentId},</if>
<if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="variationType != null">#{variationType},</if>
<if test="variationNum != null">#{variationNum},</if>
<if test="oldStockNum != null">#{oldStockNum},</if>
<if test="newStockNum != null">#{newStockNum},</if>
<if test="variationTime != null">#{variationTime},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolInstrumentDetail" parameterType="SchoolInstrumentDetail">
update school_instrument_detail
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
<if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="variationType != null">variation_type = #{variationType},</if>
<if test="variationNum != null">variation_num = #{variationNum},</if>
<if test="oldStockNum != null">old_stock_num = #{oldStockNum},</if>
<if test="newStockNum != null">new_stock_num = #{newStockNum},</if>
<if test="variationTime != null">variation_time = #{variationTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolInstrumentDetailById" parameterType="Long">
update school_instrument_detail set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolInstrumentDetailByIds" parameterType="String">
update school_instrument_detail set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</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.schoolInstrument.SchoolInstrumentMapper">
<resultMap type="SchoolInstrument" id="SchoolInstrumentResult">
<result property="id" column="id" />
<result property="instrumentName" column="instrument_name" />
<result property="instrumentTypeId" column="instrument_type_id" />
<result property="instrumentTypeName" column="instrument_type_name" />
<result property="instrumentModel" column="instrument_model" />
<result property="instrumentNum" column="instrument_num" />
<result property="remark" column="remark" />
<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>
<sql id="selectSchoolInstrumentVo">
select id, instrument_name, instrument_type_id, instrument_type_name, instrument_model, instrument_num, remark, create_by, create_time, update_by, update_time, del_flag from school_instrument
</sql>
<select id="selectSchoolInstrumentList" parameterType="SchoolInstrument" resultMap="SchoolInstrumentResult">
SELECT i.id, i.instrument_name, i.instrument_type_id, i.instrument_type_name, i.instrument_model,
i.instrument_num, i.remark, i.create_by, i.create_time, i.update_by, i.update_time, i.del_flag
FROM school_instrument i
LEFT JOIN school_instrument_classify ic ON i.instrument_type_id = ic.id
<where>
i.del_flag = '0'
<if test="instrumentName != null and instrumentName != ''"> and i.instrument_name like concat('%', #{instrumentName}, '%')</if>
<if test="instrumentTypeId != null"> and i.instrument_type_id = #{instrumentTypeId} or FIND_IN_SET(#{instrumentTypeId},ic.ancestors) </if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and i.instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="instrumentModel != null and instrumentModel != ''"> and i.instrument_model = #{instrumentModel}</if>
<if test="instrumentNum != null "> and i.instrument_num = #{instrumentNum}</if>
</where>
order by i.create_time DESC
</select>
<select id="selectInstrumentList" parameterType="SchoolInstrumentVo" resultMap="SchoolInstrumentResult">
SELECT i.id, i.instrument_name, i.instrument_type_id, i.instrument_type_name, i.instrument_model,
i.instrument_num, i.remark, i.create_by, i.create_time, i.update_by, i.update_time, i.del_flag
FROM school_instrument i
LEFT JOIN school_instrument_classify ic ON i.instrument_type_id = ic.id
<where>
i.del_flag = '0'
<if test="instrumentName != null and instrumentName != ''"> and i.instrument_name like concat('%', #{instrumentName}, '%')</if>
<if test="instrumentTypeId != null"> and i.instrument_type_id = #{instrumentTypeId} or FIND_IN_SET(#{instrumentTypeId},ic.ancestors) </if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and i.instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="instrumentModel != null and instrumentModel != ''"> and i.instrument_model = #{instrumentModel}</if>
<if test="instrumentNum != null "> and i.instrument_num = #{instrumentNum}</if>
<if test="ids != null">
and i.id not in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
order by i.create_time DESC
</select>
<select id="selectSchoolInstrumentById" parameterType="Long" resultMap="SchoolInstrumentResult">
<include refid="selectSchoolInstrumentVo"/>
where id = #{id}
</select>
<insert id="insertSchoolInstrument" parameterType="SchoolInstrument" useGeneratedKeys="true" keyProperty="id">
insert into school_instrument
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="instrumentModel != null">instrument_model,</if>
<if test="instrumentNum != null">instrument_num,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="instrumentModel != null">#{instrumentModel},</if>
<if test="instrumentNum != null">#{instrumentNum},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolInstrument" parameterType="SchoolInstrument">
update school_instrument
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="instrumentModel != null">instrument_model = #{instrumentModel},</if>
<if test="instrumentNum != null">instrument_num = #{instrumentNum},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolInstrumentById" parameterType="Long">
update school_instrument set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolInstrumentByIds" parameterType="String">
update school_instrument set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</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.schoolInstrument.SchoolTeacherBorrowMapper">
<resultMap type="SchoolTeacherBorrowVo" id="SchoolTeacherBorrowVoResult">
<result property="id" column="id" />
<result property="borrowById" column="borrow_by_id" />
<result property="borrowBy" column="borrow_by" />
<result property="borrowSub" column="borrow_sub" />
<result property="borrowTime" column="borrow_time" />
<result property="borrowState" column="borrow_state" />
<result property="applyTime" column="apply_time" />
<result property="returnTime" column="return_time" />
<result property="remark" column="remark" />
<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>
<resultMap id="SchoolTeacherBorrowSchoolTeacherBorrowDetailResult" type="SchoolTeacherBorrowVo" extends="SchoolTeacherBorrowVoResult">
<collection property="schoolTeacherBorrowDetailList" notNullColumn="sub_id" javaType="java.util.List" resultMap="SchoolTeacherBorrowDetailResult" />
</resultMap>
<resultMap type="SchoolTeacherBorrowDetail" id="SchoolTeacherBorrowDetailResult">
<result property="id" column="sub_id" />
<result property="teacherBorrowId" column="sub_teacher_borrow_id" />
<result property="instrumentId" column="sub_instrument_id" />
<result property="instrumentName" column="sub_instrument_name" />
<result property="instrumentModel" column="sub_instrument_model" />
<result property="instrumentNum" column="sub_instrument_num" />
<result property="borrowNum" column="sub_borrow_num" />
<result property="damageNum" column="sub_damage_num" />
<result property="delFlag" column="sub_del_flag" />
</resultMap>
<sql id="selectSchoolTeacherBorrowVo">
select id, borrow_by_id, borrow_by, borrow_sub, borrow_time, borrow_state, apply_time, return_time, remark, create_by, create_time, update_by, update_time, del_flag from school_teacher_borrow
</sql>
<select id="selectSchoolTeacherBorrowList" parameterType="SchoolTeacherBorrowVo" resultMap="SchoolTeacherBorrowVoResult">
<include refid="selectSchoolTeacherBorrowVo"/>
<where>
del_flag = '0'
<if test="borrowById != null "> and borrow_by_id = #{borrowById}</if>
<if test="borrowBy != null and borrowBy != ''"> and borrow_by = #{borrowBy}</if>
<if test="borrowSub != null and borrowSub != ''"> and borrow_sub = #{borrowSub}</if>
<if test="borrowTime != null "> and borrow_time = #{borrowTime}</if>
<if test="borrowState != null and borrowState != ''"> and borrow_state = #{borrowState}</if>
<if test="startTime != null and endTime != null "> and apply_time between #{startTime} and #{endTime}</if>
<if test="returnTime != null "> and return_time = #{returnTime}</if>
</where>
order by create_time DESC
</select>
<select id="selectSchoolTeacherBorrowById" parameterType="Long" resultMap="SchoolTeacherBorrowSchoolTeacherBorrowDetailResult">
select a.id, a.borrow_by_id, a.borrow_by, a.borrow_sub, a.borrow_time, a.borrow_state, a.apply_time, a.return_time, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
b.id as sub_id, b.teacher_borrow_id as sub_teacher_borrow_id, b.instrument_id as sub_instrument_id, b.instrument_name as sub_instrument_name, b.instrument_model as sub_instrument_model, b.instrument_num as sub_instrument_num, b.borrow_num as sub_borrow_num, b.damage_num as sub_damage_num, b.del_flag as sub_del_flag
from school_teacher_borrow a
left join school_teacher_borrow_detail b on b.teacher_borrow_id = a.id
where a.id = #{id}
</select>
<insert id="insertSchoolTeacherBorrow" parameterType="SchoolTeacherBorrowVo" useGeneratedKeys="true" keyProperty="id">
insert into school_teacher_borrow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="borrowById != null">borrow_by_id,</if>
<if test="borrowBy != null">borrow_by,</if>
<if test="borrowSub != null">borrow_sub,</if>
<if test="borrowTime != null">borrow_time,</if>
<if test="borrowState != null">borrow_state,</if>
<if test="applyTime != null">apply_time,</if>
<if test="returnTime != null">return_time,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="borrowById != null">#{borrowById},</if>
<if test="borrowBy != null">#{borrowBy},</if>
<if test="borrowSub != null">#{borrowSub},</if>
<if test="borrowTime != null">#{borrowTime},</if>
<if test="borrowState != null">#{borrowState},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="returnTime != null">#{returnTime},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSchoolTeacherBorrow" parameterType="SchoolTeacherBorrowVo">
update school_teacher_borrow
<trim prefix="SET" suffixOverrides=",">
<if test="borrowById != null">borrow_by_id = #{borrowById},</if>
<if test="borrowBy != null">borrow_by = #{borrowBy},</if>
<if test="borrowSub != null">borrow_sub = #{borrowSub},</if>
<if test="borrowTime != null">borrow_time = #{borrowTime},</if>
<if test="borrowState != null">borrow_state = #{borrowState},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="returnTime != null">return_time = #{returnTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolTeacherBorrowById" parameterType="Long">
update school_teacher_borrow set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolTeacherBorrowByIds" parameterType="String">
update school_teacher_borrow set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="deleteSchoolTeacherBorrowDetailByTeacherBorrowIds" parameterType="String">
update school_teacher_borrow_detail set del_flag = '1' where teacher_borrow_id in
<foreach item="teacherBorrowId" collection="array" open="(" separator="," close=")">
#{teacherBorrowId}
</foreach>
</update>
<update id="deleteSchoolTeacherBorrowDetailByTeacherBorrowId" parameterType="Long">
update school_teacher_borrow_detail set del_flag = '1' where teacher_borrow_id = #{teacherBorrowId}
</update>
<insert id="batchSchoolTeacherBorrowDetail">
insert into school_teacher_borrow_detail( id, teacher_borrow_id, instrument_id, instrument_name, instrument_model, instrument_num, borrow_num) values
<foreach item="item" index="index" collection="list" separator=",">
( 0, #{item.teacherBorrowId}, #{item.instrumentId}, #{item.instrumentName}, #{item.instrumentModel}, #{item.instrumentNum}, #{item.borrowNum})
</foreach>
</insert>
<update id="updateSchoolTeacherBorrowDetails">
<foreach collection="list" item="data" separator=";">
update school_teacher_borrow_detail set damage_num = #{data.damageNum} where id = #{data.id}
</foreach>
</update>
</mapper>
\ No newline at end of file
......@@ -14,6 +14,7 @@
<result property="experimentClassify" column="experiment_classify" />
<result property="experimentName" column="experiment_name" />
<result property="chapterContent" column="chapter_content" />
<result property="isAppointment" column="is_appointment" />
<result property="plannedStartTime" column="planned_start_time" />
<result property="plannedEndTime" column="planned_end_time" />
<result property="experimentUseGoods" column="experiment_use_goods" />
......@@ -36,7 +37,7 @@
</resultMap>
<sql id="selectSchoolExperimentPlanVo">
select id, sub, grade_id, grade, school_year, semester, experiment_classify, experiment_name, chapter_content, planned_start_time, planned_end_time, experiment_use_goods, create_by, create_time, update_by, update_time, del_flag from school_experiment_plan
select id, sub, grade_id, grade, school_year, semester, experiment_classify, experiment_name, chapter_content, is_appointment, planned_start_time, planned_end_time, experiment_use_goods, create_by, create_time, update_by, update_time, del_flag from school_experiment_plan
</sql>
<select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
......@@ -119,7 +120,7 @@
</select>
<select id="selectSchoolExperimentPlanById" parameterType="Long" resultMap="ExperimentPlanClassResult">
select a.id, a.sub, a.grade_id, a.grade, a.school_year, a.semester, a.experiment_classify, a.experiment_name, a.chapter_content, a.planned_start_time, a.planned_end_time, a.experiment_use_goods, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
select a.id, a.sub, a.grade_id, a.grade, a.school_year, a.semester, a.experiment_classify, a.experiment_name, a.chapter_content, a.is_appointment, a.planned_start_time, a.planned_end_time, a.experiment_use_goods, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
b.id as sub_id, b.experiment_plan_id as sub_experiment_plan_id, b.class_id as sub_class_id, b.del_flag as sub_del_flag
from school_experiment_plan a
left join school_experiment_plan_class b on b.experiment_plan_id = a.id
......@@ -137,6 +138,7 @@
<if test="experimentClassify != null">experiment_classify,</if>
<if test="experimentName != null">experiment_name,</if>
<if test="chapterContent != null">chapter_content,</if>
<if test="isAppointment != null">is_appointment,</if>
<if test="plannedStartTime != null">planned_start_time,</if>
<if test="plannedEndTime != null">planned_end_time,</if>
<if test="experimentUseGoods != null">experiment_use_goods,</if>
......@@ -155,6 +157,7 @@
<if test="experimentClassify != null">#{experimentClassify},</if>
<if test="experimentName != null">#{experimentName},</if>
<if test="chapterContent != null">#{chapterContent},</if>
<if test="isAppointment != null">#{isAppointment},</if>
<if test="plannedStartTime != null">#{plannedStartTime},</if>
<if test="plannedEndTime != null">#{plannedEndTime},</if>
<if test="experimentUseGoods != null">#{experimentUseGoods},</if>
......@@ -177,6 +180,7 @@
<if test="experimentClassify != null">experiment_classify = #{experimentClassify},</if>
<if test="experimentName != null">experiment_name = #{experimentName},</if>
<if test="chapterContent != null">chapter_content = #{chapterContent},</if>
<if test="isAppointment != null">is_appointment = #{isAppointment},</if>
<if test="plannedStartTime != null">planned_start_time = #{plannedStartTime},</if>
<if test="plannedEndTime != null">planned_end_time = #{plannedEndTime},</if>
<if test="experimentUseGoods != null">experiment_use_goods = #{experimentUseGoods},</if>
......
......@@ -138,4 +138,19 @@
<delete id="deleteSchoolAccessoryByBusinessId" parameterType="Long">
delete from school_accessory where accessory_type = "证书照片" and business_id = #{businessId}
</delete>
<select id="getTeacher" resultType="Map" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
SELECT
user_id as userId,
user_name as userName,
phonenumber as phone
FROM
sys_user
WHERE
del_flag = '0'
AND `status` = '0' and user_login_type = '0'
<if test="userName != null and userName != ''">
AND user_name like concat('%', #{userName}, '%')
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -122,7 +122,7 @@
group by u.user_id,u.user_name
</select>
<select id="getLabAdmin" parameterType="String" resultType="Map">
<select id="getLabAdmin" resultType="Map">
select
u.user_id as userId,
u.user_name as userName
......@@ -131,7 +131,7 @@
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on ur.role_id = r.role_id
where
r.role_key = #{roleKey}
r.role_key = #{roleKey} and u.user_id = #{userId}
</select>
<select id="getSubAll" resultType="Map">
......
......@@ -49,27 +49,27 @@
from school_teacher_lab_apply tla
LEFT JOIN school_lab_class_year lcy ON tla.lab_class_year_id = lcy.id
<where>
del_flag = '0'
<if test="labClassYearId != null and labClassYearId != ''"> and lab_class_year_id = #{labClassYearId}</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="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="classId != null and classId != ''"> and class_id = #{classId}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and chapter_content = #{chapterContent}</if>
<if test="startTime != null and endTime != null "> and experiment_time between #{startTime} and #{endTime}</if>
<if test="section != null and section != ''"> and section = #{section}</if>
<if test="labId != null "> and lab_id = #{labId}</if>
<if test="labName != null and labName != ''"> and lab_name like concat('%', #{labName}, '%')</if>
<if test="applyState != null and applyState != ''"> and apply_state = #{applyState}</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>
tla.del_flag = '0'
<if test="labClassYearId != null and labClassYearId != ''"> and tla.lab_class_year_id = #{labClassYearId}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and tla.experiment_classify = #{experimentClassify}</if>
<if test="experimentName != null and experimentName != ''"> and tla.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="sub != null and sub != ''"> and tla.sub = #{sub}</if>
<if test="gradeId != null"> and tla.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and tla.grade like concat('%', #{grade}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and tla.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and tla.semester = #{semester}</if>
<if test="classId != null and classId != ''"> and tla.class_id = #{classId}</if>
<if test="className != null and className != ''"> and tla.class_name like concat('%', #{className}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and tla.chapter_content = #{chapterContent}</if>
<if test="startTime != null and endTime != null "> and tla.experiment_time between #{startTime} and #{endTime}</if>
<if test="section != null and section != ''"> and tla.section = #{section}</if>
<if test="labId != null "> and tla.lab_id = #{labId}</if>
<if test="labName != null and labName != ''"> and tla.lab_name like concat('%', #{labName}, '%')</if>
<if test="applyState != null and applyState != ''"> and tla.apply_state = #{applyState}</if>
<if test="applyId != null "> and tla.apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and tla.apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and tla.apply_time = #{applyTime}</if>
<if test="state != null "> and tla.state = #{state}</if>
<if test="subs != null ">
and tla.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")">
......@@ -250,13 +250,18 @@
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 state = 1 THEN state END) ywccount
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 != ''">
AND apply_name like concat('%', #{applyName}, '%')
</if>
FROM school_teacher_lab_apply
<where>
<if test="schoolYear != null and schoolYear != ''">
and school_year = #{schoolYear}
</if>
<if test="semester != null and semester != ''">
AND semester = #{semester}
</if>
<if test="applyName != null and applyName != ''">
AND apply_name like concat('%', #{applyName}, '%')
</if>
</where>
GROUP BY apply_name
</select>
......@@ -293,6 +298,7 @@
<select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult">
<include refid="selectSchoolTeacherLabApplyVo"/>
WHERE del_flag = '0'
<if test="state != null and state != ''">and state = #{state}</if>
<if test="semester != null and semester != ''">and semester = #{semester}</if>
<if test="schoolYear != null and schoolYear != ''">and school_year = #{schoolYear}</if>
<if test="gradeId != null">and grade_id = #{gradeId}</if>
......
<?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.schoolSecurity.SchoolVehicleInOutMapper">
<resultMap type="SchoolVehicleInOutVp" id="SchoolVehicleInOutVoResult">
<result property="id" column="id" />
<result property="instanceId" column="instance_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="phone" column="phone" />
<result property="jobNature" column="job_nature" />
<result property="workStartTime" column="work_start_time" />
<result property="workEndTime" column="work_end_time" />
<result property="applyLicenseNumber" column="apply_license_number" />
<result property="brand" column="brand" />
<result property="carType" column="car_type" />
<result property="oldLicenseNumber" column="old_license_number" />
<result property="isRetain" column="is_retain" />
<result property="applyUserId" column="apply_user_id" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="applyType" column="apply_type" />
<result property="state" column="state" />
<result property="applyOrgid" column="apply_orgid" />
<result property="applyOrgname" column="apply_orgname" />
<result property="handUserId1" column="hand_user_id1" />
<result property="handUserName1" column="hand_user_name1" />
<result property="handUserOpinion1" column="hand_user_opinion1" />
<result property="isSign1" column="is_sign1" />
<result property="handUserId2" column="hand_user_id2" />
<result property="handUserName2" column="hand_user_name2" />
<result property="handUserOpinion2" column="hand_user_opinion2" />
<result property="isSign2" column="is_sign2" />
<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>
<sql id="selectSchoolVehicleInOutVo">
select id, instance_id, user_id, user_name, phone, job_nature, work_start_time, work_end_time, apply_license_number, brand, car_type, old_license_number, is_retain, apply_user_id, apply_user, apply_time, apply_type, state, apply_orgid, apply_orgname, hand_user_id1, hand_user_name1, hand_user_opinion1, is_sign1, hand_user_id2, hand_user_name2, hand_user_opinion2, is_sign2, create_by, create_time, update_by, update_time, del_flag from school_vehicle_in_out
</sql>
<select id="selectSchoolVehicleInOutList" parameterType="SchoolVehicleInOutVo" resultMap="SchoolVehicleInOutVoResult">
<include refid="selectSchoolVehicleInOutVo"/>
<where>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="phone != null "> and phone = #{phone}</if>
<if test="jobNature != null and jobNature != ''"> and job_nature = #{jobNature}</if>
<if test="workStartTime != null "> and work_start_time = #{workStartTime}</if>
<if test="workEndTime != null and workEndTime != ''"> and work_end_time = #{workEndTime}</if>
<if test="applyLicenseNumber != null and applyLicenseNumber != ''"> and apply_license_number = #{applyLicenseNumber}</if>
<if test="brand != null and brand != ''"> and brand = #{brand}</if>
<if test="carType != null and carType != ''"> and car_type = #{carType}</if>
<if test="oldLicenseNumber != null and oldLicenseNumber != ''"> and old_license_number = #{oldLicenseNumber}</if>
<if test="isRetain != null and isRetain != ''"> and is_retain = #{isRetain}</if>
<if test="applyUserId != null "> and apply_user_id = #{applyUserId}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="applyType != null and applyType != ''"> and apply_type = #{applyType}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="applyOrgid != null "> and apply_orgid = #{applyOrgid}</if>
<if test="applyOrgname != null and applyOrgname != ''"> and apply_orgname like concat('%', #{applyOrgname}, '%')</if>
<if test="handUserId1 != null "> and hand_user_id1 = #{handUserId1}</if>
<if test="handUserName1 != null and handUserName1 != ''"> and hand_user_name1 = #{handUserName1}</if>
<if test="handUserOpinion1 != null and handUserOpinion1 != ''"> and hand_user_opinion1 = #{handUserOpinion1}</if>
<if test="isSign1 != null and isSign1 != ''"> and is_sign1 = #{isSign1}</if>
<if test="handUserId2 != null "> and hand_user_id2 = #{handUserId2}</if>
<if test="handUserName2 != null and handUserName2 != ''"> and hand_user_name2 = #{handUserName2}</if>
<if test="handUserOpinion2 != null and handUserOpinion2 != ''"> and hand_user_opinion2 = #{handUserOpinion2}</if>
<if test="isSign2 != null and isSign2 != ''"> and is_sign2 = #{isSign2}</if>
</where>
</select>
<select id="selectSchoolVehicleInOutById" parameterType="Long" resultMap="SchoolVehicleInOutVoResult">
<include refid="selectSchoolVehicleInOutVo"/>
where id = #{id}
</select>
<insert id="insertSchoolVehicleInOut" parameterType="SchoolVehicleInOutVo" useGeneratedKeys="true" keyProperty="id">
insert into school_vehicle_in_out
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instanceId != null">instance_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="phone != null">phone,</if>
<if test="jobNature != null">job_nature,</if>
<if test="workStartTime != null">work_start_time,</if>
<if test="workEndTime != null">work_end_time,</if>
<if test="applyLicenseNumber != null">apply_license_number,</if>
<if test="brand != null">brand,</if>
<if test="carType != null">car_type,</if>
<if test="oldLicenseNumber != null">old_license_number,</if>
<if test="isRetain != null">is_retain,</if>
<if test="applyUserId != null">apply_user_id,</if>
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="applyType != null">apply_type,</if>
<if test="state != null">state,</if>
<if test="applyOrgid != null">apply_orgid,</if>
<if test="applyOrgname != null">apply_orgname,</if>
<if test="handUserId1 != null">hand_user_id1,</if>
<if test="handUserName1 != null">hand_user_name1,</if>
<if test="handUserOpinion1 != null">hand_user_opinion1,</if>
<if test="isSign1 != null">is_sign1,</if>
<if test="handUserId2 != null">hand_user_id2,</if>
<if test="handUserName2 != null">hand_user_name2,</if>
<if test="handUserOpinion2 != null">hand_user_opinion2,</if>
<if test="isSign2 != null">is_sign2,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instanceId != null">#{instanceId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="phone != null">#{phone},</if>
<if test="jobNature != null">#{jobNature},</if>
<if test="workStartTime != null">#{workStartTime},</if>
<if test="workEndTime != null">#{workEndTime},</if>
<if test="applyLicenseNumber != null">#{applyLicenseNumber},</if>
<if test="brand != null">#{brand},</if>
<if test="carType != null">#{carType},</if>
<if test="oldLicenseNumber != null">#{oldLicenseNumber},</if>
<if test="isRetain != null">#{isRetain},</if>
<if test="applyUserId != null">#{applyUserId},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="applyType != null">#{applyType},</if>
<if test="state != null">#{state},</if>
<if test="applyOrgid != null">#{applyOrgid},</if>
<if test="applyOrgname != null">#{applyOrgname},</if>
<if test="handUserId1 != null">#{handUserId1},</if>
<if test="handUserName1 != null">#{handUserName1},</if>
<if test="handUserOpinion1 != null">#{handUserOpinion1},</if>
<if test="isSign1 != null">#{isSign1},</if>
<if test="handUserId2 != null">#{handUserId2},</if>
<if test="handUserName2 != null">#{handUserName2},</if>
<if test="handUserOpinion2 != null">#{handUserOpinion2},</if>
<if test="isSign2 != null">#{isSign2},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolVehicleInOut" parameterType="SchoolVehicleInOutVo">
update school_vehicle_in_out
<trim prefix="SET" suffixOverrides=",">
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="jobNature != null">job_nature = #{jobNature},</if>
<if test="workStartTime != null">work_start_time = #{workStartTime},</if>
<if test="workEndTime != null">work_end_time = #{workEndTime},</if>
<if test="applyLicenseNumber != null">apply_license_number = #{applyLicenseNumber},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="carType != null">car_type = #{carType},</if>
<if test="oldLicenseNumber != null">old_license_number = #{oldLicenseNumber},</if>
<if test="isRetain != null">is_retain = #{isRetain},</if>
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="applyType != null">apply_type = #{applyType},</if>
<if test="state != null">state = #{state},</if>
<if test="applyOrgid != null">apply_orgid = #{applyOrgid},</if>
<if test="applyOrgname != null">apply_orgname = #{applyOrgname},</if>
<if test="handUserId1 != null">hand_user_id1 = #{handUserId1},</if>
<if test="handUserName1 != null">hand_user_name1 = #{handUserName1},</if>
<if test="handUserOpinion1 != null">hand_user_opinion1 = #{handUserOpinion1},</if>
<if test="isSign1 != null">is_sign1 = #{isSign1},</if>
<if test="handUserId2 != null">hand_user_id2 = #{handUserId2},</if>
<if test="handUserName2 != null">hand_user_name2 = #{handUserName2},</if>
<if test="handUserOpinion2 != null">hand_user_opinion2 = #{handUserOpinion2},</if>
<if test="isSign2 != null">is_sign2 = #{isSign2},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolVehicleInOutById" parameterType="Long">
update school_vehicle_in_out set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolVehicleInOutByIds" parameterType="String">
update school_vehicle_in_out set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</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.schoolSecurity.SchoolVehicleRegistrationMapper">
<resultMap type="SchoolVehicleRegistration" id="SchoolVehicleRegistrationResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="jobNature" column="job_nature" />
<result property="licenseNumber" column="license_number" />
<result property="brand" column="brand" />
<result property="phone" column="phone" />
<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="remark1" column="remark1" />
<result property="remark2" column="remark2" />
<result property="remark3" column="remark3" />
<result property="remark4" column="remark4" />
<result property="remark5" column="remark5" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolVehicleRegistrationVo">
select id, user_id, user_name, job_nature, license_number, brand, phone, create_by, create_time, update_by, update_time, remark1, remark2, remark3, remark4, remark5, del_flag from school_vehicle_registration
</sql>
<select id="selectSchoolVehicleRegistrationList" parameterType="SchoolVehicleRegistration" resultMap="SchoolVehicleRegistrationResult">
<include refid="selectSchoolVehicleRegistrationVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="jobNature != null and jobNature != ''"> and job_nature = #{jobNature}</if>
<if test="licenseNumber != null and licenseNumber != ''"> and license_number = #{licenseNumber}</if>
<if test="brand != null and brand != ''"> and brand = #{brand}</if>
<if test="phone != null "> and phone = #{phone}</if>
<if test="remark1 != null and remark1 != ''"> and remark1 = #{remark1}</if>
<if test="remark2 != null and remark2 != ''"> and remark2 = #{remark2}</if>
<if test="remark3 != null and remark3 != ''"> and remark3 = #{remark3}</if>
<if test="remark4 != null and remark4 != ''"> and remark4 = #{remark4}</if>
<if test="remark5 != null and remark5 != ''"> and remark5 = #{remark5}</if>
</where>
</select>
<select id="selectSchoolVehicleRegistrationById" parameterType="Long" resultMap="SchoolVehicleRegistrationResult">
<include refid="selectSchoolVehicleRegistrationVo"/>
where id = #{id}
</select>
<insert id="insertSchoolVehicleRegistration" parameterType="SchoolVehicleRegistration" useGeneratedKeys="true" keyProperty="id">
insert into school_vehicle_registration
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="jobNature != null">job_nature,</if>
<if test="licenseNumber != null">license_number,</if>
<if test="brand != null">brand,</if>
<if test="phone != null">phone,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark1 != null">remark1,</if>
<if test="remark2 != null">remark2,</if>
<if test="remark3 != null">remark3,</if>
<if test="remark4 != null">remark4,</if>
<if test="remark5 != null">remark5,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="jobNature != null">#{jobNature},</if>
<if test="licenseNumber != null">#{licenseNumber},</if>
<if test="brand != null">#{brand},</if>
<if test="phone != null">#{phone},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark1 != null">#{remark1},</if>
<if test="remark2 != null">#{remark2},</if>
<if test="remark3 != null">#{remark3},</if>
<if test="remark4 != null">#{remark4},</if>
<if test="remark5 != null">#{remark5},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolVehicleRegistration" parameterType="SchoolVehicleRegistration">
update school_vehicle_registration
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="jobNature != null">job_nature = #{jobNature},</if>
<if test="licenseNumber != null">license_number = #{licenseNumber},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark1 != null">remark1 = #{remark1},</if>
<if test="remark2 != null">remark2 = #{remark2},</if>
<if test="remark3 != null">remark3 = #{remark3},</if>
<if test="remark4 != null">remark4 = #{remark4},</if>
<if test="remark5 != null">remark5 = #{remark5},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolVehicleRegistrationById" parameterType="Long">
delete from school_vehicle_registration where id = #{id}
</delete>
<delete id="deleteSchoolVehicleRegistrationByIds" parameterType="String">
delete from school_vehicle_registration where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</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.schoolSecurity.SchoolVideoConsultExternalMapper">
<resultMap type="SchoolVideoConsultExternalVo" id="SchoolVideoConsultExternalVoResult">
<result property="id" column="id" />
<result property="instanceId" column="instance_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="phone" column="phone" />
<result property="idCard" column="id_card" />
<result property="videoStartTime" column="video_start_time" />
<result property="videoEndTime" column="video_end_time" />
<result property="location" column="location" />
<result property="applyReason" column="apply_reason" />
<result property="state" column="state" />
<result property="applyUserId" column="apply_user_id" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="handUserId1" column="hand_user_id1" />
<result property="handUserName1" column="hand_user_name1" />
<result property="handUserOpinion1" column="hand_user_opinion1" />
<result property="isSign1" column="is_sign1" />
<result property="handUserId2" column="hand_user_id2" />
<result property="handUserName2" column="hand_user_name2" />
<result property="handUserOpinion2" column="hand_user_opinion2" />
<result property="isSign2" column="is_sign2" />
<result property="handUserId3" column="hand_user_id3" />
<result property="handUserName3" column="hand_user_name3" />
<result property="handUserOpinion3" column="hand_user_opinion3" />
<result property="isSign3" column="is_sign3" />
<result property="handUserId4" column="hand_user_id4" />
<result property="handUserName4" column="hand_user_name4" />
<result property="handUserOpinion4" column="hand_user_opinion4" />
<result property="isSign4" column="is_sign4" />
<result property="fetchResult" column="fetch_result" />
<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>
<resultMap id="SchoolVideoConsultExternalSchoolAccessoryResult" type="SchoolVideoConsultExternalVo" extends="SchoolVideoConsultExternalVoResult">
<collection property="schoolAccessoryList" notNullColumn="sub_id" javaType="java.util.List" resultMap="SchoolAccessoryResult" />
</resultMap>
<resultMap type="SchoolAccessory" id="SchoolAccessoryResult">
<result property="id" column="sub_id" />
<result property="businessId" column="sub_business_id" />
<result property="moduleName" column="sub_module_name" />
<result property="accessoryType" column="sub_accessory_type" />
<result property="accessoryUrl" column="sub_accessory_url" />
<result property="accessoryName" column="sub_accessory_name" />
</resultMap>
<sql id="selectSchoolVideoConsultExternalVo">
select id, instance_id, user_id, user_name, phone, id_card, video_start_time, video_end_time, location, apply_reason, state, apply_user_id, apply_user, apply_time, hand_user_id1, hand_user_name1, hand_user_opinion1, is_sign1, hand_user_id2, hand_user_name2, hand_user_opinion2, is_sign2, hand_user_id3, hand_user_name3, hand_user_opinion3, is_sign3, hand_user_id4, hand_user_name4, hand_user_opinion4, is_sign4, fetch_result, create_by, create_time, update_by, update_time, del_flag from school_video_consult_external
</sql>
<select id="selectSchoolVideoConsultExternalList" parameterType="SchoolVideoConsultExternalVo" resultMap="SchoolVideoConsultExternalVoResult">
<include refid="selectSchoolVideoConsultExternalVo"/>
<where>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="phone != null "> and phone = #{phone}</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="videoStartTime != null "> and video_start_time = #{videoStartTime}</if>
<if test="videoEndTime != null "> and video_end_time = #{videoEndTime}</if>
<if test="location != null and location != ''"> and location = #{location}</if>
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="applyUserId != null "> and apply_user_id = #{applyUserId}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="handUserId1 != null "> and hand_user_id1 = #{handUserId1}</if>
<if test="handUserName1 != null and handUserName1 != ''"> and hand_user_name1 = #{handUserName1}</if>
<if test="handUserOpinion1 != null and handUserOpinion1 != ''"> and hand_user_opinion1 = #{handUserOpinion1}</if>
<if test="isSign1 != null and isSign1 != ''"> and is_sign1 = #{isSign1}</if>
<if test="handUserId2 != null "> and hand_user_id2 = #{handUserId2}</if>
<if test="handUserName2 != null and handUserName2 != ''"> and hand_user_name2 = #{handUserName2}</if>
<if test="handUserOpinion2 != null and handUserOpinion2 != ''"> and hand_user_opinion2 = #{handUserOpinion2}</if>
<if test="isSign2 != null and isSign2 != ''"> and is_sign2 = #{isSign2}</if>
<if test="handUserId3 != null "> and hand_user_id3 = #{handUserId3}</if>
<if test="handUserName3 != null and handUserName3 != ''"> and hand_user_name3 = #{handUserName3}</if>
<if test="handUserOpinion3 != null and handUserOpinion3 != ''"> and hand_user_opinion3 = #{handUserOpinion3}</if>
<if test="isSign3 != null and isSign3 != ''"> and is_sign3 = #{isSign3}</if>
<if test="handUserId4 != null "> and hand_user_id4 = #{handUserId4}</if>
<if test="handUserName4 != null and handUserName4 != ''"> and hand_user_name4 = #{handUserName4}</if>
<if test="handUserOpinion4 != null and handUserOpinion4 != ''"> and hand_user_opinion4 = #{handUserOpinion4}</if>
<if test="isSign4 != null and isSign4 != ''"> and is_sign4 = #{isSign4}</if>
<if test="fetchResult != null and fetchResult != ''"> and fetch_result = #{fetchResult}</if>
</where>
</select>
<select id="selectSchoolVideoConsultExternalById" parameterType="Long" resultMap="SchoolVideoConsultExternalSchoolAccessoryResult">
select a.id, a.instance_id, a.user_id, a.user_name, a.phone, a.id_card, a.video_start_time, a.video_end_time, a.location, a.apply_reason, a.state, a.apply_user_id, a.apply_user, a.apply_time, a.hand_user_id1, a.hand_user_name1, a.hand_user_opinion1, a.is_sign1, a.hand_user_id2, a.hand_user_name2, a.hand_user_opinion2, a.is_sign2, a.hand_user_id3, a.hand_user_name3, a.hand_user_opinion3, a.is_sign3, a.hand_user_id4, a.hand_user_name4, a.hand_user_opinion4, a.is_sign4, a.fetch_result, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
b.id as sub_id, b.business_id as sub_business_id, b.module_name as sub_module_name, b.accessory_type as sub_accessory_type, b.accessory_url as sub_accessory_url, b.accessory_name as sub_accessory_name
from school_video_consult_external a
left join school_accessory b on b.business_id = a.id
where a.id = #{id}
</select>
<insert id="insertSchoolVideoConsultExternal" parameterType="SchoolVideoConsultExternalVo" useGeneratedKeys="true" keyProperty="id">
insert into school_video_consult_external
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instanceId != null">instance_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="phone != null">phone,</if>
<if test="idCard != null">id_card,</if>
<if test="videoStartTime != null">video_start_time,</if>
<if test="videoEndTime != null">video_end_time,</if>
<if test="location != null">location,</if>
<if test="applyReason != null">apply_reason,</if>
<if test="state != null">state,</if>
<if test="applyUserId != null">apply_user_id,</if>
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="handUserId1 != null">hand_user_id1,</if>
<if test="handUserName1 != null">hand_user_name1,</if>
<if test="handUserOpinion1 != null">hand_user_opinion1,</if>
<if test="isSign1 != null">is_sign1,</if>
<if test="handUserId2 != null">hand_user_id2,</if>
<if test="handUserName2 != null">hand_user_name2,</if>
<if test="handUserOpinion2 != null">hand_user_opinion2,</if>
<if test="isSign2 != null">is_sign2,</if>
<if test="handUserId3 != null">hand_user_id3,</if>
<if test="handUserName3 != null">hand_user_name3,</if>
<if test="handUserOpinion3 != null">hand_user_opinion3,</if>
<if test="isSign3 != null">is_sign3,</if>
<if test="handUserId4 != null">hand_user_id4,</if>
<if test="handUserName4 != null">hand_user_name4,</if>
<if test="handUserOpinion4 != null">hand_user_opinion4,</if>
<if test="isSign4 != null">is_sign4,</if>
<if test="fetchResult != null">fetch_result,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instanceId != null">#{instanceId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="phone != null">#{phone},</if>
<if test="idCard != null">#{idCard},</if>
<if test="videoStartTime != null">#{videoStartTime},</if>
<if test="videoEndTime != null">#{videoEndTime},</if>
<if test="location != null">#{location},</if>
<if test="applyReason != null">#{applyReason},</if>
<if test="state != null">#{state},</if>
<if test="applyUserId != null">#{applyUserId},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="handUserId1 != null">#{handUserId1},</if>
<if test="handUserName1 != null">#{handUserName1},</if>
<if test="handUserOpinion1 != null">#{handUserOpinion1},</if>
<if test="isSign1 != null">#{isSign1},</if>
<if test="handUserId2 != null">#{handUserId2},</if>
<if test="handUserName2 != null">#{handUserName2},</if>
<if test="handUserOpinion2 != null">#{handUserOpinion2},</if>
<if test="isSign2 != null">#{isSign2},</if>
<if test="handUserId3 != null">#{handUserId3},</if>
<if test="handUserName3 != null">#{handUserName3},</if>
<if test="handUserOpinion3 != null">#{handUserOpinion3},</if>
<if test="isSign3 != null">#{isSign3},</if>
<if test="handUserId4 != null">#{handUserId4},</if>
<if test="handUserName4 != null">#{handUserName4},</if>
<if test="handUserOpinion4 != null">#{handUserOpinion4},</if>
<if test="isSign4 != null">#{isSign4},</if>
<if test="fetchResult != null">#{fetchResult},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolVideoConsultExternal" parameterType="SchoolVideoConsultExternalVo">
update school_video_consult_external
<trim prefix="SET" suffixOverrides=",">
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="videoStartTime != null">video_start_time = #{videoStartTime},</if>
<if test="videoEndTime != null">video_end_time = #{videoEndTime},</if>
<if test="location != null">location = #{location},</if>
<if test="applyReason != null">apply_reason = #{applyReason},</if>
<if test="state != null">state = #{state},</if>
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="handUserId1 != null">hand_user_id1 = #{handUserId1},</if>
<if test="handUserName1 != null">hand_user_name1 = #{handUserName1},</if>
<if test="handUserOpinion1 != null">hand_user_opinion1 = #{handUserOpinion1},</if>
<if test="isSign1 != null">is_sign1 = #{isSign1},</if>
<if test="handUserId2 != null">hand_user_id2 = #{handUserId2},</if>
<if test="handUserName2 != null">hand_user_name2 = #{handUserName2},</if>
<if test="handUserOpinion2 != null">hand_user_opinion2 = #{handUserOpinion2},</if>
<if test="isSign2 != null">is_sign2 = #{isSign2},</if>
<if test="handUserId3 != null">hand_user_id3 = #{handUserId3},</if>
<if test="handUserName3 != null">hand_user_name3 = #{handUserName3},</if>
<if test="handUserOpinion3 != null">hand_user_opinion3 = #{handUserOpinion3},</if>
<if test="isSign3 != null">is_sign3 = #{isSign3},</if>
<if test="handUserId4 != null">hand_user_id4 = #{handUserId4},</if>
<if test="handUserName4 != null">hand_user_name4 = #{handUserName4},</if>
<if test="handUserOpinion4 != null">hand_user_opinion4 = #{handUserOpinion4},</if>
<if test="isSign4 != null">is_sign4 = #{isSign4},</if>
<if test="fetchResult != null">fetch_result = #{fetchResult},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolVideoConsultExternalById" parameterType="Long">
update school_video_consult_external set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolVideoConsultExternalByIds" parameterType="String">
update school_video_consult_external set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<delete id="deleteSchoolAccessoryByBusinessIds" parameterType="String">
delete from school_accessory where business_id in
<foreach item="businessId" collection="array" open="(" separator="," close=")">
#{businessId}
</foreach>
</delete>
<delete id="deleteSchoolAccessoryByBusinessId" parameterType="Long">
delete from school_accessory where business_id = #{businessId}
</delete>
<insert id="batchSchoolAccessory">
insert into school_accessory( id, business_id, module_name, accessory_type, accessory_url, accessory_name, create_by, create_time, update_by, update_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}, #{item.updateBy},#{item.updateTime})
</foreach>
</insert>
</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.schoolSecurity.SchoolVideoConsultMapper">
<resultMap type="SchoolVideoConsultVo" id="SchoolVideoConsultVoResult">
<result property="id" column="id" />
<result property="instanceId" column="instance_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="phone" column="phone" />
<result property="orgid" column="orgid" />
<result property="orgname" column="orgname" />
<result property="videoStartTime" column="video_start_time" />
<result property="videoEndTime" column="video_end_time" />
<result property="location" column="location" />
<result property="applyReason" column="apply_reason" />
<result property="state" column="state" />
<result property="applyUserId" column="apply_user_id" />
<result property="applyUser" column="apply_user" />
<result property="applyOrgid" column="apply_orgid" />
<result property="applyOrgname" column="apply_orgname" />
<result property="applyTime" column="apply_time" />
<result property="applyType" column="apply_type" />
<result property="handUserId1" column="hand_user_id1" />
<result property="handUserName1" column="hand_user_name1" />
<result property="handUserOpinion1" column="hand_user_opinion1" />
<result property="isSign1" column="is_sign1" />
<result property="handUserId2" column="hand_user_id2" />
<result property="handUserName2" column="hand_user_name2" />
<result property="handUserOpinion2" column="hand_user_opinion2" />
<result property="isSign2" column="is_sign2" />
<result property="handUserId3" column="hand_user_id3" />
<result property="handUserName3" column="hand_user_name3" />
<result property="handUserOpinion3" column="hand_user_opinion3" />
<result property="isSign3" column="is_sign3" />
<result property="handUserId4" column="hand_user_id4" />
<result property="handUserName4" column="hand_user_name4" />
<result property="handUserOpinion4" column="hand_user_opinion4" />
<result property="isSign4" column="is_sign4" />
<result property="fetchResult1" column="fetch_result1" />
<result property="fetchResult2" column="fetch_result2" />
<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>
<sql id="selectSchoolVideoConsultVo">
select id, instance_id, user_id, user_name, phone, orgid, orgname, video_start_time, video_end_time, location, apply_reason, state, apply_user_id, apply_user, apply_orgid, apply_orgname, apply_time, apply_type, hand_user_id1, hand_user_name1, hand_user_opinion1, is_sign1, hand_user_id2, hand_user_name2, hand_user_opinion2, is_sign2, hand_user_id3, hand_user_name3, hand_user_opinion3, is_sign3, hand_user_id4, hand_user_name4, hand_user_opinion4, is_sign4, fetch_result1, fetch_result2, create_by, create_time, update_by, update_time, del_flag from school_video_consult
</sql>
<select id="selectSchoolVideoConsultList" parameterType="SchoolVideoConsultVo" resultMap="SchoolVideoConsultVoResult">
<include refid="selectSchoolVideoConsultVo"/>
<where>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="phone != null "> and phone = #{phone}</if>
<if test="orgid != null "> and orgid = #{orgid}</if>
<if test="orgname != null and orgname != ''"> and orgname like concat('%', #{orgname}, '%')</if>
<if test="videoStartTime != null "> and video_start_time = #{videoStartTime}</if>
<if test="videoEndTime != null "> and video_end_time = #{videoEndTime}</if>
<if test="location != null and location != ''"> and location = #{location}</if>
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="applyUserId != null "> and apply_user_id = #{applyUserId}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
<if test="applyOrgid != null "> and apply_orgid = #{applyOrgid}</if>
<if test="applyOrgname != null and applyOrgname != ''"> and apply_orgname like concat('%', #{applyOrgname}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="applyType != null and applyType != ''"> and apply_type = #{applyType}</if>
<if test="handUserId1 != null "> and hand_user_id1 = #{handUserId1}</if>
<if test="handUserName1 != null and handUserName1 != ''"> and hand_user_name1 = #{handUserName1}</if>
<if test="handUserOpinion1 != null and handUserOpinion1 != ''"> and hand_user_opinion1 = #{handUserOpinion1}</if>
<if test="isSign1 != null and isSign1 != ''"> and is_sign1 = #{isSign1}</if>
<if test="handUserId2 != null "> and hand_user_id2 = #{handUserId2}</if>
<if test="handUserName2 != null and handUserName2 != ''"> and hand_user_name2 = #{handUserName2}</if>
<if test="handUserOpinion2 != null and handUserOpinion2 != ''"> and hand_user_opinion2 = #{handUserOpinion2}</if>
<if test="isSign2 != null and isSign2 != ''"> and is_sign2 = #{isSign2}</if>
<if test="handUserId3 != null "> and hand_user_id3 = #{handUserId3}</if>
<if test="handUserName3 != null and handUserName3 != ''"> and hand_user_name3 = #{handUserName3}</if>
<if test="handUserOpinion3 != null and handUserOpinion3 != ''"> and hand_user_opinion3 = #{handUserOpinion3}</if>
<if test="isSign3 != null and isSign3 != ''"> and is_sign3 = #{isSign3}</if>
<if test="handUserId4 != null "> and hand_user_id4 = #{handUserId4}</if>
<if test="handUserName4 != null and handUserName4 != ''"> and hand_user_name4 = #{handUserName4}</if>
<if test="handUserOpinion4 != null and handUserOpinion4 != ''"> and hand_user_opinion4 = #{handUserOpinion4}</if>
<if test="isSign4 != null and isSign4 != ''"> and is_sign4 = #{isSign4}</if>
<if test="fetchResult1 != null and fetchResult1 != ''"> and fetch_result1 = #{fetchResult1}</if>
<if test="fetchResult2 != null and fetchResult2 != ''"> and fetch_result2 = #{fetchResult2}</if>
</where>
</select>
<select id="selectSchoolVideoConsultById" parameterType="Long" resultMap="SchoolVideoConsultVoResult">
<include refid="selectSchoolVideoConsultVo"/>
where id = #{id}
</select>
<insert id="insertSchoolVideoConsult" parameterType="SchoolVideoConsultVo" useGeneratedKeys="true" keyProperty="id">
insert into school_video_consult
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instanceId != null">instance_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="phone != null">phone,</if>
<if test="orgid != null">orgid,</if>
<if test="orgname != null">orgname,</if>
<if test="videoStartTime != null">video_start_time,</if>
<if test="videoEndTime != null">video_end_time,</if>
<if test="location != null">location,</if>
<if test="applyReason != null">apply_reason,</if>
<if test="state != null">state,</if>
<if test="applyUserId != null">apply_user_id,</if>
<if test="applyUser != null">apply_user,</if>
<if test="applyOrgid != null">apply_orgid,</if>
<if test="applyOrgname != null">apply_orgname,</if>
<if test="applyTime != null">apply_time,</if>
<if test="applyType != null">apply_type,</if>
<if test="handUserId1 != null">hand_user_id1,</if>
<if test="handUserName1 != null">hand_user_name1,</if>
<if test="handUserOpinion1 != null">hand_user_opinion1,</if>
<if test="isSign1 != null">is_sign1,</if>
<if test="handUserId2 != null">hand_user_id2,</if>
<if test="handUserName2 != null">hand_user_name2,</if>
<if test="handUserOpinion2 != null">hand_user_opinion2,</if>
<if test="isSign2 != null">is_sign2,</if>
<if test="handUserId3 != null">hand_user_id3,</if>
<if test="handUserName3 != null">hand_user_name3,</if>
<if test="handUserOpinion3 != null">hand_user_opinion3,</if>
<if test="isSign3 != null">is_sign3,</if>
<if test="handUserId4 != null">hand_user_id4,</if>
<if test="handUserName4 != null">hand_user_name4,</if>
<if test="handUserOpinion4 != null">hand_user_opinion4,</if>
<if test="isSign4 != null">is_sign4,</if>
<if test="fetchResult1 != null">fetch_result1,</if>
<if test="fetchResult2 != null">fetch_result2,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instanceId != null">#{instanceId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="phone != null">#{phone},</if>
<if test="orgid != null">#{orgid},</if>
<if test="orgname != null">#{orgname},</if>
<if test="videoStartTime != null">#{videoStartTime},</if>
<if test="videoEndTime != null">#{videoEndTime},</if>
<if test="location != null">#{location},</if>
<if test="applyReason != null">#{applyReason},</if>
<if test="state != null">#{state},</if>
<if test="applyUserId != null">#{applyUserId},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyOrgid != null">#{applyOrgid},</if>
<if test="applyOrgname != null">#{applyOrgname},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="applyType != null">#{applyType},</if>
<if test="handUserId1 != null">#{handUserId1},</if>
<if test="handUserName1 != null">#{handUserName1},</if>
<if test="handUserOpinion1 != null">#{handUserOpinion1},</if>
<if test="isSign1 != null">#{isSign1},</if>
<if test="handUserId2 != null">#{handUserId2},</if>
<if test="handUserName2 != null">#{handUserName2},</if>
<if test="handUserOpinion2 != null">#{handUserOpinion2},</if>
<if test="isSign2 != null">#{isSign2},</if>
<if test="handUserId3 != null">#{handUserId3},</if>
<if test="handUserName3 != null">#{handUserName3},</if>
<if test="handUserOpinion3 != null">#{handUserOpinion3},</if>
<if test="isSign3 != null">#{isSign3},</if>
<if test="handUserId4 != null">#{handUserId4},</if>
<if test="handUserName4 != null">#{handUserName4},</if>
<if test="handUserOpinion4 != null">#{handUserOpinion4},</if>
<if test="isSign4 != null">#{isSign4},</if>
<if test="fetchResult1 != null">#{fetchResult1},</if>
<if test="fetchResult2 != null">#{fetchResult2},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolVideoConsult" parameterType="SchoolVideoConsultVo">
update school_video_consult
<trim prefix="SET" suffixOverrides=",">
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="orgid != null">orgid = #{orgid},</if>
<if test="orgname != null">orgname = #{orgname},</if>
<if test="videoStartTime != null">video_start_time = #{videoStartTime},</if>
<if test="videoEndTime != null">video_end_time = #{videoEndTime},</if>
<if test="location != null">location = #{location},</if>
<if test="applyReason != null">apply_reason = #{applyReason},</if>
<if test="state != null">state = #{state},</if>
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyOrgid != null">apply_orgid = #{applyOrgid},</if>
<if test="applyOrgname != null">apply_orgname = #{applyOrgname},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="applyType != null">apply_type = #{applyType},</if>
<if test="handUserId1 != null">hand_user_id1 = #{handUserId1},</if>
<if test="handUserName1 != null">hand_user_name1 = #{handUserName1},</if>
<if test="handUserOpinion1 != null">hand_user_opinion1 = #{handUserOpinion1},</if>
<if test="isSign1 != null">is_sign1 = #{isSign1},</if>
<if test="handUserId2 != null">hand_user_id2 = #{handUserId2},</if>
<if test="handUserName2 != null">hand_user_name2 = #{handUserName2},</if>
<if test="handUserOpinion2 != null">hand_user_opinion2 = #{handUserOpinion2},</if>
<if test="isSign2 != null">is_sign2 = #{isSign2},</if>
<if test="handUserId3 != null">hand_user_id3 = #{handUserId3},</if>
<if test="handUserName3 != null">hand_user_name3 = #{handUserName3},</if>
<if test="handUserOpinion3 != null">hand_user_opinion3 = #{handUserOpinion3},</if>
<if test="isSign3 != null">is_sign3 = #{isSign3},</if>
<if test="handUserId4 != null">hand_user_id4 = #{handUserId4},</if>
<if test="handUserName4 != null">hand_user_name4 = #{handUserName4},</if>
<if test="handUserOpinion4 != null">hand_user_opinion4 = #{handUserOpinion4},</if>
<if test="isSign4 != null">is_sign4 = #{isSign4},</if>
<if test="fetchResult1 != null">fetch_result1 = #{fetchResult1},</if>
<if test="fetchResult2 != null">fetch_result2 = #{fetchResult2},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolVideoConsultById" parameterType="Long">
update school_video_consult set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolVideoConsultByIds" parameterType="String">
update school_video_consult set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
......@@ -24,23 +24,24 @@
</resultMap>
<select id="querylistbx" parameterType="TeacherBx" resultMap="TeacherBxResult">
SELECT ser.id,encode,equipment_name,model,date_of_production,place,report_repair_time,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark
SELECT ser.id,encode,equipment_name,model,date_of_production,place,report_repair_time,report_repair,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark
FROM school_equipment_repair ser
JOIN school_equipment_ledger sel
ON ser.equipment_id=sel.id
<if test="equipmentName!=null">
WHERE equipment_name like concat('%',#{equipmentName},'%')
</if>
<if test="classificationCode!=null">
AND ser.classification_code like concat('%',#{classificationCode},'%')
</if>
<if test="repairState!=null">
AND repair_state like concat('%',#{repairState},'%')
</if>
<if test="reportRepairId!=null">
AND report_repair_id =#{reportRepairId}
</if>
<where>
<if test="equipmentName!=null">
and equipment_name like concat('%',#{equipmentName},'%')
</if>
<if test="classificationCode!=null">
AND ser.classification_code like concat('%',#{classificationCode},'%')
</if>
<if test="repairState!=null">
AND repair_state like concat('%',#{repairState},'%')
</if>
<if test="reportRepairId!=null">
AND report_repair_id =#{reportRepairId}
</if>
</where>
</select>
</mapper>
......@@ -19,15 +19,16 @@
FROM school_circulation ss
JOIN school_equipment_ledger ssc
ON ss.equipment_id=ssc.id
<if test="equipmentName!=null">
WHERE equipment_name like concat('%',#{equipmentName},'%')
</if>
<if test="borrowTime!=null">
AND borrow_time like concat('%',#{borrowTime},'%')
</if>
<if test="borrowByid!=null">
AND borrow_by_id =#{borrowByid}
</if>
<where>
<if test="equipmentName!=null">
and equipment_name like concat('%',#{equipmentName},'%')
</if>
<if test="borrowTime!=null">
AND DATE_FORMAT(ss.borrow_time,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')
</if>
<if test="borrowByid!=null">
AND borrow_by_id = #{borrowByid}
</if>
</where>
</select>
</mapper>
......@@ -18,14 +18,19 @@
FROM school_receive sel
JOIN school_equipment_ledger sr
ON sel.equipment_id=sr.id
<if test="equipmentName!=null">
WHERE equipment_name like concat('%',#{equipmentName},'%')
</if>
<if test="recipientTime!=null">
AND recipient_time like concat('%',#{recipientTime},'%')
</if>
<if test="recipientById!=null">
AND recipient_by_id =#{recipientById}
</if>
<where>
<if test="equipmentName!=null">
and equipment_name like concat('%',#{equipmentName},'%')
</if>
<if test="recipientTime!=null">
and DATE_FORMAT(recipient_time,'%Y-%m-%d') = DATE_FORMAT(#{recipientTime},'%Y-%m-%d')
</if>
<if test="recipientBy!=null">
AND recipient_by like concat('%',#{recipientBy},'%')
</if>
<if test="recipientById!=null">
AND recipient_by_id =#{recipientById}
</if>
</where>
</select>
</mapper>
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