主题整合学期月计划

This commit is contained in:
paidaxing444
2020-08-25 16:02:51 +08:00
parent 8faf7c090a
commit ec500c38ef
8 changed files with 374 additions and 144 deletions

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>
@ -78,11 +91,23 @@
<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" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="计划名称" align="center" prop="name" /> <el-table-column label="计划名称" align="center" prop="name" />
<el-table-column label="所属班级" align="center" prop="classid" /> <el-table-column label="所属班级" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="学年学期" align="center" prop="xnxq" /> <el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" />
<el-table-column label="计划月份" align="center" prop="month" /> <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
@ -112,39 +137,31 @@
/> />
<!-- 添加或修改主题整合月计划对话框 --> <!-- 添加或修改主题整合月计划对话框 -->
<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"
></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="请选择学年学期">
<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="请输入内容" />
@ -166,11 +183,15 @@ import {
addMonthplan, addMonthplan,
updateMonthplan, updateMonthplan,
} 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 {
// 遮罩层 // 遮罩层
@ -183,56 +204,94 @@ 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) { // 当前状态类型--字典状态字典翻译
//locations是v-for里面的也是datas里面的值 statusFormat(row, column) {
let obj = {}; return this.selectDictLabel(this.statusOptions, row.status);
obj = this.classOptions.find((item) => { },
return item.bjbh === val; // 主题--字典状态字典翻译
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 +306,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 +335,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,8 +373,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加<主题整合>月计划"; this.title = "添加主题整合月计划";
this.disable = false;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -313,8 +382,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;
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */

View File

@ -1,7 +1,7 @@
<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-select v-model="queryParams.tpid" size="small"> <el-select v-model="queryParams.tpid" size="small">
<el-option <el-option
v-for="item in themePlanOptions" v-for="item in themePlanOptions"
@ -69,7 +69,7 @@
> >
<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" :formatter="themePlanFormat" /> <el-table-column label="学期计划" align="center" prop="tpid" :formatter="themePlanFormat" />
<el-table-column label="月份" align="center" prop="month" /> <el-table-column label="月份" align="center" prop="month" />
<el-table-column label="主题内容" align="center" prop="themeconent" :formatter="themeFormat" /> <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" />

View File

@ -6,7 +6,12 @@ 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.service.IByThemeTermplanService;
import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
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,12 @@ 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;
/** /**
* 查询主题整合月计划列表 * 查询主题整合月计划列表
@ -68,7 +79,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 +90,52 @@ 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("1");
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 < list.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());
byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划");
return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan)); return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
} else { } else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿"); return AjaxResult.error("当前用户非幼儿园,无法创建月计划");
} }
} }
@ -120,7 +155,7 @@ 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) {
return toAjax(byThemeMonthplanService.deleteByThemeMonthplanByIds(ids)); return toAjax(byThemeMonthplanService.deleteByThemeMonthplanByIds(ids));
} }
} }

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

@ -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

@ -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

@ -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

@ -7,66 +7,92 @@
<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>
</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 +100,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>