主题整合学期计划

This commit is contained in:
paidaxing444 2020-08-24 17:59:49 +08:00
parent 90b454d7af
commit fd6616a29a
10 changed files with 242 additions and 216 deletions

View File

@ -1,87 +1,31 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="学校id" prop="schoolid">
<el-input
v-model="queryParams.schoolid"
placeholder="请输入学校id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="班级id" prop="classid">
<el-input
v-model="queryParams.classid"
placeholder="请输入班级id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="月份" prop="month">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="queryParams.month"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择月份"
></el-date-picker>
<el-form-item label="班级编码" prop="classid">
<el-select v-model="queryParams.classid" placeholder="请选择班级">
<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="xnxq">
<el-input
v-model="queryParams.xnxq"
placeholder="请输入学年学期"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<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="createuserid">
<el-input
v-model="queryParams.createuserid"
placeholder="请输入创建人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</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-option label="请选择字典生成" value />
</el-select>
</el-form-item>
<el-form-item label="审批人" prop="spr">
<el-input
v-model="queryParams.spr"
placeholder="请输入审批人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审批时间" prop="sptime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="queryParams.sptime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择审批时间"
></el-date-picker>
</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>
@ -122,30 +66,21 @@
<el-table v-loading="loading" :data="termplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="学校id" align="center" prop="schoolid" />
<el-table-column label="班级id" align="center" prop="classid" />
<el-table-column label="班级" align="center" prop="classid" :formatter="classFormat" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="月份" align="center" prop="startmonth" width="180">
<el-table-column label="开始月份" align="center" prop="startmonth" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startmonth, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.startmonth, '{y}-{m}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束月份" align="center" prop="endmonth" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endmonth, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.endmonth, '{y}-{m}') }}</span>
</template>
</el-table-column>
<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="remark" />
<el-table-column label="创建人" align="center" prop="createuserid" />
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="审批人" align="center" prop="spr" />
<el-table-column label="审批时间" align="center" prop="sptime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.sptime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -177,61 +112,28 @@
<!-- 添加或修改主题整合学期计划对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="学校id" prop="schoolid">
<el-input v-model="form.schoolid" placeholder="请输入学校id" />
</el-form-item>
<el-form-item label="班级id" prop="classid">
<el-input v-model="form.classid" placeholder="请输入班级id" />
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="月份" prop="startmonth">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.startmonth"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择月份"
></el-date-picker>
</el-form-item>
<el-form-item label="结束月份" prop="endmonth">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.endmonth"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择结束月份"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="yyyy-MM"
></el-date-picker>
</el-form-item>
<el-form-item label="学年学期" prop="xnxq">
<el-input v-model="form.xnxq" 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 label="创建人" prop="createuserid">
<el-input v-model="form.createuserid" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审批人" prop="spr">
<el-input v-model="form.spr" placeholder="请输入审批人" />
</el-form-item>
<el-form-item label="审批时间" prop="sptime">
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.sptime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择审批时间"
></el-date-picker>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -250,6 +152,7 @@ import {
addTermplan,
updateTermplan,
} from "@/api/benyi/themetermplan";
import { listClass } from "@/api/system/class";
export default {
name: "Termplan",
@ -267,6 +170,10 @@ export default {
total: 0,
//
termplanList: [],
//
classOptions: [],
//
xnxqOptions: [],
//
title: "",
//
@ -289,13 +196,47 @@ export default {
//
form: {},
//
rules: {},
rules: {
xnxq: [
{ required: true, message: "学年学期不能为空", trigger: "blur" },
],
startmonth: [
{ required: true, message: "日期不能为空", trigger: "blur" },
],
},
};
},
created() {
this.getClassList();
this.getList();
this.getDicts("sys_xnxq").then((response) => {
this.xnxqOptions = response.data;
});
},
methods: {
//
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("");
},
// --
xnxqFormat(row, column) {
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
},
//
getClassList() {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
/** 查询主题整合学期计划列表 */
getList() {
this.loading = true;
@ -359,12 +300,19 @@ export default {
this.form = response.data;
this.open = true;
this.title = "修改主题整合学期计划";
const time = [];
time.push(response.data.startmonth);
time.push(response.data.endmonth);
this.form.startmonth = time;
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
const time = this.form.startmonth;
this.form.startmonth = time[0];
this.form.endmonth = time[1];
if (this.form.id != undefined) {
updateTermplan(this.form).then((response) => {
if (response.code === 200) {

View File

@ -1,6 +1,16 @@
package com.ruoyi.project.benyi.controller;
import java.text.ParseException;
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.ByThemeTermplanitem;
import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
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;
@ -28,31 +38,34 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/themetermplan")
public class ByThemeTermplanController extends BaseController
{
public class ByThemeTermplanController extends BaseController {
@Autowired
private IByThemeTermplanService byThemeTermplanService;
@Autowired
private SchoolCommon schoolCommon;
@Autowired
private IByClassService byClassService;
@Autowired
private IByThemeTermplanitemService byThemeTermplanitemService;
/**
* 查询主题整合学期计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeTermplan byThemeTermplan)
{
/**
* 查询主题整合学期计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeTermplan byThemeTermplan) {
startPage();
List<ByThemeTermplan> list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
return getDataTable(list);
}
/**
* 导出主题整合学期计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:export')")
@Log(title = "主题整合学期计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeTermplan byThemeTermplan)
{
public AjaxResult export(ByThemeTermplan byThemeTermplan) {
List<ByThemeTermplan> list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
ExcelUtil<ByThemeTermplan> util = new ExcelUtil<ByThemeTermplan>(ByThemeTermplan.class);
return util.exportExcel(list, "themetermplan");
@ -63,8 +76,7 @@ public class ByThemeTermplanController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byThemeTermplanService.selectByThemeTermplanById(id));
}
@ -74,9 +86,41 @@ public class ByThemeTermplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:add')")
@Log(title = "主题整合学期计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeTermplan byThemeTermplan)
{
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
public AjaxResult add(@RequestBody ByThemeTermplan byThemeTermplan) {
String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
int iCount = schoolCommon.getDifMonth(byThemeTermplan.getStartmonth(), byThemeTermplan.getEndmonth());
System.out.println("月份差=" + iCount);
String uuid = schoolCommon.getUuid();
byThemeTermplan.setId(uuid);
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
byThemeTermplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byThemeTermplan.setClassid(classId);
byThemeTermplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合学期计划");
ByThemeTermplanitem byThemeTermplanitem = null;
for (int i = 0; i <= iCount; i++) {
byThemeTermplanitem = new ByThemeTermplanitem();
byThemeTermplanitem.setTpid(uuid);
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
//月份加1
Calendar calendar = Calendar.getInstance();
calendar.setTime(byThemeTermplan.getStartmonth());
calendar.add(Calendar.MONTH, i);
byThemeTermplanitem.setMonth(calendar.getTime());
//创建时间
byThemeTermplanitem.setCreateTime(new Date());
//新增每月计划
byThemeTermplanitemService.insertByThemeTermplanitem(byThemeTermplanitem);
}
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
} else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿");
}
}
/**
@ -85,8 +129,7 @@ public class ByThemeTermplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:edit')")
@Log(title = "主题整合学期计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeTermplan byThemeTermplan)
{
public AjaxResult edit(@RequestBody ByThemeTermplan byThemeTermplan) {
return toAjax(byThemeTermplanService.updateByThemeTermplan(byThemeTermplan));
}
@ -96,8 +139,7 @@ public class ByThemeTermplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:remove')")
@Log(title = "主题整合学期计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(byThemeTermplanService.deleteByThemeTermplanByIds(ids));
}
}

View File

@ -43,15 +43,15 @@ public class ByThemeTermplan extends BaseEntity {
/**
* 月份
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "月份", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "月份", width = 30, dateFormat = "yyyy-MM")
private Date startmonth;
/**
* 结束月份
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束月份", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "结束月份", width = 30, dateFormat = "yyyy-MM")
private Date endmonth;
/**
@ -85,6 +85,12 @@ public class ByThemeTermplan extends BaseEntity {
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date sptime;
/**
* 审核意见
*/
@Excel(name = "审核意见")
private String shyj;
public void setId(String id) {
this.id = id;
}
@ -173,6 +179,14 @@ public class ByThemeTermplan extends BaseEntity {
return sptime;
}
public void setShyj(String shyj) {
this.shyj = shyj;
}
public String getShyj() {
return shyj;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@ -189,6 +203,7 @@ public class ByThemeTermplan extends BaseEntity {
.append("status", getStatus())
.append("spr", getSpr())
.append("sptime", getSptime())
.append("shyj", getShyj())
.toString();
}
}

View File

@ -28,6 +28,13 @@ public class ByThemeTermplanitem extends BaseEntity {
@Excel(name = "所属计划")
private String tpid;
/**
* 月份
*/
@JsonFormat(pattern = "yyyy-MM")
@Excel(name = "月份", width = 30, dateFormat = "yyyy-MM")
private Date month;
/**
* 主题内容
*/
@ -40,13 +47,6 @@ public class ByThemeTermplanitem extends BaseEntity {
@Excel(name = "创建人")
private Long createuserid;
/**
* $column.columnComment
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建人", width = 30, dateFormat = "yyyy-MM-dd")
private Date 创建时间;
/**
* 修改人
*/
@ -69,6 +69,14 @@ public class ByThemeTermplanitem extends BaseEntity {
return tpid;
}
public void setMonth(Date month) {
this.month = month;
}
public Date getMonth() {
return month;
}
public void setThemeconent(String themeconent) {
this.themeconent = themeconent;
}
@ -85,14 +93,6 @@ public class ByThemeTermplanitem extends BaseEntity {
return createuserid;
}
public void set创建时间(Date 创建时间) {
this.创建时间 = 创建时间;
}
public Date get创建时间() {
return 创建时间;
}
public void setUpdateuserid(Long updateuserid) {
this.updateuserid = updateuserid;
}
@ -106,12 +106,13 @@ public class ByThemeTermplanitem extends BaseEntity {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("tpid", getTpid())
.append("month", getMonth())
.append("themeconent", getThemeconent())
.append("remark", getRemark())
.append("createuserid", getCreateuserid())
.append("创建时间", get创建时间())
.append("createTime", getCreateTime())
.append("updateuserid", getUpdateuserid())
.append("updateTime", getUpdateTime())
.toString();
}
}
}

View File

@ -14,10 +14,10 @@ public interface ByThemeTermplanMapper {
/**
* 查询主题整合学期计划
*
* @param id 主题整合学期计划ID
* @param id 主题整合学期计划IDdeleteByThemeTermplanByIds
* @return 主题整合学期计划
*/
public ByThemeTermplan selectByThemeTermplanById(Long id);
public ByThemeTermplan selectByThemeTermplanById(String id);
/**
* 查询主题整合学期计划列表
@ -49,7 +49,7 @@ public interface ByThemeTermplanMapper {
* @param id 主题整合学期计划ID
* @return 结果
*/
public int deleteByThemeTermplanById(Long id);
public int deleteByThemeTermplanById(String id);
/**
* 批量删除主题整合学期计划
@ -57,5 +57,5 @@ public interface ByThemeTermplanMapper {
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeTermplanByIds(Long[] ids);
public int deleteByThemeTermplanByIds(String[] ids);
}

View File

@ -17,7 +17,7 @@ public interface IByThemeTermplanService {
* @param id 主题整合学期计划ID
* @return 主题整合学期计划
*/
public ByThemeTermplan selectByThemeTermplanById(Long id);
public ByThemeTermplan selectByThemeTermplanById(String id);
/**
* 查询主题整合学期计划列表
@ -49,7 +49,7 @@ public interface IByThemeTermplanService {
* @param ids 需要删除的主题整合学期计划ID
* @return 结果
*/
public int deleteByThemeTermplanByIds(Long[] ids);
public int deleteByThemeTermplanByIds(String[] ids);
/**
* 删除主题整合学期计划信息
@ -57,5 +57,5 @@ public interface IByThemeTermplanService {
* @param id 主题整合学期计划ID
* @return 结果
*/
public int deleteByThemeTermplanById(Long id);
public int deleteByThemeTermplanById(String id);
}

View File

@ -27,7 +27,7 @@ public class ByThemeTermplanServiceImpl implements IByThemeTermplanService {
* @return 主题整合学期计划
*/
@Override
public ByThemeTermplan selectByThemeTermplanById(Long id) {
public ByThemeTermplan selectByThemeTermplanById(String id) {
return byThemeTermplanMapper.selectByThemeTermplanById(id);
}
@ -72,7 +72,7 @@ public class ByThemeTermplanServiceImpl implements IByThemeTermplanService {
* @return 结果
*/
@Override
public int deleteByThemeTermplanByIds(Long[] ids) {
public int deleteByThemeTermplanByIds(String[] ids) {
return byThemeTermplanMapper.deleteByThemeTermplanByIds(ids);
}
@ -83,7 +83,7 @@ public class ByThemeTermplanServiceImpl implements IByThemeTermplanService {
* @return 结果
*/
@Override
public int deleteByThemeTermplanById(Long id) {
public int deleteByThemeTermplanById(String id) {
return byThemeTermplanMapper.deleteByThemeTermplanById(id);
}
}

View File

@ -109,8 +109,8 @@ public class SchoolCommon {
byClass.setZljs(sysUser.getUserId());
//新的返回byclassNew返回整条数据
ByClass byClassNew = byClassService.selectByClassByUserId(byClass);
System.out.println("--------------------"+ byClassNew);
if(byClassNew != null) {
System.out.println("--------------------" + byClassNew);
if (byClassNew != null) {
//如果实体byclassnew不为空,那么取出它的班级编号
return byClassNew.getBjbh();
} else {
@ -137,10 +137,10 @@ public class SchoolCommon {
//根据时间 生成学年学期
public String getCurrentXnXq(Date date) {
String year=String.format("%tY", date);
String year = String.format("%tY", date);
Integer iYear = Integer.parseInt(year);
System.out.println("当前年======:" + iYear);
String mon=String.format("%tm", date);
String mon = String.format("%tm", date);
Integer iMonth = Integer.parseInt(mon);
System.out.println("当前月======:" + iMonth);
String strNxNq = "";
@ -155,7 +155,7 @@ public class SchoolCommon {
}
public String getCurrentXn() {
return getCurrentXnXq().substring(0,9);
return getCurrentXnXq().substring(0, 9);
}
public String getCurrentYear() {
@ -173,7 +173,18 @@ public class SchoolCommon {
}
// 生成UUID
public String getUuid(){
return UUID.randomUUID().toString().replace("-","");
public String getUuid() {
return UUID.randomUUID().toString().replace("-", "");
}
//日期相减 获取月份
public Integer getDifMonth(Date startDate, Date endDate) {
Calendar start = Calendar.getInstance();
Calendar end = Calendar.getInstance();
start.setTime(startDate);
end.setTime(endDate);
int result = end.get(Calendar.MONTH) - start.get(Calendar.MONTH);
int month = (end.get(Calendar.YEAR) - start.get(Calendar.YEAR)) * 12;
return Math.abs(month + result);
}
}

View File

@ -18,10 +18,11 @@
<result property="status" column="status"/>
<result property="spr" column="spr"/>
<result property="sptime" column="sptime"/>
<result property="shyj" column="shyj"/>
</resultMap>
<sql id="selectByThemeTermplanVo">
select id, schoolid, classid, name, startmonth, endmonth, xnxq, remark, createuserid, create_time, status, spr, sptime from by_theme_termplan
select id, schoolid, classid, name, startmonth, endmonth, xnxq, remark, createuserid, create_time, status, spr, sptime, shyj from by_theme_termplan
</sql>
<select id="selectByThemeTermplanList" parameterType="ByThemeTermplan" resultMap="ByThemeTermplanResult">
@ -37,6 +38,7 @@
<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>
</where>
</select>
@ -61,6 +63,7 @@
<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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@ -76,6 +79,7 @@
<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>
</trim>
</insert>
@ -94,6 +98,7 @@
<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>
</trim>
where id = #{id}
</update>

View File

@ -5,30 +5,31 @@
<mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeTermplanitemMapper">
<resultMap type="ByThemeTermplanitem" id="ByThemeTermplanitemResult">
<result property="id" column="id"/>
<result property="tpid" column="tpid"/>
<result property="themeconent" column="themeconent"/>
<result property="remark" column="remark"/>
<result property="createuserid" column="createuserid"/>
<result property="创建时间" column="创建时间"/>
<result property="updateuserid" column="updateuserid"/>
<result property="updateTime" column="update_time"/>
<result property="id" column="id" />
<result property="tpid" column="tpid" />
<result property="month" column="month" />
<result property="themeconent" column="themeconent" />
<result property="remark" column="remark" />
<result property="createuserid" column="createuserid" />
<result property="createTime" column="create_time" />
<result property="updateuserid" column="updateuserid" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectByThemeTermplanitemVo">
select id, tpid, themeconent, remark, createuserid, 创建时间, updateuserid, update_time from by_theme_termplanitem
select id, tpid, month, themeconent, remark, createuserid, create_time, updateuserid, update_time from by_theme_termplanitem
</sql>
<select id="selectByThemeTermplanitemList" parameterType="ByThemeTermplanitem"
resultMap="ByThemeTermplanitemResult">
<select id="selectByThemeTermplanitemList" parameterType="ByThemeTermplanitem" resultMap="ByThemeTermplanitemResult">
<include refid="selectByThemeTermplanitemVo"/>
<where>
<if test="tpid != null and tpid != ''">and tpid = #{tpid}</if>
<if test="themeconent != null and themeconent != ''">and themeconent = #{themeconent}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="创建时间 != null ">and 创建时间 = #{创建时间}</if>
<if test="updateuserid != null ">and updateuserid = #{updateuserid}</if>
<if test="tpid != null and tpid != ''"> and tpid = #{tpid}</if>
<if test="month != null "> and month = #{month}</if>
<if test="themeconent != null and themeconent != ''"> and themeconent = #{themeconent}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="updateuserid != null "> and updateuserid = #{updateuserid}</if>
</where>
order by month
</select>
<select id="selectByThemeTermplanitemById" parameterType="Long" resultMap="ByThemeTermplanitemResult">
@ -40,19 +41,21 @@
insert into by_theme_termplanitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tpid != null and tpid != ''">tpid,</if>
<if test="month != null ">month,</if>
<if test="themeconent != null and themeconent != ''">themeconent,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="创建时间 != null ">创建时间,</if>
<if test="createTime != null ">create_time,</if>
<if test="updateuserid != null ">updateuserid,</if>
<if test="updateTime != null ">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tpid != null and tpid != ''">#{tpid},</if>
<if test="month != null ">#{month},</if>
<if test="themeconent != null and themeconent != ''">#{themeconent},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="创建时间 != null ">#{创建时间},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updateuserid != null ">#{updateuserid},</if>
<if test="updateTime != null ">#{updateTime},</if>
</trim>
@ -62,10 +65,11 @@
update by_theme_termplanitem
<trim prefix="SET" suffixOverrides=",">
<if test="tpid != null and tpid != ''">tpid = #{tpid},</if>
<if test="month != null ">month = #{month},</if>
<if test="themeconent != null and themeconent != ''">themeconent = #{themeconent},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="创建时间 != null ">创建时间 = #{创建时间},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="updateuserid != null ">updateuserid = #{updateuserid},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
</trim>