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 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) { export function exportPlanweek(query) {
return request({ 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) { export function exportMonthplan(query) {
return request({ 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) { export function exportTermplan(query) {
return request({ 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', path: '/benyi_course/theme',
component: Layout, component: Layout,
@ -233,7 +248,37 @@ export const constantRoutes = [{
import('@/views/benyi/themetermplan/data'), import('@/views/benyi/themetermplan/data'),
name: 'Themetermplan1', name: 'Themetermplan1',
meta: { 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: '' icon: ''
} }
}] }]

View File

@ -350,7 +350,7 @@ import {
delChild, delChild,
addChild, addChild,
updateChild, updateChild,
updateChild_tb updateChild_tb,
} from "@/api/benyi/child"; } from "@/api/benyi/child";
import { listClass } from "@/api/system/class"; import { listClass } from "@/api/system/class";
@ -365,22 +365,22 @@ export default {
placeholders: { placeholders: {
province: "请选择省", province: "请选择省",
city: "请选择市", city: "请选择市",
area: "请选择区" area: "请选择区",
}, },
diglogForm: { diglogForm: {
province: null, province: null,
city: null, city: null,
area: null area: null,
}, },
diglogForm1: { diglogForm1: {
province: null, province: null,
city: null, city: null,
area: null area: null,
}, },
diglogForm2: { diglogForm2: {
province: null, province: null,
city: null, city: null,
area: null area: null,
}, },
// //
loading: true, loading: true,
@ -455,46 +455,47 @@ export default {
firstLanguage: undefined, firstLanguage: undefined,
seconderLanguage: undefined, seconderLanguage: undefined,
otherLanguage: undefined, otherLanguage: undefined,
createuserid: undefined createuserid: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
name: [ name: [
{ required: true, message: "幼儿姓名不能为空", trigger: "blur" } { required: true, message: "幼儿姓名不能为空", trigger: "blur" },
], ],
phone: [ phone: [
{ required: true, message: "家长手机号码不能为空", trigger: "blur" } { required: true, message: "家长手机号码不能为空", trigger: "blur" },
] ],
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
}, },
rules_tb: { rules_tb: {
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }] classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
} },
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getClassList(); this.getClassList();
this.getDicts("sys_user_sex").then(response => { this.getDicts("sys_user_sex").then((response) => {
this.sexOptions = response.data; this.sexOptions = response.data;
}); });
this.getDicts("sys_normal_disable").then(response => { this.getDicts("sys_normal_disable").then((response) => {
this.statusOptions = response.data; this.statusOptions = response.data;
}); });
this.getDicts("sys_dm_mz").then(response => { this.getDicts("sys_dm_mz").then((response) => {
this.mzOptions = response.data; this.mzOptions = response.data;
}); });
this.getDicts("sys_yes_no").then(response => { this.getDicts("sys_yes_no").then((response) => {
this.ynOptions = response.data; this.ynOptions = response.data;
}); });
this.getDicts("sys_dm_ryqd").then(response => { this.getDicts("sys_dm_ryqd").then((response) => {
this.sourceOptions = response.data; this.sourceOptions = response.data;
}); });
}, },
components: { components: {
// //
VDistpicker VDistpicker,
}, },
methods: { methods: {
// //
@ -522,7 +523,7 @@ export default {
// return this.selectDictLabel(this.classOptions, row.classid); // return this.selectDictLabel(this.classOptions, row.classid);
var actions = []; var actions = [];
var datas = this.classOptions; var datas = this.classOptions;
Object.keys(datas).map(key => { Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) { if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc); actions.push(datas[key].bjmc);
return false; return false;
@ -531,14 +532,14 @@ export default {
return actions.join(""); return actions.join("");
}, },
getClassList() { getClassList() {
listClass(null).then(response => { listClass(null).then((response) => {
this.classOptions = response.rows; this.classOptions = response.rows;
}); });
}, },
/** 查询幼儿信息列表 */ /** 查询幼儿信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listChild(this.queryParams).then(response => { listChild(this.queryParams).then((response) => {
this.childList = response.rows; this.childList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -597,7 +598,7 @@ export default {
seconderLanguage: undefined, seconderLanguage: undefined,
otherLanguage: undefined, otherLanguage: undefined,
createuserid: undefined, createuserid: undefined,
createTime: undefined createTime: undefined,
}; };
this.diglogForm.province = ""; this.diglogForm.province = "";
@ -626,7 +627,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id); this.ids = selection.map((item) => item.id);
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -640,7 +641,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getChild(id).then(response => { getChild(id).then((response) => {
this.form = response.data; this.form = response.data;
this.diglogForm.province = response.data.birthProvincename; this.diglogForm.province = response.data.birthProvincename;
@ -661,10 +662,10 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != undefined) { if (this.form.id != undefined) {
updateChild(this.form).then(response => { updateChild(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -672,7 +673,7 @@ export default {
} }
}); });
} else { } else {
addChild(this.form).then(response => { addChild(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
@ -685,10 +686,10 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm_tb: function () { submitForm_tb: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
console.log(this.ids + "---" + this.form.classid); 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) { if (response.code === 200) {
this.msgSuccess("调班成功"); this.msgSuccess("调班成功");
this.open_tb = false; this.open_tb = false;
@ -714,7 +715,7 @@ export default {
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
} }
) )
.then(function () { .then(function () {
@ -779,7 +780,7 @@ export default {
this.form.addrAreaname = data.area.value; this.form.addrAreaname = data.area.value;
this.form.addrArea = data.area.code; this.form.addrArea = data.area.code;
} }
} },
} },
}; };
</script> </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> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> <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-form-item label="计划名称" prop="name">
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.name"
@ -28,6 +10,16 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </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-form-item label="开始时间" prop="starttime">
<el-date-picker <el-date-picker
clearable clearable
@ -59,46 +51,29 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="教学目标(社会)" prop="jxmbSh"> <el-form-item label="审核人" prop="shrid">
<el-input <el-input
v-model="queryParams.jxmbSh" v-model="queryParams.shrid"
placeholder="请输入教学目标(社会)" placeholder="请输入审核人"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="教学目标(语言)" prop="jxmbYy"> <!--
<el-form-item label="学校id" prop="schoolid">
<el-input <el-input
v-model="queryParams.jxmbYy" v-model="queryParams.schoolid"
placeholder="请输入教学目标(语言)" placeholder="请输入学校id"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="教学目标(健康)" prop="jxmbJk"> <el-form-item label="班级id" prop="classid">
<el-input <el-input
v-model="queryParams.jxmbJk" v-model="queryParams.classid"
placeholder="请输入教学目标(健康)" placeholder="请输入班级id"
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="请输入教学目标(艺术)"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -112,22 +87,9 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>-->
<el-form-item label="当前状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择当前状态" clearable size="small"> <!-- <el-form-item label="审核时间" prop="shtime">
<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-date-picker <el-date-picker
clearable clearable
size="small" size="small"
@ -137,7 +99,7 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择审核时间" placeholder="选择审核时间"
></el-date-picker> ></el-date-picker>
</el-form-item> </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 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-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 v-loading="loading" :data="planweekList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" /> <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" :formatter="classFormat" />
<el-table-column label="班级id" align="center" prop="classid" /> <el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<el-table-column label="计划名称" align="center" prop="name" /> <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"> <el-table-column label="开始时间" align="center" prop="starttime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
@ -202,19 +169,15 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本周主题" align="center" prop="themeofweek" /> <el-table-column label="本周主题" align="center" prop="themeofweek" />
<el-table-column label="教学目标(社会)" align="center" prop="jxmbSh" /> <el-table-column label="当前状态" align="center" prop="status" :formatter="statusFormat" />
<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="shrid" /> <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"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.shtime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.shtime, '{y}-{m}-{d}') }}</span>
</template> </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"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -224,6 +187,14 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:planweek:edit']" v-hasPermi="['system:planweek:edit']"
>修改</el-button> >修改</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 <el-button
size="mini" size="mini"
type="text" type="text"
@ -246,12 +217,6 @@
<!-- 添加或修改周计划(家长和教育部门)对话框 --> <!-- 添加或修改周计划(家长和教育部门)对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 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-form-item label="计划名称" prop="name">
<el-input v-model="form.name" placeholder="请输入计划名称" /> <el-input v-model="form.name" placeholder="请输入计划名称" />
</el-form-item> </el-form-item>
@ -295,18 +260,26 @@
<el-form-item label="教学目标(艺术)" prop="jxmbYs"> <el-form-item label="教学目标(艺术)" prop="jxmbYs">
<el-input v-model="form.jxmbYs" placeholder="请输入教学目标(艺术)" /> <el-input v-model="form.jxmbYs" placeholder="请输入教学目标(艺术)" />
</el-form-item> </el-form-item>
<el-form-item label="创建人" prop="createuserid"> <!-- <el-form-item label="当前状态">
<el-input v-model="form.createuserid" placeholder="请输入创建人" /> <el-select v-model="form.status" placeholder="请选择当前状态">
</el-form-item> <el-option
<el-form-item label="当前状态"> v-for="dict in statusOptions"
<el-radio-group v-model="form.status"> :key="dict.dictValue"
<el-radio label="1">请选择字典生成</el-radio> :label="dict.dictLabel"
</el-radio-group> :value="dict.dictValue"
</el-form-item> ></el-option>
<el-form-item label="审核人" prop="shrid"> </el-select>
</el-form-item> -->
<!-- <el-form-item label="审核人" prop="shrid">
<el-input v-model="form.shrid" placeholder="请输入审核人" /> <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>
<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 <el-date-picker
clearable clearable
size="small" size="small"
@ -316,7 +289,7 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择审核时间" placeholder="选择审核时间"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -334,8 +307,11 @@ import {
addPlanweek, addPlanweek,
updatePlanweek, updatePlanweek,
exportPlanweek, exportPlanweek,
checkPlanweek
} from "@/api/benyi/planweek"; } from "@/api/benyi/planweek";
import { listClass } from "@/api/system/class";
export default { export default {
name: "Planweek", name: "Planweek",
data() { data() {
@ -352,6 +328,10 @@ export default {
total: 0, total: 0,
// () // ()
planweekList: [], planweekList: [],
//
statusOptions: [],
//
classOptions: [],
// //
title: "", title: "",
// //
@ -374,27 +354,66 @@ export default {
createuserid: undefined, createuserid: undefined,
status: undefined, status: undefined,
shrid: undefined, shrid: undefined,
shtime: undefined, shtime: undefined
}, },
// //
form: {}, form: {},
// //
rules: {}, rules: {}
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getClassList();
//
this.getDicts("sys_dm_planweekstatus").then(response => {
this.statusOptions = response.data;
});
}, },
methods: { methods: {
/** 查询周计划(家长和教育部门)列表 */ /** 查询周计划(家长和教育部门)列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listPlanweek(this.queryParams).then((response) => { listPlanweek(this.queryParams).then(response => {
this.planweekList = response.rows; this.planweekList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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() { cancel() {
this.open = false; this.open = false;
@ -419,7 +438,7 @@ export default {
createTime: undefined, createTime: undefined,
status: "0", status: "0",
shrid: undefined, shrid: undefined,
shtime: undefined, shtime: undefined
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -435,7 +454,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id); this.ids = selection.map(item => item.id);
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -449,18 +468,46 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPlanweek(id).then((response) => { getPlanweek(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改周计划(家长和教育部门)"; 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() { submitForm: function() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != undefined) { if (this.form.id != undefined) {
updatePlanweek(this.form).then((response) => { updatePlanweek(this.form).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -468,7 +515,7 @@ export default {
} }
}); });
} else { } else {
addPlanweek(this.form).then((response) => { addPlanweek(this.form).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
@ -488,7 +535,7 @@ export default {
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
} }
) )
.then(function() { .then(function() {
@ -506,16 +553,16 @@ export default {
this.$confirm("是否确认导出所有周计划(家长和教育部门)数据项?", "警告", { this.$confirm("是否确认导出所有周计划(家长和教育部门)数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
}) })
.then(function() { .then(function() {
return exportPlanweek(queryParams); return exportPlanweek(queryParams);
}) })
.then((response) => { .then(response => {
this.download(response.msg); this.download(response.msg);
}) })
.catch(function() {}); .catch(function() {});
}, }
}, }
}; };
</script> </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" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="所属班级" prop="classid"> <el-form-item label="学年学期" prop="xnxq">
<el-select v-model="queryParams.classid" placeholder="请选择班级"> <el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
<el-option <el-option
v-for="dict in classOptions" v-for="dict in xnxqOptions"
:key="dict.bjbh" :key="dict.dictValue"
:label="dict.bjmc" :label="dict.dictLabel"
:value="dict.bjbh" :value="dict.dictValue"
></el-option> />
</el-select> </el-select>
</el-form-item> </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-form-item label="计划月份" prop="month">
<el-input <el-date-picker
v-model="queryParams.month"
placeholder="请输入计划月份"
clearable clearable
size="small" 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-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -77,12 +90,30 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="monthplanList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="monthplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <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">
<el-table-column label="计划名称" align="center" prop="name" /> <template slot-scope="scope">
<el-table-column label="所属班级" align="center" prop="classid" /> <router-link :to="'/benyi_course/thememonthplan/data/' + scope.row.id" class="link-type">
<el-table-column label="学年学期" align="center" prop="xnxq" /> <span>{{ scope.row.name }}</span>
<el-table-column label="计划月份" align="center" prop="month" /> </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"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -91,6 +122,7 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['benyi:thememonthplan:edit']" v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow(scope.row)"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
@ -98,7 +130,16 @@
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan:remove']" v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow(scope.row)"
>删除</el-button> >删除</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -112,39 +153,32 @@
/> />
<!-- 添加或修改主题整合月计划对话框 --> <!-- 添加或修改主题整合月计划对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<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-form-item label="计划月份" prop="month"> <el-form-item label="计划月份" prop="month">
<el-date-picker <el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.month" v-model="form.month"
type="month" type="month"
value-format="yyyy-MM"
placeholder="选择计划月份" placeholder="选择计划月份"
:disabled="disable" :disabled="disable"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="主题" prop="themes"> <el-form-item label="学年学期" prop="xnxq">
<el-input v-model="form.themes" type="textarea" placeholder="请输入内容" /> <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>
<el-form-item label="自定义主题" prop="selfthemes"> <el-form-item label="微型课程" prop="wxkc">
<el-input v-model="form.selfthemes" type="textarea" placeholder="请输入内容" /> <Editor v-model="form.wxkc" placeholder="请输入微型课程" />
</el-form-item>
<el-form-item label="家长支持" prop="support">
<el-input v-model="form.support" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" />
@ -165,14 +199,20 @@ import {
delMonthplan, delMonthplan,
addMonthplan, addMonthplan,
updateMonthplan, updateMonthplan,
checkMonthplan,
} from "@/api/benyi/thememonthplan"; } from "@/api/benyi/thememonthplan";
import Editor from "@/components/Editor";
import { listClass } from "@/api/system/class"; import { listClass } from "@/api/system/class";
import { listTheme } from "@/api/benyi/theme";
export default { export default {
name: "Monthplan", name: "Monthplan",
components: {
Editor,
},
data() { data() {
return { return {
disable: false,
// //
loading: true, loading: true,
// //
@ -183,56 +223,101 @@ export default {
multiple: true, multiple: true,
// //
total: 0, total: 0,
//
disable: false,
// //
monthplanList: [], monthplanList: [],
//
classOptions: [],
// //
title: "", title: "",
// //
open: false, open: false,
//
xnxqOptions: [],
//
classOptions: [],
//
themeOptions: [],
//
statusOptions: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: undefined, name: undefined,
schoolid: undefined,
classid: undefined, classid: undefined,
xnxq: undefined, xnxq: undefined,
month: undefined, month: undefined,
themes: undefined, themes: undefined,
selfthemes: undefined, selfthemes: undefined,
wxkc: undefined,
support: undefined, support: undefined,
remarks: undefined, remarks: undefined,
createuserid: undefined, createuserid: undefined,
spr: undefined,
sptime: undefined,
spyj: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }], xnxq: [
month: [ { required: true, message: "学年学期不能为空", trigger: "blur" },
{ required: true, message: "计划月份不能为空", trigger: "blur" }, ],
month: [{ required: true, message: "月份不能为空", trigger: "blur" }],
wxkc: [
{ required: true, message: "微型课程不能为空", trigger: "blur" },
], ],
themes: [{ required: true, message: "主题不能为空", trigger: "blur" }],
}, },
}; };
}, },
created() { created() {
this.getList();
this.getClassList(); 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: { methods: {
getClassName(val) { isShow(row) {
//locationsv-fordatas if (row.status == "0") {
let obj = {}; return true;
obj = this.classOptions.find((item) => { } else {
return item.bjbh === val; 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) { classFormat(row, column) {
@ -247,6 +332,11 @@ export default {
}); });
return actions.join(""); return actions.join("");
}, },
// --
xnxqFormat(row, column) {
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
},
//
getClassList() { getClassList() {
listClass(null).then((response) => { listClass(null).then((response) => {
this.classOptions = response.rows; this.classOptions = response.rows;
@ -271,15 +361,21 @@ export default {
this.form = { this.form = {
id: undefined, id: undefined,
name: undefined, name: undefined,
schoolid: undefined,
classid: undefined, classid: undefined,
xnxq: undefined, xnxq: undefined,
month: undefined, month: undefined,
themes: undefined, themes: undefined,
selfthemes: undefined, selfthemes: undefined,
wxkc: undefined,
support: undefined, support: undefined,
remarks: undefined, remarks: undefined,
createuserid: undefined, createuserid: undefined,
createTime: undefined, createTime: undefined,
spr: undefined,
sptime: undefined,
spyj: undefined,
status: "0",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -303,7 +399,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加<主题整合>月计划"; this.title = "添加主题整合月计划";
this.disable = false; this.disable = false;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -313,7 +409,7 @@ export default {
getMonthplan(id).then((response) => { getMonthplan(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改<主题整合>月计划"; this.title = "修改主题整合月计划";
this.disable = true; this.disable = true;
}); });
}, },
@ -344,15 +440,11 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$confirm( this.$confirm("是否确认删除主题整合月计划数据项?", "警告", {
'是否确认删除主题整合月计划编号为"' + ids + '"的数据项?',
"警告",
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
} })
)
.then(function () { .then(function () {
return delMonthplan(ids); return delMonthplan(ids);
}) })
@ -362,6 +454,23 @@ export default {
}) })
.catch(function () {}); .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> </script>

View File

@ -1,52 +1,25 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="所属计划" prop="tpid"> <el-form-item label="学期计划" prop="tpid">
<el-input <el-select v-model="queryParams.tpid" size="small">
v-model="queryParams.tpid" <el-option
placeholder="请输入所属计划" v-for="item in themePlanOptions"
clearable :key="item.id"
size="small" :label="item.name"
@keyup.enter.native="handleQuery" :value="item.id"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="主题内容" prop="themeconent"> <el-form-item label="主题内容" prop="themeconent">
<el-input <el-select v-model="queryParams.themeconent" size="small">
v-model="queryParams.themeconent" <el-option
placeholder="请输入主题内容" v-for="item in themeOptions"
clearable :key="item.id"
size="small" :label="item.name"
@keyup.enter.native="handleQuery" :value="item.id"
/>
</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>
</el-form-item> </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 type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -62,6 +35,7 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['benyi:themetermplan:add']" v-hasPermi="['benyi:themetermplan:add']"
v-show="isShow"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -72,6 +46,7 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['benyi:themetermplan:edit']" v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -82,17 +57,9 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['benyi:themetermplan:remove']" v-hasPermi="['benyi:themetermplan:remove']"
v-show="isShow"
>删除</el-button> >删除</el-button>
</el-col> </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-row>
<el-table <el-table
@ -101,17 +68,11 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" /> <!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="所属计划" align="center" prop="tpid" /> <el-table-column label="学期计划" align="center" prop="tpid" :formatter="themePlanFormat" />
<el-table-column label="主题内容" align="center" prop="themeconent" /> <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="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"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -120,6 +81,7 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']" v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
@ -127,6 +89,7 @@
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['benyi:themetermplan:remove']" v-hasPermi="['benyi:themetermplan:remove']"
v-show="isShow"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -144,27 +107,31 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属计划" prop="tpid"> <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>
<el-form-item label="主题内容" prop="themeconent"> <el-form-item label="月份" prop="month">
<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-date-picker <el-date-picker
clearable v-model="form.month"
size="small" type="month"
style="width: 200px" placeholder="请选择月"
v-model="form.创建时间" value-format="yyyy-MM"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择创建人"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="修改人" prop="updateuserid"> <el-form-item label="选择主题" prop="themeconent">
<el-input v-model="form.updateuserid" placeholder="请输入修改人" /> <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-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -185,10 +152,19 @@ import {
exportTermplanitem, exportTermplanitem,
} from "@/api/benyi/themetermplanitem"; } from "@/api/benyi/themetermplanitem";
import { listTermplan, getTermplan } from "@/api/benyi/themetermplan";
import { listTheme } from "@/api/benyi/theme";
export default { export default {
name: "Termplanitem", name: "Termplanitem",
data() { data() {
return { return {
isShow: true,
//
max: 2,
//
themeOptions: [],
themeList: [],
// //
loading: true, loading: true,
// //
@ -201,10 +177,13 @@ export default {
total: 0, total: 0,
// //
termplanitemList: [], termplanitemList: [],
//
themePlanOptions: [],
// //
title: "", title: "",
// //
open: false, open: false,
defaultThemeType: "",
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -212,19 +191,97 @@ export default {
tpid: undefined, tpid: undefined,
themeconent: undefined, themeconent: undefined,
createuserid: undefined, createuserid: undefined,
创建时间: undefined,
updateuserid: undefined, updateuserid: undefined,
}, },
// //
form: {}, form: {},
// //
rules: {}, rules: {
month: [{ required: true, message: "月份不能为空", trigger: "blur" }],
themeconent: [
{ required: true, message: "主题不能为空", trigger: "blur" },
],
},
}; };
}, },
created() { created() {
this.getList(); const themeplanid = this.$route.params && this.$route.params.id;
//console.log(themeplanid);
this.getThemePlan(themeplanid);
this.getThemePlanList();
this.getThemeList();
}, },
methods: { 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() { getList() {
this.loading = true; this.loading = true;
@ -247,11 +304,12 @@ export default {
themeconent: undefined, themeconent: undefined,
remark: undefined, remark: undefined,
createuserid: undefined, createuserid: undefined,
创建时间: undefined, month: undefined,
updateuserid: undefined, updateuserid: undefined,
updateTime: undefined, updateTime: undefined,
}; };
this.resetForm("form"); this.resetForm("form");
this.themeList = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -261,6 +319,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.tpid = this.defaultThemeType;
this.handleQuery(); this.handleQuery();
}, },
// //
@ -274,6 +333,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加主题整合学期计划明细"; this.title = "添加主题整合学期计划明细";
this.form.tpid = this.queryParams.tpid;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -283,6 +343,16 @@ export default {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改主题整合学期计划明细"; 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 () {}); .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> </script>

View File

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

View File

@ -8,8 +8,7 @@ import java.util.List;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.*; import com.ruoyi.project.benyi.domain.*;
import com.ruoyi.project.benyi.service.IBySchoolcalendarClassService; import com.ruoyi.project.benyi.service.*;
import com.ruoyi.project.benyi.service.IBySchoolcalendarService;
import com.ruoyi.project.common.SchoolCommon; import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.domain.ByTeacherJbxx; import com.ruoyi.project.system.domain.ByTeacherJbxx;
import com.ruoyi.project.system.domain.SysDictData; 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 org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; 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.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
@ -42,8 +40,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/benyi/calendar") @RequestMapping("/benyi/calendar")
public class ByCalendarController extends BaseController public class ByCalendarController extends BaseController {
{
@Autowired @Autowired
private IByCalendarService byCalendarService; private IByCalendarService byCalendarService;
@Autowired @Autowired
@ -56,14 +53,21 @@ public class ByCalendarController extends BaseController
private SchoolCommon schoolCommon; private SchoolCommon schoolCommon;
@Autowired @Autowired
private IByTeacherJbxxService byTeacherJbxxService; 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')") @PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(ByCalendar byCalendar) public TableDataInfo list(ByCalendar byCalendar) {
{
startPage(); startPage();
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar); List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
return getDataTable(list); return getDataTable(list);
@ -75,8 +79,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')") @PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT) @Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(ByCalendar byCalendar) public AjaxResult export(ByCalendar byCalendar) {
{
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar); List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class); ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class);
return util.exportExcel(list, "calendar"); return util.exportExcel(list, "calendar");
@ -87,8 +90,7 @@ public class ByCalendarController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')") @PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return AjaxResult.success(byCalendarService.selectByCalendarById(id)); return AjaxResult.success(byCalendarService.selectByCalendarById(id));
} }
@ -98,8 +100,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')") @PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT) @Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByCalendar byCalendar) public AjaxResult add(@RequestBody ByCalendar byCalendar) {
{
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byCalendar.setStylecolor("#eb2f96"); byCalendar.setStylecolor("#eb2f96");
byCalendar.setCreatetime(new Date()); byCalendar.setCreatetime(new Date());
@ -112,8 +113,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')") @PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE) @Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody ByCalendar byCalendar) public AjaxResult edit(@RequestBody ByCalendar byCalendar) {
{
return toAjax(byCalendarService.updateByCalendar(byCalendar)); return toAjax(byCalendarService.updateByCalendar(byCalendar));
} }
@ -123,8 +123,7 @@ public class ByCalendarController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')") @PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE) @Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(byCalendarService.deleteByCalendarByIds(ids)); return toAjax(byCalendarService.deleteByCalendarByIds(ids));
} }
@ -172,10 +171,14 @@ public class ByCalendarController extends BaseController
// listvi.addAll(getbyteacherBiths((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(); AjaxResult ajax = AjaxResult.success();
@ -249,7 +252,7 @@ public class ByCalendarController extends BaseController
} }
//生日 //生日
if (byTeacherJbxx.getCsrq() != null) { if (byTeacherJbxx.getCsrq() != null) {
String timefor = formatter.format(byTeacherJbxx.getCjgzrq()); String timefor = formatter.format(byTeacherJbxx.getCsrq());
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear); timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
ByCalendarShow by = new ByCalendarShow(); ByCalendarShow by = new ByCalendarShow();
@ -266,15 +269,16 @@ public class ByCalendarController extends BaseController
} }
return listvi; return listvi;
} }
/** /**
* 根据不同的班级加载班级园历 * 根据不同的班级加载班级园历
*/ */
private List<ByCalendarShow> getbyclasses(String classlId,SimpleDateFormat formatter,HashMap<String, String> hashMap){ private List<ByCalendarShow> getbyclasses(String classId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
List<ByCalendarShow> listvi = new ArrayList<>(); List<ByCalendarShow> listvi = new ArrayList<>();
BySchoolcalendarClass bySchoolcalendarClass = new BySchoolcalendarClass(); BySchoolcalendarClass bySchoolcalendarClass = new BySchoolcalendarClass();
//设置班级 //设置班级
bySchoolcalendarClass.setClassid(classlId); bySchoolcalendarClass.setClassid(classId);
List<BySchoolcalendarClass> bySchoolcalendarClassList = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass); List<BySchoolcalendarClass> bySchoolcalendarClassList = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
if (bySchoolcalendarClassList.size() > 0) { if (bySchoolcalendarClassList.size() > 0) {
for (BySchoolcalendarClass bscc : bySchoolcalendarClassList) { for (BySchoolcalendarClass bscc : bySchoolcalendarClassList) {
@ -287,6 +291,93 @@ public class ByCalendarController extends BaseController
listvi.add(by); 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; return listvi;
} }

View File

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

View File

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

View File

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

View File

@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller;
import java.util.List; 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.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
public class ByPlanweekController extends BaseController { public class ByPlanweekController extends BaseController {
@Autowired @Autowired
private IByPlanweekService byPlanweekService; private IByPlanweekService byPlanweekService;
@Autowired
private SchoolCommon schoolCommon;
/** /**
* 查询周计划(家长和教育部门)列表 * 查询周计划(家长和教育部门)列表
@ -61,7 +65,7 @@ public class ByPlanweekController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('benyi:planweek:query')") @PreAuthorize("@ss.hasPermi('benyi:planweek:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byPlanweekService.selectByPlanweekById(id)); return AjaxResult.success(byPlanweekService.selectByPlanweekById(id));
} }
@ -72,7 +76,22 @@ public class ByPlanweekController extends BaseController {
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.INSERT) @Log(title = "周计划(家长和教育部门)", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByPlanweek byPlanweek) { 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)); return toAjax(byPlanweekService.insertByPlanweek(byPlanweek));
// } else {
// return AjaxResult.error("当前用户非幼儿园,无法添加计划");
// }
} }
/** /**
@ -85,13 +104,33 @@ public class ByPlanweekController extends BaseController {
return toAjax(byPlanweekService.updateByPlanweek(byPlanweek)); 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')") @PreAuthorize("@ss.hasPermi('benyi:planweek:remove')")
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.DELETE) @Log(title = "周计划(家长和教育部门)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(byPlanweekService.deleteByPlanweekByIds(ids)); return toAjax(byPlanweekService.deleteByPlanweekByIds(ids));
} }
} }

View File

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

View File

@ -33,8 +33,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/benyi/schoolcalendarclass") @RequestMapping("/benyi/schoolcalendarclass")
public class BySchoolcalendarClassController extends BaseController public class BySchoolcalendarClassController extends BaseController {
{
@Autowired @Autowired
private IBySchoolcalendarClassService bySchoolcalendarClassService; private IBySchoolcalendarClassService bySchoolcalendarClassService;
@ -47,8 +46,7 @@ public class BySchoolcalendarClassController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass) public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass) {
{
String strClassId = schoolCommon.getClassId(); String strClassId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(strClassId)) { if (!schoolCommon.isStringEmpty(strClassId)) {
startPage(); startPage();
@ -68,8 +66,7 @@ public class BySchoolcalendarClassController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
@GetMapping("/listAll") @GetMapping("/listAll")
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass) public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass) {
{
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass); List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
//System.out.println("---------------------没有分页"+listAll); //System.out.println("---------------------没有分页"+listAll);
return getDataTable(listAll); return getDataTable(listAll);
@ -81,8 +78,7 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:export')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:export')")
@Log(title = "园历管理(班级)", businessType = BusinessType.EXPORT) @Log(title = "园历管理(班级)", businessType = BusinessType.EXPORT)
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(BySchoolcalendarClass bySchoolcalendarClass) public AjaxResult export(BySchoolcalendarClass bySchoolcalendarClass) {
{
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass); List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
ExcelUtil<BySchoolcalendarClass> util = new ExcelUtil<BySchoolcalendarClass>(BySchoolcalendarClass.class); ExcelUtil<BySchoolcalendarClass> util = new ExcelUtil<BySchoolcalendarClass>(BySchoolcalendarClass.class);
return util.exportExcel(list, "schoolcalendarclass"); return util.exportExcel(list, "schoolcalendarclass");
@ -93,8 +89,7 @@ public class BySchoolcalendarClassController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id)); return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id));
} }
@ -104,8 +99,7 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:add')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:add')")
@Log(title = "园历管理(班级)", businessType = BusinessType.INSERT) @Log(title = "园历管理(班级)", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) public AjaxResult add(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) {
{
String strClassId = schoolCommon.getClassId(); String strClassId = schoolCommon.getClassId();
//判断当前用户是否有班级 //判断当前用户是否有班级
if (!schoolCommon.isStringEmpty(strClassId)) { if (!schoolCommon.isStringEmpty(strClassId)) {
@ -131,8 +125,7 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:edit')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:edit')")
@Log(title = "园历管理(班级)", businessType = BusinessType.UPDATE) @Log(title = "园历管理(班级)", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) public AjaxResult edit(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) {
{
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) { if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
return toAjax(bySchoolcalendarClassService.updateBySchoolcalendarClass(bySchoolcalendarClass)); return toAjax(bySchoolcalendarClassService.updateBySchoolcalendarClass(bySchoolcalendarClass));
} else { } else {
@ -146,8 +139,7 @@ public class BySchoolcalendarClassController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:remove')") @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:remove')")
@Log(title = "园历管理(班级)", businessType = BusinessType.DELETE) @Log(title = "园历管理(班级)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @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)); return toAjax(bySchoolcalendarClassService.deleteBySchoolcalendarClassByIds(ids));

View File

@ -113,4 +113,14 @@ public class ByThemeActivityController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byThemeActivityService.deleteByThemeActivityByIds(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; package com.ruoyi.project.benyi.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.SecurityUtils; 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.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -39,6 +44,14 @@ public class ByThemeMonthplanController extends BaseController {
private IByThemeMonthplanService byThemeMonthplanService; private IByThemeMonthplanService byThemeMonthplanService;
@Autowired @Autowired
private SchoolCommon schoolCommon; 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") @GetMapping("/list")
public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) { public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) {
startPage(); 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); return getDataTable(list);
} }
@ -68,7 +88,7 @@ public class ByThemeMonthplanController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')") @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byThemeMonthplanService.selectByThemeMonthplanById(id)); return AjaxResult.success(byThemeMonthplanService.selectByThemeMonthplanById(id));
} }
@ -79,28 +99,53 @@ public class ByThemeMonthplanController extends BaseController {
@Log(title = "主题整合月计划", businessType = BusinessType.INSERT) @Log(title = "主题整合月计划", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByThemeMonthplan byThemeMonthplan) { 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()); //根据当前月份 查找学期计划的主题
ByThemeTermplan byThemeTermplan = new ByThemeTermplan();
String dateTime = byThemeMonthplan.getMonth(); byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
dateTime = dateTime .replace("Z", " UTC"); //2019-06-27T16:00:00.000 UTC byThemeTermplan.setClassid(classId);
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");//转换时区格式 byThemeTermplan.setStatus("2");
SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM"); byThemeTermplan.setXnxq(byThemeMonthplan.getXnxq());
Date date = null;//将Z时间格式转换成Date类型格式或换成毫秒 List<ByThemeTermplan> list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
try { String strThemeIds = "";
date = format1.parse(dateTime); if (list != null && list.size() > 0) {
} catch (ParseException e) { for (int i = 0; i < list.size(); i++) {
e.printStackTrace(); 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)); return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
} else { } else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿"); return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划");
} }
} }
@ -120,7 +165,29 @@ public class ByThemeMonthplanController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')") @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')")
@Log(title = "主题整合月计划", businessType = BusinessType.DELETE) @Log(title = "主题整合月计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @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)); 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") @GetMapping("/list")
public TableDataInfo list(ByThemeTermplan byThemeTermplan) { public TableDataInfo list(ByThemeTermplan byThemeTermplan) {
startPage(); 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); return getDataTable(list);
} }
@ -104,11 +111,13 @@ public class ByThemeTermplanController extends BaseController {
byThemeTermplanitem = new ByThemeTermplanitem(); byThemeTermplanitem = new ByThemeTermplanitem();
byThemeTermplanitem.setTpid(uuid); byThemeTermplanitem.setTpid(uuid);
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
//月份加1 // //月份加1
Calendar calendar = Calendar.getInstance(); // Calendar calendar = Calendar.getInstance();
calendar.setTime(byThemeTermplan.getStartmonth()); // calendar.setTime(byThemeTermplan.getStartmonth());
calendar.add(Calendar.MONTH, i); // calendar.add(Calendar.MONTH, i);
byThemeTermplanitem.setMonth(calendar.getTime());
byThemeTermplanitem.setMonth(schoolCommon.DateAddMonths(i, byThemeTermplan.getStartmonth()));
//创建时间 //创建时间
byThemeTermplanitem.setCreateTime(new Date()); byThemeTermplanitem.setCreateTime(new Date());
@ -118,7 +127,7 @@ public class ByThemeTermplanController extends BaseController {
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan)); return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
} else { } else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿"); return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
} }
} }
@ -140,6 +149,28 @@ public class ByThemeTermplanController extends BaseController {
@Log(title = "主题整合学期计划", businessType = BusinessType.DELETE) @Log(title = "主题整合学期计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] 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)); 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 java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -72,6 +73,7 @@ public class ByThemeTermplanitemController extends BaseController {
@Log(title = "主题整合学期计划明细", businessType = BusinessType.INSERT) @Log(title = "主题整合学期计划明细", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByThemeTermplanitem byThemeTermplanitem) { public AjaxResult add(@RequestBody ByThemeTermplanitem byThemeTermplanitem) {
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeTermplanitemService.insertByThemeTermplanitem(byThemeTermplanitem)); 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 * 学校id
@ -115,11 +115,19 @@ public class ByPlanweek extends BaseEntity {
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date shtime; private Date shtime;
public void setId(Long id) { /**
* 审核意见
*/
@Excel(name = "审核意见")
private String shyj;
public void setId(String id) {
this.id = id; this.id = id;
} }
public Long getId() { public String getId() {
return id; return id;
} }
@ -263,6 +271,15 @@ public class ByPlanweek extends BaseEntity {
.append("status", getStatus()) .append("status", getStatus())
.append("shrid", getShrid()) .append("shrid", getShrid())
.append("shtime", getShtime()) .append("shtime", getShtime())
.append("shyj", getShyj())
.toString(); .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 * 周计划(家长和教育部门细化)对象 by_planweekitem
* *
* @author tsbz * @author tsbz
* @date 2020-08-24 * @date 2020-08-27
*/ */
public class ByPlanweekitem extends BaseEntity { public class ByPlanweekitem extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -26,7 +26,7 @@ public class ByPlanweekitem extends BaseEntity {
* 所属计划 * 所属计划
*/ */
@Excel(name = "所属计划") @Excel(name = "所属计划")
private Long wid; private String wid;
/** /**
* 活动类型 * 活动类型
@ -67,11 +67,11 @@ public class ByPlanweekitem extends BaseEntity {
return id; return id;
} }
public void setWid(Long wid) { public void setWid(String wid) {
this.wid = wid; this.wid = wid;
} }
public Long getWid() { public String getWid() {
return wid; return wid;
} }

View File

@ -1,5 +1,8 @@
package com.ruoyi.project.benyi.domain; 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.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.aspectj.lang.annotation.Excel;
@ -9,7 +12,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
* 主题整合月计划对象 by_theme_monthplan * 主题整合月计划对象 by_theme_monthplan
* *
* @author tsbz * @author tsbz
* @date 2020-08-17 * @date 2020-08-25
*/ */
public class ByThemeMonthplan extends BaseEntity { public class ByThemeMonthplan extends BaseEntity {
private static final long serialVersionUID = 1L; 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 = "计划名称") @Excel(name = "计划名称")
private String name; private String name;
/**
* 所属学校
*/
@Excel(name = "所属学校")
private Long schoolid;
/** /**
* 所属班级 * 所属班级
*/ */
@ -40,8 +49,9 @@ public class ByThemeMonthplan extends BaseEntity {
/** /**
* 计划月份 * 计划月份
*/ */
@Excel(name = "计划月份") @JsonFormat(pattern = "yyyy-MM")
private String month; @Excel(name = "计划月份", width = 30, dateFormat = "yyyy-MM")
private Date month;
/** /**
* 本月主题 * 本月主题
@ -55,6 +65,12 @@ public class ByThemeMonthplan extends BaseEntity {
@Excel(name = "本月自定义主题") @Excel(name = "本月自定义主题")
private String selfthemes; private String selfthemes;
/**
* 微型课程
*/
@Excel(name = "微型课程")
private String wxkc;
/** /**
* 家长支持 * 家长支持
*/ */
@ -73,11 +89,36 @@ public class ByThemeMonthplan extends BaseEntity {
@Excel(name = "创建人") @Excel(name = "创建人")
private Long createuserid; 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; this.id = id;
} }
public Long getId() { public String getId() {
return id; return id;
} }
@ -89,6 +130,14 @@ public class ByThemeMonthplan extends BaseEntity {
return name; return name;
} }
public void setSchoolid(Long schoolid) {
this.schoolid = schoolid;
}
public Long getSchoolid() {
return schoolid;
}
public void setClassid(String classid) { public void setClassid(String classid) {
this.classid = classid; this.classid = classid;
} }
@ -105,11 +154,11 @@ public class ByThemeMonthplan extends BaseEntity {
return xnxq; return xnxq;
} }
public void setMonth(String month) { public void setMonth(Date month) {
this.month = month; this.month = month;
} }
public String getMonth() { public Date getMonth() {
return month; return month;
} }
@ -129,6 +178,14 @@ public class ByThemeMonthplan extends BaseEntity {
return selfthemes; return selfthemes;
} }
public void setWxkc(String wxkc) {
this.wxkc = wxkc;
}
public String getWxkc() {
return wxkc;
}
public void setSupport(String support) { public void setSupport(String support) {
this.support = support; this.support = support;
} }
@ -153,20 +210,58 @@ public class ByThemeMonthplan extends BaseEntity {
return createuserid; 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 @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("name", getName()) .append("name", getName())
.append("schoolid", getSchoolid())
.append("classid", getClassid()) .append("classid", getClassid())
.append("xnxq", getXnxq()) .append("xnxq", getXnxq())
.append("month", getMonth()) .append("month", getMonth())
.append("themes", getThemes()) .append("themes", getThemes())
.append("selfthemes", getSelfthemes()) .append("selfthemes", getSelfthemes())
.append("wxkc", getWxkc())
.append("support", getSupport()) .append("support", getSupport())
.append("remarks", getRemarks()) .append("remarks", getRemarks())
.append("createuserid", getCreateuserid()) .append("createuserid", getCreateuserid())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("spr", getSpr())
.append("sptime", getSptime())
.append("spyj", getSpyj())
.append("status", getStatus())
.toString(); .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 * @param id 周计划(家长和教育部门)ID
* @return 周计划(家长和教育部门) * @return 周计划(家长和教育部门)
*/ */
public ByPlanweek selectByPlanweekById(Long id); public ByPlanweek selectByPlanweekById(String id);
/** /**
* 查询周计划(家长和教育部门)列表 * 查询周计划(家长和教育部门)列表
@ -49,7 +49,7 @@ public interface ByPlanweekMapper
* @param id 周计划(家长和教育部门)ID * @param id 周计划(家长和教育部门)ID
* @return 结果 * @return 结果
*/ */
public int deleteByPlanweekById(Long id); public int deleteByPlanweekById(String id);
/** /**
* 批量删除周计划(家长和教育部门) * 批量删除周计划(家长和教育部门)
@ -57,5 +57,5 @@ public interface ByPlanweekMapper
* @param ids 需要删除的数据ID * @param ids 需要删除的数据ID
* @return 结果 * @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接口 * 周计划(家长和教育部门细化)Mapper接口
* *
* @author tsbz * @author tsbz
* @date 2020-08-24 * @date 2020-08-27
*/ */
public interface ByPlanweekitemMapper public interface ByPlanweekitemMapper
{ {

View File

@ -58,4 +58,12 @@ public interface ByThemeActivityMapper {
* @return 结果 * @return 结果
*/ */
public int deleteByThemeActivityByIds(Long[] ids); 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接口 * 主题整合月计划Mapper接口
* *
* @author tsbz * @author tsbz
* @date 2020-08-17 * @date 2020-08-25
*/ */
public interface ByThemeMonthplanMapper { public interface ByThemeMonthplanMapper {
/** /**
@ -17,7 +17,7 @@ public interface ByThemeMonthplanMapper {
* @param id 主题整合月计划ID * @param id 主题整合月计划ID
* @return 主题整合月计划 * @return 主题整合月计划
*/ */
public ByThemeMonthplan selectByThemeMonthplanById(Long id); public ByThemeMonthplan selectByThemeMonthplanById(String id);
/** /**
* 查询主题整合月计划列表 * 查询主题整合月计划列表
@ -49,7 +49,7 @@ public interface ByThemeMonthplanMapper {
* @param id 主题整合月计划ID * @param id 主题整合月计划ID
* @return 结果 * @return 结果
*/ */
public int deleteByThemeMonthplanById(Long id); public int deleteByThemeMonthplanById(String id);
/** /**
* 批量删除主题整合月计划 * 批量删除主题整合月计划
@ -57,5 +57,5 @@ public interface ByThemeMonthplanMapper {
* @param ids 需要删除的数据ID * @param ids 需要删除的数据ID
* @return 结果 * @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 * @param id 周计划(家长和教育部门)ID
* @return 周计划(家长和教育部门) * @return 周计划(家长和教育部门)
*/ */
public ByPlanweek selectByPlanweekById(Long id); public ByPlanweek selectByPlanweekById(String id);
/** /**
* 查询周计划(家长和教育部门)列表 * 查询周计划(家长和教育部门)列表
@ -49,7 +49,7 @@ public interface IByPlanweekService {
* @param ids 需要删除的周计划(家长和教育部门)ID * @param ids 需要删除的周计划(家长和教育部门)ID
* @return 结果 * @return 结果
*/ */
public int deleteByPlanweekByIds(Long[] ids); public int deleteByPlanweekByIds(String[] ids);
/** /**
* 删除周计划(家长和教育部门)信息 * 删除周计划(家长和教育部门)信息
@ -57,5 +57,5 @@ public interface IByPlanweekService {
* @param id 周计划(家长和教育部门)ID * @param id 周计划(家长和教育部门)ID
* @return 结果 * @return 结果
*/ */
public int deleteByPlanweekById(Long id); public int deleteByPlanweekById(String id);
} }

View File

@ -1,16 +1,16 @@
package com.ruoyi.project.benyi.service; package com.ruoyi.project.benyi.service;
import java.util.List; import java.util.List;
import com.ruoyi.project.benyi.domain.ByPlanweekitem; import com.ruoyi.project.benyi.domain.ByPlanweekitem;
/** /**
* 周计划(家长和教育部门细化)Service接口 * 周计划(家长和教育部门细化)Service接口
* *
* @author tsbz * @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 结果 * @return 结果
*/ */
public int deleteByThemeActivityById(Long id); 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接口 * 主题整合月计划Service接口
* *
* @author tsbz * @author tsbz
* @date 2020-08-17 * @date 2020-08-25
*/ */
public interface IByThemeMonthplanService { public interface IByThemeMonthplanService {
/** /**
@ -17,7 +17,7 @@ public interface IByThemeMonthplanService {
* @param id 主题整合月计划ID * @param id 主题整合月计划ID
* @return 主题整合月计划 * @return 主题整合月计划
*/ */
public ByThemeMonthplan selectByThemeMonthplanById(Long id); public ByThemeMonthplan selectByThemeMonthplanById(String id);
/** /**
* 查询主题整合月计划列表 * 查询主题整合月计划列表
@ -49,7 +49,7 @@ public interface IByThemeMonthplanService {
* @param ids 需要删除的主题整合月计划ID * @param ids 需要删除的主题整合月计划ID
* @return 结果 * @return 结果
*/ */
public int deleteByThemeMonthplanByIds(Long[] ids); public int deleteByThemeMonthplanByIds(String[] ids);
/** /**
* 删除主题整合月计划信息 * 删除主题整合月计划信息
@ -57,5 +57,5 @@ public interface IByThemeMonthplanService {
* @param id 主题整合月计划ID * @param id 主题整合月计划ID
* @return 结果 * @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 周计划(家长和教育部门) * @return 周计划(家长和教育部门)
*/ */
@Override @Override
public ByPlanweek selectByPlanweekById(Long id) { public ByPlanweek selectByPlanweekById(String id) {
return byPlanweekMapper.selectByPlanweekById(id); return byPlanweekMapper.selectByPlanweekById(id);
} }
@ -72,7 +72,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteByPlanweekByIds(Long[] ids) { public int deleteByPlanweekByIds(String[] ids) {
return byPlanweekMapper.deleteByPlanweekByIds(ids); return byPlanweekMapper.deleteByPlanweekByIds(ids);
} }
@ -83,7 +83,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteByPlanweekById(Long id) { public int deleteByPlanweekById(String id) {
return byPlanweekMapper.deleteByPlanweekById(id); return byPlanweekMapper.deleteByPlanweekById(id);
} }
} }

View File

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

View File

@ -86,4 +86,15 @@ public class ByThemeActivityServiceImpl implements IByThemeActivityService {
public int deleteByThemeActivityById(Long id) { public int deleteByThemeActivityById(Long id) {
return byThemeActivityMapper.deleteByThemeActivityById(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业务层处理 * 主题整合月计划Service业务层处理
* *
* @author tsbz * @author tsbz
* @date 2020-08-17 * @date 2020-08-25
*/ */
@Service @Service
public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService { public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
@ -27,7 +27,7 @@ public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
* @return 主题整合月计划 * @return 主题整合月计划
*/ */
@Override @Override
public ByThemeMonthplan selectByThemeMonthplanById(Long id) { public ByThemeMonthplan selectByThemeMonthplanById(String id) {
return byThemeMonthplanMapper.selectByThemeMonthplanById(id); return byThemeMonthplanMapper.selectByThemeMonthplanById(id);
} }
@ -72,7 +72,7 @@ public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteByThemeMonthplanByIds(Long[] ids) { public int deleteByThemeMonthplanByIds(String[] ids) {
return byThemeMonthplanMapper.deleteByThemeMonthplanByIds(ids); return byThemeMonthplanMapper.deleteByThemeMonthplanByIds(ids);
} }
@ -83,7 +83,7 @@ public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteByThemeMonthplanById(Long id) { public int deleteByThemeMonthplanById(String id) {
return byThemeMonthplanMapper.deleteByThemeMonthplanById(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.common.utils.SecurityUtils;
import com.ruoyi.framework.security.LoginUser; import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.web.domain.server.Sys; import com.ruoyi.framework.web.domain.server.Sys;
import com.ruoyi.project.system.domain.ByClass; import com.ruoyi.project.system.domain.*;
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.service.IByClassService; import com.ruoyi.project.system.service.IByClassService;
import com.ruoyi.project.system.service.IBySchoolService; import com.ruoyi.project.system.service.IBySchoolService;
import com.ruoyi.project.system.service.ISysDeptService; import com.ruoyi.project.system.service.ISysDeptService;
@ -101,6 +98,7 @@ public class SchoolCommon {
* 判断当前用户是否拥有班级 * 判断当前用户是否拥有班级
**/ **/
public String getClassId() { public String getClassId() {
String strClassId = "-1";
SysUser sysUser = getUser(); SysUser sysUser = getUser();
ByClass byClass = new ByClass(); ByClass byClass = new ByClass();
//根据用户id来设置主班教师,配班教师,助理教师的教师id //根据用户id来设置主班教师,配班教师,助理教师的教师id
@ -114,8 +112,26 @@ public class SchoolCommon {
//如果实体byclassnew不为空,那么取出它的班级编号 //如果实体byclassnew不为空,那么取出它的班级编号
return byClassNew.getBjbh(); return byClassNew.getBjbh();
} else { } 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() { public String getCurrentXnXq() {
@ -187,4 +203,41 @@ public class SchoolCommon {
int month = (end.get(Calendar.YEAR) - start.get(Calendar.YEAR)) * 12; int month = (end.get(Calendar.YEAR) - start.get(Calendar.YEAR)) * 12;
return Math.abs(month + result); 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 java.util.UUID;
import com.ruoyi.common.utils.SecurityUtils; 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 com.ruoyi.project.common.SchoolCommon;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -38,6 +40,9 @@ public class ByClassController extends BaseController {
private IByClassService byClassService; private IByClassService byClassService;
@Autowired @Autowired
private SchoolCommon schoolCommon; private SchoolCommon schoolCommon;
@Autowired
private IByChildService byChildService;
/** /**
* 查询班级信息列表 * 查询班级信息列表
@ -46,7 +51,16 @@ public class ByClassController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(ByClass byClass) { public TableDataInfo list(ByClass byClass) {
startPage(); 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); return getDataTable(list);
} }
@ -209,6 +223,19 @@ public class ByClassController extends BaseController {
public AjaxResult remove(@PathVariable String[] bjbhs) { public AjaxResult remove(@PathVariable String[] bjbhs) {
//首先判断 当前用户是否为学校 //首先判断 当前用户是否为学校
if (schoolCommon.isSchool()) { 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 toAjax(byClassService.deleteByClassByIds(bjbhs));
} }
return AjaxResult.error("当前用户非幼儿园,无法删除班级"); return AjaxResult.error("当前用户非幼儿园,无法删除班级");

View File

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

View File

@ -23,7 +23,7 @@
<select id="selectByPlanweekitemList" parameterType="ByPlanweekitem" resultMap="ByPlanweekitemResult"> <select id="selectByPlanweekitemList" parameterType="ByPlanweekitem" resultMap="ByPlanweekitemResult">
<include refid="selectByPlanweekitemVo"/> <include refid="selectByPlanweekitemVo"/>
<where> <where>
<if test="wid != null ">and wid = #{wid}</if> <if test="wid != null and wid != ''"> and wid = #{wid}</if>
<if test="activitytype != null and activitytype != ''"> and activitytype = #{activitytype}</if> <if test="activitytype != null and activitytype != ''"> and activitytype = #{activitytype}</if>
<if test="content != null and content != ''"> and content = #{content}</if> <if test="content != null and content != ''"> and content = #{content}</if>
<if test="activitytime != null "> and activitytime = #{activitytime}</if> <if test="activitytime != null "> and activitytime = #{activitytime}</if>
@ -40,7 +40,7 @@
<insert id="insertByPlanweekitem" parameterType="ByPlanweekitem" useGeneratedKeys="true" keyProperty="id"> <insert id="insertByPlanweekitem" parameterType="ByPlanweekitem" useGeneratedKeys="true" keyProperty="id">
insert into by_planweekitem insert into by_planweekitem
<trim prefix="(" suffix=")" suffixOverrides=","> <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="activitytype != null and activitytype != ''">activitytype,</if>
<if test="content != null and content != ''">content,</if> <if test="content != null and content != ''">content,</if>
<if test="activitytime != null ">activitytime,</if> <if test="activitytime != null ">activitytime,</if>
@ -50,7 +50,7 @@
<if test="updateTime != null ">update_time,</if> <if test="updateTime != null ">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <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="activitytype != null and activitytype != ''">#{activitytype},</if>
<if test="content != null and content != ''">#{content},</if> <if test="content != null and content != ''">#{content},</if>
<if test="activitytime != null ">#{activitytime},</if> <if test="activitytime != null ">#{activitytime},</if>
@ -64,7 +64,7 @@
<update id="updateByPlanweekitem" parameterType="ByPlanweekitem"> <update id="updateByPlanweekitem" parameterType="ByPlanweekitem">
update by_planweekitem update by_planweekitem
<trim prefix="SET" suffixOverrides=","> <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="activitytype != null and activitytype != ''">activitytype = #{activitytype},</if>
<if test="content != null and content != ''">content = #{content},</if> <if test="content != null and content != ''">content = #{content},</if>
<if test="activitytime != null ">activitytime = #{activitytime},</if> <if test="activitytime != null ">activitytime = #{activitytime},</if>

View File

@ -44,9 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from by_schoolcalendar_class s, by_class c from by_schoolcalendar_class s, by_class c
</sql> </sql>
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult"> <select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass"
resultMap="BySchoolcalendarClassResult">
<include refid="selectBySchoolcalendarClassVo"/> <include refid="selectBySchoolcalendarClassVo"/>
<where> where s.classid=c.bjbh
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''">and type = #{type}</if> <if test="type != null and type != ''">and type = #{type}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if> <if test="classid != null and classid != ''">and classid = #{classid}</if>
@ -57,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stylecolor != null and stylecolor != ''">and stylecolor = #{stylecolor}</if> <if test="stylecolor != null and stylecolor != ''">and stylecolor = #{stylecolor}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if> <if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="createtime != null ">and createtime = #{createtime}</if> <if test="createtime != null ">and createtime = #{createtime}</if>
</where>
</select> </select>
<select id="selectBySchoolcalendarClassById" parameterType="Long" resultMap="BySchoolcalendarClassResult"> <select id="selectBySchoolcalendarClassById" parameterType="Long" resultMap="BySchoolcalendarClassResult">

View File

@ -108,4 +108,13 @@
</foreach> </foreach>
</delete> </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> </mapper>

View File

@ -7,66 +7,93 @@
<resultMap type="ByThemeMonthplan" id="ByThemeMonthplanResult"> <resultMap type="ByThemeMonthplan" id="ByThemeMonthplanResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="schoolid" column="schoolid" />
<result property="classid" column="classid" /> <result property="classid" column="classid" />
<result property="xnxq" column="xnxq" /> <result property="xnxq" column="xnxq" />
<result property="month" column="month" /> <result property="month" column="month" />
<result property="themes" column="themes" /> <result property="themes" column="themes" />
<result property="selfthemes" column="selfthemes" /> <result property="selfthemes" column="selfthemes" />
<result property="wxkc" column="wxkc" />
<result property="support" column="support" /> <result property="support" column="support" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="createuserid" column="createuserid" /> <result property="createuserid" column="createuserid" />
<result property="createTime" column="create_time" /> <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> </resultMap>
<sql id="selectByThemeMonthplanVo"> <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> </sql>
<select id="selectByThemeMonthplanList" parameterType="ByThemeMonthplan" resultMap="ByThemeMonthplanResult"> <select id="selectByThemeMonthplanList" parameterType="ByThemeMonthplan" resultMap="ByThemeMonthplanResult">
<include refid="selectByThemeMonthplanVo"/> <include refid="selectByThemeMonthplanVo"/>
<where> <where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</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="classid != null and classid != ''"> and classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''"> and xnxq = #{xnxq}</if> <if test="xnxq != null and xnxq != ''"> and xnxq = #{xnxq}</if>
<if test="month != null and month != ''">and month = #{month}</if> <if test="month != null "> and month = #{month}</if>
<if test="themes != null and themes != ''"> and themes = #{themes}</if> <if test="themes != null and themes != ''"> and themes = #{themes}</if>
<if test="selfthemes != null and selfthemes != ''"> and selfthemes = #{selfthemes}</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="support != null and support != ''"> and support = #{support}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</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> </where>
order by month desc
</select> </select>
<select id="selectByThemeMonthplanById" parameterType="Long" resultMap="ByThemeMonthplanResult"> <select id="selectByThemeMonthplanById" parameterType="String" resultMap="ByThemeMonthplanResult">
<include refid="selectByThemeMonthplanVo"/> <include refid="selectByThemeMonthplanVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertByThemeMonthplan" parameterType="ByThemeMonthplan" useGeneratedKeys="true" keyProperty="id"> <insert id="insertByThemeMonthplan" parameterType="ByThemeMonthplan">
insert into by_theme_monthplan insert into by_theme_monthplan
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="name != null and name != ''">name,</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="classid != null and classid != ''">classid,</if>
<if test="xnxq != null and xnxq != ''">xnxq,</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="themes != null and themes != ''">themes,</if>
<if test="selfthemes != null and selfthemes != ''">selfthemes,</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="support != null and support != ''">support,</if>
<if test="remarks != null and remarks != ''">remarks,</if> <if test="remarks != null and remarks != ''">remarks,</if>
<if test="createuserid != null ">createuserid,</if> <if test="createuserid != null ">createuserid,</if>
<if test="createTime != null ">create_time,</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>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="name != null and name != ''">#{name},</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="classid != null and classid != ''">#{classid},</if>
<if test="xnxq != null and xnxq != ''">#{xnxq},</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="themes != null and themes != ''">#{themes},</if>
<if test="selfthemes != null and selfthemes != ''">#{selfthemes},</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="support != null and support != ''">#{support},</if>
<if test="remarks != null and remarks != ''">#{remarks},</if> <if test="remarks != null and remarks != ''">#{remarks},</if>
<if test="createuserid != null ">#{createuserid},</if> <if test="createuserid != null ">#{createuserid},</if>
<if test="createTime != null ">#{createTime},</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> </trim>
</insert> </insert>
@ -74,20 +101,26 @@
update by_theme_monthplan update by_theme_monthplan
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if> <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="classid != null and classid != ''">classid = #{classid},</if>
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</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="themes != null and themes != ''">themes = #{themes},</if>
<if test="selfthemes != null and selfthemes != ''">selfthemes = #{selfthemes},</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="support != null and support != ''">support = #{support},</if>
<if test="remarks != null and remarks != ''">remarks = #{remarks},</if> <if test="remarks != null and remarks != ''">remarks = #{remarks},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if> <if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createTime != null ">create_time = #{createTime},</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> </trim>
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteByThemeMonthplanById" parameterType="Long"> <delete id="deleteByThemeMonthplanById" parameterType="String">
delete from by_theme_monthplan where id = #{id} delete from by_theme_monthplan where id = #{id}
</delete> </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

@ -20,12 +20,13 @@
select id, tpid, month, themeconent, remark, createuserid, create_time, updateuserid, update_time from by_theme_termplanitem select id, tpid, month, themeconent, remark, createuserid, create_time, updateuserid, update_time from by_theme_termplanitem
</sql> </sql>
<select id="selectByThemeTermplanitemList" parameterType="ByThemeTermplanitem" resultMap="ByThemeTermplanitemResult"> <select id="selectByThemeTermplanitemList" parameterType="ByThemeTermplanitem"
resultMap="ByThemeTermplanitemResult">
<include refid="selectByThemeTermplanitemVo"/> <include refid="selectByThemeTermplanitemVo"/>
<where> <where>
<if test="tpid != null and tpid != ''">and tpid = #{tpid}</if> <if test="tpid != null and tpid != ''">and tpid = #{tpid}</if>
<if test="month != null ">and month = #{month}</if> <if test="month != null ">and month = #{month}</if>
<if test="themeconent != null and themeconent != ''"> and themeconent = #{themeconent}</if> <if test="themeconent != null and themeconent != ''">and themeconent like concat('%;', #{themeconent}, ';%')</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if> <if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="updateuserid != null ">and updateuserid = #{updateuserid}</if> <if test="updateuserid != null ">and updateuserid = #{updateuserid}</if>
</where> </where>

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"> <select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult">
<include refid="selectByClassVo"/> <include refid="selectByClassVo"/>
where isdel='0' 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="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
<if test="bjtype != null and bjtype != ''">and bjtype = #{bjtype}</if> <if test="bjtype != null and bjtype != ''">and bjtype = #{bjtype}</if>
<if test="bhxh != null ">and bhxh = #{bhxh}</if> <if test="bhxh != null ">and bhxh = #{bhxh}</if>