add游戏数学学期计划详细功能
This commit is contained in:
parent
09ca6827c4
commit
def67e67c0
53
ruoyi-ui/src/api/benyi/mathtermplanitem.js
Normal file
53
ruoyi-ui/src/api/benyi/mathtermplanitem.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询游戏数学学期计划明细列表
|
||||
export function listMathtermplanitem(query) {
|
||||
return request({
|
||||
url: '/benyi/mathtermplanitem/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询游戏数学学期计划明细详细
|
||||
export function getMathtermplanitem(id) {
|
||||
return request({
|
||||
url: '/benyi/mathtermplanitem/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增游戏数学学期计划明细
|
||||
export function addMathtermplanitem(data) {
|
||||
return request({
|
||||
url: '/benyi/mathtermplanitem',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改游戏数学学期计划明细
|
||||
export function updateMathtermplanitem(data) {
|
||||
return request({
|
||||
url: '/benyi/mathtermplanitem',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除游戏数学学期计划明细
|
||||
export function delMathtermplanitem(id) {
|
||||
return request({
|
||||
url: '/benyi/mathtermplanitem/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出游戏数学学期计划明细
|
||||
export function exportMathtermplanitem(query) {
|
||||
return request({
|
||||
url: '/benyi/mathtermplanitem/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -274,6 +274,21 @@ export const constantRoutes = [{
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/benyi_course/mathtermplan',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'data/:id',
|
||||
component: () =>
|
||||
import ('@/views/benyi/mathtermplan/data'),
|
||||
name: 'Mathtermplan1',
|
||||
meta: {
|
||||
title: '游戏数学学期计划(明细)',
|
||||
icon: ''
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/benyi_course/themetermplan',
|
||||
component: Layout,
|
||||
|
406
ruoyi-ui/src/views/benyi/mathtermplan/data.vue
Normal file
406
ruoyi-ui/src/views/benyi/mathtermplan/data.vue
Normal file
@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
label-width="102px"
|
||||
>
|
||||
<el-form-item label="学期计划" prop="tpid">
|
||||
<el-select v-model="queryParams.tpid" size="small">
|
||||
<el-option
|
||||
v-for="item in mathPlanOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="游戏数学内容" prop="mathconent">
|
||||
<el-input
|
||||
v-model="queryParams.mathconent"
|
||||
placeholder="请输入游戏数学内容"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['benyi:mathtermplan:add']"
|
||||
v-show="isShow"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['benyi:mathtermplan:edit']"
|
||||
v-show="isShow"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['benyi:mathtermplan:remove']"
|
||||
v-show="isShow"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="mathtermplanitemList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="所属计划" align="center" prop="tpid" :formatter="mathPlanFormat" />
|
||||
<el-table-column label="月份" align="center" prop="month" />
|
||||
<el-table-column label="游戏数学内容" align="center" prop="mathconent" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['benyi:mathtermplan:edit']"
|
||||
v-show="isShow"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['benyi:mathtermplan:remove']"
|
||||
v-show="isShow"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改游戏数学学期计划明细对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="所属计划" prop="tpid">
|
||||
<el-select v-model="form.tpid" size="small" :disabled="true">
|
||||
<el-option
|
||||
v-for="item in mathPlanOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="month">
|
||||
<el-date-picker
|
||||
v-model="form.month"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
placeholder="选择月份"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择内容" prop="mathconent">
|
||||
<el-select v-model="form.mathconent" size="small" >
|
||||
<el-option
|
||||
v-for="item in mathOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMathtermplanitem,
|
||||
getMathtermplanitem,
|
||||
delMathtermplanitem,
|
||||
addMathtermplanitem,
|
||||
updateMathtermplanitem,
|
||||
} from "@/api/benyi/mathtermplanitem";
|
||||
// 获取游戏数学内容接口
|
||||
import {
|
||||
listMath,
|
||||
getMath,
|
||||
} from "@/api/benyi/math";
|
||||
|
||||
// 获取班级接口
|
||||
import { listClass } from "@/api/system/class";
|
||||
// 获取游戏数学计划接口
|
||||
import {
|
||||
listMathtermplan,
|
||||
getMathtermplan,
|
||||
} from "@/api/benyi/mathtermplan";
|
||||
|
||||
export default {
|
||||
name: "Mathtermplanitem",
|
||||
data() {
|
||||
return {
|
||||
// 是否显示按钮
|
||||
isShow: true,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 游戏数学学期计划明细表格数据
|
||||
mathtermplanitemList: [],
|
||||
// 计划列表
|
||||
mathPlanOptions: [],
|
||||
// 游戏数学内容选项
|
||||
mathOptions: [],
|
||||
// 默认游戏数学类型
|
||||
defaultMathType: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
tpid: undefined,
|
||||
month: undefined,
|
||||
mathconent: undefined,
|
||||
createuserid: undefined,
|
||||
updateuserid: undefined,
|
||||
},
|
||||
queryParams_class: {
|
||||
bjbh: undefined
|
||||
},
|
||||
queryParams_classtype: {
|
||||
classtypeId: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const mathplanid = this.$route.params && this.$route.params.id;
|
||||
this.getMathPlan(mathplanid);
|
||||
this.getMathPlanList();
|
||||
this.getClassType();
|
||||
},
|
||||
methods: {
|
||||
/** 查询游戏数学学期计划明细列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMathtermplanitem(this.queryParams).then((response) => {
|
||||
this.mathtermplanitemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//计划详情
|
||||
getMathPlan(mathplanid) {
|
||||
getMathtermplan(mathplanid).then((response) => {
|
||||
this.queryParams_class.bjbh = response.data.classid;
|
||||
this.queryParams.tpid = response.data.id;
|
||||
this.defaultMathType = response.data.id;
|
||||
if (response.data.status == "0") {
|
||||
this.isShow = true;
|
||||
} else {
|
||||
this.isShow = false;
|
||||
}
|
||||
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
// 获取班级类型
|
||||
getClassType() {
|
||||
listClass(this.queryParams_class).then((response) => {
|
||||
this.queryParams_classtype.classtypeId = response.rows[0].bjtype;
|
||||
this.getMathList();
|
||||
});
|
||||
},
|
||||
// 获取游戏数学内容列表
|
||||
getMathList() {
|
||||
listMath(this.queryParams_classtype).then((response) => {
|
||||
this.mathOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 获取游戏数学学期计划列表
|
||||
getMathPlanList() {
|
||||
listMathtermplan().then((response) => {
|
||||
this.mathPlanOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 字典翻译
|
||||
mathPlanFormat(row, column) {
|
||||
// return this.selectDictLabel(this.classOptions, row.classid);
|
||||
var actions = [];
|
||||
var datas = this.mathPlanOptions;
|
||||
Object.keys(datas).map((key) => {
|
||||
if (datas[key].id == "" + row.tpid) {
|
||||
actions.push(datas[key].name);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return actions.join("");
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
tpid: undefined,
|
||||
month: undefined,
|
||||
mathconent: undefined,
|
||||
remark: undefined,
|
||||
createuserid: undefined,
|
||||
createTime: undefined,
|
||||
updateuserid: undefined,
|
||||
updateTime: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.tpid = this.defaultMathType;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加游戏数学学期计划明细";
|
||||
this.form.tpid = this.queryParams.tpid;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getMathtermplanitem(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改游戏数学学期计划明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateMathtermplanitem(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addMathtermplanitem(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm(
|
||||
'是否确认删除游戏数学学期计划明细编号为"' + ids + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(function () {
|
||||
return delMathtermplanitem(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function () {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,8 +1,11 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
|
||||
import com.ruoyi.project.benyi.service.IByMathTermplanitemService;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import com.ruoyi.project.system.service.IByClassService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -40,6 +43,8 @@ public class ByMathTermplanController extends BaseController
|
||||
private SchoolCommon schoolCommon;
|
||||
@Autowired
|
||||
private IByClassService byClassService;
|
||||
@Autowired
|
||||
private IByMathTermplanitemService byMathTermplanitemService;
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划列表
|
||||
@ -49,7 +54,13 @@ public class ByMathTermplanController extends BaseController
|
||||
public TableDataInfo list(ByMathTermplan byMathTermplan)
|
||||
{
|
||||
startPage();
|
||||
List<ByMathTermplan> list = byMathTermplanService.selectByMathTermplanList(byMathTermplan);
|
||||
byMathTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
String classId = schoolCommon.getClassId();
|
||||
List<ByMathTermplan> list = null;
|
||||
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
|
||||
byMathTermplan.setClassid(classId);
|
||||
}
|
||||
list = byMathTermplanService.selectByMathTermplanList(byMathTermplan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -86,6 +97,7 @@ public class ByMathTermplanController extends BaseController
|
||||
{
|
||||
String classId = schoolCommon.getClassId();
|
||||
|
||||
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
|
||||
int iCount = schoolCommon.getDifMonth(byMathTermplan.getStartmonth(), byMathTermplan.getEndmonth());
|
||||
System.out.println("月份差=" + iCount);
|
||||
String uuid = schoolCommon.getUuid();
|
||||
@ -94,7 +106,23 @@ public class ByMathTermplanController extends BaseController
|
||||
byMathTermplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
byMathTermplan.setClassid(classId);
|
||||
byMathTermplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合学期计划");
|
||||
|
||||
// 自动创建游戏数学学期计划明细
|
||||
ByMathTermplanitem byMathTermplanitem = null;
|
||||
for (int i = 0; i <= iCount; i++) {
|
||||
byMathTermplanitem = new ByMathTermplanitem();
|
||||
byMathTermplanitem.setTpid(uuid);
|
||||
byMathTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
byMathTermplanitem.setMonth(schoolCommon.DateAddMonths(i, byMathTermplan.getStartmonth()));
|
||||
//创建时间
|
||||
byMathTermplanitem.setCreateTime(new Date());
|
||||
//新增每月计划
|
||||
byMathTermplanitemService.insertByMathTermplanitem(byMathTermplanitem);
|
||||
}
|
||||
return toAjax(byMathTermplanService.insertByMathTermplan(byMathTermplan));
|
||||
}else {
|
||||
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,6 +144,15 @@ public class ByMathTermplanController extends BaseController
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
//首先判断当前id下是否存在子目录
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
ByMathTermplanitem byMathTermplanitem = new ByMathTermplanitem();
|
||||
byMathTermplanitem.setTpid(ids[i]);
|
||||
List<ByMathTermplanitem> list = byMathTermplanitemService.selectByMathTermplanitemList(byMathTermplanitem);
|
||||
if (list != null && list.size() > 0) {
|
||||
return AjaxResult.error("选中的计划下存在计划明细,无法删除");
|
||||
}
|
||||
}
|
||||
return toAjax(byMathTermplanService.deleteByMathTermplanByIds(ids));
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
|
||||
import com.ruoyi.project.benyi.service.IByMathTermplanitemService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 游戏数学学期计划明细Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-10-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/mathtermplanitem")
|
||||
public class ByMathTermplanitemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IByMathTermplanitemService byMathTermplanitemService;
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
startPage();
|
||||
List<ByMathTermplanitem> list = byMathTermplanitemService.selectByMathTermplanitemList(byMathTermplanitem);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出游戏数学学期计划明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:export')")
|
||||
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
List<ByMathTermplanitem> list = byMathTermplanitemService.selectByMathTermplanitemList(byMathTermplanitem);
|
||||
ExcelUtil<ByMathTermplanitem> util = new ExcelUtil<ByMathTermplanitem>(ByMathTermplanitem.class);
|
||||
return util.exportExcel(list, "mathtermplanitem");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取游戏数学学期计划明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(byMathTermplanitemService.selectByMathTermplanitemById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏数学学期计划明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:add')")
|
||||
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
return toAjax(byMathTermplanitemService.insertByMathTermplanitem(byMathTermplanitem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏数学学期计划明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:edit')")
|
||||
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
return toAjax(byMathTermplanitemService.updateByMathTermplanitem(byMathTermplanitem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏数学学期计划明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:remove')")
|
||||
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(byMathTermplanitemService.deleteByMathTermplanitemByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 游戏数学学期计划明细对象 by_math_termplanitem
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-10-29
|
||||
*/
|
||||
public class ByMathTermplanitem extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属计划
|
||||
*/
|
||||
@Excel(name = "所属计划")
|
||||
private String tpid;
|
||||
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月份", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date month;
|
||||
|
||||
/**
|
||||
* 游戏数学内容
|
||||
*/
|
||||
@Excel(name = "游戏数学内容")
|
||||
private String mathconent;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@Excel(name = "修改人")
|
||||
private Long updateuserid;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTpid(String tpid) {
|
||||
this.tpid = tpid;
|
||||
}
|
||||
|
||||
public String getTpid() {
|
||||
return tpid;
|
||||
}
|
||||
|
||||
public void setMonth(Date month) {
|
||||
this.month = month;
|
||||
}
|
||||
|
||||
public Date getMonth() {
|
||||
return month;
|
||||
}
|
||||
|
||||
public void setMathconent(String mathconent) {
|
||||
this.mathconent = mathconent;
|
||||
}
|
||||
|
||||
public String getMathconent() {
|
||||
return mathconent;
|
||||
}
|
||||
|
||||
public void setCreateuserid(Long createuserid) {
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid() {
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
public void setUpdateuserid(Long updateuserid) {
|
||||
this.updateuserid = updateuserid;
|
||||
}
|
||||
|
||||
public Long getUpdateuserid() {
|
||||
return updateuserid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tpid", getTpid())
|
||||
.append("month", getMonth())
|
||||
.append("mathconent", getMathconent())
|
||||
.append("remark", getRemark())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateuserid", getUpdateuserid())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
|
||||
|
||||
/**
|
||||
* 游戏数学学期计划明细Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-10-29
|
||||
*/
|
||||
public interface ByMathTermplanitemMapper
|
||||
{
|
||||
/**
|
||||
* 查询游戏数学学期计划明细
|
||||
*
|
||||
* @param id 游戏数学学期计划明细ID
|
||||
* @return 游戏数学学期计划明细
|
||||
*/
|
||||
public ByMathTermplanitem selectByMathTermplanitemById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划明细列表
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 游戏数学学期计划明细集合
|
||||
*/
|
||||
public List<ByMathTermplanitem> selectByMathTermplanitemList(ByMathTermplanitem byMathTermplanitem);
|
||||
|
||||
/**
|
||||
* 新增游戏数学学期计划明细
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByMathTermplanitem(ByMathTermplanitem byMathTermplanitem);
|
||||
|
||||
/**
|
||||
* 修改游戏数学学期计划明细
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByMathTermplanitem(ByMathTermplanitem byMathTermplanitem);
|
||||
|
||||
/**
|
||||
* 删除游戏数学学期计划明细
|
||||
*
|
||||
* @param id 游戏数学学期计划明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathTermplanitemById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除游戏数学学期计划明细
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathTermplanitemByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
|
||||
|
||||
/**
|
||||
* 游戏数学学期计划明细Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-10-29
|
||||
*/
|
||||
public interface IByMathTermplanitemService
|
||||
{
|
||||
/**
|
||||
* 查询游戏数学学期计划明细
|
||||
*
|
||||
* @param id 游戏数学学期计划明细ID
|
||||
* @return 游戏数学学期计划明细
|
||||
*/
|
||||
public ByMathTermplanitem selectByMathTermplanitemById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划明细列表
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 游戏数学学期计划明细集合
|
||||
*/
|
||||
public List<ByMathTermplanitem> selectByMathTermplanitemList(ByMathTermplanitem byMathTermplanitem);
|
||||
|
||||
/**
|
||||
* 新增游戏数学学期计划明细
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByMathTermplanitem(ByMathTermplanitem byMathTermplanitem);
|
||||
|
||||
/**
|
||||
* 修改游戏数学学期计划明细
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByMathTermplanitem(ByMathTermplanitem byMathTermplanitem);
|
||||
|
||||
/**
|
||||
* 批量删除游戏数学学期计划明细
|
||||
*
|
||||
* @param ids 需要删除的游戏数学学期计划明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathTermplanitemByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除游戏数学学期计划明细信息
|
||||
*
|
||||
* @param id 游戏数学学期计划明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathTermplanitemById(Long id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByMathTermplanitemMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
|
||||
import com.ruoyi.project.benyi.service.IByMathTermplanitemService;
|
||||
|
||||
/**
|
||||
* 游戏数学学期计划明细Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-10-29
|
||||
*/
|
||||
@Service
|
||||
public class ByMathTermplanitemServiceImpl implements IByMathTermplanitemService
|
||||
{
|
||||
@Autowired
|
||||
private ByMathTermplanitemMapper byMathTermplanitemMapper;
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划明细
|
||||
*
|
||||
* @param id 游戏数学学期计划明细ID
|
||||
* @return 游戏数学学期计划明细
|
||||
*/
|
||||
@Override
|
||||
public ByMathTermplanitem selectByMathTermplanitemById(Long id)
|
||||
{
|
||||
return byMathTermplanitemMapper.selectByMathTermplanitemById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划明细列表
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 游戏数学学期计划明细
|
||||
*/
|
||||
@Override
|
||||
public List<ByMathTermplanitem> selectByMathTermplanitemList(ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
return byMathTermplanitemMapper.selectByMathTermplanitemList(byMathTermplanitem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏数学学期计划明细
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByMathTermplanitem(ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
byMathTermplanitem.setCreateTime(DateUtils.getNowDate());
|
||||
return byMathTermplanitemMapper.insertByMathTermplanitem(byMathTermplanitem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏数学学期计划明细
|
||||
*
|
||||
* @param byMathTermplanitem 游戏数学学期计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByMathTermplanitem(ByMathTermplanitem byMathTermplanitem)
|
||||
{
|
||||
byMathTermplanitem.setUpdateTime(DateUtils.getNowDate());
|
||||
return byMathTermplanitemMapper.updateByMathTermplanitem(byMathTermplanitem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除游戏数学学期计划明细
|
||||
*
|
||||
* @param ids 需要删除的游戏数学学期计划明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByMathTermplanitemByIds(Long[] ids)
|
||||
{
|
||||
return byMathTermplanitemMapper.deleteByMathTermplanitemByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏数学学期计划明细信息
|
||||
*
|
||||
* @param id 游戏数学学期计划明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByMathTermplanitemById(Long id)
|
||||
{
|
||||
return byMathTermplanitemMapper.deleteByMathTermplanitemById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
<?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="com.ruoyi.project.benyi.mapper.ByMathTermplanitemMapper">
|
||||
|
||||
<resultMap type="ByMathTermplanitem" id="ByMathTermplanitemResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tpid" column="tpid" />
|
||||
<result property="month" column="month" />
|
||||
<result property="mathconent" column="mathconent" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateuserid" column="updateuserid" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByMathTermplanitemVo">
|
||||
select id, tpid, month, mathconent, remark, createuserid, create_time, updateuserid, update_time from by_math_termplanitem
|
||||
</sql>
|
||||
|
||||
<select id="selectByMathTermplanitemList" parameterType="ByMathTermplanitem" resultMap="ByMathTermplanitemResult">
|
||||
<include refid="selectByMathTermplanitemVo"/>
|
||||
<where>
|
||||
<if test="tpid != null and tpid != ''"> and tpid = #{tpid}</if>
|
||||
<if test="month != null "> and month = #{month}</if>
|
||||
<if test="mathconent != null and mathconent != ''"> and mathconent = #{mathconent}</if>
|
||||
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
|
||||
<if test="updateuserid != null "> and updateuserid = #{updateuserid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByMathTermplanitemById" parameterType="Long" resultMap="ByMathTermplanitemResult">
|
||||
<include refid="selectByMathTermplanitemVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByMathTermplanitem" parameterType="ByMathTermplanitem" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_math_termplanitem
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tpid != null and tpid != ''">tpid,</if>
|
||||
<if test="month != null ">month,</if>
|
||||
<if test="mathconent != null and mathconent != ''">mathconent,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateuserid != null ">updateuserid,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tpid != null and tpid != ''">#{tpid},</if>
|
||||
<if test="month != null ">#{month},</if>
|
||||
<if test="mathconent != null and mathconent != ''">#{mathconent},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateuserid != null ">#{updateuserid},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByMathTermplanitem" parameterType="ByMathTermplanitem">
|
||||
update by_math_termplanitem
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tpid != null and tpid != ''">tpid = #{tpid},</if>
|
||||
<if test="month != null ">month = #{month},</if>
|
||||
<if test="mathconent != null and mathconent != ''">mathconent = #{mathconent},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateuserid != null ">updateuserid = #{updateuserid},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByMathTermplanitemById" parameterType="Long">
|
||||
delete from by_math_termplanitem where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMathTermplanitemByIds" parameterType="String">
|
||||
delete from by_math_termplanitem where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user