主题整合学期月计划(明细)

This commit is contained in:
paidaxing444 2020-08-26 09:07:40 +08:00
parent e47e97b89d
commit 2d8e96e661
17 changed files with 345 additions and 204 deletions

View File

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

View File

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询主题整合周计划列表
export function listWeekplan(query) {
return request({
url: '/benyi/themeweekplan/list',
url: '/benyi/thememonthplanitem/list',
method: 'get',
params: query
})
@ -12,7 +12,7 @@ export function listWeekplan(query) {
// 查询主题整合周计划详细
export function getWeekplan(id) {
return request({
url: '/benyi/themeweekplan/' + id,
url: '/benyi/thememonthplanitem/' + id,
method: 'get'
})
}
@ -20,7 +20,7 @@ export function getWeekplan(id) {
// 新增主题整合周计划
export function addWeekplan(data) {
return request({
url: '/benyi/themeweekplan',
url: '/benyi/thememonthplanitem',
method: 'post',
data: data
})
@ -29,7 +29,7 @@ export function addWeekplan(data) {
// 修改主题整合周计划
export function updateWeekplan(data) {
return request({
url: '/benyi/themeweekplan',
url: '/benyi/thememonthplanitem',
method: 'put',
data: data
})
@ -38,7 +38,7 @@ export function updateWeekplan(data) {
// 删除主题整合周计划
export function delWeekplan(id) {
return request({
url: '/benyi/themeweekplan/' + id,
url: '/benyi/thememonthplanitem/' + id,
method: 'delete'
})
}
@ -46,7 +46,7 @@ export function delWeekplan(id) {
// 导出主题整合周计划
export function exportWeekplan(query) {
return request({
url: '/benyi/themeweekplan/export',
url: '/benyi/thememonthplanitem/export',
method: 'get',
params: query
})

View File

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

View File

@ -12,9 +12,9 @@
</el-select>
</el-form-item>
<el-form-item label="周次" prop="zc">
<el-input
<el-input-number
v-model="queryParams.zc"
placeholder="请输入周次"
placeholder="周次"
clearable
size="small"
@keyup.enter.native="handleQuery"
@ -34,6 +34,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['benyi:thememonthplan:add']"
v-show="isShow"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -44,6 +45,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -54,6 +56,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow"
>删除</el-button>
</el-col>
</el-row>
@ -61,7 +64,7 @@
<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="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">
@ -73,7 +76,12 @@
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="活动" align="center" prop="activityid" />
<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">
@ -83,6 +91,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow"
>修改</el-button>
<el-button
size="mini"
@ -90,6 +99,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow"
>删除</el-button>
</template>
</el-table-column>
@ -174,7 +184,7 @@ import {
delWeekplan,
addWeekplan,
updateWeekplan,
} from "@/api/benyi/themeweekplan";
} from "@/api/benyi/thememonthplanitem";
import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan";
import { listActivityByThemeId } from "@/api/benyi/activity";
@ -182,6 +192,7 @@ export default {
name: "Weekplan",
data() {
return {
isShow: true,
//
loading: true,
//
@ -196,8 +207,11 @@ export default {
weekplanList: [],
//
themeMonthPlanOptions: [],
//id
defaultThemeMonthType: "",
//chebox
themeactivityList: [],
//
themeactivityOptions: [],
max: 5,
//
@ -239,6 +253,25 @@ export default {
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);
@ -257,7 +290,7 @@ export default {
this.themeactivityOptions = response.rows;
});
},
//
//
themeMonthPlanFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
@ -287,6 +320,12 @@ export default {
});
this.getThemeActivityList(array);
if (response.data.status == "0") {
this.isShow = true;
} else {
this.isShow = false;
}
this.getList();
});
},
@ -323,6 +362,7 @@ export default {
createTime: undefined,
};
this.resetForm("form");
this.themeactivityList = [];
},
/** 搜索按钮操作 */
handleQuery() {
@ -355,7 +395,17 @@ export default {
getWeekplan(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改主题整合周计划";
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;
});
},
/** 提交按钮 */

View File

@ -90,8 +90,8 @@
</el-row>
<el-table v-loading="loading" :data="monthplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<el-table-column type="selection" width="55" align="center" :selectable="isShow" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/benyi_course/thememonthplan/data/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
@ -112,7 +112,7 @@
</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="remarks" />-->
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -122,6 +122,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow(scope.row)"
>修改</el-button>
<el-button
size="mini"
@ -129,7 +130,16 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleCheck(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow(scope.row)"
>提交</el-button>
</template>
</el-table-column>
</el-table>
@ -188,6 +198,7 @@ import {
delMonthplan,
addMonthplan,
updateMonthplan,
checkMonthplan
} from "@/api/benyi/thememonthplan";
import Editor from "@/components/Editor";
import { listClass } from "@/api/system/class";
@ -269,6 +280,13 @@ export default {
});
},
methods: {
isShow(row) {
if (row.status == "0") {
return true;
} else {
return false;
}
},
// --
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
@ -419,7 +437,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合月计划编号为"' + ids + '"的数据项?',
'是否确认删除主题整合月计划数据项?',
"警告",
{
confirmButtonText: "确定",
@ -436,6 +454,27 @@ export default {
})
.catch(function () {});
},
/** 提交按钮操作 */
handleCheck(row) {
const id = row.id;
this.$confirm(
"是否确认提交主题整合月计划?提交后数据将不能维护",
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return checkMonthplan(id);
})
.then(() => {
this.getList();
this.msgSuccess("提交成功");
})
.catch(function () {});
},
},
};
</script>

View File

@ -376,7 +376,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合学期计划编号为"' + ids + '"的数据项?',
'是否确认删除主题整合学期计划数据项?',
"警告",
{
confirmButtonText: "确定",

View File

@ -1,15 +1,15 @@
package com.ruoyi.project.benyi.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.ByThemeTermplan;
import com.ruoyi.project.benyi.domain.ByThemeTermplanitem;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
import com.ruoyi.project.benyi.service.IByThemeTermplanService;
import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService;
import org.springframework.security.access.prepost.PreAuthorize;
@ -50,6 +50,8 @@ public class ByThemeMonthplanController extends BaseController {
private IByThemeTermplanService byThemeTermplanService;
@Autowired
private IByThemeTermplanitemService byThemeTermplanitemService;
@Autowired
private IByThemeMonthplanitemService byThemeWeekplanService;
/**
* 查询主题整合月计划列表
@ -136,7 +138,7 @@ public class ByThemeMonthplanController extends BaseController {
byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")");
return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
} else {
return AjaxResult.error("当前用户非幼儿园,无法创建月计划");
return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划");
}
}
@ -157,6 +159,28 @@ public class ByThemeMonthplanController extends BaseController {
@Log(title = "主题整合月计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{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 = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
if (list != null && list.size() > 0) {
return AjaxResult.error("选中的计划下存在子计划,无法删除");
}
}
return toAjax(byThemeMonthplanService.deleteByThemeMonthplanByIds(ids));
}
/**
* 提交主题整合学期计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
@Log(title = "主题整合学期计划", businessType = BusinessType.UPDATE)
@PostMapping("/check/{id}")
public AjaxResult check(@PathVariable String id) {
ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan();
byThemeMonthplan.setId(id);
byThemeMonthplan.setStatus("1");
return toAjax(byThemeMonthplanService.updateByThemeMonthplan(byThemeMonthplan));
}
}

View File

@ -16,8 +16,8 @@ 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.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;
@ -30,11 +30,11 @@ import com.ruoyi.framework.web.page.TableDataInfo;
* @date 2020-08-25
*/
@RestController
@RequestMapping("/benyi/themeweekplan")
public class ByThemeWeekplanController extends BaseController
@RequestMapping("/benyi/thememonthplanitem")
public class ByThemeMonthplanitemController extends BaseController
{
@Autowired
private IByThemeWeekplanService byThemeWeekplanService;
private IByThemeMonthplanitemService byThemeWeekplanService;
@Autowired
private SchoolCommon schoolCommon;
@ -43,10 +43,10 @@ public class ByThemeWeekplanController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeWeekplan byThemeWeekplan)
public TableDataInfo list(ByThemeMonthplanitem byThemeMonthplanitem)
{
startPage();
List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
return getDataTable(list);
}
@ -56,10 +56,10 @@ public class ByThemeWeekplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')")
@Log(title = "主题整合周计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeWeekplan byThemeWeekplan)
public AjaxResult export(ByThemeMonthplanitem byThemeMonthplanitem)
{
List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
ExcelUtil<ByThemeWeekplan> util = new ExcelUtil<ByThemeWeekplan>(ByThemeWeekplan.class);
List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
ExcelUtil<ByThemeMonthplanitem> util = new ExcelUtil<ByThemeMonthplanitem>(ByThemeMonthplanitem.class);
return util.exportExcel(list, "weekplan");
}
@ -70,7 +70,7 @@ public class ByThemeWeekplanController extends BaseController
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(byThemeWeekplanService.selectByThemeWeekplanById(id));
return AjaxResult.success(byThemeWeekplanService.selectByThemeMonthplanitemById(id));
}
/**
@ -79,12 +79,12 @@ public class ByThemeWeekplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')")
@Log(title = "主题整合周计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeWeekplan byThemeWeekplan)
public AjaxResult add(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem)
{
String uuid=schoolCommon.getUuid();
byThemeWeekplan.setId(uuid);
byThemeWeekplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan));
byThemeMonthplanitem.setId(uuid);
byThemeMonthplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeWeekplanService.insertByThemeMonthplanitem(byThemeMonthplanitem));
}
/**
@ -93,9 +93,9 @@ public class ByThemeWeekplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
@Log(title = "主题整合周计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeWeekplan byThemeWeekplan)
public AjaxResult edit(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem)
{
return toAjax(byThemeWeekplanService.updateByThemeWeekplan(byThemeWeekplan));
return toAjax(byThemeWeekplanService.updateByThemeMonthplanitem(byThemeMonthplanitem));
}
/**
@ -106,6 +106,6 @@ public class ByThemeWeekplanController extends BaseController
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids));
return toAjax(byThemeWeekplanService.deleteByThemeMonthplanitemByIds(ids));
}
}

View File

@ -118,7 +118,7 @@ public class ByThemeTermplanController extends BaseController {
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
} else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿");
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
}
}
@ -140,6 +140,15 @@ public class ByThemeTermplanController extends BaseController {
@Log(title = "主题整合学期计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
//首先判断当前id下是否存在子目录
for (int i = 0; i < ids.length; i++) {
ByThemeTermplanitem byThemeTermplanitem = new ByThemeTermplanitem();
byThemeTermplanitem.setTpid(ids[i]);
List<ByThemeTermplanitem> list = byThemeTermplanitemService.selectByThemeTermplanitemList(byThemeTermplanitem);
if (list != null && list.size() > 0) {
return AjaxResult.error("选中的计划下存在子计划,无法删除");
}
}
return toAjax(byThemeTermplanService.deleteByThemeTermplanByIds(ids));
}

View File

@ -14,7 +14,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
* @author tsbz
* @date 2020-08-25
*/
public class ByThemeWeekplan extends BaseEntity {
public class ByThemeMonthplanitem extends BaseEntity {
private static final long serialVersionUID = 1L;
/**

View File

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

View File

@ -2,7 +2,7 @@ package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem;
/**
* 主题整合周计划Service接口
@ -10,38 +10,38 @@ import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
* @author tsbz
* @date 2020-08-25
*/
public interface IByThemeWeekplanService {
public interface IByThemeMonthplanitemService {
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
public ByThemeWeekplan selectByThemeWeekplanById(String id);
public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id);
/**
* 查询主题整合周计划列表
*
* @param byThemeWeekplan 主题整合周计划
* @param byThemeMonthplanitem 主题整合周计划
* @return 主题整合周计划集合
*/
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan);
public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 新增主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 修改主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @param byThemeMonthplanitem 主题整合周计划
* @return 结果
*/
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem);
/**
* 批量删除主题整合周计划
@ -49,7 +49,7 @@ public interface IByThemeWeekplanService {
* @param ids 需要删除的主题整合周计划ID
* @return 结果
*/
public int deleteByThemeWeekplanByIds(String[] ids);
public int deleteByThemeMonthplanitemByIds(String[] ids);
/**
* 删除主题整合周计划信息
@ -57,5 +57,5 @@ public interface IByThemeWeekplanService {
* @param id 主题整合周计划ID
* @return 结果
*/
public int deleteByThemeWeekplanById(String id);
public int deleteByThemeMonthplanitemById(String 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

@ -1,89 +0,0 @@
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-25
*/
@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

@ -46,7 +46,16 @@ public class ByClassController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(ByClass byClass) {
startPage();
List<ByClass> list = byClassService.selectByClassList(byClass);
List<ByClass> list = null;
String classId = schoolCommon.getClassId();
//如果是幼儿园教师 只显示当前班级
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byClass.setBjbh(classId);
list = byClassService.selectByClassList(byClass);
}else{
list = byClassService.selectByClassList(byClass);
}
return getDataTable(list);
}

View File

@ -2,9 +2,9 @@
<!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">
<mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeMonthplanitemMapper">
<resultMap type="ByThemeWeekplan" id="ByThemeWeekplanResult">
<resultMap type="ByThemeMonthplanitem" id="ByThemeMonthplanitemResult">
<result property="id" column="id"/>
<result property="mpid" column="mpid"/>
<result property="zc" column="zc"/>
@ -16,12 +16,12 @@
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectByThemeWeekplanVo">
select id, mpid, zc, starttime, endtime, activityid, jzzc, createuserid, create_time from by_theme_weekplan
<sql id="selectByThemeMonthplanitemVo">
select id, mpid, zc, starttime, endtime, activityid, jzzc, createuserid, create_time from by_theme_monthplanitem
</sql>
<select id="selectByThemeWeekplanList" parameterType="ByThemeWeekplan" resultMap="ByThemeWeekplanResult">
<include refid="selectByThemeWeekplanVo"/>
<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>
@ -34,13 +34,13 @@
order by zc
</select>
<select id="selectByThemeWeekplanById" parameterType="String" resultMap="ByThemeWeekplanResult">
<include refid="selectByThemeWeekplanVo"/>
<select id="selectByThemeMonthplanitemById" parameterType="String" resultMap="ByThemeMonthplanitemResult">
<include refid="selectByThemeMonthplanitemVo"/>
where id = #{id}
</select>
<insert id="insertByThemeWeekplan" parameterType="ByThemeWeekplan">
insert into by_theme_weekplan
<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>
@ -65,8 +65,8 @@
</trim>
</insert>
<update id="updateByThemeWeekplan" parameterType="ByThemeWeekplan">
update by_theme_weekplan
<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>
@ -80,12 +80,12 @@
where id = #{id}
</update>
<delete id="deleteByThemeWeekplanById" parameterType="String">
delete from by_theme_weekplan where id = #{id}
<delete id="deleteByThemeMonthplanitemById" parameterType="String">
delete from by_theme_monthplanitem where id = #{id}
</delete>
<delete id="deleteByThemeWeekplanByIds" parameterType="String">
delete from by_theme_weekplan where id in
<delete id="deleteByThemeMonthplanitemByIds" parameterType="String">
delete from by_theme_monthplanitem where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

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