20200720-zlp-1
幼儿管理
This commit is contained in:
parent
ccffb12833
commit
ca727677d2
53
ruoyi-ui/src/api/benyi/child.js
Normal file
53
ruoyi-ui/src/api/benyi/child.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询幼儿信息列表
|
||||
export function listChild(query) {
|
||||
return request({
|
||||
url: '/benyi/child/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询幼儿信息详细
|
||||
export function getChild(id) {
|
||||
return request({
|
||||
url: '/benyi/child/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增幼儿信息
|
||||
export function addChild(data) {
|
||||
return request({
|
||||
url: '/benyi/child',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改幼儿信息
|
||||
export function updateChild(data) {
|
||||
return request({
|
||||
url: '/benyi/child',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除幼儿信息
|
||||
export function delChild(id) {
|
||||
return request({
|
||||
url: '/benyi/child/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出幼儿信息
|
||||
export function exportChild(query) {
|
||||
return request({
|
||||
url: '/benyi/child/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
471
ruoyi-ui/src/views/benyi/child/index.vue
Normal file
471
ruoyi-ui/src/views/benyi/child/index.vue
Normal file
@ -0,0 +1,471 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="xb">
|
||||
<el-input
|
||||
v-model="queryParams.xb"
|
||||
placeholder="请输入性别"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
||||
<el-option label="请选择字典生成" value />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['benyi:child:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['benyi:child:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['benyi:child:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="childList" @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="name" />
|
||||
<el-table-column label="英文名" align="center" prop="enName" />
|
||||
<el-table-column label="小名" align="center" prop="infantName" />
|
||||
<el-table-column label="家长手机号码" align="center" prop="phone" />
|
||||
<el-table-column label="性别" align="center" prop="xb" />
|
||||
<el-table-column label="民族" align="center" prop="mz" />
|
||||
<el-table-column label="证件号码" align="center" prop="zjhm" />
|
||||
<el-table-column label="出生日期" align="center" prop="csrq" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.csrq, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出生所在省" align="center" prop="birthProvince" />
|
||||
<el-table-column label="出生所在地市" align="center" prop="birthCity" />
|
||||
<el-table-column label="出生地区" align="center" prop="birthArea" />
|
||||
<el-table-column label="户口所在地" align="center" prop="registeredProvince" />
|
||||
<el-table-column label="户口所在地市" align="center" prop="registeredCity" />
|
||||
<el-table-column label="户口所在区" align="center" prop="registeredArea" />
|
||||
<el-table-column label="住址省" align="center" prop="addrProvince" />
|
||||
<el-table-column label="住址市" align="center" prop="addrCity" />
|
||||
<el-table-column label="住址区" align="center" prop="addrArea" />
|
||||
<el-table-column label="详细地址" align="center" prop="addrDetail" />
|
||||
<el-table-column label="曾经就读幼儿园" align="center" prop="everSchool" />
|
||||
<el-table-column label="是否学习英语" align="center" prop="learnEnglish" />
|
||||
<el-table-column label="入园渠道" align="center" prop="source" />
|
||||
<el-table-column label="状态" align="center" prop="status" />
|
||||
<el-table-column label="入园时间" align="center" prop="enterDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.enterDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离园时间" align="center" prop="outDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.outDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="第一语言" align="center" prop="firstLanguage" />
|
||||
<el-table-column label="第二语言" align="center" prop="seconderLanguage" />
|
||||
<el-table-column label="其他语言" align="center" prop="otherLanguage" />
|
||||
<el-table-column label="创建人" align="center" prop="createuserid" />
|
||||
<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:child:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:child:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改幼儿信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="学校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="enName">
|
||||
<el-input v-model="form.enName" placeholder="请输入英文名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="小名" prop="infantName">
|
||||
<el-input v-model="form.infantName" placeholder="请输入小名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长手机号码" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入家长手机号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="xb">
|
||||
<el-input v-model="form.xb" placeholder="请输入性别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="民族" prop="mz">
|
||||
<el-input v-model="form.mz" placeholder="请输入民族" />
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码" prop="zjhm">
|
||||
<el-input v-model="form.zjhm" placeholder="请输入证件号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出生日期" prop="csrq">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="form.csrq"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择出生日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="出生所在省" prop="birthProvince">
|
||||
<el-input v-model="form.birthProvince" placeholder="请输入出生所在省" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出生所在地市" prop="birthCity">
|
||||
<el-input v-model="form.birthCity" placeholder="请输入出生所在地市" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出生地区" prop="birthArea">
|
||||
<el-input v-model="form.birthArea" placeholder="请输入出生地区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="户口所在地" prop="registeredProvince">
|
||||
<el-input v-model="form.registeredProvince" placeholder="请输入户口所在地" />
|
||||
</el-form-item>
|
||||
<el-form-item label="户口所在地市" prop="registeredCity">
|
||||
<el-input v-model="form.registeredCity" placeholder="请输入户口所在地市" />
|
||||
</el-form-item>
|
||||
<el-form-item label="户口所在区" prop="registeredArea">
|
||||
<el-input v-model="form.registeredArea" placeholder="请输入户口所在区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="住址省" prop="addrProvince">
|
||||
<el-input v-model="form.addrProvince" placeholder="请输入住址省" />
|
||||
</el-form-item>
|
||||
<el-form-item label="住址市" prop="addrCity">
|
||||
<el-input v-model="form.addrCity" placeholder="请输入住址市" />
|
||||
</el-form-item>
|
||||
<el-form-item label="住址区" prop="addrArea">
|
||||
<el-input v-model="form.addrArea" placeholder="请输入住址区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址" prop="addrDetail">
|
||||
<el-input v-model="form.addrDetail" placeholder="请输入详细地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="曾经就读幼儿园" prop="everSchool">
|
||||
<el-input v-model="form.everSchool" placeholder="请输入曾经就读幼儿园" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否学习英语" prop="learnEnglish">
|
||||
<el-input v-model="form.learnEnglish" placeholder="请输入是否学习英语" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入园渠道" prop="source">
|
||||
<el-input v-model="form.source" 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="enterDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="form.enterDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择入园时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="离园时间" prop="outDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="form.outDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择离园时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="第一语言" prop="firstLanguage">
|
||||
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" />
|
||||
</el-form-item>
|
||||
<el-form-item label="第二语言" prop="seconderLanguage">
|
||||
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他语言" prop="otherLanguage">
|
||||
<el-input v-model="form.otherLanguage" 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 {
|
||||
listChild,
|
||||
getChild,
|
||||
delChild,
|
||||
addChild,
|
||||
updateChild
|
||||
} from "@/api/benyi/child";
|
||||
|
||||
export default {
|
||||
name: "Child",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 幼儿信息表格数据
|
||||
childList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
schoolid: undefined,
|
||||
classid: undefined,
|
||||
name: undefined,
|
||||
enName: undefined,
|
||||
infantName: undefined,
|
||||
phone: undefined,
|
||||
xb: undefined,
|
||||
mz: undefined,
|
||||
zjhm: undefined,
|
||||
csrq: undefined,
|
||||
birthProvince: undefined,
|
||||
birthCity: undefined,
|
||||
birthArea: undefined,
|
||||
registeredProvince: undefined,
|
||||
registeredCity: undefined,
|
||||
registeredArea: undefined,
|
||||
addrProvince: undefined,
|
||||
addrCity: undefined,
|
||||
addrArea: undefined,
|
||||
addrDetail: undefined,
|
||||
everSchool: undefined,
|
||||
learnEnglish: undefined,
|
||||
source: undefined,
|
||||
status: undefined,
|
||||
enterDate: undefined,
|
||||
outDate: undefined,
|
||||
firstLanguage: undefined,
|
||||
seconderLanguage: undefined,
|
||||
otherLanguage: undefined,
|
||||
createuserid: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询幼儿信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listChild(this.queryParams).then(response => {
|
||||
this.childList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
schoolid: undefined,
|
||||
classid: undefined,
|
||||
name: undefined,
|
||||
enName: undefined,
|
||||
infantName: undefined,
|
||||
phone: undefined,
|
||||
xb: undefined,
|
||||
mz: undefined,
|
||||
zjhm: undefined,
|
||||
csrq: undefined,
|
||||
birthProvince: undefined,
|
||||
birthCity: undefined,
|
||||
birthArea: undefined,
|
||||
registeredProvince: undefined,
|
||||
registeredCity: undefined,
|
||||
registeredArea: undefined,
|
||||
addrProvince: undefined,
|
||||
addrCity: undefined,
|
||||
addrArea: undefined,
|
||||
addrDetail: undefined,
|
||||
everSchool: undefined,
|
||||
learnEnglish: undefined,
|
||||
source: undefined,
|
||||
status: "0",
|
||||
enterDate: undefined,
|
||||
outDate: undefined,
|
||||
firstLanguage: undefined,
|
||||
seconderLanguage: undefined,
|
||||
otherLanguage: 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;
|
||||
getChild(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) {
|
||||
updateChild(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addChild(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm(
|
||||
'是否确认删除幼儿信息编号为"' + ids + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return delChild(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
import com.ruoyi.project.benyi.service.IByChildService;
|
||||
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-07-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/child")
|
||||
public class ByChildController extends BaseController {
|
||||
@Autowired
|
||||
private IByChildService byChildService;
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByChild byChild) {
|
||||
startPage();
|
||||
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出幼儿信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:export')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByChild byChild) {
|
||||
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||
ExcelUtil<ByChild> util = new ExcelUtil<ByChild>(ByChild.class);
|
||||
return util.exportExcel(list, "child");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取幼儿信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(byChildService.selectByChildById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:add')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByChild byChild) {
|
||||
return toAjax(byChildService.insertByChild(byChild));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:edit')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByChild byChild) {
|
||||
return toAjax(byChildService.updateByChild(byChild));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:remove')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(byChildService.deleteByChildByIds(ids));
|
||||
}
|
||||
}
|
493
ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java
Normal file
493
ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java
Normal file
@ -0,0 +1,493 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 幼儿信息对象 by_child
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public class ByChild extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
*/
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolid;
|
||||
|
||||
/**
|
||||
* 班级id
|
||||
*/
|
||||
@Excel(name = "班级id")
|
||||
private Long classid;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@Excel(name = "英文名")
|
||||
private String enName;
|
||||
|
||||
/**
|
||||
* 小名
|
||||
*/
|
||||
@Excel(name = "小名")
|
||||
private String infantName;
|
||||
|
||||
/**
|
||||
* 家长手机号码
|
||||
*/
|
||||
@Excel(name = "家长手机号码")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Excel(name = "性别")
|
||||
private String xb;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@Excel(name = "民族")
|
||||
private String mz;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
@Excel(name = "证件号码")
|
||||
private String zjhm;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date csrq;
|
||||
|
||||
/**
|
||||
* 出生所在省
|
||||
*/
|
||||
@Excel(name = "出生所在省")
|
||||
private String birthProvince;
|
||||
|
||||
/**
|
||||
* 出生所在地市
|
||||
*/
|
||||
@Excel(name = "出生所在地市")
|
||||
private String birthCity;
|
||||
|
||||
/**
|
||||
* 出生地区
|
||||
*/
|
||||
@Excel(name = "出生地区")
|
||||
private String birthArea;
|
||||
|
||||
/**
|
||||
* 户口所在地
|
||||
*/
|
||||
@Excel(name = "户口所在地")
|
||||
private String registeredProvince;
|
||||
|
||||
/**
|
||||
* 户口所在地市
|
||||
*/
|
||||
@Excel(name = "户口所在地市")
|
||||
private String registeredCity;
|
||||
|
||||
/**
|
||||
* 户口所在区
|
||||
*/
|
||||
@Excel(name = "户口所在区")
|
||||
private String registeredArea;
|
||||
|
||||
/**
|
||||
* 住址省
|
||||
*/
|
||||
@Excel(name = "住址省")
|
||||
private String addrProvince;
|
||||
|
||||
/**
|
||||
* 住址市
|
||||
*/
|
||||
@Excel(name = "住址市")
|
||||
private String addrCity;
|
||||
|
||||
/**
|
||||
* 住址区
|
||||
*/
|
||||
@Excel(name = "住址区")
|
||||
private String addrArea;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@Excel(name = "详细地址")
|
||||
private String addrDetail;
|
||||
|
||||
/**
|
||||
* 曾经就读幼儿园
|
||||
*/
|
||||
@Excel(name = "曾经就读幼儿园")
|
||||
private String everSchool;
|
||||
|
||||
/**
|
||||
* 是否学习英语
|
||||
*/
|
||||
@Excel(name = "是否学习英语")
|
||||
private String learnEnglish;
|
||||
|
||||
/**
|
||||
* 入园渠道
|
||||
*/
|
||||
@Excel(name = "入园渠道")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 入园时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入园时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date enterDate;
|
||||
|
||||
/**
|
||||
* 离园时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "离园时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date outDate;
|
||||
|
||||
/**
|
||||
* 第一语言
|
||||
*/
|
||||
@Excel(name = "第一语言")
|
||||
private String firstLanguage;
|
||||
|
||||
/**
|
||||
* 第二语言
|
||||
*/
|
||||
@Excel(name = "第二语言")
|
||||
private String seconderLanguage;
|
||||
|
||||
/**
|
||||
* 其他语言
|
||||
*/
|
||||
@Excel(name = "其他语言")
|
||||
private String otherLanguage;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSchoolid(Long schoolid) {
|
||||
this.schoolid = schoolid;
|
||||
}
|
||||
|
||||
public Long getSchoolid() {
|
||||
return schoolid;
|
||||
}
|
||||
|
||||
public void setClassid(Long classid) {
|
||||
this.classid = classid;
|
||||
}
|
||||
|
||||
public Long getClassid() {
|
||||
return classid;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setInfantName(String infantName) {
|
||||
this.infantName = infantName;
|
||||
}
|
||||
|
||||
public String getInfantName() {
|
||||
return infantName;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setXb(String xb) {
|
||||
this.xb = xb;
|
||||
}
|
||||
|
||||
public String getXb() {
|
||||
return xb;
|
||||
}
|
||||
|
||||
public void setMz(String mz) {
|
||||
this.mz = mz;
|
||||
}
|
||||
|
||||
public String getMz() {
|
||||
return mz;
|
||||
}
|
||||
|
||||
public void setZjhm(String zjhm) {
|
||||
this.zjhm = zjhm;
|
||||
}
|
||||
|
||||
public String getZjhm() {
|
||||
return zjhm;
|
||||
}
|
||||
|
||||
public void setCsrq(Date csrq) {
|
||||
this.csrq = csrq;
|
||||
}
|
||||
|
||||
public Date getCsrq() {
|
||||
return csrq;
|
||||
}
|
||||
|
||||
public void setBirthProvince(String birthProvince) {
|
||||
this.birthProvince = birthProvince;
|
||||
}
|
||||
|
||||
public String getBirthProvince() {
|
||||
return birthProvince;
|
||||
}
|
||||
|
||||
public void setBirthCity(String birthCity) {
|
||||
this.birthCity = birthCity;
|
||||
}
|
||||
|
||||
public String getBirthCity() {
|
||||
return birthCity;
|
||||
}
|
||||
|
||||
public void setBirthArea(String birthArea) {
|
||||
this.birthArea = birthArea;
|
||||
}
|
||||
|
||||
public String getBirthArea() {
|
||||
return birthArea;
|
||||
}
|
||||
|
||||
public void setRegisteredProvince(String registeredProvince) {
|
||||
this.registeredProvince = registeredProvince;
|
||||
}
|
||||
|
||||
public String getRegisteredProvince() {
|
||||
return registeredProvince;
|
||||
}
|
||||
|
||||
public void setRegisteredCity(String registeredCity) {
|
||||
this.registeredCity = registeredCity;
|
||||
}
|
||||
|
||||
public String getRegisteredCity() {
|
||||
return registeredCity;
|
||||
}
|
||||
|
||||
public void setRegisteredArea(String registeredArea) {
|
||||
this.registeredArea = registeredArea;
|
||||
}
|
||||
|
||||
public String getRegisteredArea() {
|
||||
return registeredArea;
|
||||
}
|
||||
|
||||
public void setAddrProvince(String addrProvince) {
|
||||
this.addrProvince = addrProvince;
|
||||
}
|
||||
|
||||
public String getAddrProvince() {
|
||||
return addrProvince;
|
||||
}
|
||||
|
||||
public void setAddrCity(String addrCity) {
|
||||
this.addrCity = addrCity;
|
||||
}
|
||||
|
||||
public String getAddrCity() {
|
||||
return addrCity;
|
||||
}
|
||||
|
||||
public void setAddrArea(String addrArea) {
|
||||
this.addrArea = addrArea;
|
||||
}
|
||||
|
||||
public String getAddrArea() {
|
||||
return addrArea;
|
||||
}
|
||||
|
||||
public void setAddrDetail(String addrDetail) {
|
||||
this.addrDetail = addrDetail;
|
||||
}
|
||||
|
||||
public String getAddrDetail() {
|
||||
return addrDetail;
|
||||
}
|
||||
|
||||
public void setEverSchool(String everSchool) {
|
||||
this.everSchool = everSchool;
|
||||
}
|
||||
|
||||
public String getEverSchool() {
|
||||
return everSchool;
|
||||
}
|
||||
|
||||
public void setLearnEnglish(String learnEnglish) {
|
||||
this.learnEnglish = learnEnglish;
|
||||
}
|
||||
|
||||
public String getLearnEnglish() {
|
||||
return learnEnglish;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setEnterDate(Date enterDate) {
|
||||
this.enterDate = enterDate;
|
||||
}
|
||||
|
||||
public Date getEnterDate() {
|
||||
return enterDate;
|
||||
}
|
||||
|
||||
public void setOutDate(Date outDate) {
|
||||
this.outDate = outDate;
|
||||
}
|
||||
|
||||
public Date getOutDate() {
|
||||
return outDate;
|
||||
}
|
||||
|
||||
public void setFirstLanguage(String firstLanguage) {
|
||||
this.firstLanguage = firstLanguage;
|
||||
}
|
||||
|
||||
public String getFirstLanguage() {
|
||||
return firstLanguage;
|
||||
}
|
||||
|
||||
public void setSeconderLanguage(String seconderLanguage) {
|
||||
this.seconderLanguage = seconderLanguage;
|
||||
}
|
||||
|
||||
public String getSeconderLanguage() {
|
||||
return seconderLanguage;
|
||||
}
|
||||
|
||||
public void setOtherLanguage(String otherLanguage) {
|
||||
this.otherLanguage = otherLanguage;
|
||||
}
|
||||
|
||||
public String getOtherLanguage() {
|
||||
return otherLanguage;
|
||||
}
|
||||
|
||||
public void setCreateuserid(Long createuserid) {
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid() {
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("schoolid", getSchoolid())
|
||||
.append("classid", getClassid())
|
||||
.append("name", getName())
|
||||
.append("enName", getEnName())
|
||||
.append("infantName", getInfantName())
|
||||
.append("phone", getPhone())
|
||||
.append("xb", getXb())
|
||||
.append("mz", getMz())
|
||||
.append("zjhm", getZjhm())
|
||||
.append("csrq", getCsrq())
|
||||
.append("birthProvince", getBirthProvince())
|
||||
.append("birthCity", getBirthCity())
|
||||
.append("birthArea", getBirthArea())
|
||||
.append("registeredProvince", getRegisteredProvince())
|
||||
.append("registeredCity", getRegisteredCity())
|
||||
.append("registeredArea", getRegisteredArea())
|
||||
.append("addrProvince", getAddrProvince())
|
||||
.append("addrCity", getAddrCity())
|
||||
.append("addrArea", getAddrArea())
|
||||
.append("addrDetail", getAddrDetail())
|
||||
.append("everSchool", getEverSchool())
|
||||
.append("learnEnglish", getLearnEnglish())
|
||||
.append("source", getSource())
|
||||
.append("status", getStatus())
|
||||
.append("enterDate", getEnterDate())
|
||||
.append("outDate", getOutDate())
|
||||
.append("firstLanguage", getFirstLanguage())
|
||||
.append("seconderLanguage", getSeconderLanguage())
|
||||
.append("otherLanguage", getOtherLanguage())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
|
||||
/**
|
||||
* 幼儿信息Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public interface ByChildMapper {
|
||||
/**
|
||||
* 查询幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
public ByChild selectByChildById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
public List<ByChild> selectByChildList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 删除幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
|
||||
/**
|
||||
* 幼儿信息Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public interface IByChildService {
|
||||
/**
|
||||
* 查询幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
public ByChild selectByChildById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
public List<ByChild> selectByChildList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿信息
|
||||
*
|
||||
* @param ids 需要删除的幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除幼儿信息信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildById(Long id);
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByChildMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
import com.ruoyi.project.benyi.service.IByChildService;
|
||||
|
||||
/**
|
||||
* 幼儿信息Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
@Service
|
||||
public class ByChildServiceImpl implements IByChildService {
|
||||
@Autowired
|
||||
private ByChildMapper byChildMapper;
|
||||
|
||||
/**
|
||||
* 查询幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
@Override
|
||||
public ByChild selectByChildById(Long id) {
|
||||
return byChildMapper.selectByChildById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
@Override
|
||||
public List<ByChild> selectByChildList(ByChild byChild) {
|
||||
return byChildMapper.selectByChildList(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByChild(ByChild byChild) {
|
||||
byChild.setCreateTime(DateUtils.getNowDate());
|
||||
return byChildMapper.insertByChild(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByChild(ByChild byChild) {
|
||||
return byChildMapper.updateByChild(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除幼儿信息
|
||||
*
|
||||
* @param ids 需要删除的幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByChildByIds(Long[] ids) {
|
||||
return byChildMapper.deleteByChildByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿信息信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByChildById(Long id) {
|
||||
return byChildMapper.deleteByChildById(id);
|
||||
}
|
||||
}
|
206
ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml
Normal file
206
ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml
Normal file
@ -0,0 +1,206 @@
|
||||
<?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.ByChildMapper">
|
||||
|
||||
<resultMap type="ByChild" id="ByChildResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="schoolid" column="schoolid" />
|
||||
<result property="classid" column="classid" />
|
||||
<result property="name" column="name" />
|
||||
<result property="enName" column="en_name" />
|
||||
<result property="infantName" column="infant_name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="xb" column="xb" />
|
||||
<result property="mz" column="mz" />
|
||||
<result property="zjhm" column="zjhm" />
|
||||
<result property="csrq" column="csrq" />
|
||||
<result property="birthProvince" column="birth_province" />
|
||||
<result property="birthCity" column="birth_city" />
|
||||
<result property="birthArea" column="birth_area" />
|
||||
<result property="registeredProvince" column="registered_province" />
|
||||
<result property="registeredCity" column="registered_city" />
|
||||
<result property="registeredArea" column="registered_area" />
|
||||
<result property="addrProvince" column="addr_province" />
|
||||
<result property="addrCity" column="addr_city" />
|
||||
<result property="addrArea" column="addr_area" />
|
||||
<result property="addrDetail" column="addr_detail" />
|
||||
<result property="everSchool" column="ever_school" />
|
||||
<result property="learnEnglish" column="learn_english" />
|
||||
<result property="source" column="source" />
|
||||
<result property="status" column="status" />
|
||||
<result property="enterDate" column="enter_date" />
|
||||
<result property="outDate" column="out_date" />
|
||||
<result property="firstLanguage" column="first_language" />
|
||||
<result property="seconderLanguage" column="seconder_language" />
|
||||
<result property="otherLanguage" column="other_language" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByChildVo">
|
||||
select id, schoolid, classid, name, en_name, infant_name, phone, xb, mz, zjhm, csrq, birth_province, birth_city, birth_area, registered_province, registered_city, registered_area, addr_province, addr_city, addr_area, addr_detail, ever_school, learn_english, source, status, enter_date, out_date, first_language, seconder_language, other_language, createuserid, create_time from by_child
|
||||
</sql>
|
||||
|
||||
<select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult">
|
||||
<include refid="selectByChildVo"/>
|
||||
<where>
|
||||
<if test="schoolid != null "> and schoolid = #{schoolid}</if>
|
||||
<if test="classid != null "> and classid = #{classid}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="enName != null and enName != ''"> and en_name like concat('%', #{enName}, '%')</if>
|
||||
<if test="infantName != null and infantName != ''"> and infant_name like concat('%', #{infantName}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
|
||||
<if test="mz != null and mz != ''"> and mz = #{mz}</if>
|
||||
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
||||
<if test="csrq != null "> and csrq = #{csrq}</if>
|
||||
<if test="birthProvince != null and birthProvince != ''"> and birth_province = #{birthProvince}</if>
|
||||
<if test="birthCity != null and birthCity != ''"> and birth_city = #{birthCity}</if>
|
||||
<if test="birthArea != null and birthArea != ''"> and birth_area = #{birthArea}</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''"> and registered_province = #{registeredProvince}</if>
|
||||
<if test="registeredCity != null and registeredCity != ''"> and registered_city = #{registeredCity}</if>
|
||||
<if test="registeredArea != null and registeredArea != ''"> and registered_area = #{registeredArea}</if>
|
||||
<if test="addrProvince != null and addrProvince != ''"> and addr_province = #{addrProvince}</if>
|
||||
<if test="addrCity != null and addrCity != ''"> and addr_city = #{addrCity}</if>
|
||||
<if test="addrArea != null and addrArea != ''"> and addr_area = #{addrArea}</if>
|
||||
<if test="addrDetail != null and addrDetail != ''"> and addr_detail = #{addrDetail}</if>
|
||||
<if test="everSchool != null and everSchool != ''"> and ever_school = #{everSchool}</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''"> and learn_english = #{learnEnglish}</if>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="enterDate != null "> and enter_date = #{enterDate}</if>
|
||||
<if test="outDate != null "> and out_date = #{outDate}</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''"> and first_language = #{firstLanguage}</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''"> and seconder_language = #{seconderLanguage}</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''"> and other_language = #{otherLanguage}</if>
|
||||
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByChildById" parameterType="Long" resultMap="ByChildResult">
|
||||
<include refid="selectByChildVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByChild" parameterType="ByChild" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_child
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolid != null ">schoolid,</if>
|
||||
<if test="classid != null ">classid,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="enName != null and enName != ''">en_name,</if>
|
||||
<if test="infantName != null and infantName != ''">infant_name,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="xb != null and xb != ''">xb,</if>
|
||||
<if test="mz != null and mz != ''">mz,</if>
|
||||
<if test="zjhm != null and zjhm != ''">zjhm,</if>
|
||||
<if test="csrq != null ">csrq,</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">birth_province,</if>
|
||||
<if test="birthCity != null and birthCity != ''">birth_city,</if>
|
||||
<if test="birthArea != null and birthArea != ''">birth_area,</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">registered_province,</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">registered_city,</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">registered_area,</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">addr_province,</if>
|
||||
<if test="addrCity != null and addrCity != ''">addr_city,</if>
|
||||
<if test="addrArea != null and addrArea != ''">addr_area,</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">addr_detail,</if>
|
||||
<if test="everSchool != null and everSchool != ''">ever_school,</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">learn_english,</if>
|
||||
<if test="source != null and source != ''">source,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="enterDate != null ">enter_date,</if>
|
||||
<if test="outDate != null ">out_date,</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">first_language,</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language,</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">other_language,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolid != null ">#{schoolid},</if>
|
||||
<if test="classid != null ">#{classid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="enName != null and enName != ''">#{enName},</if>
|
||||
<if test="infantName != null and infantName != ''">#{infantName},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="xb != null and xb != ''">#{xb},</if>
|
||||
<if test="mz != null and mz != ''">#{mz},</if>
|
||||
<if test="zjhm != null and zjhm != ''">#{zjhm},</if>
|
||||
<if test="csrq != null ">#{csrq},</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">#{birthProvince},</if>
|
||||
<if test="birthCity != null and birthCity != ''">#{birthCity},</if>
|
||||
<if test="birthArea != null and birthArea != ''">#{birthArea},</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">#{registeredProvince},</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">#{registeredCity},</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">#{registeredArea},</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">#{addrProvince},</if>
|
||||
<if test="addrCity != null and addrCity != ''">#{addrCity},</if>
|
||||
<if test="addrArea != null and addrArea != ''">#{addrArea},</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">#{addrDetail},</if>
|
||||
<if test="everSchool != null and everSchool != ''">#{everSchool},</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">#{learnEnglish},</if>
|
||||
<if test="source != null and source != ''">#{source},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="enterDate != null ">#{enterDate},</if>
|
||||
<if test="outDate != null ">#{outDate},</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">#{firstLanguage},</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">#{seconderLanguage},</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">#{otherLanguage},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByChild" parameterType="ByChild">
|
||||
update by_child
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="schoolid != null ">schoolid = #{schoolid},</if>
|
||||
<if test="classid != null ">classid = #{classid},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="enName != null and enName != ''">en_name = #{enName},</if>
|
||||
<if test="infantName != null and infantName != ''">infant_name = #{infantName},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="xb != null and xb != ''">xb = #{xb},</if>
|
||||
<if test="mz != null and mz != ''">mz = #{mz},</if>
|
||||
<if test="zjhm != null and zjhm != ''">zjhm = #{zjhm},</if>
|
||||
<if test="csrq != null ">csrq = #{csrq},</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">birth_province = #{birthProvince},</if>
|
||||
<if test="birthCity != null and birthCity != ''">birth_city = #{birthCity},</if>
|
||||
<if test="birthArea != null and birthArea != ''">birth_area = #{birthArea},</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">registered_province = #{registeredProvince},</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">registered_city = #{registeredCity},</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">registered_area = #{registeredArea},</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">addr_province = #{addrProvince},</if>
|
||||
<if test="addrCity != null and addrCity != ''">addr_city = #{addrCity},</if>
|
||||
<if test="addrArea != null and addrArea != ''">addr_area = #{addrArea},</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">addr_detail = #{addrDetail},</if>
|
||||
<if test="everSchool != null and everSchool != ''">ever_school = #{everSchool},</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">learn_english = #{learnEnglish},</if>
|
||||
<if test="source != null and source != ''">source = #{source},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="enterDate != null ">enter_date = #{enterDate},</if>
|
||||
<if test="outDate != null ">out_date = #{outDate},</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">first_language = #{firstLanguage},</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language = #{seconderLanguage},</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">other_language = #{otherLanguage},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByChildById" parameterType="Long">
|
||||
delete from by_child where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByChildByIds" parameterType="String">
|
||||
delete from by_child where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user