This commit is contained in:
xinbowang 2020-08-27 20:44:37 +08:00
commit 59b4d0e89a
71 changed files with 5488 additions and 690 deletions

View File

@ -51,3 +51,11 @@ export function exportActivity(query) {
params: query
})
}
// 删除主题整合活动
export function listActivityByThemeId(id) {
return request({
url: '/benyi/activity/listbythemeid/' + id,
method: 'post'
})
}

View File

@ -43,6 +43,14 @@ export function delPlanweek(id) {
})
}
// 提交周计划(家长和教育部门)
export function checkPlanweek(id) {
return request({
url: '/benyi/planweek/check/' + id,
method: 'post'
})
}
// 导出周计划(家长和教育部门)
export function exportPlanweek(query) {
return request({

View File

@ -43,6 +43,14 @@ export function delMonthplan(id) {
})
}
// 提交主题整合学期计划
export function checkMonthplan(id) {
return request({
url: '/benyi/thememonthplan/check/' + id,
method: 'post'
})
}
// 导出主题整合月计划
export function exportMonthplan(query) {
return request({

View File

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询主题整合周计划列表
export function listMonthplanitem(query) {
return request({
url: '/benyi/thememonthplanitem/list',
method: 'get',
params: query
})
}
// 查询主题整合周计划详细
export function getMonthplanitem(id) {
return request({
url: '/benyi/thememonthplanitem/' + id,
method: 'get'
})
}
// 新增主题整合周计划
export function addMonthplanitem(data) {
return request({
url: '/benyi/thememonthplanitem',
method: 'post',
data: data
})
}
// 修改主题整合周计划
export function updateMonthplanitem(data) {
return request({
url: '/benyi/thememonthplanitem',
method: 'put',
data: data
})
}
// 删除主题整合周计划
export function delMonthplanitem(id) {
return request({
url: '/benyi/thememonthplanitem/' + id,
method: 'delete'
})
}
// 导出主题整合周计划
export function exportMonthplanitem(query) {
return request({
url: '/benyi/thememonthplanitem/export',
method: 'get',
params: query
})
}

View File

@ -43,6 +43,14 @@ export function delTermplan(id) {
})
}
// 提交主题整合学期计划
export function checkTermplan(id) {
return request({
url: '/benyi/themetermplan/check/' + id,
method: 'post'
})
}
// 导出主题整合学期计划
export function exportTermplan(query) {
return request({

View File

@ -0,0 +1,61 @@
import request from '@/utils/request'
// 查询主题整合周计划(根据月计划明细)列表
export function listWeekplan(query) {
return request({
url: '/benyi/themeweekplan/list',
method: 'get',
params: query
})
}
// 查询主题整合周计划(根据月计划明细)详细
export function getWeekplan(id) {
return request({
url: '/benyi/themeweekplan/' + id,
method: 'get'
})
}
// 新增主题整合周计划(根据月计划明细)
export function addWeekplan(data) {
return request({
url: '/benyi/themeweekplan',
method: 'post',
data: data
})
}
// 修改主题整合周计划(根据月计划明细)
export function updateWeekplan(data) {
return request({
url: '/benyi/themeweekplan',
method: 'put',
data: data
})
}
// 删除主题整合周计划(根据月计划明细)
export function delWeekplan(id) {
return request({
url: '/benyi/themeweekplan/' + id,
method: 'delete'
})
}
// 提交主题整合学期计划
export function checkWeekplan(id) {
return request({
url: '/benyi/themeweekplan/check/' + id,
method: 'post'
})
}
// 导出主题整合周计划(根据月计划明细)
export function exportWeekplan(query) {
return request({
url: '/benyi/themeweekplan/export',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询主题整合周计划明细列表
export function listWeekplanitem(query) {
return request({
url: '/benyi/themeweekplanitem/list',
method: 'get',
params: query
})
}
// 查询主题整合周计划明细详细
export function getWeekplanitem(id) {
return request({
url: '/benyi/themeweekplanitem/' + id,
method: 'get'
})
}
// 新增主题整合周计划明细
export function addWeekplanitem(data) {
return request({
url: '/benyi/themeweekplanitem',
method: 'post',
data: data
})
}
// 修改主题整合周计划明细
export function updateWeekplanitem(data) {
return request({
url: '/benyi/themeweekplanitem',
method: 'put',
data: data
})
}
// 删除主题整合周计划明细
export function delWeekplanitem(id) {
return request({
url: '/benyi/themeweekplanitem/' + id,
method: 'delete'
})
}
// 导出主题整合周计划明细
export function exportWeekplanitem(query) {
return request({
url: '/benyi/themeweekplanitem/export',
method: 'get',
params: query
})
}

View File

@ -208,6 +208,21 @@ export const constantRoutes = [{
}
}]
},
{
path: '/benyi_course/planweek',
component: Layout,
hidden: true,
children: [{
path: 'data/:id',
component: () =>
import('@/views/benyi/planweek/data'),
name: 'planweek1',
meta: {
title: '周计划(明细)',
icon: ''
}
}]
},
{
path: '/benyi_course/theme',
component: Layout,
@ -233,7 +248,37 @@ export const constantRoutes = [{
import('@/views/benyi/themetermplan/data'),
name: 'Themetermplan1',
meta: {
title: '主题整合学期计划',
title: '主题整合学期计划(明细)',
icon: ''
}
}]
},
{
path: '/benyi_course/thememonthplan',
component: Layout,
hidden: true,
children: [{
path: 'data/:id',
component: () =>
import('@/views/benyi/thememonthplan/data'),
name: 'Thememonthplan1',
meta: {
title: '主题整合月计划(明细)',
icon: ''
}
}]
},
{
path: '/benyi_course/themeweekplan',
component: Layout,
hidden: true,
children: [{
path: 'data/:id',
component: () =>
import('@/views/benyi/themeweekplan/data'),
name: 'Themeweekplan1',
meta: {
title: '主题整合周计划(明细)',
icon: ''
}
}]

View File

@ -350,7 +350,7 @@ import {
delChild,
addChild,
updateChild,
updateChild_tb
updateChild_tb,
} from "@/api/benyi/child";
import { listClass } from "@/api/system/class";
@ -365,22 +365,22 @@ export default {
placeholders: {
province: "请选择省",
city: "请选择市",
area: "请选择区"
area: "请选择区",
},
diglogForm: {
province: null,
city: null,
area: null
area: null,
},
diglogForm1: {
province: null,
city: null,
area: null
area: null,
},
diglogForm2: {
province: null,
city: null,
area: null
area: null,
},
//
loading: true,
@ -455,46 +455,47 @@ export default {
firstLanguage: undefined,
seconderLanguage: undefined,
otherLanguage: undefined,
createuserid: undefined
createuserid: undefined,
},
//
form: {},
//
rules: {
name: [
{ required: true, message: "幼儿姓名不能为空", trigger: "blur" }
{ required: true, message: "幼儿姓名不能为空", trigger: "blur" },
],
phone: [
{ required: true, message: "家长手机号码不能为空", trigger: "blur" }
]
{ required: true, message: "家长手机号码不能为空", trigger: "blur" },
],
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
},
rules_tb: {
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }]
}
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
},
};
},
created() {
this.getList();
this.getClassList();
this.getDicts("sys_user_sex").then(response => {
this.getDicts("sys_user_sex").then((response) => {
this.sexOptions = response.data;
});
this.getDicts("sys_normal_disable").then(response => {
this.getDicts("sys_normal_disable").then((response) => {
this.statusOptions = response.data;
});
this.getDicts("sys_dm_mz").then(response => {
this.getDicts("sys_dm_mz").then((response) => {
this.mzOptions = response.data;
});
this.getDicts("sys_yes_no").then(response => {
this.getDicts("sys_yes_no").then((response) => {
this.ynOptions = response.data;
});
this.getDicts("sys_dm_ryqd").then(response => {
this.getDicts("sys_dm_ryqd").then((response) => {
this.sourceOptions = response.data;
});
},
components: {
//
VDistpicker
VDistpicker,
},
methods: {
//
@ -522,7 +523,7 @@ export default {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.classOptions;
Object.keys(datas).map(key => {
Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc);
return false;
@ -531,14 +532,14 @@ export default {
return actions.join("");
},
getClassList() {
listClass(null).then(response => {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
/** 查询幼儿信息列表 */
getList() {
this.loading = true;
listChild(this.queryParams).then(response => {
listChild(this.queryParams).then((response) => {
this.childList = response.rows;
this.total = response.total;
this.loading = false;
@ -597,7 +598,7 @@ export default {
seconderLanguage: undefined,
otherLanguage: undefined,
createuserid: undefined,
createTime: undefined
createTime: undefined,
};
this.diglogForm.province = "";
@ -626,7 +627,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
@ -640,7 +641,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getChild(id).then(response => {
getChild(id).then((response) => {
this.form = response.data;
this.diglogForm.province = response.data.birthProvincename;
@ -660,11 +661,11 @@ export default {
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
updateChild(this.form).then(response => {
updateChild(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
@ -672,7 +673,7 @@ export default {
}
});
} else {
addChild(this.form).then(response => {
addChild(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
@ -684,11 +685,11 @@ export default {
});
},
/** 提交按钮 */
submitForm_tb: function() {
this.$refs["form"].validate(valid => {
submitForm_tb: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
console.log(this.ids + "---" + this.form.classid);
updateChild_tb(this.form, this.ids).then(response => {
updateChild_tb(this.form, this.ids).then((response) => {
if (response.code === 200) {
this.msgSuccess("调班成功");
this.open_tb = false;
@ -714,17 +715,17 @@ export default {
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}
)
.then(function() {
.then(function () {
return delChild(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function() {});
.catch(function () {});
},
//
onSelected_brith(data) {
@ -779,7 +780,7 @@ export default {
this.form.addrAreaname = data.area.value;
this.form.addrArea = data.area.code;
}
}
}
},
},
};
</script>

View File

@ -0,0 +1,430 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="周计划" prop="wid">
<el-select v-model="queryParams.wid" size="small">
<el-option
v-for="item in planweekOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="活动类型" prop="activitytype">
<el-select v-model="queryParams.activitytype" placeholder="请选择活动类型" clearable size="small">
<el-option
v-for="dict in activitytypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="活动内容" prop="content">
<el-input
v-model="queryParams.content"
placeholder="请输入活动内容"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="活动时间" prop="activitytime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="queryParams.activitytime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择活动时间"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="创建人" prop="createuserid">
<el-input
v-model="queryParams.createuserid"
placeholder="请输入创建人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="修改人" prop="updateuserid">
<el-input
v-model="queryParams.updateuserid"
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:planweekitem:add']"
>新增</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:planweekitem:edit']"
>修改</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:planweekitem:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['benyi:planweekitem:export']"
>导出</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="planweekitemList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="所属计划" align="center" prop="wid" />
<el-table-column
label="活动类型"
align="center"
prop="activitytype"
:formatter="activitytypeFormat"
/>
<el-table-column label="活动内容" align="center" prop="content" />
<el-table-column label="活动时间" align="center" prop="activitytime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.activitytime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createuserid" />
<el-table-column label="修改人" align="center" prop="updateuserid" />
<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:planweekitem:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:planweekitem:remove']"
>删除</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="wid">
<el-select v-model="form.wid" size="small" :disabled="true">
<el-option
v-for="item in planweekOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="活动类型">
<el-select v-model="form.activitytype" placeholder="请选择活动类型">
<el-option
v-for="dict in activitytypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="活动内容" prop="content">
<el-input v-model="form.content" placeholder="请输入活动内容" />
</el-form-item>
<el-form-item label="活动时间" prop="activitytime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.activitytime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择活动时间"
></el-date-picker>
</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 {
listPlanweekitem,
getPlanweekitem,
delPlanweekitem,
addPlanweekitem,
updatePlanweekitem,
exportPlanweekitem
} from "@/api/benyi/planweekitem";
import { getPlanweek, listPlanweek } from "@/api/benyi/planweek";
export default {
name: "Planweekitem",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
// ()
planweekitemList: [],
//
planweekOptions: [],
//
defaultWeekType: "",
//
title: "",
//
open: false,
//
activitytypeOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
wid: undefined,
activitytype: undefined,
content: undefined,
activitytime: undefined,
createuserid: undefined,
updateuserid: undefined
},
//
form: {},
//
rules: {}
};
},
created() {
const planweekid = this.$route.params && this.$route.params.id;
this.getPlanweek2(planweekid);
this.getPlanWeekList();
this.getDicts("sys_math_type").then(response => {
this.activitytypeOptions = response.data;
});
},
methods: {
//
getPlanweek2(planweekid) {
getPlanweek(planweekid).then((response) => {
this.queryParams.wid = response.data.id;
this.defaultWeekType = response.data.id;
this.getList();
});
},
/** 查询周计划(家长和教育部门细化)列表 */
getList() {
this.loading = true;
listPlanweekitem(this.queryParams).then(response => {
this.planweekitemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
getPlanWeekList() {
listPlanweek().then((response) => {
this.planweekOptions = response.rows;
});
},
//
themePlanFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.planweekOptions;
Object.keys(datas).map((key) => {
if (datas[key].id == "" + row.wid) {
actions.push(datas[key].name);
return false;
}
});
return actions.join("");
},
//
activitytypeFormat(row, column) {
return this.selectDictLabel(this.activitytypeOptions, row.activitytype);
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
wid: undefined,
activitytype: undefined,
content: undefined,
activitytime: 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.wid = this.defaultWeekType;
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.wid = this.queryParams.wid;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getPlanweekitem(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) {
updatePlanweekitem(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addPlanweekitem(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 delPlanweekitem(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function() {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm(
"是否确认导出所有周计划(家长和教育部门细化)数据项?",
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}
)
.then(function() {
return exportPlanweekitem(queryParams);
})
.then(response => {
this.download(response.msg);
})
.catch(function() {});
}
}
};
</script>

View File

@ -1,24 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="学校id" prop="schoolid">
<el-input
v-model="queryParams.schoolid"
placeholder="请输入学校id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="班级id" prop="classid">
<el-input
v-model="queryParams.classid"
placeholder="请输入班级id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划名称" prop="name">
<el-input
v-model="queryParams.name"
@ -28,6 +10,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="当前状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择当前状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="starttime">
<el-date-picker
clearable
@ -59,46 +51,29 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="教学目标(社会)" prop="jxmbSh">
<el-form-item label="审核人" prop="shrid">
<el-input
v-model="queryParams.jxmbSh"
placeholder="请输入教学目标(社会)"
v-model="queryParams.shrid"
placeholder="请输入审核人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="教学目标(语言)" prop="jxmbYy">
<!--
<el-form-item label="学校id" prop="schoolid">
<el-input
v-model="queryParams.jxmbYy"
placeholder="请输入教学目标(语言)"
v-model="queryParams.schoolid"
placeholder="请输入学校id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="教学目标(健康)" prop="jxmbJk">
<el-form-item label="班级id" prop="classid">
<el-input
v-model="queryParams.jxmbJk"
placeholder="请输入教学目标(健康)"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="教学目标(科学)" prop="jxmbKx">
<el-input
v-model="queryParams.jxmbKx"
placeholder="请输入教学目标(科学)"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="教学目标(艺术)" prop="jxmbYs">
<el-input
v-model="queryParams.jxmbYs"
placeholder="请输入教学目标(艺术)"
v-model="queryParams.classid"
placeholder="请输入班级id"
clearable
size="small"
@keyup.enter.native="handleQuery"
@ -112,22 +87,9 @@
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="当前状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择当前状态" clearable size="small">
<el-option label="请选择字典生成" value />
</el-select>
</el-form-item>
<el-form-item label="审核人" prop="shrid">
<el-input
v-model="queryParams.shrid"
placeholder="请输入审核人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核时间" prop="shtime">
</el-form-item>-->
<!-- <el-form-item label="审核时间" prop="shtime">
<el-date-picker
clearable
size="small"
@ -137,7 +99,7 @@
value-format="yyyy-MM-dd"
placeholder="选择审核时间"
></el-date-picker>
</el-form-item>
</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>
@ -188,9 +150,14 @@
<el-table v-loading="loading" :data="planweekList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="学校id" align="center" prop="schoolid" />
<el-table-column label="班级id" align="center" prop="classid" />
<el-table-column label="计划名称" align="center" prop="name" />
<el-table-column label="班级id" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/benyi_course/planweek/data/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="starttime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
@ -202,19 +169,15 @@
</template>
</el-table-column>
<el-table-column label="本周主题" align="center" prop="themeofweek" />
<el-table-column label="教学目标(社会)" align="center" prop="jxmbSh" />
<el-table-column label="教学目标(语言)" align="center" prop="jxmbYy" />
<el-table-column label="教学目标(健康)" align="center" prop="jxmbJk" />
<el-table-column label="教学目标(科学)" align="center" prop="jxmbKx" />
<el-table-column label="教学目标(艺术)" align="center" prop="jxmbYs" />
<el-table-column label="创建人" align="center" prop="createuserid" />
<el-table-column label="当前状态" align="center" prop="status" />
<el-table-column label="当前状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="审核人" align="center" prop="shrid" />
<el-table-column label="审核时间" align="center" prop="shtime" width="180">
<!-- <el-table-column label="审核时间" align="center" prop="shtime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.shtime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table-column> -->
<!-- <el-table-column label="学校id" align="center" prop="schoolid" />
-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -224,6 +187,14 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['system:planweek:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleCheck(scope.row)"
v-hasPermi="['system:planweek:edit']"
v-show="isShow(scope.row)"
>提交</el-button>
<el-button
size="mini"
type="text"
@ -246,12 +217,6 @@
<!-- 添加或修改周计划(家长和教育部门)对话框 -->
<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="学校id" prop="schoolid">
<el-input v-model="form.schoolid" placeholder="请输入学校id" />
</el-form-item>
<el-form-item label="班级id" prop="classid">
<el-input v-model="form.classid" placeholder="请输入班级id" />
</el-form-item>
<el-form-item label="计划名称" prop="name">
<el-input v-model="form.name" placeholder="请输入计划名称" />
</el-form-item>
@ -295,18 +260,26 @@
<el-form-item label="教学目标(艺术)" prop="jxmbYs">
<el-input v-model="form.jxmbYs" placeholder="请输入教学目标(艺术)" />
</el-form-item>
<el-form-item label="创建人" prop="createuserid">
<el-input v-model="form.createuserid" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="当前状态">
<el-radio-group v-model="form.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核人" prop="shrid">
<!-- <el-form-item label="当前状态">
<el-select v-model="form.status" placeholder="请选择当前状态">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="审核人" prop="shrid">
<el-input v-model="form.shrid" placeholder="请输入审核人" />
</el-form-item> -->
<!-- <el-form-item label="学校id" prop="schoolid">
<el-input v-model="form.schoolid" placeholder="请输入学校id" />
</el-form-item>
<el-form-item label="审核时间" prop="shtime">
<el-form-item label="班级id" prop="classid">
<el-input v-model="form.classid" placeholder="请输入班级id" />
</el-form-item>-->
<!-- <el-form-item label="审核时间" prop="shtime">
<el-date-picker
clearable
size="small"
@ -316,7 +289,7 @@
value-format="yyyy-MM-dd"
placeholder="选择审核时间"
></el-date-picker>
</el-form-item>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -334,8 +307,11 @@ import {
addPlanweek,
updatePlanweek,
exportPlanweek,
checkPlanweek
} from "@/api/benyi/planweek";
import { listClass } from "@/api/system/class";
export default {
name: "Planweek",
data() {
@ -352,6 +328,10 @@ export default {
total: 0,
// ()
planweekList: [],
//
statusOptions: [],
//
classOptions: [],
//
title: "",
//
@ -374,27 +354,66 @@ export default {
createuserid: undefined,
status: undefined,
shrid: undefined,
shtime: undefined,
shtime: undefined
},
//
form: {},
//
rules: {},
rules: {}
};
},
created() {
this.getList();
this.getClassList();
//
this.getDicts("sys_dm_planweekstatus").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询周计划(家长和教育部门)列表 */
getList() {
this.loading = true;
listPlanweek(this.queryParams).then((response) => {
listPlanweek(this.queryParams).then(response => {
this.planweekList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
getClassList() {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
// //
// getClassName(val) {
// //locationsv-fordatas
// let obj = {};
// obj = this.classOptions.find((item) => {
// return item.bjbh === val;
// });
// let getName = "";
// getName = obj.bjmc;
// this.form.name = getName;
// },
//
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
//
classFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.classOptions;
Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc);
return false;
}
});
return actions.join("");
},
//
cancel() {
this.open = false;
@ -419,7 +438,7 @@ export default {
createTime: undefined,
status: "0",
shrid: undefined,
shtime: undefined,
shtime: undefined
};
this.resetForm("form");
},
@ -435,7 +454,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map(item => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
@ -449,18 +468,46 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getPlanweek(id).then((response) => {
getPlanweek(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改周计划(家长和教育部门)";
});
},
/** 审核提交按钮操作 */
handleCheck(row) {
const ids = row.id || this.ids;
this.$confirm(
'确认提交周计划编号为"' + ids + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return checkPlanweek(ids);
})
.then(() => {
this.getList();
this.msgSuccess("提交成功");
})
.catch(function () {});
},
isShow(row) {
if (row.status == "1" || row.status == "2") {
return false;
} else {
return true;
}
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updatePlanweek(this.form).then((response) => {
updatePlanweek(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
@ -468,7 +515,7 @@ export default {
}
});
} else {
addPlanweek(this.form).then((response) => {
addPlanweek(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
@ -488,17 +535,17 @@ export default {
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
type: "warning"
}
)
.then(function () {
.then(function() {
return delPlanweek(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
.catch(function() {});
},
/** 导出按钮操作 */
handleExport() {
@ -506,16 +553,16 @@ export default {
this.$confirm("是否确认导出所有周计划(家长和教育部门)数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
type: "warning"
})
.then(function () {
.then(function() {
return exportPlanweek(queryParams);
})
.then((response) => {
.then(response => {
this.download(response.msg);
})
.catch(function () {});
},
},
.catch(function() {});
}
}
};
</script>

View File

@ -0,0 +1,474 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="月计划" prop="mpid">
<el-select v-model="queryParams.mpid" size="small">
<el-option
v-for="item in themeMonthPlanOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="周次" prop="zc">
<el-input-number
v-model="queryParams.zc"
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:thememonthplan: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:thememonthplan: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:thememonthplan:remove']"
v-show="isShow"
>删除</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="weekplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="所属月计划" align="center" prop="mpid" :formatter="themeMonthPlanFormat" />
<el-table-column label="周次" align="center" prop="zc" />
<el-table-column label="开始时间" align="center" prop="starttime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="endtime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column
label="活动"
align="center"
prop="activityid"
:formatter="themeactivityFormat"
/>
<el-table-column label="家长支持" align="center" prop="jzzc" />
<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:thememonthplan:edit']"
v-show="isShow"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan: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="mpid">
<el-select v-model="form.mpid" size="small" :disabled="true">
<el-option
v-for="item in themeMonthPlanOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="周次" prop="zc">
<el-input-number v-model="form.zc" placeholder="请输入周次" />
</el-form-item>
<el-form-item label="开始时间" prop="starttime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.starttime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开始时间"
></el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="endtime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.endtime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择结束时间"
></el-date-picker>
</el-form-item>
<el-form-item label="选择活动" prop="activityid">
<el-checkbox-group
v-model="themeactivityList"
:max="max"
@change="getThemeActivityIdValue"
>
<el-checkbox
v-for="(item,i) in themeactivityOptions"
:label="item.id"
:key="i"
>{{item.name}}</el-checkbox>
</el-checkbox-group>
<el-input v-model="form.activityid" v-if="false" />
</el-form-item>
<el-form-item label="家长支持" prop="jzzc">
<el-input v-model="form.jzzc" 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 {
listMonthplanitem,
getMonthplanitem,
delMonthplanitem,
addMonthplanitem,
updateMonthplanitem,
} from "@/api/benyi/thememonthplanitem";
import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan";
import { listActivityByThemeId } from "@/api/benyi/activity";
export default {
name: "Weekplan",
data() {
return {
isShow: true,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
//
weekplanList: [],
//
themeMonthPlanOptions: [],
//id
defaultThemeMonthType: "",
//chebox
themeactivityList: [],
//
themeactivityOptions: [],
max: 5,
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
mpid: undefined,
zc: undefined,
starttime: undefined,
endtime: undefined,
activityid: undefined,
jzzc: undefined,
createuserid: undefined,
},
//
form: {},
//
rules: {
zc: [{ required: true, message: "周次不能为空", trigger: "blur" }],
starttime: [
{ required: true, message: "开始时间不能为空", trigger: "blur" },
],
endtime: [
{ required: true, message: "结束时间不能为空", trigger: "blur" },
],
activityid: [
{ required: true, message: "活动不能为空", trigger: "blur" },
],
},
};
},
created() {
const thememonthplanid = this.$route.params && this.$route.params.id;
this.getThemeMonthPlan(thememonthplanid);
this.getThemeMonthPlanList();
},
methods: {
// --
themeactivityFormat(row, column) {
if (row.activityid != null) {
var ilength = row.activityid.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeactivityOptions,
row.activityid.split(";")[i]
) +
"";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
}
return "";
},
//checkbox
getThemeActivityIdValue() {
//console.log(this.themeList);
var text = ";";
this.themeactivityList.forEach(function (value, key, arr) {
//console.log(value); // 123
text = text + value + ";";
//console.log(text);
});
this.form.activityid = text;
},
//
getThemeActivityList(themeid) {
listActivityByThemeId(themeid).then((response) => {
//console.log(response.rows);
this.themeactivityOptions = response.rows;
});
},
//
themeMonthPlanFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.themeMonthPlanOptions;
Object.keys(datas).map((key) => {
if (datas[key].id == "" + row.mpid) {
actions.push(datas[key].name);
return false;
}
});
return actions.join("");
},
//
getThemeMonthPlan(thememonthplanid) {
getMonthplan(thememonthplanid).then((response) => {
this.queryParams.mpid = response.data.id;
this.defaultThemeMonthType = response.data.id;
console.log(response.data.themes);
var themeids = response.data.themes.split(";");
var array = [];
//console.log(arr);
themeids.forEach(function (value, key, arr) {
//console.log(value); // 123
if (value != "") {
array.push(parseInt(value));
}
});
this.getThemeActivityList(array);
if (response.data.status == "0") {
this.isShow = true;
} else {
this.isShow = false;
}
this.getList();
});
},
getThemeMonthPlanList() {
listMonthplan().then((response) => {
this.themeMonthPlanOptions = response.rows;
});
},
/** 查询主题整合周计划列表 */
getList() {
this.loading = true;
listMonthplanitem(this.queryParams).then((response) => {
this.weekplanList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
mpid: undefined,
zc: 0,
starttime: undefined,
endtime: undefined,
activityid: undefined,
jzzc: undefined,
createuserid: undefined,
createTime: undefined,
};
this.resetForm("form");
this.themeactivityList = [];
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.mpid = this.defaultThemeMonthType;
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.mpid = this.queryParams.mpid;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getMonthplanitem(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改主题整合周计划明细";
var activityid = response.data.activityid.split(";");
var array = [];
//console.log(arr);
activityid.forEach(function (value, key, arr) {
//console.log(value); // 123
if (value != "") {
array.push(parseInt(value));
}
});
this.themeactivityList = array;
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
updateMonthplanitem(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addMonthplanitem(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 delMonthplanitem(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有主题整合周计划数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportWeekplan(queryParams);
})
.then((response) => {
this.download(response.msg);
})
.catch(function () {});
},
},
};
</script>

View File

@ -10,33 +10,46 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属班级" prop="classid">
<el-select v-model="queryParams.classid" placeholder="请选择班级">
<el-form-item label="学年学期" prop="xnxq">
<el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
<el-option
v-for="dict in classOptions"
:key="dict.bjbh"
:label="dict.bjmc"
:value="dict.bjbh"
></el-option>
v-for="dict in xnxqOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="学年学期" prop="xnxq">
<el-input
v-model="queryParams.xnxq"
placeholder="请输入学年学期"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划月份" prop="month">
<el-input
v-model="queryParams.month"
placeholder="请输入计划月份"
<el-date-picker
clearable
size="small"
@keyup.enter.native="handleQuery"
style="width: 200px"
v-model="queryParams.month"
type="month"
value-format="yyyy-MM"
placeholder="选择计划月份"
></el-date-picker>
</el-form-item>
<el-form-item label="主题内容" prop="themes">
<el-select v-model="queryParams.themes" size="small">
<el-option
v-for="item in themeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="当前状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -77,12 +90,30 @@
</el-row>
<el-table v-loading="loading" :data="monthplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="计划名称" align="center" prop="name" />
<el-table-column label="所属班级" align="center" prop="classid" />
<el-table-column label="学年学期" align="center" prop="xnxq" />
<el-table-column label="计划月份" align="center" prop="month" />
<el-table-column type="selection" width="55" align="center" :selectable="isShow" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/benyi_course/thememonthplan/data/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="班级名称" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" />
<el-table-column label="计划月份" align="center" prop="month" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.month, '{y}-{m}') }}</span>
</template>
</el-table-column>
<el-table-column label="本月主题" align="center" prop="themes" :formatter="themeFormat" />
<el-table-column prop="wxkc" label="微型课程">
<template slot-scope="scope">
<div v-html="scope.row.wxkc"></div>
</template>
</el-table-column>
<!-- <el-table-column label="家长支持" align="center" prop="support" />
<el-table-column label="备注" align="center" prop="remarks" />-->
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -91,6 +122,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow(scope.row)"
>修改</el-button>
<el-button
size="mini"
@ -98,7 +130,16 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleCheck(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow(scope.row)"
>提交</el-button>
</template>
</el-table-column>
</el-table>
@ -112,39 +153,32 @@
/>
<!-- 添加或修改主题整合月计划对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="所属班级" prop="classid">
<el-select
v-model="form.classid"
placeholder="请选择班级"
@change="getClassName"
:disabled="disable"
>
<el-option
v-for="dict in classOptions"
:key="dict.bjbh"
:label="dict.bjmc"
:value="dict.bjbh"
></el-option>
</el-select>
</el-form-item>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="计划月份" prop="month">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.month"
type="month"
value-format="yyyy-MM"
placeholder="选择计划月份"
:disabled="disable"
></el-date-picker>
</el-form-item>
<el-form-item label="主题" prop="themes">
<el-input v-model="form.themes" type="textarea" placeholder="请输入内容" />
<el-form-item label="学年学期" prop="xnxq">
<el-select v-model="form.xnxq" placeholder="请选择学年学期" :disabled="disable">
<el-option
v-for="dict in xnxqOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="自定义主题" prop="selfthemes">
<el-input v-model="form.selfthemes" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="家长支持" prop="support">
<el-input v-model="form.support" type="textarea" placeholder="请输入内容" />
<el-form-item label="微型课程" prop="wxkc">
<Editor v-model="form.wxkc" placeholder="请输入微型课程" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" />
@ -165,14 +199,20 @@ import {
delMonthplan,
addMonthplan,
updateMonthplan,
checkMonthplan,
} from "@/api/benyi/thememonthplan";
import Editor from "@/components/Editor";
import { listClass } from "@/api/system/class";
import { listTheme } from "@/api/benyi/theme";
export default {
name: "Monthplan",
components: {
Editor,
},
data() {
return {
disable: false,
//
loading: true,
//
@ -183,56 +223,101 @@ export default {
multiple: true,
//
total: 0,
//
disable: false,
//
monthplanList: [],
//
classOptions: [],
//
title: "",
//
open: false,
//
xnxqOptions: [],
//
classOptions: [],
//
themeOptions: [],
//
statusOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
schoolid: undefined,
classid: undefined,
xnxq: undefined,
month: undefined,
themes: undefined,
selfthemes: undefined,
wxkc: undefined,
support: undefined,
remarks: undefined,
createuserid: undefined,
spr: undefined,
sptime: undefined,
spyj: undefined,
},
//
form: {},
//
rules: {
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
month: [
{ required: true, message: "计划月份不能为空", trigger: "blur" },
xnxq: [
{ required: true, message: "学年学期不能为空", trigger: "blur" },
],
month: [{ required: true, message: "月份不能为空", trigger: "blur" }],
wxkc: [
{ required: true, message: "微型课程不能为空", trigger: "blur" },
],
themes: [{ required: true, message: "主题不能为空", trigger: "blur" }],
},
};
},
created() {
this.getList();
this.getClassList();
this.getThemeList();
this.getList();
this.getDicts("sys_xnxq").then((response) => {
this.xnxqOptions = response.data;
});
this.getDicts("sys_dm_planweekstatus").then((response) => {
this.statusOptions = response.data;
});
},
methods: {
getClassName(val) {
//locationsv-fordatas
let obj = {};
obj = this.classOptions.find((item) => {
return item.bjbh === val;
isShow(row) {
if (row.status == "0") {
return true;
} else {
return false;
}
},
// --
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// --
themeFormat(row, column) {
if (row.themes != null) {
var ilength = row.themes.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeOptions,
row.themes.split(";")[i]
) +
" ";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
}
return "";
},
//
getThemeList() {
listTheme(null).then((response) => {
//console.log(response.rows);
this.themeOptions = response.rows;
});
let getName = "";
getName = obj.bjmc;
this.form.name = getName;
},
//
classFormat(row, column) {
@ -247,6 +332,11 @@ export default {
});
return actions.join("");
},
// --
xnxqFormat(row, column) {
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
},
//
getClassList() {
listClass(null).then((response) => {
this.classOptions = response.rows;
@ -271,15 +361,21 @@ export default {
this.form = {
id: undefined,
name: undefined,
schoolid: undefined,
classid: undefined,
xnxq: undefined,
month: undefined,
themes: undefined,
selfthemes: undefined,
wxkc: undefined,
support: undefined,
remarks: undefined,
createuserid: undefined,
createTime: undefined,
spr: undefined,
sptime: undefined,
spyj: undefined,
status: "0",
};
this.resetForm("form");
},
@ -303,7 +399,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加<主题整合>月计划";
this.title = "添加主题整合月计划";
this.disable = false;
},
/** 修改按钮操作 */
@ -313,7 +409,7 @@ export default {
getMonthplan(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改<主题整合>月计划";
this.title = "修改主题整合月计划";
this.disable = true;
});
},
@ -344,15 +440,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合月计划编号为"' + ids + '"的数据项?',
"警告",
{
this.$confirm("是否确认删除主题整合月计划数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
})
.then(function () {
return delMonthplan(ids);
})
@ -362,6 +454,23 @@ export default {
})
.catch(function () {});
},
/** 提交按钮操作 */
handleCheck(row) {
const id = row.id;
this.$confirm("是否确认提交主题整合月计划?提交后数据将不能维护", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return checkMonthplan(id);
})
.then(() => {
this.getList();
this.msgSuccess("提交成功");
})
.catch(function () {});
},
},
};
</script>

View File

@ -1,52 +1,25 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="所属计划" prop="tpid">
<el-input
v-model="queryParams.tpid"
placeholder="请输入所属计划"
clearable
size="small"
@keyup.enter.native="handleQuery"
<el-form-item label="学期计划" prop="tpid">
<el-select v-model="queryParams.tpid" size="small">
<el-option
v-for="item in themePlanOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="主题内容" prop="themeconent">
<el-input
v-model="queryParams.themeconent"
placeholder="请输入主题内容"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createuserid">
<el-input
v-model="queryParams.createuserid"
placeholder="请输入创建人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="创建时间">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="queryParams.创建时间"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择创建人"
></el-date-picker>
</el-form-item>
<el-form-item label="修改人" prop="updateuserid">
<el-input
v-model="queryParams.updateuserid"
placeholder="请输入修改人"
clearable
size="small"
@keyup.enter.native="handleQuery"
<el-select v-model="queryParams.themeconent" size="small">
<el-option
v-for="item in themeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -62,6 +35,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['benyi:themetermplan:add']"
v-show="isShow"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -72,6 +46,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -82,17 +57,9 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['benyi:themetermplan:remove']"
v-show="isShow"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['benyi:themetermplan:export']"
>导出</el-button>
</el-col>
</el-row>
<el-table
@ -101,17 +68,11 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="所属计划" align="center" prop="tpid" />
<el-table-column label="主题内容" align="center" prop="themeconent" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="学期计划" align="center" prop="tpid" :formatter="themePlanFormat" />
<el-table-column label="月份" align="center" prop="month" />
<el-table-column label="主题内容" align="center" prop="themeconent" :formatter="themeFormat" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建人" align="center" prop="createuserid" />
<el-table-column label="创建人" align="center" prop="创建时间" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.创建时间, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="修改人" align="center" prop="updateuserid" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -120,6 +81,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow"
>修改</el-button>
<el-button
size="mini"
@ -127,6 +89,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:themetermplan:remove']"
v-show="isShow"
>删除</el-button>
</template>
</el-table-column>
@ -144,27 +107,31 @@
<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-input v-model="form.tpid" placeholder="请输入所属计划" />
<el-select v-model="form.tpid" size="small" :disabled="true">
<el-option
v-for="item in themePlanOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="主题内容" prop="themeconent">
<el-input v-model="form.themeconent" placeholder="请输入主题内容" />
</el-form-item>
<el-form-item label="创建人" prop="createuserid">
<el-input v-model="form.createuserid" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="创建人" prop="创建时间">
<el-form-item label="月份" prop="month">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.创建时间"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择创建人"
v-model="form.month"
type="month"
placeholder="请选择月"
value-format="yyyy-MM"
></el-date-picker>
</el-form-item>
<el-form-item label="修改人" prop="updateuserid">
<el-input v-model="form.updateuserid" placeholder="请输入修改人" />
<el-form-item label="选择主题" prop="themeconent">
<el-checkbox-group v-model="themeList" :max="max" @change="getThemeconentValue">
<el-checkbox v-for="(item,i) in themeOptions" :label="item.id" :key="i">{{item.name}}</el-checkbox>
</el-checkbox-group>
<el-input v-model="form.themeconent" v-if="false" />
</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">
@ -185,10 +152,19 @@ import {
exportTermplanitem,
} from "@/api/benyi/themetermplanitem";
import { listTermplan, getTermplan } from "@/api/benyi/themetermplan";
import { listTheme } from "@/api/benyi/theme";
export default {
name: "Termplanitem",
data() {
return {
isShow: true,
//
max: 2,
//
themeOptions: [],
themeList: [],
//
loading: true,
//
@ -201,10 +177,13 @@ export default {
total: 0,
//
termplanitemList: [],
//
themePlanOptions: [],
//
title: "",
//
open: false,
defaultThemeType: "",
//
queryParams: {
pageNum: 1,
@ -212,19 +191,97 @@ export default {
tpid: undefined,
themeconent: undefined,
createuserid: undefined,
创建时间: undefined,
updateuserid: undefined,
},
//
form: {},
//
rules: {},
rules: {
month: [{ required: true, message: "月份不能为空", trigger: "blur" }],
themeconent: [
{ required: true, message: "主题不能为空", trigger: "blur" },
],
},
};
},
created() {
this.getList();
const themeplanid = this.$route.params && this.$route.params.id;
//console.log(themeplanid);
this.getThemePlan(themeplanid);
this.getThemePlanList();
this.getThemeList();
},
methods: {
// --
themeFormat(row, column) {
if (row.themeconent != null) {
var ilength = row.themeconent.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeOptions,
row.themeconent.split(";")[i]
) +
" ";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
}
return "";
},
//checkbox
getThemeconentValue() {
//console.log(this.themeList);
var text = ";";
this.themeList.forEach(function (value, key, arr) {
//console.log(value); // 123
text = text + value + ";";
//console.log(text);
});
this.form.themeconent = text;
},
//
getThemeList() {
listTheme(null).then((response) => {
//console.log(response.rows);
this.themeOptions = response.rows;
});
},
//
themePlanFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.themePlanOptions;
Object.keys(datas).map((key) => {
if (datas[key].id == "" + row.tpid) {
actions.push(datas[key].name);
return false;
}
});
return actions.join("");
},
//
getThemePlan(themeplanid) {
getTermplan(themeplanid).then((response) => {
this.queryParams.tpid = response.data.id;
this.defaultThemeType = response.data.id;
if (response.data.status == "0") {
this.isShow = true;
} else {
this.isShow = false;
}
this.getList();
});
},
getThemePlanList() {
listTermplan().then((response) => {
this.themePlanOptions = response.rows;
});
},
/** 查询主题整合学期计划明细列表 */
getList() {
this.loading = true;
@ -247,11 +304,12 @@ export default {
themeconent: undefined,
remark: undefined,
createuserid: undefined,
创建时间: undefined,
month: undefined,
updateuserid: undefined,
updateTime: undefined,
};
this.resetForm("form");
this.themeList = [];
},
/** 搜索按钮操作 */
handleQuery() {
@ -261,6 +319,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.tpid = this.defaultThemeType;
this.handleQuery();
},
//
@ -274,6 +333,7 @@ export default {
this.reset();
this.open = true;
this.title = "添加主题整合学期计划明细";
this.form.tpid = this.queryParams.tpid;
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -283,6 +343,16 @@ export default {
this.form = response.data;
this.open = true;
this.title = "修改主题整合学期计划明细";
var themeconent = response.data.themeconent.split(";");
var array = [];
//console.log(arr);
themeconent.forEach(function (value, key, arr) {
//console.log(value); // 123
if (value != "") {
array.push(parseInt(value));
}
});
this.themeList = array;
});
},
/** 提交按钮 */
@ -330,22 +400,6 @@ export default {
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有主题整合学期计划明细数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportTermplanitem(queryParams);
})
.then((response) => {
this.download(response.msg);
})
.catch(function () {});
},
},
};
</script>

View File

@ -23,7 +23,12 @@
</el-form-item>
<el-form-item label="当前状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option label="请选择字典生成" value />
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
@ -65,9 +70,9 @@
</el-row>
<el-table v-loading="loading" :data="termplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="班级" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="名称" align="center" prop="name" :show-overflow-tooltip="true">
<el-table-column type="selection" width="55" align="center" :selectable="isShow"/>
<el-table-column label="班级名称" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/benyi_course/themetermplan/data/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
@ -86,7 +91,7 @@
</el-table-column>
<el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -95,6 +100,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow(scope.row)"
>修改</el-button>
<el-button
size="mini"
@ -102,7 +108,16 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:themetermplan:remove']"
v-show="isShow(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleCheck(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow(scope.row)"
>提交</el-button>
</template>
</el-table-column>
</el-table>
@ -157,6 +172,7 @@ import {
delTermplan,
addTermplan,
updateTermplan,
checkTermplan,
} from "@/api/benyi/themetermplan";
import { listClass } from "@/api/system/class";
@ -180,6 +196,8 @@ export default {
classOptions: [],
//
xnxqOptions: [],
//
statusOptions: [],
//
title: "",
//
@ -218,8 +236,19 @@ export default {
this.getDicts("sys_xnxq").then((response) => {
this.xnxqOptions = response.data;
});
this.getDicts("sys_dm_planweekstatus").then((response) => {
this.statusOptions = response.data;
});
},
methods: {
isShow(row) {
console.log(row.status);
if (row.status == "0") {
return true;
} else {
return false;
}
},
//
classFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
@ -237,6 +266,10 @@ export default {
xnxqFormat(row, column) {
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
},
// --
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
//
getClassList() {
listClass(null).then((response) => {
@ -343,7 +376,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合学期计划编号为"' + ids + '"的数据项?',
'是否确认删除主题整合学期计划数据项?',
"警告",
{
confirmButtonText: "确定",
@ -360,6 +393,27 @@ export default {
})
.catch(function () {});
},
/** 提交按钮操作 */
handleCheck(row) {
const id = row.id;
this.$confirm(
"是否确认提交主题整合学期计划?提交后数据将不能维护",
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return checkTermplan(id);
})
.then(() => {
this.getList();
this.msgSuccess("提交成功");
})
.catch(function () {});
},
},
};
</script>

View File

@ -0,0 +1,548 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="周计划" prop="wpid">
<el-select v-model="queryParams.wpid" size="small">
<el-option
v-for="item in themeWeekPlanOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="选择日期" prop="daytime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="queryParams.daytime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
></el-date-picker>
</el-form-item>
<el-form-item label="星期" prop="zhou">
<el-input-number
v-model="queryParams.zhou"
placeholder="星期"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="活动" prop="activityid">
<el-input
v-model="queryParams.activityid"
placeholder="请输入活动"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分组性质" prop="fzxz">
<el-select v-model="queryParams.fzxz" size="small">
<el-option
v-for="item in fzxzOptions"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</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:themeweekplan: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:themeweekplan: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:themeweekplan:remove']"
v-show="isShow"
>删除</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="weekplanitemList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="所属周计划" align="center" prop="wpid" :formatter="themeweekPlanFormat" />
<el-table-column label="日期" align="center" prop="daytime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.daytime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="星期" align="center" prop="zhou" />
<el-table-column
label="活动"
align="center"
prop="activityid"
:formatter="themeactivityFormat"
/>
<el-table-column label="分组性质" align="center" prop="fzxz" :formatter="fzxzFormat" />
<el-table-column label="家长支持" align="center" prop="jzzc" />
<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:themeweekplan:edit']"
v-show="isShow"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:themeweekplan: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="wpid">
<el-select v-model="form.wpid" size="small" :disabled="true">
<el-option
v-for="item in themeWeekPlanOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="日期" prop="daytime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.daytime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:disabled="disabled"
></el-date-picker>
</el-form-item>
<el-form-item label="星期" prop="zhou">
<el-input-number v-model="form.zhou" placeholder="请输入星期" :disabled="disabled" />
</el-form-item>
<el-form-item label="活动" prop="activityid">
<el-checkbox-group
v-model="themeactivityList"
:max="max"
@change="getThemeActivityIdValue"
>
<el-checkbox
v-for="(item,i) in themeactivityOptions"
:label="item.id"
:key="i"
>{{item.name}}</el-checkbox>
</el-checkbox-group>
<el-input v-model="form.activityid" v-if="false" />
</el-form-item>
<el-form-item label="分组性质" prop="fzxz">
<el-select v-model="form.fzxz" size="small">
<el-option
v-for="item in fzxzOptions"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="家长支持" prop="jzzc">
<el-input v-model="form.jzzc" 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 {
listWeekplanitem,
getWeekplanitem,
delWeekplanitem,
addWeekplanitem,
updateWeekplanitem,
exportWeekplanitem,
} from "@/api/benyi/themeweekplanitem";
import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
import { listActivityByThemeId } from "@/api/benyi/activity";
import { listMonthplan } from "@/api/benyi/thememonthplan";
import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
export default {
name: "Weekplanitem",
data() {
return {
isShow: true,
max: 2,
disabled: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
//
weekplanitemList: [],
//
themeWeekPlanOptions: [],
//id
defaultThemeWeekType: "",
//
fzxzOptions: [],
//chebox
themeactivityList: [],
//
themeactivityOptions: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
daytime: undefined,
zhou: undefined,
activityid: undefined,
fzxz: undefined,
jzzc: undefined,
createuserid: undefined,
updateuserid: undefined,
wpid: undefined,
},
//
queryParams_MonPlan: {
xnxq: undefined,
month: undefined,
status: "2",
},
queryParams_MonPlanItem: {
mpid: undefined,
zc: undefined,
},
//
form: {},
//
rules: {
daytime: [{ required: true, message: "日期不能为空", trigger: "blur" }],
zhou: [{ required: true, message: "星期不能为空", trigger: "blur" }],
fzxz: [
{ required: true, message: "分组性质不能为空", trigger: "blur" },
],
activityid: [
{ required: true, message: "活动不能为空", trigger: "blur" },
],
},
};
},
created() {
const themeweekplanid = this.$route.params && this.$route.params.id;
this.getThemeWeekPlan(themeweekplanid);
this.getThemeWeekPlanList();
this.getDicts("sys_dm_fzxz").then((response) => {
this.fzxzOptions = response.data;
});
},
methods: {
// --
themeactivityFormat(row, column) {
if (row.activityid != null) {
var ilength = row.activityid.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeactivityOptions,
row.activityid.split(";")[i]
) +
"";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
}
return "";
},
//checkbox
getThemeActivityIdValue() {
//console.log(this.themeList);
var text = ";";
this.themeactivityList.forEach(function (value, key, arr) {
//console.log(value); // 123
text = text + value + ";";
//console.log(text);
});
this.form.activityid = text;
},
//
getThemeActivityList(themeid) {
listActivityByThemeId(themeid).then((response) => {
//console.log(response.rows);
this.themeactivityOptions = response.rows;
});
},
// --
fzxzFormat(row, column) {
return this.selectDictLabel(this.fzxzOptions, row.fzxz);
},
//
themeweekPlanFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.themeWeekPlanOptions;
Object.keys(datas).map((key) => {
if (datas[key].id == "" + row.wpid) {
actions.push(datas[key].name);
return false;
}
});
return actions.join("");
},
//
getThemeWeekPlan(themeweekplanid) {
getWeekplan(themeweekplanid).then((response) => {
this.queryParams.wpid = response.data.id;
this.defaultThemeweekType = response.data.id;
console.log(
"月份:" + response.data.month + " " + "周次:" + response.data.zc
);
//id
this.queryParams_MonPlan.month = response.data.month;
this.queryParams_MonPlan.xnxq = response.data.xnxq;
listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => {
//console.log(resMonPlan.rows);
this.queryParams_MonPlanItem.mpid = resMonPlan.rows[0].id;
this.queryParams_MonPlanItem.zc = response.data.zc;
listMonthplanitem(this.queryParams_MonPlanItem).then(
(resMonPlanItem) => {
console.log(resMonPlanItem.rows);
var activityids = resMonPlanItem.rows[0].activityid.split(";");
var array = [];
//console.log(arr);
activityids.forEach(function (value, key, arr) {
//console.log(value); // 123
if (value != "") {
array.push(parseInt(value));
}
});
this.getThemeActivityList(array);
}
);
});
if (response.data.status == "0") {
this.isShow = true;
} else {
this.isShow = false;
}
this.getList();
});
},
getThemeWeekPlanList() {
listWeekplan().then((response) => {
this.themeWeekPlanOptions = response.rows;
});
},
/** 查询主题整合周计划明细列表 */
getList() {
this.loading = true;
listWeekplanitem(this.queryParams).then((response) => {
this.weekplanitemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
daytime: undefined,
zhou: undefined,
activityid: undefined,
fzxz: undefined,
jzzc: undefined,
createuserid: undefined,
createTime: undefined,
updateuserid: undefined,
updateTime: undefined,
wpid: undefined,
};
this.resetForm("form");
this.themeactivityList = [];
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.wpid = this.defaultThemeweekType;
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.wpid = this.queryParams.wpid;
this.disabled = false;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getWeekplanitem(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改主题整合周计划明细";
this.disabled = true;
var activityid = response.data.activityid.split(";");
var array = [];
//console.log(arr);
activityid.forEach(function (value, key, arr) {
//console.log(value); // 123
if (value != "") {
array.push(parseInt(value));
}
});
this.themeactivityList = array;
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
updateWeekplanitem(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addWeekplanitem(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 delWeekplanitem(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有主题整合周计划明细数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportWeekplanitem(queryParams);
})
.then((response) => {
this.download(response.msg);
})
.catch(function () {});
},
},
};
</script>

View File

@ -0,0 +1,429 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="计划名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入计划名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="学年学期" prop="xnxq">
<el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
<el-option
v-for="dict in xnxqOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="所属月份" prop="month">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="queryParams.month"
type="month"
value-format="yyyy-MM"
placeholder="选择所属月份"
></el-date-picker>
</el-form-item>
<el-form-item label="所属周次" prop="zc">
<el-input-number
v-model="queryParams.zc"
placeholder="周次"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</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:themeweekplan:add']"
>新增</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:themeweekplan:edit']"
>修改</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:themeweekplan:remove']"
>删除</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="weekplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="isShow" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/benyi_course/themeweekplan/data/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="班级名称" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="所属月份" align="center" prop="month" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.month, '{y}-{m}') }}</span>
</template>
</el-table-column>
<el-table-column label="所属周次" align="center" prop="zc" />
<el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<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:themeweekplan:edit']"
v-show="isShow(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:themeweekplan:remove']"
v-show="isShow(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleCheck(scope.row)"
v-hasPermi="['benyi:themeweekplan:edit']"
v-show="isShow(scope.row)"
>提交</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改主题整合周计划根据月计划明细对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="学年学期" prop="xnxq">
<el-select v-model="form.xnxq" placeholder="请选择学年学期" :disabled="disable">
<el-option
v-for="dict in xnxqOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="所属月份" prop="month">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.month"
type="month"
value-format="yyyy-MM"
placeholder="选择所属月份"
:disabled="disable"
></el-date-picker>
</el-form-item>
<el-form-item label="所属周次" prop="zc">
<el-input-number v-model="form.zc" placeholder="周次" :disabled="disable" />
</el-form-item>
<el-form-item label="备注" prop="remar">
<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 {
listWeekplan,
getWeekplan,
delWeekplan,
addWeekplan,
updateWeekplan,
exportWeekplan,
checkWeekplan,
} from "@/api/benyi/themeweekplan";
import { listClass } from "@/api/system/class";
export default {
name: "Weekplan",
data() {
return {
disable: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
//
weekplanList: [],
//
title: "",
//
open: false,
//
xnxqOptions: [],
//
classOptions: [],
//
statusOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
schoolid: undefined,
classid: undefined,
month: undefined,
zc: undefined,
status: undefined,
spr: undefined,
sptime: undefined,
shyj: undefined,
createuserid: undefined,
xnxq: undefined,
},
//
form: {},
//
rules: {
xnxq: [
{ required: true, message: "学年学期不能为空", trigger: "blur" },
],
month: [{ required: true, message: "月份不能为空", trigger: "blur" }],
zc: [{ required: true, message: "周次不能为空", trigger: "blur" }],
},
};
},
created() {
this.getList();
this.getClassList();
this.getDicts("sys_xnxq").then((response) => {
this.xnxqOptions = response.data;
});
this.getDicts("sys_dm_planweekstatus").then((response) => {
this.statusOptions = response.data;
});
},
methods: {
isShow(row) {
if (row.status == "0") {
return true;
} else {
return false;
}
},
//
getClassList() {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
// --
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// --
xnxqFormat(row, column) {
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
},
//
classFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.classOptions;
Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc);
return false;
}
});
return actions.join("");
},
/** 查询主题整合周计划(根据月计划明细)列表 */
getList() {
this.loading = true;
listWeekplan(this.queryParams).then((response) => {
this.weekplanList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
name: undefined,
schoolid: undefined,
classid: undefined,
month: undefined,
zc: undefined,
remark: undefined,
status: "0",
spr: undefined,
sptime: undefined,
shyj: undefined,
createuserid: undefined,
createTime: undefined,
xnxq: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加主题整合周计划";
this.disable = false;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getWeekplan(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改主题整合周计划";
this.disable = true;
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
updateWeekplan(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addWeekplan(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("是否确认删除主题整合周计划数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delWeekplan(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
/** 提交按钮操作 */
handleCheck(row) {
const id = row.id;
this.$confirm("是否确认提交主题整合周计划?提交后数据将不能维护", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return checkWeekplan(id);
})
.then(() => {
this.getList();
this.msgSuccess("提交成功");
})
.catch(function () {});
},
},
};
</script>

View File

@ -100,6 +100,7 @@ export default {
title: undefined,
lecturer: undefined,
type: undefined,
status:"0",
pageNum: 1,
pageSize: 8
}

View File

@ -8,8 +8,7 @@ import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.*;
import com.ruoyi.project.benyi.service.IBySchoolcalendarClassService;
import com.ruoyi.project.benyi.service.IBySchoolcalendarService;
import com.ruoyi.project.benyi.service.*;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.domain.ByTeacherJbxx;
import com.ruoyi.project.system.domain.SysDictData;
@ -28,7 +27,6 @@ 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.service.IByCalendarService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
@ -42,8 +40,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/calendar")
public class ByCalendarController extends BaseController
{
public class ByCalendarController extends BaseController {
@Autowired
private IByCalendarService byCalendarService;
@Autowired
@ -56,14 +53,21 @@ public class ByCalendarController extends BaseController
private SchoolCommon schoolCommon;
@Autowired
private IByTeacherJbxxService byTeacherJbxxService;
@Autowired
private IByThemeWeekplanService byThemeWeekplanService;
@Autowired
private IByThemeWeekplanitemService byThemeWeekplanitemService;
@Autowired
private IByThemeActivityService byThemeActivityService;
@Autowired
private IByChildService byChildService;
/**
* 查询园历管理(本一)列表
*/
@PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
@GetMapping("/list")
public TableDataInfo list(ByCalendar byCalendar)
{
public TableDataInfo list(ByCalendar byCalendar) {
startPage();
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
return getDataTable(list);
@ -75,8 +79,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByCalendar byCalendar)
{
public AjaxResult export(ByCalendar byCalendar) {
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class);
return util.exportExcel(list, "calendar");
@ -87,8 +90,7 @@ public class ByCalendarController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byCalendarService.selectByCalendarById(id));
}
@ -98,8 +100,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByCalendar byCalendar)
{
public AjaxResult add(@RequestBody ByCalendar byCalendar) {
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byCalendar.setStylecolor("#eb2f96");
byCalendar.setCreatetime(new Date());
@ -112,8 +113,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByCalendar byCalendar)
{
public AjaxResult edit(@RequestBody ByCalendar byCalendar) {
return toAjax(byCalendarService.updateByCalendar(byCalendar));
}
@ -123,8 +123,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byCalendarService.deleteByCalendarByIds(ids));
}
@ -137,21 +136,21 @@ public class ByCalendarController extends BaseController
//将类型颜色样式加载到字典
HashMap<String, String> hashMap = new HashMap<>();
for (SysDictData calendartype : dictDataService.selectDictDataByType("sys_schoolcalendartype")) {
System.out.println("====sys_yebjlx.getDictValue()"+calendartype.getDictValue());
System.out.println("=====calendartype.getCssClass()"+calendartype.getCssClass());
hashMap.put(calendartype.getDictValue(),calendartype.getCssClass());
System.out.println("====sys_yebjlx.getDictValue()" + calendartype.getDictValue());
System.out.println("=====calendartype.getCssClass()" + calendartype.getCssClass());
hashMap.put(calendartype.getDictValue(), calendartype.getCssClass());
}
//定义返回列表
List<ByCalendarShow> listvi= new ArrayList<>();
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
List<ByCalendarShow> listvi = new ArrayList<>();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
//加载本一园历
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
if(list.size()>0){
for (ByCalendar calendar:list) {
if (list.size() > 0) {
for (ByCalendar calendar : list) {
ByCalendarShow by = new ByCalendarShow();
by.setId(calendar.getId());
by.setTitle(calendar.getName());
System.out.println("title:"+calendar.getName());
System.out.println("title:" + calendar.getName());
by.setStart(formatter.format(calendar.getActivitytime()));
by.setEnd(formatter.format(calendar.getActivityendtime()));
by.setColor(hashMap.get(calendar.getType()));
@ -160,22 +159,26 @@ public class ByCalendarController extends BaseController
}
//幼儿园登陆展示
if (schoolCommon.isSchool() == true){
if (schoolCommon.isSchool() == true) {
Long schoolId = SecurityUtils.getLoginUser().getUser().getDeptId();
//根据不同的幼儿园加载幼儿园园历
//(long)207
listvi.addAll(getbySchoolcalendars(schoolId,formatter,hashMap));
listvi.addAll(getbySchoolcalendars(schoolId, formatter, hashMap));
//根据不同的幼儿园加载幼儿园园历
listvi.addAll(getbyteacherBiths(schoolId,formatter,hashMap));
listvi.addAll(getbyteacherBiths(schoolId, formatter, hashMap));
}
// listvi.addAll(getbySchoolcalendars((long)207,formatter,hashMap));
// listvi.addAll(getbyteacherBiths((long)207,formatter,hashMap));
//根据不同的班级记载班级园历
if (schoolCommon.getClassId()!=""){
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId)) {
//根据不同的班级加载班级园历
listvi.addAll(getbyclasses(schoolCommon.getClassId(),formatter,hashMap));
listvi.addAll(getbyclasses(classId, formatter, hashMap));
//加载主题整合活动
listvi.addAll(getbyclassthemes(classId, formatter, hashMap));
//根据班级加载幼儿生日
listvi.addAll(getbychilds(classId, formatter));
}
AjaxResult ajax = AjaxResult.success();
@ -187,16 +190,16 @@ public class ByCalendarController extends BaseController
/**
* 根据不同的幼儿园加载幼儿园园历
*/
private List<ByCalendarShow> getbySchoolcalendars(Long schoolId,SimpleDateFormat formatter,HashMap<String, String> hashMap){
List<ByCalendarShow> listvi= new ArrayList<>();
private List<ByCalendarShow> getbySchoolcalendars(Long schoolId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
List<ByCalendarShow> listvi = new ArrayList<>();
BySchoolcalendar bySchoolcalendar = new BySchoolcalendar();
//设置幼儿园
bySchoolcalendar.setDeptid(schoolId);
List<BySchoolcalendar> bySchoolcalendarList = bySchoolcalendarService.selectBySchoolcalendarList(bySchoolcalendar);
if(bySchoolcalendarList.size()>0){
for (BySchoolcalendar bsc:bySchoolcalendarList) {
if (bySchoolcalendarList.size() > 0) {
for (BySchoolcalendar bsc : bySchoolcalendarList) {
ByCalendarShow by = new ByCalendarShow();
by.setId(bsc.getId());
by.setTitle(bsc.getName());
@ -212,14 +215,14 @@ public class ByCalendarController extends BaseController
/**
* 根据不同的幼儿园加载教师生日
*/
private List<ByCalendarShow> getbyteacherBiths(Long schoolId,SimpleDateFormat formatter,HashMap<String, String> hashMap){
SysUser sysUser=new SysUser();
private List<ByCalendarShow> getbyteacherBiths(Long schoolId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
SysUser sysUser = new SysUser();
sysUser.setDeptId(schoolId);
ByTeacherJbxx byTeacherJbxx = new ByTeacherJbxx();
byTeacherJbxx.setUser(sysUser);
List<ByTeacherJbxx> listTeacherBirth = byTeacherJbxxService.selectByTeacherJbxxList(byTeacherJbxx);
List<ByCalendarShow> listvi= new ArrayList<>();
List<ByCalendarShow> listvi = new ArrayList<>();
//系统内员工的生日入职日期信息
System.out.println("listTeacherBirth.size()===" + listTeacherBirth.size());
if (listTeacherBirth != null && listTeacherBirth.size() > 0) {
@ -228,56 +231,57 @@ public class ByCalendarController extends BaseController
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//创建一个教师实体类并赋值
byTeacherJbxx=listTeacherBirth.get(i);
String strCurrentYear=schoolCommon.getCurrentYear();
byTeacherJbxx = listTeacherBirth.get(i);
String strCurrentYear = schoolCommon.getCurrentYear();
System.out.println("当前年===" + strCurrentYear);
//参加工作日期
if(byTeacherJbxx.getCjgzrq()!=null){
if (byTeacherJbxx.getCjgzrq() != null) {
String timefor = formatter.format(byTeacherJbxx.getCjgzrq());
timefor = timefor.replaceAll(timefor.split("-")[0],strCurrentYear);
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
ByCalendarShow by = new ByCalendarShow();
//by.setId((long)000);
by.setTitle(listTeacherBirth.get(i).getUser().getNickName()+"-合同满年期限");
by.setTitle(listTeacherBirth.get(i).getUser().getNickName() + "-合同满年期限");
by.setStart(timefor);
by.setEnd(timefor);
//教师生日颜色
by.setColor("#13c2c2");
listvi.add(by);
System.out.println("当前年工作日期timefor===" + timefor+"====="+listTeacherBirth.get(i).getUser().getNickName()+"-合同满年期限");
System.out.println("当前年工作日期timefor===" + timefor + "=====" + listTeacherBirth.get(i).getUser().getNickName() + "-合同满年期限");
}
//生日
if(byTeacherJbxx.getCsrq()!=null){
String timefor = formatter.format(byTeacherJbxx.getCjgzrq());
timefor = timefor.replaceAll(timefor.split("-")[0],strCurrentYear);
if (byTeacherJbxx.getCsrq() != null) {
String timefor = formatter.format(byTeacherJbxx.getCsrq());
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
ByCalendarShow by = new ByCalendarShow();
//by.setId((long)000);
by.setTitle(listTeacherBirth.get(i).getUser().getNickName()+"-生日");
by.setTitle(listTeacherBirth.get(i).getUser().getNickName() + "-生日");
by.setStart(timefor);
by.setEnd(timefor);
//教师生日颜色
by.setColor("#722ed1");
listvi.add(by);
System.out.println("当前年生日timefor===" + timefor+"====="+listTeacherBirth.get(i).getUser().getNickName()+"-生日");
System.out.println("当前年生日timefor===" + timefor + "=====" + listTeacherBirth.get(i).getUser().getNickName() + "-生日");
}
}
}
return listvi;
}
/**
* 根据不同的班级加载班级园历
*/
private List<ByCalendarShow> getbyclasses(String classlId,SimpleDateFormat formatter,HashMap<String, String> hashMap){
List<ByCalendarShow> listvi= new ArrayList<>();
private List<ByCalendarShow> getbyclasses(String classId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
List<ByCalendarShow> listvi = new ArrayList<>();
BySchoolcalendarClass bySchoolcalendarClass = new BySchoolcalendarClass();
//设置班级
bySchoolcalendarClass.setClassid(classlId);
bySchoolcalendarClass.setClassid(classId);
List<BySchoolcalendarClass> bySchoolcalendarClassList = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
if(bySchoolcalendarClassList.size()>0){
for (BySchoolcalendarClass bscc:bySchoolcalendarClassList) {
if (bySchoolcalendarClassList.size() > 0) {
for (BySchoolcalendarClass bscc : bySchoolcalendarClassList) {
ByCalendarShow by = new ByCalendarShow();
by.setId(bscc.getId());
by.setTitle(bscc.getName());
@ -287,6 +291,93 @@ public class ByCalendarController extends BaseController
listvi.add(by);
}
}
//班级课程
return listvi;
}
//获取班级主题整合活动
private List<ByCalendarShow> getbyclassthemes(String classId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
List<ByCalendarShow> listvi = new ArrayList<>();
Long deptId = SecurityUtils.getLoginUser().getUser().getDept().getDeptId();
ByThemeWeekplan byThemeWeekplan = new ByThemeWeekplan();
byThemeWeekplan.setSchoolid(deptId);
byThemeWeekplan.setClassid(classId);
byThemeWeekplan.setStatus("2");
//学年学期
List<ByThemeWeekplan> listByThemeWeekplan = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
if (listByThemeWeekplan != null && listByThemeWeekplan.size() > 0) {
ByThemeWeekplanitem byThemeWeekplanitem = null;
for (int i = 0; i < listByThemeWeekplan.size(); i++) {
byThemeWeekplanitem = new ByThemeWeekplanitem();
String wpId = listByThemeWeekplan.get(i).getId();
byThemeWeekplanitem.setWpid(wpId);
List<ByThemeWeekplanitem> listByThemeWeekplanitem = byThemeWeekplanitemService.selectByThemeWeekplanitemList(byThemeWeekplanitem);
if (listByThemeWeekplanitem != null && listByThemeWeekplanitem.size() > 0) {
for (int j = 0; j < listByThemeWeekplanitem.size(); j++) {
if (!schoolCommon.isStringEmpty(listByThemeWeekplanitem.get(j).getActivityid())) {
ByCalendarShow by = new ByCalendarShow();
by.setId(listByThemeWeekplanitem.get(j).getId());
String[] strArr = listByThemeWeekplanitem.get(j).getActivityid().split(";");
String activityName = "";
if (strArr.length > 0) {
for (int g = 0; g < strArr.length; g++) {
if (!schoolCommon.isStringEmpty(strArr[g])) {
activityName = activityName + byThemeActivityService.selectByThemeActivityById(Long.valueOf(strArr[g])).getName() + ";";
}
}
}
by.setTitle("主题整合(" + activityName + ")");
by.setStart(formatter.format(listByThemeWeekplanitem.get(j).getDaytime()));
by.setEnd(formatter.format(listByThemeWeekplanitem.get(j).getDaytime()));
by.setColor(hashMap.get("03"));
listvi.add(by);
}
}
}
}
}
return listvi;
}
//获取班级幼儿生日列表
private List<ByCalendarShow> getbychilds(String classId, SimpleDateFormat formatter) {
List<ByCalendarShow> listvi = new ArrayList<>();
Long deptId = SecurityUtils.getLoginUser().getUser().getDept().getDeptId();
ByChild byChild = new ByChild();
byChild.setSchoolid(deptId);
byChild.setClassid(classId);
byChild.setStatus("0");
List<ByChild> list = byChildService.selectByChildList(byChild);
if (list != null && list.size() > 0) {
String strCurrentYear = schoolCommon.getCurrentYear();
ByCalendarShow by = null;
for (int i = 0; i < list.size(); i++) {
by = new ByCalendarShow();
ByChild byNewChild = list.get(i);
if (byNewChild.getCsrq() != null) {
by.setId(byNewChild.getId());
by.setTitle(byNewChild.getName() + "-生日");
String timefor = formatter.format(byNewChild.getCsrq());
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
by.setStart(timefor);
by.setEnd(timefor);
by.setColor("#b37feb");
listvi.add(by);
}
}
}
return listvi;
}

View File

@ -56,8 +56,9 @@ public class ByChildCheckinDetailController extends BaseController {
byChildCheckinDetail.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
byChildCheckinDetail.setClassid(schoolCommon.getClassId());
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId)) {
byChildCheckinDetail.setClassid(classId);
}
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);

View File

@ -46,8 +46,9 @@ public class ByChildContactpeopleController extends BaseController {
startPage();
byChildContactpeople.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
byChildContactpeople.setClassid(schoolCommon.getClassId());
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId)) {
byChildContactpeople.setClassid(classId);
}
List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople);
return getDataTable(list);

View File

@ -46,8 +46,9 @@ public class ByChildController extends BaseController {
startPage();
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
byChild.setClassid(schoolCommon.getClassId());
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId) && classId != "-1") {
byChild.setClassid(classId);
}
List<ByChild> list = byChildService.selectByChildList(byChild);
return getDataTable(list);
@ -61,9 +62,10 @@ public class ByChildController extends BaseController {
public TableDataInfo listByCheck(ByChild byChild) {
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
System.out.println(schoolCommon.getClassId());
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
byChild.setClassid(schoolCommon.getClassId());
//System.out.println(schoolCommon.getClassId());
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId) && classId != "-1") {
byChild.setClassid(classId);
}
List<ByChild> list = byChildService.selectByCheckList(byChild);
return getDataTable(list);

View File

@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.common.SchoolCommon;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
public class ByPlanweekController extends BaseController {
@Autowired
private IByPlanweekService byPlanweekService;
@Autowired
private SchoolCommon schoolCommon;
/**
* 查询周计划(家长和教育部门)列表
@ -61,7 +65,7 @@ public class ByPlanweekController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byPlanweekService.selectByPlanweekById(id));
}
@ -72,7 +76,22 @@ public class ByPlanweekController extends BaseController {
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByPlanweek byPlanweek) {
String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号
//if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
String uuid = schoolCommon.getUuid();
byPlanweek.setId(uuid);
//学校id
byPlanweek.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//创建人id
byPlanweek.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
//班级id
byPlanweek.setClassid(classId);
byPlanweek.setStatus("0");
return toAjax(byPlanweekService.insertByPlanweek(byPlanweek));
// } else {
// return AjaxResult.error("当前用户非幼儿园,无法添加计划");
// }
}
/**
@ -85,13 +104,33 @@ public class ByPlanweekController extends BaseController {
return toAjax(byPlanweekService.updateByPlanweek(byPlanweek));
}
/**
* 提交审核周计划(家长和教育部门)
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:edit')")
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.UPDATE)
@PostMapping("/check/{ids}")
public AjaxResult check(@PathVariable String[] ids) {
int iCount = 0;
ByPlanweek byPlanweek = null;
for (int i = 0; i < ids.length; i++) {
byPlanweek = new ByPlanweek();
byPlanweek.setId(ids[i]);
byPlanweek.setStatus("1");
//byPlanweek.setShrid(SecurityUtils.getLoginUser().getUser().getUserId());
iCount = iCount + byPlanweekService.updateByPlanweek(byPlanweek);
}
return toAjax(iCount);
}
/**
* 删除周计划(家长和教育部门)
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:remove')")
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(byPlanweekService.deleteByPlanweekByIds(ids));
}
}

View File

@ -1,7 +1,6 @@
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;
@ -25,20 +24,22 @@ import com.ruoyi.framework.web.page.TableDataInfo;
* 周计划(家长和教育部门细化)Controller
*
* @author tsbz
* @date 2020-08-24
* @date 2020-08-27
*/
@RestController
@RequestMapping("/benyi/planweekitem")
public class ByPlanweekitemController extends BaseController {
public class ByPlanweekitemController extends BaseController
{
@Autowired
private IByPlanweekitemService byPlanweekitemService;
/**
/**
* 查询周计划(家长和教育部门细化)列表
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:list')")
@GetMapping("/list")
public TableDataInfo list(ByPlanweekitem byPlanweekitem) {
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:list')")
@GetMapping("/list")
public TableDataInfo list(ByPlanweekitem byPlanweekitem)
{
startPage();
List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem);
return getDataTable(list);
@ -47,10 +48,11 @@ public class ByPlanweekitemController extends BaseController {
/**
* 导出周计划(家长和教育部门细化)列表
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:export')")
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:export')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByPlanweekitem byPlanweekitem) {
public AjaxResult export(ByPlanweekitem byPlanweekitem)
{
List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem);
ExcelUtil<ByPlanweekitem> util = new ExcelUtil<ByPlanweekitem>(ByPlanweekitem.class);
return util.exportExcel(list, "planweekitem");
@ -59,39 +61,43 @@ public class ByPlanweekitemController extends BaseController {
/**
* 获取周计划(家长和教育部门细化)详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:query')")
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(byPlanweekitemService.selectByPlanweekitemById(id));
}
/**
* 新增周计划(家长和教育部门细化)
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:add')")
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:add')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem) {
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem)
{
return toAjax(byPlanweekitemService.insertByPlanweekitem(byPlanweekitem));
}
/**
* 修改周计划(家长和教育部门细化)
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:edit')")
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:edit')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem) {
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem)
{
return toAjax(byPlanweekitemService.updateByPlanweekitem(byPlanweekitem));
}
/**
* 删除周计划(家长和教育部门细化)
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:remove')")
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:remove')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(byPlanweekitemService.deleteByPlanweekitemByIds(ids));
}
}

View File

@ -33,8 +33,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/schoolcalendarclass")
public class BySchoolcalendarClassController extends BaseController
{
public class BySchoolcalendarClassController extends BaseController {
@Autowired
private IBySchoolcalendarClassService bySchoolcalendarClassService;
@ -47,17 +46,16 @@ public class BySchoolcalendarClassController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
@GetMapping("/list")
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass)
{
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass) {
String strClassId = schoolCommon.getClassId();
if(!schoolCommon.isStringEmpty(strClassId)){
if (!schoolCommon.isStringEmpty(strClassId)) {
startPage();
bySchoolcalendarClass.setClassid(strClassId);
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
//System.out.println("---------------------分页"+list);
return getDataTable(list);
}else{
List<BySchoolcalendarClass> list =new ArrayList<>();
} else {
List<BySchoolcalendarClass> list = new ArrayList<>();
return getDataTable(list);
}
@ -68,8 +66,7 @@ public class BySchoolcalendarClassController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
@GetMapping("/listAll")
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass)
{
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass) {
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
//System.out.println("---------------------没有分页"+listAll);
return getDataTable(listAll);
@ -81,8 +78,7 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:export')")
@Log(title = "园历管理(班级)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(BySchoolcalendarClass bySchoolcalendarClass)
{
public AjaxResult export(BySchoolcalendarClass bySchoolcalendarClass) {
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
ExcelUtil<BySchoolcalendarClass> util = new ExcelUtil<BySchoolcalendarClass>(BySchoolcalendarClass.class);
return util.exportExcel(list, "schoolcalendarclass");
@ -93,8 +89,7 @@ public class BySchoolcalendarClassController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id));
}
@ -104,11 +99,10 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:add')")
@Log(title = "园历管理(班级)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BySchoolcalendarClass bySchoolcalendarClass)
{
public AjaxResult add(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) {
String strClassId = schoolCommon.getClassId();
//判断当前用户是否有班级
if(!schoolCommon.isStringEmpty(strClassId)) {
if (!schoolCommon.isStringEmpty(strClassId)) {
//设置创建时间为当前时间
bySchoolcalendarClass.setCreatetime(new Date());
//设置学年信息 从学校公共类调取方法 传入活动时间进行判断
@ -119,7 +113,7 @@ public class BySchoolcalendarClassController extends BaseController
bySchoolcalendarClass.setDeptid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
bySchoolcalendarClass.setClassid(strClassId);
return toAjax(bySchoolcalendarClassService.insertBySchoolcalendarClass(bySchoolcalendarClass));
}else {
} else {
return AjaxResult.error("当前用户下没有班级,无法创建园历");
}
@ -131,11 +125,10 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:edit')")
@Log(title = "园历管理(班级)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BySchoolcalendarClass bySchoolcalendarClass)
{
if(!schoolCommon.isStringEmpty(schoolCommon.getClassId())){
public AjaxResult edit(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) {
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
return toAjax(bySchoolcalendarClassService.updateBySchoolcalendarClass(bySchoolcalendarClass));
}else{
} else {
return AjaxResult.error("当前用户下没有班级,无法修改园历");
}
}
@ -146,12 +139,11 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:remove')")
@Log(title = "园历管理(班级)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
//判断当前用户下是否有班级
if(!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
return toAjax(bySchoolcalendarClassService.deleteBySchoolcalendarClassByIds(ids));
}else {
} else {
return AjaxResult.error("当前用户下没有班级,无法删除园历");
}

View File

@ -113,4 +113,14 @@ public class ByThemeActivityController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byThemeActivityService.deleteByThemeActivityByIds(ids));
}
/**
* 查询主题整合活动列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:list')"+ "||@ss.hasPermi('benyi:thememonthplan:list')")
@PostMapping("/listbythemeid/{ids}")
public TableDataInfo listbythemeid(@PathVariable Long[] ids) {
List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityByThemeIds(ids);
return getDataTable(list);
}
}

View File

@ -1,12 +1,17 @@
package com.ruoyi.project.benyi.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.ByThemeTermplan;
import com.ruoyi.project.benyi.domain.ByThemeTermplanitem;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
import com.ruoyi.project.benyi.service.IByThemeTermplanService;
import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -39,6 +44,14 @@ public class ByThemeMonthplanController extends BaseController {
private IByThemeMonthplanService byThemeMonthplanService;
@Autowired
private SchoolCommon schoolCommon;
@Autowired
private IByClassService byClassService;
@Autowired
private IByThemeTermplanService byThemeTermplanService;
@Autowired
private IByThemeTermplanitemService byThemeTermplanitemService;
@Autowired
private IByThemeMonthplanitemService byThemeonthplanitemService;
/**
* 查询主题整合月计划列表
@ -47,7 +60,14 @@ public class ByThemeMonthplanController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) {
startPage();
List<ByThemeMonthplan> list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByThemeMonthplan> list = null;
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeMonthplan.setClassid(classId);
}
list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
return getDataTable(list);
}
@ -68,7 +88,7 @@ public class ByThemeMonthplanController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byThemeMonthplanService.selectByThemeMonthplanById(id));
}
@ -79,28 +99,53 @@ public class ByThemeMonthplanController extends BaseController {
@Log(title = "主题整合月计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeMonthplan byThemeMonthplan) {
String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool()) {
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeMonthplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
String dateTime = byThemeMonthplan.getMonth();
dateTime = dateTime .replace("Z", " UTC"); //2019-06-27T16:00:00.000 UTC
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");//转换时区格式
SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM");
Date date = null;//将Z时间格式转换成Date类型格式或换成毫秒
try {
date = format1.parse(dateTime);
} catch (ParseException e) {
e.printStackTrace();
//根据当前月份 查找学期计划的主题
ByThemeTermplan byThemeTermplan = new ByThemeTermplan();
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
byThemeTermplan.setClassid(classId);
byThemeTermplan.setStatus("2");
byThemeTermplan.setXnxq(byThemeMonthplan.getXnxq());
List<ByThemeTermplan> list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
String strThemeIds = "";
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
String themeId = list.get(i).getId();
ByThemeTermplanitem byThemeTermplanitem = new ByThemeTermplanitem();
byThemeTermplanitem.setTpid(themeId);
byThemeTermplanitem.setMonth(byThemeMonthplan.getMonth());
List<ByThemeTermplanitem> listItem = byThemeTermplanitemService.selectByThemeTermplanitemList(byThemeTermplanitem);
if (listItem != null && listItem.size() > 0) {
for (int j = 0; j < listItem.size(); j++) {
String themeIds = listItem.get(j).getThemeconent();
if (!schoolCommon.isStringEmpty(themeIds)) {
strThemeIds = strThemeIds + themeIds;
}
String time= format2.format(date);//2019-06
System.out.println(time);
byThemeMonthplan.setMonth(time);
byThemeMonthplan.setName(byThemeMonthplan.getName() + "-主题整合月计划(" + byThemeMonthplan.getMonth() + "");
}
}
}
} else {
return AjaxResult.error("当前班级未制定学期计划或学期计划未审批,无法创建月计划");
}
if (schoolCommon.isStringEmpty(strThemeIds)) {
return AjaxResult.error("当前班级制定的学期计划未设置月份主题,无法创建月计划");
}
String uuid = schoolCommon.getUuid();
byThemeMonthplan.setId(uuid);
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
byThemeMonthplan.setClassid(classId);
byThemeMonthplan.setThemes(strThemeIds);//主题id
byThemeMonthplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")");
return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
} else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿");
return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划");
}
}
@ -120,7 +165,29 @@ public class ByThemeMonthplanController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')")
@Log(title = "主题整合月计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
public AjaxResult remove(@PathVariable String[] ids) {
//首先判断当前id下是否存在子目录
for (int i = 0; i < ids.length; i++) {
ByThemeMonthplanitem byThemeMonthplanitem = new ByThemeMonthplanitem();
byThemeMonthplanitem.setMpid(ids[i]);
List<ByThemeMonthplanitem> list = byThemeonthplanitemService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
if (list != null && list.size() > 0) {
return AjaxResult.error("选中的计划下存在子计划,无法删除");
}
}
return toAjax(byThemeMonthplanService.deleteByThemeMonthplanByIds(ids));
}
/**
* 提交主题整合学期计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
@Log(title = "主题整合学期计划", businessType = BusinessType.UPDATE)
@PostMapping("/check/{id}")
public AjaxResult check(@PathVariable String id) {
ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan();
byThemeMonthplan.setId(id);
byThemeMonthplan.setStatus("1");
return toAjax(byThemeMonthplanService.updateByThemeMonthplan(byThemeMonthplan));
}
}

View File

@ -0,0 +1,111 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.common.SchoolCommon;
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.ByThemeMonthplanitem;
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
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-08-25
*/
@RestController
@RequestMapping("/benyi/thememonthplanitem")
public class ByThemeMonthplanitemController extends BaseController
{
@Autowired
private IByThemeMonthplanitemService byThemeWeekplanService;
@Autowired
private SchoolCommon schoolCommon;
/**
* 查询主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeMonthplanitem byThemeMonthplanitem)
{
startPage();
List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
return getDataTable(list);
}
/**
* 导出主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')")
@Log(title = "主题整合周计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeMonthplanitem byThemeMonthplanitem)
{
List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
ExcelUtil<ByThemeMonthplanitem> util = new ExcelUtil<ByThemeMonthplanitem>(ByThemeMonthplanitem.class);
return util.exportExcel(list, "weekplan");
}
/**
* 获取主题整合周计划详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(byThemeWeekplanService.selectByThemeMonthplanitemById(id));
}
/**
* 新增主题整合周计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')")
@Log(title = "主题整合周计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem)
{
String uuid=schoolCommon.getUuid();
byThemeMonthplanitem.setId(uuid);
byThemeMonthplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeWeekplanService.insertByThemeMonthplanitem(byThemeMonthplanitem));
}
/**
* 修改主题整合周计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
@Log(title = "主题整合周计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem)
{
return toAjax(byThemeWeekplanService.updateByThemeMonthplanitem(byThemeMonthplanitem));
}
/**
* 删除主题整合周计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')")
@Log(title = "主题整合周计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(byThemeWeekplanService.deleteByThemeMonthplanitemByIds(ids));
}
}

View File

@ -55,7 +55,14 @@ public class ByThemeTermplanController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(ByThemeTermplan byThemeTermplan) {
startPage();
List<ByThemeTermplan> list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByThemeTermplan> list = null;
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeTermplan.setClassid(classId);
}
list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
return getDataTable(list);
}
@ -104,11 +111,13 @@ public class ByThemeTermplanController extends BaseController {
byThemeTermplanitem = new ByThemeTermplanitem();
byThemeTermplanitem.setTpid(uuid);
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
//月份加1
Calendar calendar = Calendar.getInstance();
calendar.setTime(byThemeTermplan.getStartmonth());
calendar.add(Calendar.MONTH, i);
byThemeTermplanitem.setMonth(calendar.getTime());
// //月份加1
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(byThemeTermplan.getStartmonth());
// calendar.add(Calendar.MONTH, i);
byThemeTermplanitem.setMonth(schoolCommon.DateAddMonths(i, byThemeTermplan.getStartmonth()));
//创建时间
byThemeTermplanitem.setCreateTime(new Date());
@ -118,7 +127,7 @@ public class ByThemeTermplanController extends BaseController {
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
} else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿");
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
}
}
@ -140,6 +149,28 @@ public class ByThemeTermplanController extends BaseController {
@Log(title = "主题整合学期计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
//首先判断当前id下是否存在子目录
for (int i = 0; i < ids.length; i++) {
ByThemeTermplanitem byThemeTermplanitem = new ByThemeTermplanitem();
byThemeTermplanitem.setTpid(ids[i]);
List<ByThemeTermplanitem> list = byThemeTermplanitemService.selectByThemeTermplanitemList(byThemeTermplanitem);
if (list != null && list.size() > 0) {
return AjaxResult.error("选中的计划下存在子计划,无法删除");
}
}
return toAjax(byThemeTermplanService.deleteByThemeTermplanByIds(ids));
}
/**
* 提交主题整合学期计划
*/
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:edit')")
@Log(title = "主题整合学期计划", businessType = BusinessType.UPDATE)
@PostMapping("/check/{id}")
public AjaxResult check(@PathVariable String id) {
ByThemeTermplan byThemeTermplan = new ByThemeTermplan();
byThemeTermplan.setId(id);
byThemeTermplan.setStatus("1");
return toAjax(byThemeTermplanService.updateByThemeTermplan(byThemeTermplan));
}
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.project.benyi.controller;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -72,6 +73,7 @@ public class ByThemeTermplanitemController extends BaseController {
@Log(title = "主题整合学期计划明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeTermplanitem byThemeTermplanitem) {
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeTermplanitemService.insertByThemeTermplanitem(byThemeTermplanitem));
}

View File

@ -0,0 +1,214 @@
package com.ruoyi.project.benyi.controller;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
import com.ruoyi.project.benyi.domain.ByThemeWeekplanitem;
import com.ruoyi.project.benyi.service.IByThemeMonthplanService;
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
import com.ruoyi.project.benyi.service.IByThemeWeekplanitemService;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService;
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.ByThemeWeekplan;
import com.ruoyi.project.benyi.service.IByThemeWeekplanService;
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-08-26
*/
@RestController
@RequestMapping("/benyi/themeweekplan")
public class ByThemeWeekplanController extends BaseController {
@Autowired
private IByThemeWeekplanService byThemeWeekplanService;
@Autowired
private SchoolCommon schoolCommon;
@Autowired
private IByClassService byClassService;
@Autowired
private IByThemeMonthplanService byThemeMonthplanService;
@Autowired
private IByThemeMonthplanitemService byThemeonthplanitemService;
@Autowired
private IByThemeWeekplanitemService byThemeWeekplanitemService;
/**
* 查询主题整合周计划根据月计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeWeekplan byThemeWeekplan) {
startPage();
byThemeWeekplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByThemeWeekplan> list = null;
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeWeekplan.setClassid(classId);
}
list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
return getDataTable(list);
}
/**
* 导出主题整合周计划根据月计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:export')")
@Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeWeekplan byThemeWeekplan) {
List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
ExcelUtil<ByThemeWeekplan> util = new ExcelUtil<ByThemeWeekplan>(ByThemeWeekplan.class);
return util.exportExcel(list, "weekplan");
}
/**
* 获取主题整合周计划根据月计划明细详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byThemeWeekplanService.selectByThemeWeekplanById(id));
}
/**
* 新增主题整合周计划根据月计划明细
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:add')")
@Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeWeekplan byThemeWeekplan) {
String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
//判断当前班级是否创建月计划
ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan();
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
byThemeMonthplan.setClassid(classId);
byThemeMonthplan.setXnxq(byThemeWeekplan.getXnxq());
byThemeMonthplan.setMonth(byThemeWeekplan.getMonth());
byThemeMonthplan.setStatus("2");
List<ByThemeMonthplan> list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
int iCount = 0;
if (list != null && list.size() > 0) {
//循环月计划查找周详情
for (int i = 0; i < list.size(); i++) {
String mpid = list.get(i).getId();
ByThemeMonthplanitem byThemeMonthplanitem = new ByThemeMonthplanitem();
byThemeMonthplanitem.setMpid(mpid);
byThemeMonthplanitem.setZc(byThemeWeekplan.getZc());
List<ByThemeMonthplanitem> listItem = byThemeonthplanitemService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
for (int j = 0; j < listItem.size(); j++) {
iCount = iCount + (j + 1);
}
}
} else {
return AjaxResult.error("当前班级未制定月计划或月计划未审批,无法创建周计划");
}
if (iCount <= 0) {
return AjaxResult.error("当前班级未设置月份明细计划,无法创建周计划");
}
String uuid = schoolCommon.getUuid();
byThemeWeekplan.setId(uuid);
byThemeWeekplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合周计划" + "(第" + byThemeWeekplan.getZc() + "周)");
byThemeWeekplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
byThemeWeekplan.setClassid(classId);
byThemeWeekplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
if (list != null && list.size() > 0) {
//循环月计划查找周详情
for (int i = 0; i < list.size(); i++) {
String mpid = list.get(i).getId();
ByThemeMonthplanitem byThemeMonthplanitem = new ByThemeMonthplanitem();
byThemeMonthplanitem.setMpid(mpid);
byThemeMonthplanitem.setZc(byThemeWeekplan.getZc());
List<ByThemeMonthplanitem> listItem = byThemeonthplanitemService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
for (int j = 0; j < listItem.size(); j++) {
SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy-MM-dd");
Date dtStart = listItem.get(j).getStarttime();
Date dtEnd = listItem.get(j).getEndtime();
long day = (dtEnd.getTime() - dtStart.getTime()) / (24 * 60 * 60 * 1000) + 1;
System.out.println("day=" + day);
ByThemeWeekplanitem byThemeWeekplanitem = null;
for (int g = 0; g < day; g++) {
byThemeWeekplanitem = new ByThemeWeekplanitem();
byThemeWeekplanitem.setDaytime(schoolCommon.DateAddDays(g, listItem.get(j).getStarttime()));
byThemeWeekplanitem.setZhou(Long.valueOf(schoolCommon.dateToWeek(byThemeWeekplanitem.getDaytime())));
byThemeWeekplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byThemeWeekplanitem.setWpid(uuid);
byThemeWeekplanitemService.insertByThemeWeekplanitem(byThemeWeekplanitem);
}
}
}
}
return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan));
} else {
return AjaxResult.error("当前用户非幼儿园教师,无法创建周计划");
}
}
/**
* 修改主题整合周计划根据月计划明细
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:edit')")
@Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeWeekplan byThemeWeekplan) {
return toAjax(byThemeWeekplanService.updateByThemeWeekplan(byThemeWeekplan));
}
/**
* 删除主题整合周计划根据月计划明细
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:remove')")
@Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids));
}
/**
* 提交主题整合学期计划
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:edit')")
@Log(title = "主题整合周计划", businessType = BusinessType.UPDATE)
@PostMapping("/check/{id}")
public AjaxResult check(@PathVariable String id) {
ByThemeWeekplan byThemeWeekplan = new ByThemeWeekplan();
byThemeWeekplan.setId(id);
byThemeWeekplan.setStatus("1");
return toAjax(byThemeWeekplanService.updateByThemeWeekplan(byThemeWeekplan));
}
}

View File

@ -0,0 +1,97 @@
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.ByThemeWeekplanitem;
import com.ruoyi.project.benyi.service.IByThemeWeekplanitemService;
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-08-26
*/
@RestController
@RequestMapping("/benyi/themeweekplanitem")
public class ByThemeWeekplanitemController extends BaseController {
@Autowired
private IByThemeWeekplanitemService byThemeWeekplanitemService;
/**
* 查询主题整合周计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeWeekplanitem byThemeWeekplanitem) {
startPage();
List<ByThemeWeekplanitem> list = byThemeWeekplanitemService.selectByThemeWeekplanitemList(byThemeWeekplanitem);
return getDataTable(list);
}
/**
* 导出主题整合周计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:export')")
@Log(title = "主题整合周计划明细", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeWeekplanitem byThemeWeekplanitem) {
List<ByThemeWeekplanitem> list = byThemeWeekplanitemService.selectByThemeWeekplanitemList(byThemeWeekplanitem);
ExcelUtil<ByThemeWeekplanitem> util = new ExcelUtil<ByThemeWeekplanitem>(ByThemeWeekplanitem.class);
return util.exportExcel(list, "weekplanitem");
}
/**
* 获取主题整合周计划明细详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byThemeWeekplanitemService.selectByThemeWeekplanitemById(id));
}
/**
* 新增主题整合周计划明细
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:add')")
@Log(title = "主题整合周计划明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeWeekplanitem byThemeWeekplanitem) {
return toAjax(byThemeWeekplanitemService.insertByThemeWeekplanitem(byThemeWeekplanitem));
}
/**
* 修改主题整合周计划明细
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:edit')")
@Log(title = "主题整合周计划明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeWeekplanitem byThemeWeekplanitem) {
return toAjax(byThemeWeekplanitemService.updateByThemeWeekplanitem(byThemeWeekplanitem));
}
/**
* 删除主题整合周计划明细
*/
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:remove')")
@Log(title = "主题整合周计划明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byThemeWeekplanitemService.deleteByThemeWeekplanitemByIds(ids));
}
}

View File

@ -20,7 +20,7 @@ public class ByPlanweek extends BaseEntity {
/**
* 编号
*/
private Long id;
private String id;
/**
* 学校id
@ -115,11 +115,19 @@ public class ByPlanweek extends BaseEntity {
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date shtime;
public void setId(Long id) {
/**
* 审核意见
*/
@Excel(name = "审核意见")
private String shyj;
public void setId(String id) {
this.id = id;
}
public Long getId() {
public String getId() {
return id;
}
@ -263,6 +271,15 @@ public class ByPlanweek extends BaseEntity {
.append("status", getStatus())
.append("shrid", getShrid())
.append("shtime", getShtime())
.append("shyj", getShyj())
.toString();
}
public String getShyj() {
return shyj;
}
public void setShyj(String shyj) {
this.shyj = shyj;
}
}

View File

@ -12,7 +12,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
* 周计划(家长和教育部门细化)对象 by_planweekitem
*
* @author tsbz
* @date 2020-08-24
* @date 2020-08-27
*/
public class ByPlanweekitem extends BaseEntity {
private static final long serialVersionUID = 1L;
@ -26,7 +26,7 @@ public class ByPlanweekitem extends BaseEntity {
* 所属计划
*/
@Excel(name = "所属计划")
private Long wid;
private String wid;
/**
* 活动类型
@ -67,11 +67,11 @@ public class ByPlanweekitem extends BaseEntity {
return id;
}
public void setWid(Long wid) {
public void setWid(String wid) {
this.wid = wid;
}
public Long getWid() {
public String getWid() {
return wid;
}

View File

@ -1,5 +1,8 @@
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;
@ -9,7 +12,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
* 主题整合月计划对象 by_theme_monthplan
*
* @author tsbz
* @date 2020-08-17
* @date 2020-08-25
*/
public class ByThemeMonthplan extends BaseEntity {
private static final long serialVersionUID = 1L;
@ -17,7 +20,7 @@ public class ByThemeMonthplan extends BaseEntity {
/**
* 编号
*/
private Long id;
private String id;
/**
* 计划名称
@ -25,6 +28,12 @@ public class ByThemeMonthplan extends BaseEntity {
@Excel(name = "计划名称")
private String name;
/**
* 所属学校
*/
@Excel(name = "所属学校")
private Long schoolid;
/**
* 所属班级
*/
@ -40,8 +49,9 @@ public class ByThemeMonthplan extends BaseEntity {
/**
* 计划月份
*/
@Excel(name = "计划月份")
private String month;
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "计划月份", width = 30, dateFormat = "yyyy-MM")
private Date month;
/**
* 本月主题
@ -55,6 +65,12 @@ public class ByThemeMonthplan extends BaseEntity {
@Excel(name = "本月自定义主题")
private String selfthemes;
/**
* 微型课程
*/
@Excel(name = "微型课程")
private String wxkc;
/**
* 家长支持
*/
@ -73,11 +89,36 @@ public class ByThemeMonthplan extends BaseEntity {
@Excel(name = "创建人")
private Long createuserid;
public void setId(Long id) {
/**
* 审批人
*/
@Excel(name = "审批人")
private Long spr;
/**
* 审批时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date sptime;
/**
* 审批意见
*/
@Excel(name = "审批意见")
private String spyj;
/**
* 当前状态
*/
@Excel(name = "当前状态")
private String status;
public void setId(String id) {
this.id = id;
}
public Long getId() {
public String getId() {
return id;
}
@ -89,6 +130,14 @@ public class ByThemeMonthplan extends BaseEntity {
return name;
}
public void setSchoolid(Long schoolid) {
this.schoolid = schoolid;
}
public Long getSchoolid() {
return schoolid;
}
public void setClassid(String classid) {
this.classid = classid;
}
@ -105,11 +154,11 @@ public class ByThemeMonthplan extends BaseEntity {
return xnxq;
}
public void setMonth(String month) {
public void setMonth(Date month) {
this.month = month;
}
public String getMonth() {
public Date getMonth() {
return month;
}
@ -129,6 +178,14 @@ public class ByThemeMonthplan extends BaseEntity {
return selfthemes;
}
public void setWxkc(String wxkc) {
this.wxkc = wxkc;
}
public String getWxkc() {
return wxkc;
}
public void setSupport(String support) {
this.support = support;
}
@ -153,20 +210,58 @@ public class ByThemeMonthplan extends BaseEntity {
return createuserid;
}
public void setSpr(Long spr) {
this.spr = spr;
}
public Long getSpr() {
return spr;
}
public void setSptime(Date sptime) {
this.sptime = sptime;
}
public Date getSptime() {
return sptime;
}
public void setSpyj(String spyj) {
this.spyj = spyj;
}
public String getSpyj() {
return spyj;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("schoolid", getSchoolid())
.append("classid", getClassid())
.append("xnxq", getXnxq())
.append("month", getMonth())
.append("themes", getThemes())
.append("selfthemes", getSelfthemes())
.append("wxkc", getWxkc())
.append("support", getSupport())
.append("remarks", getRemarks())
.append("createuserid", getCreateuserid())
.append("createTime", getCreateTime())
.append("spr", getSpr())
.append("sptime", getSptime())
.append("spyj", getSpyj())
.append("status", getStatus())
.toString();
}
}

View File

@ -0,0 +1,147 @@
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_theme_weekplan
*
* @author tsbz
* @date 2020-08-25
*/
public class ByThemeMonthplanitem extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String id;
/**
* 所属月计划
*/
@Excel(name = "所属月计划")
private String mpid;
/**
* 周次
*/
@Excel(name = "周次")
private Long zc;
/**
* 开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date starttime;
/**
* 结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endtime;
/**
* 活动id
*/
@Excel(name = "活动id")
private String activityid;
/**
* 家长支持
*/
@Excel(name = "家长支持")
private String jzzc;
/**
* 创建人
*/
@Excel(name = "创建人")
private Long createuserid;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setMpid(String mpid) {
this.mpid = mpid;
}
public String getMpid() {
return mpid;
}
public void setZc(Long zc) {
this.zc = zc;
}
public Long getZc() {
return zc;
}
public void setStarttime(Date starttime) {
this.starttime = starttime;
}
public Date getStarttime() {
return starttime;
}
public void setEndtime(Date endtime) {
this.endtime = endtime;
}
public Date getEndtime() {
return endtime;
}
public void setActivityid(String activityid) {
this.activityid = activityid;
}
public String getActivityid() {
return activityid;
}
public void setJzzc(String jzzc) {
this.jzzc = jzzc;
}
public String getJzzc() {
return jzzc;
}
public void setCreateuserid(Long createuserid) {
this.createuserid = createuserid;
}
public Long getCreateuserid() {
return createuserid;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("mpid", getMpid())
.append("zc", getZc())
.append("starttime", getStarttime())
.append("endtime", getEndtime())
.append("activityid", getActivityid())
.append("jzzc", getJzzc())
.append("createuserid", getCreateuserid())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,208 @@
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_theme_weekplan
*
* @author tsbz
* @date 2020-08-26
*/
public class ByThemeWeekplan extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String id;
/**
* 名称
*/
@Excel(name = "名称")
private String name;
/**
* 学校id
*/
@Excel(name = "学校id")
private Long schoolid;
/**
* 班级编号
*/
@Excel(name = "班级编号")
private String classid;
/**
* 所属月份
*/
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "所属月份", width = 30, dateFormat = "yyyy-MM")
private Date month;
/**
* 所属周
*/
@Excel(name = "所属周")
private Long zc;
/**
* 状态
*/
@Excel(name = "状态")
private String status;
/**
* 审批人
*/
@Excel(name = "审批人")
private Long spr;
/**
* 审批时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date sptime;
/**
* 审核意见
*/
@Excel(name = "审核意见")
private String shyj;
/**
* 创建人
*/
@Excel(name = "创建人")
private Long createuserid;
/**
* 学年学期
*/
@Excel(name = "学年学期")
private String xnxq;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setSchoolid(Long schoolid) {
this.schoolid = schoolid;
}
public Long getSchoolid() {
return schoolid;
}
public void setClassid(String classid) {
this.classid = classid;
}
public String getClassid() {
return classid;
}
public void setMonth(Date month) {
this.month = month;
}
public Date getMonth() {
return month;
}
public void setZc(Long zc) {
this.zc = zc;
}
public Long getZc() {
return zc;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setSpr(Long spr) {
this.spr = spr;
}
public Long getSpr() {
return spr;
}
public void setSptime(Date sptime) {
this.sptime = sptime;
}
public Date getSptime() {
return sptime;
}
public void setShyj(String shyj) {
this.shyj = shyj;
}
public String getShyj() {
return shyj;
}
public void setCreateuserid(Long createuserid) {
this.createuserid = createuserid;
}
public Long getCreateuserid() {
return createuserid;
}
public void setXnxq(String xnxq) {
this.xnxq = xnxq;
}
public String getXnxq() {
return xnxq;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("schoolid", getSchoolid())
.append("classid", getClassid())
.append("month", getMonth())
.append("zc", getZc())
.append("remark", getRemark())
.append("status", getStatus())
.append("spr", getSpr())
.append("sptime", getSptime())
.append("shyj", getShyj())
.append("createuserid", getCreateuserid())
.append("createTime", getCreateTime())
.append("xnxq", getXnxq())
.toString();
}
}

View File

@ -0,0 +1,162 @@
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_theme_weekplanitem
*
* @author tsbz
* @date 2020-08-26
*/
public class ByThemeWeekplanitem extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private Long id;
/**
* 日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date daytime;
/**
*
*/
@Excel(name = "")
private Long zhou;
/**
* 活动
*/
@Excel(name = "活动")
private String activityid;
/**
* 分组性质
*/
@Excel(name = "分组性质")
private String fzxz;
/**
* 家长支持
*/
@Excel(name = "家长支持")
private String jzzc;
/**
* 创建人
*/
@Excel(name = "创建人")
private Long createuserid;
/**
* 修改人
*/
@Excel(name = "修改人")
private Long updateuserid;
/**
* 所属周计划
*/
@Excel(name = "所属周计划")
private String wpid;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setDaytime(Date daytime) {
this.daytime = daytime;
}
public Date getDaytime() {
return daytime;
}
public void setZhou(Long zhou) {
this.zhou = zhou;
}
public Long getZhou() {
return zhou;
}
public void setActivityid(String activityid) {
this.activityid = activityid;
}
public String getActivityid() {
return activityid;
}
public void setFzxz(String fzxz) {
this.fzxz = fzxz;
}
public String getFzxz() {
return fzxz;
}
public void setJzzc(String jzzc) {
this.jzzc = jzzc;
}
public String getJzzc() {
return jzzc;
}
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;
}
public void setWpid(String wpid) {
this.wpid = wpid;
}
public String getWpid() {
return wpid;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("daytime", getDaytime())
.append("zhou", getZhou())
.append("activityid", getActivityid())
.append("fzxz", getFzxz())
.append("jzzc", getJzzc())
.append("createuserid", getCreateuserid())
.append("createTime", getCreateTime())
.append("updateuserid", getUpdateuserid())
.append("updateTime", getUpdateTime())
.append("wpid", getWpid())
.toString();
}
}

View File

@ -17,7 +17,7 @@ public interface ByPlanweekMapper
* @param id 周计划(家长和教育部门)ID
* @return 周计划(家长和教育部门)
*/
public ByPlanweek selectByPlanweekById(Long id);
public ByPlanweek selectByPlanweekById(String id);
/**
* 查询周计划(家长和教育部门)列表
@ -49,7 +49,7 @@ public interface ByPlanweekMapper
* @param id 周计划(家长和教育部门)ID
* @return 结果
*/
public int deleteByPlanweekById(Long id);
public int deleteByPlanweekById(String id);
/**
* 批量删除周计划(家长和教育部门)
@ -57,5 +57,5 @@ public interface ByPlanweekMapper
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByPlanweekByIds(Long[] ids);
public int deleteByPlanweekByIds(String[] ids);
}

View File

@ -7,7 +7,7 @@ import com.ruoyi.project.benyi.domain.ByPlanweekitem;
* 周计划(家长和教育部门细化)Mapper接口
*
* @author tsbz
* @date 2020-08-24
* @date 2020-08-27
*/
public interface ByPlanweekitemMapper
{

View File

@ -58,4 +58,12 @@ public interface ByThemeActivityMapper {
* @return 结果
*/
public int deleteByThemeActivityByIds(Long[] ids);
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids);
}

View File

@ -8,7 +8,7 @@ import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
* 主题整合月计划Mapper接口
*
* @author tsbz
* @date 2020-08-17
* @date 2020-08-25
*/
public interface ByThemeMonthplanMapper {
/**
@ -17,7 +17,7 @@ public interface ByThemeMonthplanMapper {
* @param id 主题整合月计划ID
* @return 主题整合月计划
*/
public ByThemeMonthplan selectByThemeMonthplanById(Long id);
public ByThemeMonthplan selectByThemeMonthplanById(String id);
/**
* 查询主题整合月计划列表
@ -49,7 +49,7 @@ public interface ByThemeMonthplanMapper {
* @param id 主题整合月计划ID
* @return 结果
*/
public int deleteByThemeMonthplanById(Long id);
public int deleteByThemeMonthplanById(String id);
/**
* 批量删除主题整合月计划
@ -57,5 +57,5 @@ public interface ByThemeMonthplanMapper {
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeMonthplanByIds(Long[] ids);
public int deleteByThemeMonthplanByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
/**
* 主题整合周计划Mapper接口
*
* @author tsbz
* @date 2020-08-25
*/
public interface ByThemeMonthplanitemMapper {
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id);
/**
* 查询主题整合周计划列表
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 主题整合周计划集合
*/
public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 新增主题整合周计划
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 修改主题整合周计划
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 删除主题整合周计划
*
* @param id 主题整合周计划ID
* @return 结果
*/
public int deleteByThemeMonthplanitemById(String id);
/**
* 批量删除主题整合周计划
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeMonthplanitemByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
/**
* 主题整合周计划根据月计划明细Mapper接口
*
* @author tsbz
* @date 2020-08-26
*/
public interface ByThemeWeekplanMapper {
/**
* 查询主题整合周计划根据月计划明细
*
* @param id 主题整合周计划根据月计划明细ID
* @return 主题整合周计划根据月计划明细
*/
public ByThemeWeekplan selectByThemeWeekplanById(String id);
/**
* 查询主题整合周计划根据月计划明细列表
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 主题整合周计划根据月计划明细集合
*/
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan);
/**
* 新增主题整合周计划根据月计划明细
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 结果
*/
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 修改主题整合周计划根据月计划明细
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 结果
*/
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 删除主题整合周计划根据月计划明细
*
* @param id 主题整合周计划根据月计划明细ID
* @return 结果
*/
public int deleteByThemeWeekplanById(String id);
/**
* 批量删除主题整合周计划根据月计划明细
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeWeekplanByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplanitem;
/**
* 主题整合周计划明细Mapper接口
*
* @author tsbz
* @date 2020-08-26
*/
public interface ByThemeWeekplanitemMapper {
/**
* 查询主题整合周计划明细
*
* @param id 主题整合周计划明细ID
* @return 主题整合周计划明细
*/
public ByThemeWeekplanitem selectByThemeWeekplanitemById(Long id);
/**
* 查询主题整合周计划明细列表
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 主题整合周计划明细集合
*/
public List<ByThemeWeekplanitem> selectByThemeWeekplanitemList(ByThemeWeekplanitem byThemeWeekplanitem);
/**
* 新增主题整合周计划明细
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 结果
*/
public int insertByThemeWeekplanitem(ByThemeWeekplanitem byThemeWeekplanitem);
/**
* 修改主题整合周计划明细
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 结果
*/
public int updateByThemeWeekplanitem(ByThemeWeekplanitem byThemeWeekplanitem);
/**
* 删除主题整合周计划明细
*
* @param id 主题整合周计划明细ID
* @return 结果
*/
public int deleteByThemeWeekplanitemById(Long id);
/**
* 批量删除主题整合周计划明细
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeWeekplanitemByIds(Long[] ids);
}

View File

@ -17,7 +17,7 @@ public interface IByPlanweekService {
* @param id 周计划(家长和教育部门)ID
* @return 周计划(家长和教育部门)
*/
public ByPlanweek selectByPlanweekById(Long id);
public ByPlanweek selectByPlanweekById(String id);
/**
* 查询周计划(家长和教育部门)列表
@ -49,7 +49,7 @@ public interface IByPlanweekService {
* @param ids 需要删除的周计划(家长和教育部门)ID
* @return 结果
*/
public int deleteByPlanweekByIds(Long[] ids);
public int deleteByPlanweekByIds(String[] ids);
/**
* 删除周计划(家长和教育部门)信息
@ -57,5 +57,5 @@ public interface IByPlanweekService {
* @param id 周计划(家长和教育部门)ID
* @return 结果
*/
public int deleteByPlanweekById(Long id);
public int deleteByPlanweekById(String id);
}

View File

@ -1,16 +1,16 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByPlanweekitem;
/**
* 周计划(家长和教育部门细化)Service接口
*
* @author tsbz
* @date 2020-08-24
* @date 2020-08-27
*/
public interface IByPlanweekitemService {
public interface IByPlanweekitemService
{
/**
* 查询周计划(家长和教育部门细化)
*

View File

@ -58,4 +58,12 @@ public interface IByThemeActivityService {
* @return 结果
*/
public int deleteByThemeActivityById(Long id);
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids);
}

View File

@ -8,7 +8,7 @@ import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
* 主题整合月计划Service接口
*
* @author tsbz
* @date 2020-08-17
* @date 2020-08-25
*/
public interface IByThemeMonthplanService {
/**
@ -17,7 +17,7 @@ public interface IByThemeMonthplanService {
* @param id 主题整合月计划ID
* @return 主题整合月计划
*/
public ByThemeMonthplan selectByThemeMonthplanById(Long id);
public ByThemeMonthplan selectByThemeMonthplanById(String id);
/**
* 查询主题整合月计划列表
@ -49,7 +49,7 @@ public interface IByThemeMonthplanService {
* @param ids 需要删除的主题整合月计划ID
* @return 结果
*/
public int deleteByThemeMonthplanByIds(Long[] ids);
public int deleteByThemeMonthplanByIds(String[] ids);
/**
* 删除主题整合月计划信息
@ -57,5 +57,5 @@ public interface IByThemeMonthplanService {
* @param id 主题整合月计划ID
* @return 结果
*/
public int deleteByThemeMonthplanById(Long id);
public int deleteByThemeMonthplanById(String id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
/**
* 主题整合周计划Service接口
*
* @author tsbz
* @date 2020-08-25
*/
public interface IByThemeMonthplanitemService {
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id);
/**
* 查询主题整合周计划列表
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 主题整合周计划集合
*/
public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 新增主题整合周计划
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 修改主题整合周计划
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 批量删除主题整合周计划
*
* @param ids 需要删除的主题整合周计划ID
* @return 结果
*/
public int deleteByThemeMonthplanitemByIds(String[] ids);
/**
* 删除主题整合周计划信息
*
* @param id 主题整合周计划ID
* @return 结果
*/
public int deleteByThemeMonthplanitemById(String id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
/**
* 主题整合周计划根据月计划明细Service接口
*
* @author tsbz
* @date 2020-08-26
*/
public interface IByThemeWeekplanService {
/**
* 查询主题整合周计划根据月计划明细
*
* @param id 主题整合周计划根据月计划明细ID
* @return 主题整合周计划根据月计划明细
*/
public ByThemeWeekplan selectByThemeWeekplanById(String id);
/**
* 查询主题整合周计划根据月计划明细列表
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 主题整合周计划根据月计划明细集合
*/
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan);
/**
* 新增主题整合周计划根据月计划明细
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 结果
*/
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 修改主题整合周计划根据月计划明细
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 结果
*/
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 批量删除主题整合周计划根据月计划明细
*
* @param ids 需要删除的主题整合周计划根据月计划明细ID
* @return 结果
*/
public int deleteByThemeWeekplanByIds(String[] ids);
/**
* 删除主题整合周计划根据月计划明细信息
*
* @param id 主题整合周计划根据月计划明细ID
* @return 结果
*/
public int deleteByThemeWeekplanById(String id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplanitem;
/**
* 主题整合周计划明细Service接口
*
* @author tsbz
* @date 2020-08-26
*/
public interface IByThemeWeekplanitemService {
/**
* 查询主题整合周计划明细
*
* @param id 主题整合周计划明细ID
* @return 主题整合周计划明细
*/
public ByThemeWeekplanitem selectByThemeWeekplanitemById(Long id);
/**
* 查询主题整合周计划明细列表
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 主题整合周计划明细集合
*/
public List<ByThemeWeekplanitem> selectByThemeWeekplanitemList(ByThemeWeekplanitem byThemeWeekplanitem);
/**
* 新增主题整合周计划明细
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 结果
*/
public int insertByThemeWeekplanitem(ByThemeWeekplanitem byThemeWeekplanitem);
/**
* 修改主题整合周计划明细
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 结果
*/
public int updateByThemeWeekplanitem(ByThemeWeekplanitem byThemeWeekplanitem);
/**
* 批量删除主题整合周计划明细
*
* @param ids 需要删除的主题整合周计划明细ID
* @return 结果
*/
public int deleteByThemeWeekplanitemByIds(Long[] ids);
/**
* 删除主题整合周计划明细信息
*
* @param id 主题整合周计划明细ID
* @return 结果
*/
public int deleteByThemeWeekplanitemById(Long id);
}

View File

@ -27,7 +27,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
* @return 周计划(家长和教育部门)
*/
@Override
public ByPlanweek selectByPlanweekById(Long id) {
public ByPlanweek selectByPlanweekById(String id) {
return byPlanweekMapper.selectByPlanweekById(id);
}
@ -72,7 +72,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
* @return 结果
*/
@Override
public int deleteByPlanweekByIds(Long[] ids) {
public int deleteByPlanweekByIds(String[] ids) {
return byPlanweekMapper.deleteByPlanweekByIds(ids);
}
@ -83,7 +83,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
* @return 结果
*/
@Override
public int deleteByPlanweekById(Long id) {
public int deleteByPlanweekById(String id) {
return byPlanweekMapper.deleteByPlanweekById(id);
}
}

View File

@ -1,9 +1,8 @@
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 com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.benyi.mapper.ByPlanweekitemMapper;
import com.ruoyi.project.benyi.domain.ByPlanweekitem;
@ -13,10 +12,11 @@ import com.ruoyi.project.benyi.service.IByPlanweekitemService;
* 周计划(家长和教育部门细化)Service业务层处理
*
* @author tsbz
* @date 2020-08-24
* @date 2020-08-27
*/
@Service
public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
public class ByPlanweekitemServiceImpl implements IByPlanweekitemService
{
@Autowired
private ByPlanweekitemMapper byPlanweekitemMapper;
@ -27,7 +27,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
* @return 周计划(家长和教育部门细化)
*/
@Override
public ByPlanweekitem selectByPlanweekitemById(Long id) {
public ByPlanweekitem selectByPlanweekitemById(Long id)
{
return byPlanweekitemMapper.selectByPlanweekitemById(id);
}
@ -38,7 +39,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
* @return 周计划(家长和教育部门细化)
*/
@Override
public List<ByPlanweekitem> selectByPlanweekitemList(ByPlanweekitem byPlanweekitem) {
public List<ByPlanweekitem> selectByPlanweekitemList(ByPlanweekitem byPlanweekitem)
{
return byPlanweekitemMapper.selectByPlanweekitemList(byPlanweekitem);
}
@ -49,7 +51,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
* @return 结果
*/
@Override
public int insertByPlanweekitem(ByPlanweekitem byPlanweekitem) {
public int insertByPlanweekitem(ByPlanweekitem byPlanweekitem)
{
byPlanweekitem.setCreateTime(DateUtils.getNowDate());
return byPlanweekitemMapper.insertByPlanweekitem(byPlanweekitem);
}
@ -61,7 +64,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
* @return 结果
*/
@Override
public int updateByPlanweekitem(ByPlanweekitem byPlanweekitem) {
public int updateByPlanweekitem(ByPlanweekitem byPlanweekitem)
{
byPlanweekitem.setUpdateTime(DateUtils.getNowDate());
return byPlanweekitemMapper.updateByPlanweekitem(byPlanweekitem);
}
@ -73,7 +77,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
* @return 结果
*/
@Override
public int deleteByPlanweekitemByIds(Long[] ids) {
public int deleteByPlanweekitemByIds(Long[] ids)
{
return byPlanweekitemMapper.deleteByPlanweekitemByIds(ids);
}
@ -84,7 +89,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
* @return 结果
*/
@Override
public int deleteByPlanweekitemById(Long id) {
public int deleteByPlanweekitemById(Long id)
{
return byPlanweekitemMapper.deleteByPlanweekitemById(id);
}
}

View File

@ -86,4 +86,15 @@ public class ByThemeActivityServiceImpl implements IByThemeActivityService {
public int deleteByThemeActivityById(Long id) {
return byThemeActivityMapper.deleteByThemeActivityById(id);
}
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
@Override
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids){
return byThemeActivityMapper.selectByThemeActivityByThemeIds(ids);
}
}

View File

@ -13,7 +13,7 @@ import com.ruoyi.project.benyi.service.IByThemeMonthplanService;
* 主题整合月计划Service业务层处理
*
* @author tsbz
* @date 2020-08-17
* @date 2020-08-25
*/
@Service
public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
@ -27,7 +27,7 @@ public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
* @return 主题整合月计划
*/
@Override
public ByThemeMonthplan selectByThemeMonthplanById(Long id) {
public ByThemeMonthplan selectByThemeMonthplanById(String id) {
return byThemeMonthplanMapper.selectByThemeMonthplanById(id);
}
@ -72,7 +72,7 @@ public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
* @return 结果
*/
@Override
public int deleteByThemeMonthplanByIds(Long[] ids) {
public int deleteByThemeMonthplanByIds(String[] ids) {
return byThemeMonthplanMapper.deleteByThemeMonthplanByIds(ids);
}
@ -83,7 +83,7 @@ public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
* @return 结果
*/
@Override
public int deleteByThemeMonthplanById(Long id) {
public int deleteByThemeMonthplanById(String id) {
return byThemeMonthplanMapper.deleteByThemeMonthplanById(id);
}
}

View File

@ -0,0 +1,89 @@
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.ByThemeMonthplanitemMapper;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
/**
* 主题整合周计划Service业务层处理
*
* @author tsbz
* @date 2020-08-25
*/
@Service
public class ByThemeMonthplanitemServiceImpl implements IByThemeMonthplanitemService {
@Autowired
private ByThemeMonthplanitemMapper byThemeMonthplanitemMapper;
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
@Override
public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id) {
return byThemeMonthplanitemMapper.selectByThemeMonthplanitemById(id);
}
/**
* 查询主题整合周计划列表
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 主题整合周计划
*/
@Override
public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem) {
return byThemeMonthplanitemMapper.selectByThemeMonthplanitemList(byThemeMonthplanitem);
}
/**
* 新增主题整合周计划
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
@Override
public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem) {
byThemeMonthplanitem.setCreateTime(DateUtils.getNowDate());
return byThemeMonthplanitemMapper.insertByThemeMonthplanitem(byThemeMonthplanitem);
}
/**
* 修改主题整合周计划
*
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
@Override
public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem) {
return byThemeMonthplanitemMapper.updateByThemeMonthplanitem(byThemeMonthplanitem);
}
/**
* 批量删除主题整合周计划
*
* @param ids 需要删除的主题整合周计划ID
* @return 结果
*/
@Override
public int deleteByThemeMonthplanitemByIds(String[] ids) {
return byThemeMonthplanitemMapper.deleteByThemeMonthplanitemByIds(ids);
}
/**
* 删除主题整合周计划信息
*
* @param id 主题整合周计划ID
* @return 结果
*/
@Override
public int deleteByThemeMonthplanitemById(String id) {
return byThemeMonthplanitemMapper.deleteByThemeMonthplanitemById(id);
}
}

View File

@ -0,0 +1,89 @@
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.ByThemeWeekplanMapper;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
import com.ruoyi.project.benyi.service.IByThemeWeekplanService;
/**
* 主题整合周计划根据月计划明细Service业务层处理
*
* @author tsbz
* @date 2020-08-26
*/
@Service
public class ByThemeWeekplanServiceImpl implements IByThemeWeekplanService {
@Autowired
private ByThemeWeekplanMapper byThemeWeekplanMapper;
/**
* 查询主题整合周计划根据月计划明细
*
* @param id 主题整合周计划根据月计划明细ID
* @return 主题整合周计划根据月计划明细
*/
@Override
public ByThemeWeekplan selectByThemeWeekplanById(String id) {
return byThemeWeekplanMapper.selectByThemeWeekplanById(id);
}
/**
* 查询主题整合周计划根据月计划明细列表
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 主题整合周计划根据月计划明细
*/
@Override
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan) {
return byThemeWeekplanMapper.selectByThemeWeekplanList(byThemeWeekplan);
}
/**
* 新增主题整合周计划根据月计划明细
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 结果
*/
@Override
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan) {
byThemeWeekplan.setCreateTime(DateUtils.getNowDate());
return byThemeWeekplanMapper.insertByThemeWeekplan(byThemeWeekplan);
}
/**
* 修改主题整合周计划根据月计划明细
*
* @param byThemeWeekplan 主题整合周计划根据月计划明细
* @return 结果
*/
@Override
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan) {
return byThemeWeekplanMapper.updateByThemeWeekplan(byThemeWeekplan);
}
/**
* 批量删除主题整合周计划根据月计划明细
*
* @param ids 需要删除的主题整合周计划根据月计划明细ID
* @return 结果
*/
@Override
public int deleteByThemeWeekplanByIds(String[] ids) {
return byThemeWeekplanMapper.deleteByThemeWeekplanByIds(ids);
}
/**
* 删除主题整合周计划根据月计划明细信息
*
* @param id 主题整合周计划根据月计划明细ID
* @return 结果
*/
@Override
public int deleteByThemeWeekplanById(String id) {
return byThemeWeekplanMapper.deleteByThemeWeekplanById(id);
}
}

View File

@ -0,0 +1,90 @@
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.ByThemeWeekplanitemMapper;
import com.ruoyi.project.benyi.domain.ByThemeWeekplanitem;
import com.ruoyi.project.benyi.service.IByThemeWeekplanitemService;
/**
* 主题整合周计划明细Service业务层处理
*
* @author tsbz
* @date 2020-08-26
*/
@Service
public class ByThemeWeekplanitemServiceImpl implements IByThemeWeekplanitemService {
@Autowired
private ByThemeWeekplanitemMapper byThemeWeekplanitemMapper;
/**
* 查询主题整合周计划明细
*
* @param id 主题整合周计划明细ID
* @return 主题整合周计划明细
*/
@Override
public ByThemeWeekplanitem selectByThemeWeekplanitemById(Long id) {
return byThemeWeekplanitemMapper.selectByThemeWeekplanitemById(id);
}
/**
* 查询主题整合周计划明细列表
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 主题整合周计划明细
*/
@Override
public List<ByThemeWeekplanitem> selectByThemeWeekplanitemList(ByThemeWeekplanitem byThemeWeekplanitem) {
return byThemeWeekplanitemMapper.selectByThemeWeekplanitemList(byThemeWeekplanitem);
}
/**
* 新增主题整合周计划明细
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 结果
*/
@Override
public int insertByThemeWeekplanitem(ByThemeWeekplanitem byThemeWeekplanitem) {
byThemeWeekplanitem.setCreateTime(DateUtils.getNowDate());
return byThemeWeekplanitemMapper.insertByThemeWeekplanitem(byThemeWeekplanitem);
}
/**
* 修改主题整合周计划明细
*
* @param byThemeWeekplanitem 主题整合周计划明细
* @return 结果
*/
@Override
public int updateByThemeWeekplanitem(ByThemeWeekplanitem byThemeWeekplanitem) {
byThemeWeekplanitem.setUpdateTime(DateUtils.getNowDate());
return byThemeWeekplanitemMapper.updateByThemeWeekplanitem(byThemeWeekplanitem);
}
/**
* 批量删除主题整合周计划明细
*
* @param ids 需要删除的主题整合周计划明细ID
* @return 结果
*/
@Override
public int deleteByThemeWeekplanitemByIds(Long[] ids) {
return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemByIds(ids);
}
/**
* 删除主题整合周计划明细信息
*
* @param id 主题整合周计划明细ID
* @return 结果
*/
@Override
public int deleteByThemeWeekplanitemById(Long id) {
return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemById(id);
}
}

View File

@ -3,10 +3,7 @@ package com.ruoyi.project.common;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.web.domain.server.Sys;
import com.ruoyi.project.system.domain.ByClass;
import com.ruoyi.project.system.domain.BySchool;
import com.ruoyi.project.system.domain.SysDept;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.domain.*;
import com.ruoyi.project.system.service.IByClassService;
import com.ruoyi.project.system.service.IBySchoolService;
import com.ruoyi.project.system.service.ISysDeptService;
@ -101,6 +98,7 @@ public class SchoolCommon {
* 判断当前用户是否拥有班级
**/
public String getClassId() {
String strClassId = "-1";
SysUser sysUser = getUser();
ByClass byClass = new ByClass();
//根据用户id来设置主班教师,配班教师,助理教师的教师id
@ -114,8 +112,26 @@ public class SchoolCommon {
//如果实体byclassnew不为空,那么取出它的班级编号
return byClassNew.getBjbh();
} else {
return "";
// //如果为空 确认当前用户的角色是否为班长配班助理实习教师
// List<SysRole> listRole = SecurityUtils.getLoginUser().getUser().getRoles();
// if (listRole != null && listRole.size() > 0) {
// for (int i = 0; i < listRole.size(); i++) {
// System.out.println(listRole.get(i).getRoleId() == (102));
// //为班长配班助理实习教师
// if (listRole.get(i).getRoleId() == 102 || listRole.get(i).getRoleId() == 104 || listRole.get(i).getRoleId() == 105 || listRole.get(i).getRoleId() == 105) {
// System.out.println("未设置当前账户所在班级");
// strClassId = "-1";
// } else {
// strClassId = "";
// break;
// }
// }
// } else {
// //没设置角色
// strClassId = "-1";
// }
}
return "";
}
public String getCurrentXnXq() {
@ -187,4 +203,41 @@ public class SchoolCommon {
int month = (end.get(Calendar.YEAR) - start.get(Calendar.YEAR)) * 12;
return Math.abs(month + result);
}
//日期加天数
public Date DateAddDays(int iday, Date dt) {
//天数加1
Calendar calendar = Calendar.getInstance();
calendar.setTime(dt);
calendar.add(Calendar.DAY_OF_MONTH, iday);
return calendar.getTime();
}
//月份加数
public Date DateAddMonths(int iday, Date dt) {
//天数加1
Calendar calendar = Calendar.getInstance();
calendar.setTime(dt);
calendar.add(Calendar.MONTH, iday);
return calendar.getTime();
}
/**
* 日期转星期
*
* @param datetime
* @return
*/
public int dateToWeek(Date datetime) {
int[] weekDays = {7, 1, 2, 3, 4, 5, 6};
Calendar cal = Calendar.getInstance(); // 获得一个日历
cal.setTime(datetime);
int w = cal.get(Calendar.DAY_OF_WEEK) - 1; // 指示一个星期中的某天
if (w < 0)
w = 0;
return weekDays[w];
}
}

View File

@ -5,6 +5,8 @@ import java.util.List;
import java.util.UUID;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.ByChild;
import com.ruoyi.project.benyi.service.IByChildService;
import com.ruoyi.project.common.SchoolCommon;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -38,6 +40,9 @@ public class ByClassController extends BaseController {
private IByClassService byClassService;
@Autowired
private SchoolCommon schoolCommon;
@Autowired
private IByChildService byChildService;
/**
* 查询班级信息列表
@ -46,7 +51,16 @@ public class ByClassController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(ByClass byClass) {
startPage();
List<ByClass> list = byClassService.selectByClassList(byClass);
List<ByClass> list = null;
String classId = schoolCommon.getClassId();
//如果是幼儿园教师 只显示当前班级
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byClass.setBjbh(classId);
list = byClassService.selectByClassList(byClass);
} else {
list = byClassService.selectByClassList(byClass);
}
return getDataTable(list);
}
@ -190,7 +204,7 @@ public class ByClassController extends BaseController {
public AjaxResult deljs(@PathVariable String bjbhs) {
//首先判断 当前用户是否为学校
if (schoolCommon.isSchool()) {
ByClass byClass=byClassService.selectByClassById(bjbhs);
ByClass byClass = byClassService.selectByClassById(bjbhs);
byClass.setZbjs(null);
byClass.setPbjs(null);
byClass.setZljs(null);
@ -209,6 +223,19 @@ public class ByClassController extends BaseController {
public AjaxResult remove(@PathVariable String[] bjbhs) {
//首先判断 当前用户是否为学校
if (schoolCommon.isSchool()) {
//判断班级下 是否存在幼儿信息
if (bjbhs.length > 0) {
for (int i = 0; i < bjbhs.length; i++) {
ByChild byChild = new ByChild();
byChild.setClassid(bjbhs[i]);
List<ByChild> list = byChildService.selectByChildList(byChild);
if (list != null && list.size() > 0) {
return AjaxResult.error("当前班级存在幼儿信息,无法删除班级");
}
}
}
return toAjax(byClassService.deleteByClassByIds(bjbhs));
}
return AjaxResult.error("当前用户非幼儿园,无法删除班级");

View File

@ -22,10 +22,11 @@
<result property="status" column="status"/>
<result property="shrid" column="shrid"/>
<result property="shtime" column="shtime"/>
<result property="shyj" column="shyj" />
</resultMap>
<sql id="selectByPlanweekVo">
select id, schoolid, classid, name, starttime, endtime, themeofweek, jxmb_sh, jxmb_yy, jxmb_jk, jxmb_kx, jxmb_ys, createuserid, create_time, status, shrid, shtime from by_planweek
select id, schoolid, classid, name, starttime, endtime, themeofweek, jxmb_sh, jxmb_yy, jxmb_jk, jxmb_kx, jxmb_ys, createuserid, create_time, status, shrid, shtime, shyj from by_planweek
</sql>
<select id="selectByPlanweekList" parameterType="ByPlanweek" resultMap="ByPlanweekResult">
@ -46,17 +47,19 @@
<if test="status != null and status != ''">and status = #{status}</if>
<if test="shrid != null ">and shrid = #{shrid}</if>
<if test="shtime != null ">and shtime = #{shtime}</if>
<if test="shyj != null and shyj != ''"> and shyj = #{shyj}</if>
</where>
</select>
<select id="selectByPlanweekById" parameterType="Long" resultMap="ByPlanweekResult">
<select id="selectByPlanweekById" parameterType="String" resultMap="ByPlanweekResult">
<include refid="selectByPlanweekVo"/>
where id = #{id}
</select>
<insert id="insertByPlanweek" parameterType="ByPlanweek" useGeneratedKeys="true" keyProperty="id">
<insert id="insertByPlanweek" parameterType="ByPlanweek" >
insert into by_planweek
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="schoolid != null ">schoolid,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="name != null and name != ''">name,</if>
@ -73,8 +76,10 @@
<if test="status != null and status != ''">status,</if>
<if test="shrid != null ">shrid,</if>
<if test="shtime != null ">shtime,</if>
<if test="shyj != null and shyj != ''">shyj,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="schoolid != null ">#{schoolid},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="name != null and name != ''">#{name},</if>
@ -91,6 +96,7 @@
<if test="status != null and status != ''">#{status},</if>
<if test="shrid != null ">#{shrid},</if>
<if test="shtime != null ">#{shtime},</if>
<if test="shyj != null and shyj != ''">#{shyj},</if>
</trim>
</insert>
@ -113,11 +119,12 @@
<if test="status != null and status != ''">status = #{status},</if>
<if test="shrid != null ">shrid = #{shrid},</if>
<if test="shtime != null ">shtime = #{shtime},</if>
<if test="shyj != null and shyj != ''">shyj = #{shyj},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByPlanweekById" parameterType="Long">
<delete id="deleteByPlanweekById" parameterType="String">
delete from by_planweek where id = #{id}
</delete>

View File

@ -5,15 +5,15 @@
<mapper namespace="com.ruoyi.project.benyi.mapper.ByPlanweekitemMapper">
<resultMap type="ByPlanweekitem" id="ByPlanweekitemResult">
<result property="id" column="id"/>
<result property="wid" column="wid"/>
<result property="activitytype" column="activitytype"/>
<result property="content" column="content"/>
<result property="activitytime" column="activitytime"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
<result property="updateuserid" column="updateuserid"/>
<result property="updateTime" column="update_time"/>
<result property="id" column="id" />
<result property="wid" column="wid" />
<result property="activitytype" column="activitytype" />
<result property="content" column="content" />
<result property="activitytime" column="activitytime" />
<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="selectByPlanweekitemVo">
@ -23,12 +23,12 @@
<select id="selectByPlanweekitemList" parameterType="ByPlanweekitem" resultMap="ByPlanweekitemResult">
<include refid="selectByPlanweekitemVo"/>
<where>
<if test="wid != null ">and wid = #{wid}</if>
<if test="activitytype != null and activitytype != ''">and activitytype = #{activitytype}</if>
<if test="content != null and content != ''">and content = #{content}</if>
<if test="activitytime != null ">and activitytime = #{activitytime}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="updateuserid != null ">and updateuserid = #{updateuserid}</if>
<if test="wid != null and wid != ''"> and wid = #{wid}</if>
<if test="activitytype != null and activitytype != ''"> and activitytype = #{activitytype}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="activitytime != null "> and activitytime = #{activitytime}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="updateuserid != null "> and updateuserid = #{updateuserid}</if>
</where>
</select>
@ -40,7 +40,7 @@
<insert id="insertByPlanweekitem" parameterType="ByPlanweekitem" useGeneratedKeys="true" keyProperty="id">
insert into by_planweekitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wid != null ">wid,</if>
<if test="wid != null and wid != ''">wid,</if>
<if test="activitytype != null and activitytype != ''">activitytype,</if>
<if test="content != null and content != ''">content,</if>
<if test="activitytime != null ">activitytime,</if>
@ -50,7 +50,7 @@
<if test="updateTime != null ">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wid != null ">#{wid},</if>
<if test="wid != null and wid != ''">#{wid},</if>
<if test="activitytype != null and activitytype != ''">#{activitytype},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="activitytime != null ">#{activitytime},</if>
@ -64,7 +64,7 @@
<update id="updateByPlanweekitem" parameterType="ByPlanweekitem">
update by_planweekitem
<trim prefix="SET" suffixOverrides=",">
<if test="wid != null ">wid = #{wid},</if>
<if test="wid != null and wid != ''">wid = #{wid},</if>
<if test="activitytype != null and activitytype != ''">activitytype = #{activitytype},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="activitytime != null ">activitytime = #{activitytime},</if>

View File

@ -1,22 +1,22 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.benyi.mapper.BySchoolcalendarClassMapper">
<resultMap type="BySchoolcalendarClass" id="BySchoolcalendarClassResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="classid" column="classid" />
<result property="xnxq" column="xnxq" />
<result property="deptid" column="deptId" />
<result property="activitytime" column="activitytime" />
<result property="activityendtime" column="activityendtime" />
<result property="stylecolor" column="stylecolor" />
<result property="createuserid" column="createuserid" />
<result property="createtime" column="createtime" />
<association property="byClass" column="bjbh" javaType="ByClass" resultMap="ByClassResult" />
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="type" column="type"/>
<result property="classid" column="classid"/>
<result property="xnxq" column="xnxq"/>
<result property="deptid" column="deptId"/>
<result property="activitytime" column="activitytime"/>
<result property="activityendtime" column="activityendtime"/>
<result property="stylecolor" column="stylecolor"/>
<result property="createuserid" column="createuserid"/>
<result property="createtime" column="createtime"/>
<association property="byClass" column="bjbh" javaType="ByClass" resultMap="ByClassResult"/>
</resultMap>
<resultMap type="ByClass" id="ByClassResult">
@ -44,20 +44,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from by_schoolcalendar_class s, by_class c
</sql>
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult">
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass"
resultMap="BySchoolcalendarClassResult">
<include refid="selectBySchoolcalendarClassVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="classid != null and classid != ''"> and classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''"> and xnxq = #{xnxq}</if>
<if test="deptid != null "> and deptId = #{deptid}</if>
<if test="activitytime != null "> and activitytime = #{activitytime}</if>
<if test="activityendtime != null "> and activityendtime = #{activityendtime}</if>
<if test="stylecolor != null and stylecolor != ''"> and stylecolor = #{stylecolor}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="createtime != null "> and createtime = #{createtime}</if>
</where>
where s.classid=c.bjbh
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''">and type = #{type}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
<if test="deptid != null ">and deptId = #{deptid}</if>
<if test="activitytime != null ">and activitytime = #{activitytime}</if>
<if test="activityendtime != null ">and activityendtime = #{activityendtime}</if>
<if test="stylecolor != null and stylecolor != ''">and stylecolor = #{stylecolor}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="createtime != null ">and createtime = #{createtime}</if>
</select>
<select id="selectBySchoolcalendarClassById" parameterType="Long" resultMap="BySchoolcalendarClassResult">

View File

@ -108,4 +108,13 @@
</foreach>
</delete>
<select id="selectByThemeActivityByThemeIds" parameterType="String" resultMap="ByThemeActivityResult">
<include refid="selectByThemeActivityVo"/>
where themeid in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
order by themeid,sort
</select>
</mapper>

View File

@ -5,68 +5,95 @@
<mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeMonthplanMapper">
<resultMap type="ByThemeMonthplan" id="ByThemeMonthplanResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="classid" column="classid"/>
<result property="xnxq" column="xnxq"/>
<result property="month" column="month"/>
<result property="themes" column="themes"/>
<result property="selfthemes" column="selfthemes"/>
<result property="support" column="support"/>
<result property="remarks" column="remarks"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
<result property="id" column="id" />
<result property="name" column="name" />
<result property="schoolid" column="schoolid" />
<result property="classid" column="classid" />
<result property="xnxq" column="xnxq" />
<result property="month" column="month" />
<result property="themes" column="themes" />
<result property="selfthemes" column="selfthemes" />
<result property="wxkc" column="wxkc" />
<result property="support" column="support" />
<result property="remarks" column="remarks" />
<result property="createuserid" column="createuserid" />
<result property="createTime" column="create_time" />
<result property="spr" column="spr" />
<result property="sptime" column="sptime" />
<result property="spyj" column="spyj" />
<result property="status" column="status" />
</resultMap>
<sql id="selectByThemeMonthplanVo">
select id, name, classid, xnxq, month, themes, selfthemes, support, remarks, createuserid, create_time from by_theme_monthplan
select id, name, schoolid, classid, xnxq, month, themes, selfthemes, wxkc, support, remarks, createuserid, create_time, spr, sptime, spyj, status from by_theme_monthplan
</sql>
<select id="selectByThemeMonthplanList" parameterType="ByThemeMonthplan" resultMap="ByThemeMonthplanResult">
<include refid="selectByThemeMonthplanVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
<if test="month != null and month != ''">and month = #{month}</if>
<if test="themes != null and themes != ''">and themes = #{themes}</if>
<if test="selfthemes != null and selfthemes != ''">and selfthemes = #{selfthemes}</if>
<if test="support != null and support != ''">and support = #{support}</if>
<if test="remarks != null and remarks != ''">and remarks = #{remarks}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="schoolid != null "> and schoolid = #{schoolid}</if>
<if test="classid != null and classid != ''"> and classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''"> and xnxq = #{xnxq}</if>
<if test="month != null "> and month = #{month}</if>
<if test="themes != null and themes != ''"> and themes = #{themes}</if>
<if test="selfthemes != null and selfthemes != ''"> and selfthemes = #{selfthemes}</if>
<if test="wxkc != null and wxkc != ''"> and wxkc = #{wxkc}</if>
<if test="support != null and support != ''"> and support = #{support}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="spr != null "> and spr = #{spr}</if>
<if test="sptime != null "> and sptime = #{sptime}</if>
<if test="spyj != null and spyj != ''"> and spyj = #{spyj}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
order by month desc
</select>
<select id="selectByThemeMonthplanById" parameterType="Long" resultMap="ByThemeMonthplanResult">
<select id="selectByThemeMonthplanById" parameterType="String" resultMap="ByThemeMonthplanResult">
<include refid="selectByThemeMonthplanVo"/>
where id = #{id}
</select>
<insert id="insertByThemeMonthplan" parameterType="ByThemeMonthplan" useGeneratedKeys="true" keyProperty="id">
<insert id="insertByThemeMonthplan" parameterType="ByThemeMonthplan">
insert into by_theme_monthplan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="schoolid != null ">schoolid,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="xnxq != null and xnxq != ''">xnxq,</if>
<if test="month != null and month != ''">month,</if>
<if test="month != null ">month,</if>
<if test="themes != null and themes != ''">themes,</if>
<if test="selfthemes != null and selfthemes != ''">selfthemes,</if>
<if test="wxkc != null and wxkc != ''">wxkc,</if>
<if test="support != null and support != ''">support,</if>
<if test="remarks != null and remarks != ''">remarks,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createTime != null ">create_time,</if>
<if test="spr != null ">spr,</if>
<if test="sptime != null ">sptime,</if>
<if test="spyj != null and spyj != ''">spyj,</if>
<if test="status != null and status != ''">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="schoolid != null ">#{schoolid},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
<if test="month != null and month != ''">#{month},</if>
<if test="month != null ">#{month},</if>
<if test="themes != null and themes != ''">#{themes},</if>
<if test="selfthemes != null and selfthemes != ''">#{selfthemes},</if>
<if test="wxkc != null and wxkc != ''">#{wxkc},</if>
<if test="support != null and support != ''">#{support},</if>
<if test="remarks != null and remarks != ''">#{remarks},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="spr != null ">#{spr},</if>
<if test="sptime != null ">#{sptime},</if>
<if test="spyj != null and spyj != ''">#{spyj},</if>
<if test="status != null and status != ''">#{status},</if>
</trim>
</insert>
@ -74,20 +101,26 @@
update by_theme_monthplan
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="schoolid != null ">schoolid = #{schoolid},</if>
<if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
<if test="month != null and month != ''">month = #{month},</if>
<if test="month != null ">month = #{month},</if>
<if test="themes != null and themes != ''">themes = #{themes},</if>
<if test="selfthemes != null and selfthemes != ''">selfthemes = #{selfthemes},</if>
<if test="wxkc != null and wxkc != ''">wxkc = #{wxkc},</if>
<if test="support != null and support != ''">support = #{support},</if>
<if test="remarks != null and remarks != ''">remarks = #{remarks},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="spr != null ">spr = #{spr},</if>
<if test="sptime != null ">sptime = #{sptime},</if>
<if test="spyj != null and spyj != ''">spyj = #{spyj},</if>
<if test="status != null and status != ''">status = #{status},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeMonthplanById" parameterType="Long">
<delete id="deleteByThemeMonthplanById" parameterType="String">
delete from by_theme_monthplan where id = #{id}
</delete>

View File

@ -0,0 +1,94 @@
<?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.ByThemeMonthplanitemMapper">
<resultMap type="ByThemeMonthplanitem" id="ByThemeMonthplanitemResult">
<result property="id" column="id"/>
<result property="mpid" column="mpid"/>
<result property="zc" column="zc"/>
<result property="starttime" column="starttime"/>
<result property="endtime" column="endtime"/>
<result property="activityid" column="activityid"/>
<result property="jzzc" column="jzzc"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectByThemeMonthplanitemVo">
select id, mpid, zc, starttime, endtime, activityid, jzzc, createuserid, create_time from by_theme_monthplanitem
</sql>
<select id="selectByThemeMonthplanitemList" parameterType="ByThemeMonthplanitem" resultMap="ByThemeMonthplanitemResult">
<include refid="selectByThemeMonthplanitemVo"/>
<where>
<if test="mpid != null and mpid != ''">and mpid = #{mpid}</if>
<if test="zc != null ">and zc = #{zc}</if>
<if test="starttime != null ">and starttime = #{starttime}</if>
<if test="endtime != null ">and endtime = #{endtime}</if>
<if test="activityid != null and activityid != ''">and activityid = #{activityid}</if>
<if test="jzzc != null and jzzc != ''">and jzzc = #{jzzc}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
</where>
order by zc
</select>
<select id="selectByThemeMonthplanitemById" parameterType="String" resultMap="ByThemeMonthplanitemResult">
<include refid="selectByThemeMonthplanitemVo"/>
where id = #{id}
</select>
<insert id="insertByThemeMonthplanitem" parameterType="ByThemeMonthplanitem">
insert into by_theme_monthplanitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="mpid != null and mpid != ''">mpid,</if>
<if test="zc != null ">zc,</if>
<if test="starttime != null ">starttime,</if>
<if test="endtime != null ">endtime,</if>
<if test="activityid != null and activityid != ''">activityid,</if>
<if test="jzzc != null and jzzc != ''">jzzc,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="mpid != null and mpid != ''">#{mpid},</if>
<if test="zc != null ">#{zc},</if>
<if test="starttime != null ">#{starttime},</if>
<if test="endtime != null ">#{endtime},</if>
<if test="activityid != null and activityid != ''">#{activityid},</if>
<if test="jzzc != null and jzzc != ''">#{jzzc},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateByThemeMonthplanitem" parameterType="ByThemeMonthplanitem">
update by_theme_monthplanitem
<trim prefix="SET" suffixOverrides=",">
<if test="mpid != null and mpid != ''">mpid = #{mpid},</if>
<if test="zc != null ">zc = #{zc},</if>
<if test="starttime != null ">starttime = #{starttime},</if>
<if test="endtime != null ">endtime = #{endtime},</if>
<if test="activityid != null and activityid != ''">activityid = #{activityid},</if>
<if test="jzzc != null and jzzc != ''">jzzc = #{jzzc},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeMonthplanitemById" parameterType="String">
delete from by_theme_monthplanitem where id = #{id}
</delete>
<delete id="deleteByThemeMonthplanitemByIds" parameterType="String">
delete from by_theme_monthplanitem where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -5,29 +5,30 @@
<mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeTermplanitemMapper">
<resultMap type="ByThemeTermplanitem" id="ByThemeTermplanitemResult">
<result property="id" column="id" />
<result property="tpid" column="tpid" />
<result property="month" column="month" />
<result property="themeconent" column="themeconent" />
<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" />
<result property="id" column="id"/>
<result property="tpid" column="tpid"/>
<result property="month" column="month"/>
<result property="themeconent" column="themeconent"/>
<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="selectByThemeTermplanitemVo">
select id, tpid, month, themeconent, remark, createuserid, create_time, updateuserid, update_time from by_theme_termplanitem
</sql>
<select id="selectByThemeTermplanitemList" parameterType="ByThemeTermplanitem" resultMap="ByThemeTermplanitemResult">
<select id="selectByThemeTermplanitemList" parameterType="ByThemeTermplanitem"
resultMap="ByThemeTermplanitemResult">
<include refid="selectByThemeTermplanitemVo"/>
<where>
<if test="tpid != null and tpid != ''"> and tpid = #{tpid}</if>
<if test="month != null "> and month = #{month}</if>
<if test="themeconent != null and themeconent != ''"> and themeconent = #{themeconent}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="updateuserid != null "> and updateuserid = #{updateuserid}</if>
<if test="tpid != null and tpid != ''">and tpid = #{tpid}</if>
<if test="month != null ">and month = #{month}</if>
<if test="themeconent != null and themeconent != ''">and themeconent like concat('%;', #{themeconent}, ';%')</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="updateuserid != null ">and updateuserid = #{updateuserid}</if>
</where>
order by month
</select>

View File

@ -0,0 +1,118 @@
<?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.ByThemeWeekplanMapper">
<resultMap type="ByThemeWeekplan" id="ByThemeWeekplanResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="schoolid" column="schoolid"/>
<result property="classid" column="classid"/>
<result property="month" column="month"/>
<result property="zc" column="zc"/>
<result property="remark" column="remark"/>
<result property="status" column="status"/>
<result property="spr" column="spr"/>
<result property="sptime" column="sptime"/>
<result property="shyj" column="shyj"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
<result property="xnxq" column="xnxq"/>
</resultMap>
<sql id="selectByThemeWeekplanVo">
select id, name, schoolid, classid, month, zc, remark, status, spr, sptime, shyj, createuserid, create_time, xnxq from by_theme_weekplan
</sql>
<select id="selectByThemeWeekplanList" parameterType="ByThemeWeekplan" resultMap="ByThemeWeekplanResult">
<include refid="selectByThemeWeekplanVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="schoolid != null ">and schoolid = #{schoolid}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="month != null ">and month = #{month}</if>
<if test="zc != null ">and zc = #{zc}</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="spr != null ">and spr = #{spr}</if>
<if test="sptime != null ">and sptime = #{sptime}</if>
<if test="shyj != null and shyj != ''">and shyj = #{shyj}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
</where>
order by month desc
</select>
<select id="selectByThemeWeekplanById" parameterType="String" resultMap="ByThemeWeekplanResult">
<include refid="selectByThemeWeekplanVo"/>
where id = #{id}
</select>
<insert id="insertByThemeWeekplan" parameterType="ByThemeWeekplan">
insert into by_theme_weekplan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="schoolid != null ">schoolid,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="month != null ">month,</if>
<if test="zc != null ">zc,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="status != null and status != ''">status,</if>
<if test="spr != null ">spr,</if>
<if test="sptime != null ">sptime,</if>
<if test="shyj != null and shyj != ''">shyj,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createTime != null ">create_time,</if>
<if test="xnxq != null and xnxq != ''">xnxq,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="schoolid != null ">#{schoolid},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="month != null ">#{month},</if>
<if test="zc != null ">#{zc},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="spr != null ">#{spr},</if>
<if test="sptime != null ">#{sptime},</if>
<if test="shyj != null and shyj != ''">#{shyj},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
</trim>
</insert>
<update id="updateByThemeWeekplan" parameterType="ByThemeWeekplan">
update by_theme_weekplan
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="schoolid != null ">schoolid = #{schoolid},</if>
<if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="month != null ">month = #{month},</if>
<if test="zc != null ">zc = #{zc},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="spr != null ">spr = #{spr},</if>
<if test="sptime != null ">sptime = #{sptime},</if>
<if test="shyj != null and shyj != ''">shyj = #{shyj},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeWeekplanById" parameterType="String">
delete from by_theme_weekplan where id = #{id}
</delete>
<delete id="deleteByThemeWeekplanByIds" parameterType="String">
delete from by_theme_weekplan where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,102 @@
<?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.ByThemeWeekplanitemMapper">
<resultMap type="ByThemeWeekplanitem" id="ByThemeWeekplanitemResult">
<result property="id" column="id"/>
<result property="daytime" column="daytime"/>
<result property="zhou" column="zhou"/>
<result property="activityid" column="activityid"/>
<result property="fzxz" column="fzxz"/>
<result property="jzzc" column="jzzc"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
<result property="updateuserid" column="updateuserid"/>
<result property="updateTime" column="update_time"/>
<result property="wpid" column="wpid"/>
</resultMap>
<sql id="selectByThemeWeekplanitemVo">
select id, daytime, zhou, activityid, fzxz, jzzc, createuserid, create_time, updateuserid, update_time, wpid from by_theme_weekplanitem
</sql>
<select id="selectByThemeWeekplanitemList" parameterType="ByThemeWeekplanitem"
resultMap="ByThemeWeekplanitemResult">
<include refid="selectByThemeWeekplanitemVo"/>
<where>
<if test="daytime != null ">and daytime = #{daytime}</if>
<if test="zhou != null ">and zhou = #{zhou}</if>
<if test="activityid != null and activityid != ''">and activityid = #{activityid}</if>
<if test="fzxz != null and fzxz != ''">and fzxz = #{fzxz}</if>
<if test="jzzc != null and jzzc != ''">and jzzc = #{jzzc}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="updateuserid != null ">and updateuserid = #{updateuserid}</if>
<if test="wpid != null and wpid != ''">and wpid = #{wpid}</if>
</where>
order by zhou
</select>
<select id="selectByThemeWeekplanitemById" parameterType="Long" resultMap="ByThemeWeekplanitemResult">
<include refid="selectByThemeWeekplanitemVo"/>
where id = #{id}
</select>
<insert id="insertByThemeWeekplanitem" parameterType="ByThemeWeekplanitem" useGeneratedKeys="true" keyProperty="id">
insert into by_theme_weekplanitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="daytime != null ">daytime,</if>
<if test="zhou != null ">zhou,</if>
<if test="activityid != null and activityid != ''">activityid,</if>
<if test="fzxz != null and fzxz != ''">fzxz,</if>
<if test="jzzc != null and jzzc != ''">jzzc,</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>
<if test="wpid != null and wpid != ''">wpid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="daytime != null ">#{daytime},</if>
<if test="zhou != null ">#{zhou},</if>
<if test="activityid != null and activityid != ''">#{activityid},</if>
<if test="fzxz != null and fzxz != ''">#{fzxz},</if>
<if test="jzzc != null and jzzc != ''">#{jzzc},</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>
<if test="wpid != null and wpid != ''">#{wpid},</if>
</trim>
</insert>
<update id="updateByThemeWeekplanitem" parameterType="ByThemeWeekplanitem">
update by_theme_weekplanitem
<trim prefix="SET" suffixOverrides=",">
<if test="daytime != null ">daytime = #{daytime},</if>
<if test="zhou != null ">zhou = #{zhou},</if>
<if test="activityid != null and activityid != ''">activityid = #{activityid},</if>
<if test="fzxz != null and fzxz != ''">fzxz = #{fzxz},</if>
<if test="jzzc != null and jzzc != ''">jzzc = #{jzzc},</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>
<if test="wpid != null and wpid != ''">wpid = #{wpid},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeWeekplanitemById" parameterType="Long">
delete from by_theme_weekplanitem where id = #{id}
</delete>
<delete id="deleteByThemeWeekplanitemByIds" parameterType="String">
delete from by_theme_weekplanitem where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -34,6 +34,7 @@
<select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult">
<include refid="selectByClassVo"/>
where isdel='0'
<if test="bjbh != null and bjbh != ''">and bjbh = #{bjbh}</if>
<if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
<if test="bjtype != null and bjtype != ''">and bjtype = #{bjtype}</if>
<if test="bhxh != null ">and bhxh = #{bhxh}</if>