20200510-zlp-1

新增本一端园历
园历新增字段 结束时间和活动样式
This commit is contained in:
paidaxing444 2020-05-10 21:03:42 +08:00
parent bf1836db64
commit d686674ddc
12 changed files with 1064 additions and 101 deletions

View File

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询园历管理(本一)列表
export function listCalendar(query) {
return request({
url: '/system/calendar/list',
method: 'get',
params: query
})
}
// 查询园历管理(本一)详细
export function getCalendar(id) {
return request({
url: '/system/calendar/' + id,
method: 'get'
})
}
// 新增园历管理(本一)
export function addCalendar(data) {
return request({
url: '/system/calendar',
method: 'post',
data: data
})
}
// 修改园历管理(本一)
export function updateCalendar(data) {
return request({
url: '/system/calendar',
method: 'put',
data: data
})
}
// 删除园历管理(本一)
export function delCalendar(id) {
return request({
url: '/system/calendar/' + id,
method: 'delete'
})
}
// 导出园历管理(本一)
export function exportCalendar(query) {
return request({
url: '/system/calendar/export',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,353 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="活动类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择活动类型" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="活动时间" prop="activitytime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.activitytime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择活动时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动结束时间" prop="activityendtime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.activityendtime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择活动结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动样式颜色" prop="stylecolor">
<el-input
v-model="queryParams.stylecolor"
placeholder="请输入活动样式颜色"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createuserid">
<el-input
v-model="queryParams.createuserid"
placeholder="请输入创建人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createtime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.createtime"
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>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:calendar:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:calendar:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:calendar:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:calendar:export']"
>导出</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="calendarList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="标识" align="center" prop="id" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="活动类型" align="center" prop="type" />
<el-table-column label="活动时间" align="center" prop="activitytime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.activitytime) }}</span>
</template>
</el-table-column>
<el-table-column label="活动结束时间" align="center" prop="activityendtime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.activityendtime) }}</span>
</template>
</el-table-column>
<el-table-column label="活动样式颜色" align="center" prop="stylecolor" />
<el-table-column label="创建人" align="center" prop="createuserid" />
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createtime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:calendar:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:calendar:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改园历管理(本一)对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="活动类型">
<el-select v-model="form.type" placeholder="请选择活动类型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="活动时间" prop="activitytime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="form.activitytime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择活动时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动结束时间" prop="activityendtime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="form.activityendtime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择活动结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动样式颜色" prop="stylecolor">
<el-input v-model="form.stylecolor" placeholder="请输入活动样式颜色" />
</el-form-item>
<el-form-item label="创建人" prop="createuserid">
<el-input v-model="form.createuserid" placeholder="请输入创建人" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCalendar, getCalendar, delCalendar, addCalendar, updateCalendar, exportCalendar } from "@/api/benyi/calendar";
export default {
name: "Calendar",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
// ()
calendarList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
type: undefined,
activitytime: undefined,
activityendtime: undefined,
stylecolor: undefined,
createuserid: undefined,
createtime: undefined
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询园历管理(本一)列表 */
getList() {
this.loading = true;
listCalendar(this.queryParams).then(response => {
this.calendarList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
name: undefined,
type: undefined,
activitytime: undefined,
activityendtime: undefined,
stylecolor: undefined,
createuserid: undefined,
createtime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加园历管理(本一)";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCalendar(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改园历管理(本一)";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateCalendar(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
} else {
addCalendar(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除园历管理(本一)编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delCalendar(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有园历管理(本一)数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportCalendar(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
}
};
</script>

View File

@ -0,0 +1,103 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.benyi.domain.ByCalendar;
import com.ruoyi.project.benyi.service.IByCalendarService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 园历管理(本一)Controller
*
* @author tsbz
* @date 2020-05-10
*/
@RestController
@RequestMapping("/benyi/calendar")
public class ByCalendarController extends BaseController
{
@Autowired
private IByCalendarService byCalendarService;
/**
* 查询园历管理(本一)列表
*/
@PreAuthorize("@ss.hasPermi('system:calendar:list')")
@GetMapping("/list")
public TableDataInfo list(ByCalendar byCalendar)
{
startPage();
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
return getDataTable(list);
}
/**
* 导出园历管理(本一)列表
*/
@PreAuthorize("@ss.hasPermi('system:calendar:export')")
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByCalendar byCalendar)
{
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class);
return util.exportExcel(list, "calendar");
}
/**
* 获取园历管理(本一)详细信息
*/
@PreAuthorize("@ss.hasPermi('system:calendar:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(byCalendarService.selectByCalendarById(id));
}
/**
* 新增园历管理(本一)
*/
@PreAuthorize("@ss.hasPermi('system:calendar:add')")
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByCalendar byCalendar)
{
return toAjax(byCalendarService.insertByCalendar(byCalendar));
}
/**
* 修改园历管理(本一)
*/
@PreAuthorize("@ss.hasPermi('system:calendar:edit')")
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByCalendar byCalendar)
{
return toAjax(byCalendarService.updateByCalendar(byCalendar));
}
/**
* 删除园历管理(本一)
*/
@PreAuthorize("@ss.hasPermi('system:calendar:remove')")
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(byCalendarService.deleteByCalendarByIds(ids));
}
}

View File

@ -0,0 +1,137 @@
package com.ruoyi.project.benyi.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import java.util.Date;
/**
* 园历管理(本一)对象 by_calendar
*
* @author tsbz
* @date 2020-05-10
*/
public class ByCalendar extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 标识 */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 活动类型 */
@Excel(name = "活动类型")
private String type;
/** 活动时间 */
@Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date activitytime;
/** 活动结束时间 */
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date activityendtime;
/** 活动样式颜色 */
@Excel(name = "活动样式颜色")
private String stylecolor;
/** 创建人 */
@Excel(name = "创建人")
private Long createuserid;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setActivitytime(Date activitytime)
{
this.activitytime = activitytime;
}
public Date getActivitytime()
{
return activitytime;
}
public void setActivityendtime(Date activityendtime)
{
this.activityendtime = activityendtime;
}
public Date getActivityendtime()
{
return activityendtime;
}
public void setStylecolor(String stylecolor)
{
this.stylecolor = stylecolor;
}
public String getStylecolor()
{
return stylecolor;
}
public void setCreateuserid(Long createuserid)
{
this.createuserid = createuserid;
}
public Long getCreateuserid()
{
return createuserid;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public Date getCreatetime() {
return createtime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("activitytime", getActivitytime())
.append("activityendtime", getActivityendtime())
.append("stylecolor", getStylecolor())
.append("createuserid", getCreateuserid())
.append("createtime", getCreatetime())
.toString();
}
}

View File

@ -5,46 +5,74 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import java.util.Date;
/**
* 园历管理对象 by_schoolcalendar
*
*
* @author tsbz
* @date 2020-04-20
*/
public class BySchoolcalendar extends BaseEntity
{
public class BySchoolcalendar extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 标识 */
/**
* 标识
*/
private Long id;
/** 名称 */
/**
* 名称
*/
@Excel(name = "名称")
private String name;
/** 活动类型 */
/**
* 活动类型
*/
@Excel(name = "活动类型")
private String type;
/** 适用范围:大班、中班、小班、全园 */
/**
* 适用范围大班中班小班全园
*/
@Excel(name = "适用范围:大班、中班、小班、全园")
private String scope;
/** 学年学期 */
/**
* 学年学期
*/
@Excel(name = "学年学期")
private String xnxq;
/** 所属学校 */
/**
* 所属学校
*/
@Excel(name = "所属学校")
private Long deptid;
/** 活动时间 */
/**
* 活动时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date activitytime;
/** 创建人 */
/**
* 活动结束时间
*/
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date activityendtime;
/**
* 活动样式颜色
*/
@Excel(name = "活动样式颜色")
private String stylecolor;
/**
* 创建人
*/
@Excel(name = "创建人")
private Long createuserid;
@ -54,78 +82,86 @@ public class BySchoolcalendar extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
public void setId(Long id)
{
public void setId(Long id) {
this.id = id;
}
public Long getId()
{
public Long getId() {
return id;
}
public void setName(String name)
{
public void setName(String name) {
this.name = name;
}
public String getName()
{
public String getName() {
return name;
}
public void setType(String type)
{
public void setType(String type) {
this.type = type;
}
public String getType()
{
public String getType() {
return type;
}
public void setScope(String scope)
{
public void setScope(String scope) {
this.scope = scope;
}
public String getScope()
{
public String getScope() {
return scope;
}
public void setXnxq(String xnxq)
{
public void setXnxq(String xnxq) {
this.xnxq = xnxq;
}
public String getXnxq()
{
public String getXnxq() {
return xnxq;
}
public void setDeptid(Long deptid)
{
public void setDeptid(Long deptid) {
this.deptid = deptid;
}
public Long getDeptid()
{
public Long getDeptid() {
return deptid;
}
public void setActivitytime(Date activitytime)
{
public void setActivitytime(Date activitytime) {
this.activitytime = activitytime;
}
public Date getActivitytime()
{
public Date getActivitytime() {
return activitytime;
}
public void setCreateuserid(Long createuserid)
{
public void setActivityendtime(Date activityendtime) {
this.activityendtime = activityendtime;
}
public Date getActivityendtime() {
return activityendtime;
}
public void setStylecolor(String stylecolor) {
this.stylecolor = stylecolor;
}
public String getStylecolor() {
return stylecolor;
}
public void setCreateuserid(Long createuserid) {
this.createuserid = createuserid;
}
public Long getCreateuserid()
{
public Long getCreateuserid() {
return createuserid;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
@ -136,16 +172,18 @@ public class BySchoolcalendar extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("scope", getScope())
.append("xnxq", getXnxq())
.append("deptid", getDeptid())
.append("activitytime", getActivitytime())
.append("createuserid", getCreateuserid())
.append("createtime", getCreatetime())
.toString();
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("scope", getScope())
.append("xnxq", getXnxq())
.append("deptid", getDeptid())
.append("activitytime", getActivitytime())
.append("activityendtime", getActivityendtime())
.append("stylecolor", getStylecolor())
.append("createuserid", getCreateuserid())
.append("createtime", getCreatetime())
.toString();
}
}

View File

@ -1,7 +1,6 @@
package com.ruoyi.project.benyi.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.project.system.domain.ByClass;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
@ -54,8 +53,6 @@ public class BySchoolcalendarClass extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
private ByClass byClass;
public void setId(Long id)
@ -145,7 +142,6 @@ public class BySchoolcalendarClass extends BaseEntity
.append("activitytime", getActivitytime())
.append("createuserid", getCreateuserid())
.append("createtime", getCreatetime())
.append("byClass", getByClass())
.toString();
}
@ -156,12 +152,4 @@ public class BySchoolcalendarClass extends BaseEntity
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public ByClass getByClass() {
return byClass;
}
public void setByClass(ByClass byClass) {
this.byClass = byClass;
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByCalendar;
/**
* 园历管理(本一)Mapper接口
*
* @author tsbz
* @date 2020-05-10
*/
public interface ByCalendarMapper
{
/**
* 查询园历管理(本一)
*
* @param id 园历管理(本一)ID
* @return 园历管理(本一)
*/
public ByCalendar selectByCalendarById(Long id);
/**
* 查询园历管理(本一)列表
*
* @param byCalendar 园历管理(本一)
* @return 园历管理(本一)集合
*/
public List<ByCalendar> selectByCalendarList(ByCalendar byCalendar);
/**
* 新增园历管理(本一)
*
* @param byCalendar 园历管理(本一)
* @return 结果
*/
public int insertByCalendar(ByCalendar byCalendar);
/**
* 修改园历管理(本一)
*
* @param byCalendar 园历管理(本一)
* @return 结果
*/
public int updateByCalendar(ByCalendar byCalendar);
/**
* 删除园历管理(本一)
*
* @param id 园历管理(本一)ID
* @return 结果
*/
public int deleteByCalendarById(Long id);
/**
* 批量删除园历管理(本一)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByCalendarByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByCalendar;
/**
* 园历管理(本一)Service接口
*
* @author tsbz
* @date 2020-05-10
*/
public interface IByCalendarService
{
/**
* 查询园历管理(本一)
*
* @param id 园历管理(本一)ID
* @return 园历管理(本一)
*/
public ByCalendar selectByCalendarById(Long id);
/**
* 查询园历管理(本一)列表
*
* @param byCalendar 园历管理(本一)
* @return 园历管理(本一)集合
*/
public List<ByCalendar> selectByCalendarList(ByCalendar byCalendar);
/**
* 新增园历管理(本一)
*
* @param byCalendar 园历管理(本一)
* @return 结果
*/
public int insertByCalendar(ByCalendar byCalendar);
/**
* 修改园历管理(本一)
*
* @param byCalendar 园历管理(本一)
* @return 结果
*/
public int updateByCalendar(ByCalendar byCalendar);
/**
* 批量删除园历管理(本一)
*
* @param ids 需要删除的园历管理(本一)ID
* @return 结果
*/
public int deleteByCalendarByIds(Long[] ids);
/**
* 删除园历管理(本一)信息
*
* @param id 园历管理(本一)ID
* @return 结果
*/
public int deleteByCalendarById(Long id);
}

View File

@ -0,0 +1,93 @@
package com.ruoyi.project.benyi.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.benyi.mapper.ByCalendarMapper;
import com.ruoyi.project.benyi.domain.ByCalendar;
import com.ruoyi.project.benyi.service.IByCalendarService;
/**
* 园历管理(本一)Service业务层处理
*
* @author tsbz
* @date 2020-05-10
*/
@Service
public class ByCalendarServiceImpl implements IByCalendarService
{
@Autowired
private ByCalendarMapper byCalendarMapper;
/**
* 查询园历管理(本一)
*
* @param id 园历管理(本一)ID
* @return 园历管理(本一)
*/
@Override
public ByCalendar selectByCalendarById(Long id)
{
return byCalendarMapper.selectByCalendarById(id);
}
/**
* 查询园历管理(本一)列表
*
* @param byCalendar 园历管理(本一)
* @return 园历管理(本一)
*/
@Override
public List<ByCalendar> selectByCalendarList(ByCalendar byCalendar)
{
return byCalendarMapper.selectByCalendarList(byCalendar);
}
/**
* 新增园历管理(本一)
*
* @param byCalendar 园历管理(本一)
* @return 结果
*/
@Override
public int insertByCalendar(ByCalendar byCalendar)
{
return byCalendarMapper.insertByCalendar(byCalendar);
}
/**
* 修改园历管理(本一)
*
* @param byCalendar 园历管理(本一)
* @return 结果
*/
@Override
public int updateByCalendar(ByCalendar byCalendar)
{
return byCalendarMapper.updateByCalendar(byCalendar);
}
/**
* 批量删除园历管理(本一)
*
* @param ids 需要删除的园历管理(本一)ID
* @return 结果
*/
@Override
public int deleteByCalendarByIds(Long[] ids)
{
return byCalendarMapper.deleteByCalendarByIds(ids);
}
/**
* 删除园历管理(本一)信息
*
* @param id 园历管理(本一)ID
* @return 结果
*/
@Override
public int deleteByCalendarById(Long id)
{
return byCalendarMapper.deleteByCalendarById(id);
}
}

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.benyi.mapper.ByCalendarMapper">
<resultMap type="ByCalendar" id="ByCalendarResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="activitytime" column="activitytime" />
<result property="activityendtime" column="activityendtime" />
<result property="stylecolor" column="stylecolor" />
<result property="createuserid" column="createuserid" />
<result property="createtime" column="createtime" />
</resultMap>
<sql id="selectByCalendarVo">
select id, name, type, activitytime, activityendtime, stylecolor, createuserid, createtime from by_calendar
</sql>
<select id="selectByCalendarList" parameterType="ByCalendar" resultMap="ByCalendarResult">
<include refid="selectByCalendarVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="activitytime != null "> and activitytime = #{activitytime}</if>
<if test="activityendtime != null "> and activityendtime = #{activityendtime}</if>
<if test="stylecolor != null and stylecolor != ''"> and stylecolor = #{stylecolor}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="createtime != null "> and createtime = #{createtime}</if>
</where>
</select>
<select id="selectByCalendarById" parameterType="Long" resultMap="ByCalendarResult">
<include refid="selectByCalendarVo"/>
where id = #{id}
</select>
<insert id="insertByCalendar" parameterType="ByCalendar">
insert into by_calendar
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null ">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="type != null and type != ''">type,</if>
<if test="activitytime != null ">activitytime,</if>
<if test="activityendtime != null ">activityendtime,</if>
<if test="stylecolor != null and stylecolor != ''">stylecolor,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createtime != null ">createtime,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null ">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="activitytime != null ">#{activitytime},</if>
<if test="activityendtime != null ">#{activityendtime},</if>
<if test="stylecolor != null and stylecolor != ''">#{stylecolor},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createtime != null ">#{createtime},</if>
</trim>
</insert>
<update id="updateByCalendar" parameterType="ByCalendar">
update by_calendar
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="activitytime != null ">activitytime = #{activitytime},</if>
<if test="activityendtime != null ">activityendtime = #{activityendtime},</if>
<if test="stylecolor != null and stylecolor != ''">stylecolor = #{stylecolor},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createtime != null ">createtime = #{createtime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByCalendarById" parameterType="Long">
delete from by_calendar where id = #{id}
</delete>
<delete id="deleteByCalendarByIds" parameterType="String">
delete from by_calendar where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -14,46 +14,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="activitytime" column="activitytime" />
<result property="createuserid" column="createuserid" />
<result property="createtime" column="createtime" />
<association property="byClass" column="bjbh" javaType="ByClass" resultMap="ByClassResult" />
</resultMap>
<resultMap type="ByClass" id="ByClassResult">
<result property="bjbh" column="bjbh"/>
<result property="deptId" column="dept_id"/>
<result property="bjtype" column="bjtype"/>
<result property="bhxh" column="bhxh"/>
<result property="xn" column="xn"/>
<result property="bjmc" column="bjmc"/>
<result property="bjrych" column="bjrych"/>
<result property="jbny" column="jbny"/>
<result property="zbjs" column="zbjs"/>
<result property="zbjsxm" column="zbjsxm"/>
<result property="pbjs" column="pbjs"/>
<result property="pbjsxm" column="pbjsxm"/>
<result property="zljs" column="zljs"/>
<result property="zljsxm" column="zljsxm"/>
<result property="isdel" column="isdel"/>
<result property="createtime" column="createtime"/>
</resultMap>
<sql id="selectBySchoolcalendarClassVo">
select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime
from by_schoolcalendar_class
select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime from by_schoolcalendar_class
</sql>
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult">
select sc.id, sc.name, sc.type, sc.classid, sc.xnxq, sc.deptId, sc.activitytime, sc.createuserid, sc.createtime,
c.bjbh, c.bjmc
from by_schoolcalendar_class sc, by_class c
<where>
<if test="name != null and name != ''"> and sc.name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and sc.type = #{type}</if>
<if test="classid != null and classid != ''"> and sc.classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''"> and sc.xnxq = #{xnxq}</if>
<if test="deptid != null "> and sc.deptId = #{deptid}</if>
<if test="activitytime != null "> and sc.activitytime = #{activitytime}</if>
<if test="createuserid != null "> and sc.createuserid = #{createuserid}</if>
<if test="createtime != null "> and sc.createtime = #{createtime}</if>
<include refid="selectBySchoolcalendarClassVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="classid != null and classid != ''"> and classid = #{classid}</if>
<if test="xnxq != null and xnxq != ''"> and xnxq = #{xnxq}</if>
<if test="deptid != null "> and deptId = #{deptid}</if>
<if test="activitytime != null "> and activitytime = #{activitytime}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
<if test="createtime != null "> and createtime = #{createtime}</if>
</where>
</select>

View File

@ -12,12 +12,14 @@
<result property="xnxq" column="xnxq"/>
<result property="deptid" column="dept_id"/>
<result property="activitytime" column="activitytime"/>
<result property="activityendtime" column="activityendtime" />
<result property="stylecolor" column="stylecolor" />
<result property="createuserid" column="createuserid"/>
<result property="createtime" column="createtime"/>
</resultMap>
<sql id="selectBySchoolcalendarVo">
select id, name, type, scope, xnxq, dept_id, activitytime, createuserid, createtime from by_schoolcalendar d
select id, name, type, scope, xnxq, dept_id, activitytime, activityendtime, stylecolor, createuserid, createtime from by_schoolcalendar d
</sql>
<select id="selectBySchoolcalendarList" parameterType="BySchoolcalendar" resultMap="BySchoolcalendarResult">
@ -29,6 +31,8 @@
<if test="xnxq != null and xnxq != ''">and xnxq like concat('%', #{xnxq}, '%')</if>
<if test="deptid != null ">and dept_id = #{deptid}</if>
<if test="activitytime != null ">and activitytime = #{activitytime}</if>
<if test="activityendtime != null "> and activityendtime = #{activityendtime}</if>
<if test="stylecolor != null and stylecolor != ''"> and stylecolor = #{stylecolor}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
AND date_format(activitytime,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
@ -56,6 +60,8 @@
<if test="xnxq != null and xnxq != ''">xnxq,</if>
<if test="deptid != null ">dept_id,</if>
<if test="activitytime != null ">activitytime,</if>
<if test="activityendtime != null ">activityendtime,</if>
<if test="stylecolor != null and stylecolor != ''">stylecolor,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createtime != null ">createtime,</if>
</trim>
@ -66,6 +72,8 @@
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
<if test="deptid != null ">#{deptid},</if>
<if test="activitytime != null ">#{activitytime},</if>
<if test="activityendtime != null ">#{activityendtime},</if>
<if test="stylecolor != null and stylecolor != ''">#{stylecolor},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createtime != null ">#{createtime},</if>
</trim>
@ -80,6 +88,8 @@
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
<if test="deptid != null ">dept_id = #{deptid},</if>
<if test="activitytime != null ">activitytime = #{activitytime},</if>
<if test="activityendtime != null ">activityendtime = #{activityendtime},</if>
<if test="stylecolor != null and stylecolor != ''">stylecolor = #{stylecolor},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createtime != null ">createtime = #{createtime},</if>
</trim>