20200721-zlp-1

幼儿管理
This commit is contained in:
paidaxing444 2020-07-21 18:00:49 +08:00
parent 54563295e5
commit 97f47e8942
6 changed files with 911 additions and 339 deletions

View File

@ -35,6 +35,15 @@ export function updateChild(data) {
}) })
} }
// 修改幼儿信息
export function updateChild_tb(data,id) {
return request({
url: '/benyi/child/'+id,
method: 'put',
data: data
})
}
// 删除幼儿信息 // 删除幼儿信息
export function delChild(id) { export function delChild(id) {
return request({ return request({

View File

@ -11,17 +11,35 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="性别" prop="xb"> <el-form-item label="性别" prop="xb">
<el-input <el-select
v-model="queryParams.xb" v-model="queryParams.xb"
placeholder="请输入性别" placeholder="请选择性别"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" style="width: 240px"
/> >
<el-option
v-for="dict in sexOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item> </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-select
<el-option label="请选择字典生成" value /> v-model="queryParams.status"
placeholder="请选择状态"
clearable
size="small"
style="width: 240px"
>
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -60,53 +78,32 @@
v-hasPermi="['benyi:child:remove']" v-hasPermi="['benyi:child:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
:disabled="multiple"
@click="handleTiaoban"
v-hasPermi="['benyi:child:edit']"
>调班</el-button>
</el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="childList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="childList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" /> <el-table-column label="编号" align="center" prop="id" />
<el-table-column label="学校id" align="center" prop="schoolid" /> <!-- <el-table-column label="幼儿园名称" 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="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="phone" />
<el-table-column label="性别" align="center" prop="xb" /> <el-table-column label="性别" align="center" prop="xb" :formatter="xbFormat" />
<el-table-column label="民族" align="center" prop="mz" /> <el-table-column label="民族" align="center" prop="mz" :formatter="mzFormat" />
<el-table-column label="证件号码" align="center" prop="zjhm" /> <el-table-column label="详细地址" show-overflow-tooltip align="center" prop="addrDetail" />
<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="everSchool" />
<el-table-column label="是否学习英语" align="center" prop="learnEnglish" /> <el-table-column label="是否学习英语" align="center" prop="learnEnglish" :formatter="ynFormat" />
<el-table-column label="入园渠道" align="center" prop="source" /> <el-table-column label="入园渠道" align="center" prop="source" :formatter="sourceFormat" />
<el-table-column label="状态" align="center" prop="status" /> <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<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"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -114,14 +111,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:child:edit']" v-hasPermi="['benyi:child:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:child:remove']" v-hasPermi="['benyi:child:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -136,130 +133,213 @@
/> />
<!-- 添加或修改幼儿信息对话框 --> <!-- 添加或修改幼儿信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-row :gutter="15">
<el-form-item label="学校id" prop="schoolid"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-input v-model="form.schoolid" placeholder="请输入学校id" /> <el-col :span="12">
</el-form-item> <el-form-item label="姓名" prop="name">
<el-form-item label="班级id" prop="classid"> <el-input v-model="form.name" placeholder="请输入姓名" />
<el-input v-model="form.classid" placeholder="请输入班级id" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="姓名" prop="name"> <el-col :span="12">
<el-input v-model="form.name" placeholder="请输入姓名" /> <el-form-item label="英文名" prop="enName">
</el-form-item> <el-input v-model="form.enName" placeholder="请输入英文名" />
<el-form-item label="英文名" prop="enName"> </el-form-item>
<el-input v-model="form.enName" placeholder="请输入英文名" /> </el-col>
</el-form-item> <el-col :span="12">
<el-form-item label="小名" prop="infantName"> <el-form-item label="小名" prop="infantName">
<el-input v-model="form.infantName" placeholder="请输入小名" /> <el-input v-model="form.infantName" placeholder="请输入小名" />
</el-form-item> </el-form-item>
<el-form-item label="家长手机号码" prop="phone"> </el-col>
<el-input v-model="form.phone" placeholder="请输入家长手机号码" /> <el-col :span="12">
</el-form-item> <el-form-item label="手机号码" prop="phone">
<el-form-item label="性别" prop="xb"> <el-input v-model="form.phone" placeholder="请输入家长手机号码" />
<el-input v-model="form.xb" placeholder="请输入性别" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="民族" prop="mz"> <el-col :span="12">
<el-input v-model="form.mz" placeholder="请输入民族" /> <el-form-item label="性别" prop="xb">
</el-form-item> <el-select v-model="form.xb" placeholder="请选择性别">
<el-form-item label="证件号码" prop="zjhm"> <el-option
<el-input v-model="form.zjhm" placeholder="请输入证件号码" /> v-for="dict in sexOptions"
</el-form-item> :key="dict.dictValue"
<el-form-item label="出生日期" prop="csrq"> :label="dict.dictLabel"
<el-date-picker :value="dict.dictValue"
clearable ></el-option>
size="small" </el-select>
style="width: 200px" </el-form-item>
v-model="form.csrq" </el-col>
type="date" <el-col :span="12">
value-format="yyyy-MM-dd" <el-form-item label="民族" prop="mz">
placeholder="选择出生日期" <el-select v-model="form.mz" placeholder="请选择民族">
></el-date-picker> <el-option
</el-form-item> v-for="dict in mzOptions"
<el-form-item label="出生所在省" prop="birthProvince"> :key="dict.dictValue"
<el-input v-model="form.birthProvince" placeholder="请输入出生所在省" /> :label="dict.dictLabel"
</el-form-item> :value="dict.dictValue"
<el-form-item label="出生所在地市" prop="birthCity"> ></el-option>
<el-input v-model="form.birthCity" placeholder="请输入出生所在地市" /> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="出生地区" prop="birthArea"> </el-col>
<el-input v-model="form.birthArea" placeholder="请输入出生地区" /> <el-col :span="12">
</el-form-item> <el-form-item label="证件号码" prop="zjhm">
<el-form-item label="户口所在地" prop="registeredProvince"> <el-input v-model="form.zjhm" placeholder="请输入证件号码" />
<el-input v-model="form.registeredProvince" placeholder="请输入户口所在地" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="户口所在地市" prop="registeredCity"> <el-col :span="12">
<el-input v-model="form.registeredCity" placeholder="请输入户口所在地市" /> <el-form-item label="出生日期" prop="csrq">
</el-form-item> <el-date-picker
<el-form-item label="户口所在区" prop="registeredArea"> clearable
<el-input v-model="form.registeredArea" placeholder="请输入户口所在区" /> size="small"
</el-form-item> style="width: 200px"
<el-form-item label="住址省" prop="addrProvince"> v-model="form.csrq"
<el-input v-model="form.addrProvince" placeholder="请输入住址省" /> type="date"
</el-form-item> value-format="yyyy-MM-dd"
<el-form-item label="住址市" prop="addrCity"> placeholder="选择出生日期"
<el-input v-model="form.addrCity" placeholder="请输入住址市" /> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="住址区" prop="addrArea"> </el-col>
<el-input v-model="form.addrArea" placeholder="请输入住址区" /> <el-col :span="24">
</el-form-item> <el-form-item label="出生地" prop="birthProvincename">
<el-form-item label="详细地址" prop="addrDetail"> <v-distpicker
<el-input v-model="form.addrDetail" placeholder="请输入详细地址" /> v-model="form.birthProvincename"
</el-form-item> :placeholders="placeholders"
<el-form-item label="曾经就读幼儿园" prop="everSchool"> :province="diglogForm.province"
<el-input v-model="form.everSchool" placeholder="请输入曾经就读幼儿园" /> :city="diglogForm.city"
</el-form-item> :area="diglogForm.area"
<el-form-item label="是否学习英语" prop="learnEnglish"> @selected="onSelected_brith"
<el-input v-model="form.learnEnglish" placeholder="请输入是否学习英语" /> ></v-distpicker>
</el-form-item> <el-input v-model="form.birthProvince" v-if="false" />
<el-form-item label="入园渠道" prop="source"> <el-input v-model="form.birthCity" v-if="false" />
<el-input v-model="form.source" placeholder="请输入入园渠道" /> <el-input v-model="form.birthArea" v-if="false" />
</el-form-item> </el-form-item>
<el-form-item label="状态"> </el-col>
<el-radio-group v-model="form.status"> <el-col :span="24">
<el-radio label="1">请选择字典生成</el-radio> <el-form-item label="户口地" prop="registeredProvincename">
</el-radio-group> <v-distpicker
</el-form-item> v-model="form.registeredProvincename"
<el-form-item label="入园时间" prop="enterDate"> :placeholders="placeholders"
<el-date-picker :province="diglogForm1.province"
clearable :city="diglogForm1.city"
size="small" :area="diglogForm1.area"
style="width: 200px" @selected="onSelected_registered"
v-model="form.enterDate" ></v-distpicker>
type="date" <el-input v-model="form.registeredProvince" v-if="false" />
value-format="yyyy-MM-dd" <el-input v-model="form.registeredCity" v-if="false" />
placeholder="选择入园时间" <el-input v-model="form.registeredArea" v-if="false" />
></el-date-picker> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="离园时间" prop="outDate"> <el-col :span="24">
<el-date-picker <el-form-item label="现住址" prop="addrProvincename">
clearable <v-distpicker
size="small" v-model="form.addrProvincename"
style="width: 200px" :placeholders="placeholders"
v-model="form.outDate" :province="diglogForm2.province"
type="date" :city="diglogForm2.city"
value-format="yyyy-MM-dd" :area="diglogForm2.area"
placeholder="选择离园时间" @selected="onSelected_addr"
></el-date-picker> ></v-distpicker>
</el-form-item> <el-input v-model="form.addrProvince" v-if="false" />
<el-form-item label="第一语言" prop="firstLanguage"> <el-input v-model="form.addrCity" v-if="false" />
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" /> <el-input v-model="form.addrArea" v-if="false" />
</el-form-item> </el-form-item>
<el-form-item label="第二语言" prop="seconderLanguage"> </el-col>
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" /> <el-col :span="12">
</el-form-item> <el-form-item label="详细地址" prop="addrDetail">
<el-form-item label="其他语言" prop="otherLanguage"> <el-input v-model="form.addrDetail" placeholder="请输入详细地址" />
<el-input v-model="form.otherLanguage" placeholder="请输入其他语言" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="创建人" prop="createuserid"> <el-col :span="12">
<el-input v-model="form.createuserid" placeholder="请输入创建人" /> <el-form-item label="曾就读园" prop="everSchool">
</el-form-item> <el-input v-model="form.everSchool" placeholder="请输入曾经就读幼儿园" />
</el-form> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="学习英语" prop="learnEnglish">
<el-radio-group v-model="form.learnEnglish">
<el-radio
v-for="dict in ynOptions"
:key="dict.dictValue"
:label="dict.dictValue"
>{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入园渠道" prop="source">
<el-select v-model="form.source" placeholder="请选择入园渠道">
<el-option
v-for="dict in sourceOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictValue"
>{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="第一语言" prop="firstLanguage">
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="第二语言" prop="seconderLanguage">
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他语言" prop="otherLanguage">
<el-input v-model="form.otherLanguage" placeholder="请输入其他语言" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选择班级" prop="classid">
<el-select v-model="form.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-col>
</el-form>
</el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 幼儿调班信息对话框 -->
<el-dialog title="幼儿调班" :visible.sync="open_tb" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules_tb" label-width="80px">
<el-form-item label="选择班级" prop="classid">
<el-select v-model="form.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>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm_tb"> </el-button>
<el-button @click="cancel_tb"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -269,13 +349,39 @@ import {
getChild, getChild,
delChild, delChild,
addChild, addChild,
updateChild updateChild,
updateChild_tb
} from "@/api/benyi/child"; } from "@/api/benyi/child";
import { listClass } from "@/api/system/class";
//
import VDistpicker from "v-distpicker";
export default { export default {
name: "Child", name: "Child",
data() { data() {
return { return {
placeholders: {
province: "请选择省",
city: "请选择市",
area: "请选择区"
},
diglogForm: {
province: null,
city: null,
area: null
},
diglogForm1: {
province: null,
city: null,
area: null
},
diglogForm2: {
province: null,
city: null,
area: null
},
// //
loading: true, loading: true,
// //
@ -292,6 +398,21 @@ export default {
title: "", title: "",
// //
open: false, open: false,
open_tb: false,
//
statusOptions: [],
//
sexOptions: [],
//
mzOptions: [],
//
ynOptions: [],
//
sourceOptions: [],
//
classOptions: [],
//
isable: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -307,14 +428,23 @@ export default {
zjhm: undefined, zjhm: undefined,
csrq: undefined, csrq: undefined,
birthProvince: undefined, birthProvince: undefined,
birthProvincename: undefined,
birthCity: undefined, birthCity: undefined,
birthCityname: undefined,
birthArea: undefined, birthArea: undefined,
birthAreaname: undefined,
registeredProvince: undefined, registeredProvince: undefined,
registeredProvincename: undefined,
registeredCity: undefined, registeredCity: undefined,
registeredCityname: undefined,
registeredArea: undefined, registeredArea: undefined,
registeredAreaname: undefined,
addrProvince: undefined, addrProvince: undefined,
addrProvincename: undefined,
addrCity: undefined, addrCity: undefined,
addrCityname: undefined,
addrArea: undefined, addrArea: undefined,
addrAreaname: undefined,
addrDetail: undefined, addrDetail: undefined,
everSchool: undefined, everSchool: undefined,
learnEnglish: undefined, learnEnglish: undefined,
@ -330,13 +460,81 @@ export default {
// //
form: {}, form: {},
// //
rules: {} rules: {
name: [
{ required: true, message: "幼儿姓名不能为空", trigger: "blur" }
],
phone: [
{ required: true, message: "家长手机号码不能为空", trigger: "blur" }
]
},
rules_tb: {
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }]
}
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getClassList();
this.getDicts("sys_user_sex").then(response => {
this.sexOptions = response.data;
});
this.getDicts("sys_normal_disable").then(response => {
this.statusOptions = response.data;
});
this.getDicts("sys_dm_mz").then(response => {
this.mzOptions = response.data;
});
this.getDicts("sys_yes_no").then(response => {
this.ynOptions = response.data;
});
this.getDicts("sys_dm_ryqd").then(response => {
this.sourceOptions = response.data;
});
},
components: {
//
VDistpicker
}, },
methods: { methods: {
//
xbFormat(row, column) {
return this.selectDictLabel(this.sexOptions, row.xb);
},
//
mzFormat(row, column) {
return this.selectDictLabel(this.mzOptions, row.mz);
},
//
ynFormat(row, column) {
return this.selectDictLabel(this.ynOptions, row.learnEnglish);
},
//
sourceFormat(row, column) {
return this.selectDictLabel(this.sourceOptions, row.source);
},
//
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
//
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("");
},
getClassList() {
listClass(null).then(response => {
this.classOptions = response.rows;
});
},
/** 查询幼儿信息列表 */ /** 查询幼儿信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -351,6 +549,11 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
//
cancel_tb() {
this.open_tb = false;
this.reset();
},
// //
reset() { reset() {
this.form = { this.form = {
@ -366,17 +569,26 @@ export default {
zjhm: undefined, zjhm: undefined,
csrq: undefined, csrq: undefined,
birthProvince: undefined, birthProvince: undefined,
birthProvincename: undefined,
birthCity: undefined, birthCity: undefined,
birthCityname: undefined,
birthArea: undefined, birthArea: undefined,
birthAreaname: undefined,
registeredProvince: undefined, registeredProvince: undefined,
registeredProvincename: undefined,
registeredCity: undefined, registeredCity: undefined,
registeredCityname: undefined,
registeredArea: undefined, registeredArea: undefined,
registeredAreaname: undefined,
addrProvince: undefined, addrProvince: undefined,
addrProvincename: undefined,
addrCity: undefined, addrCity: undefined,
addrCityname: undefined,
addrArea: undefined, addrArea: undefined,
addrAreaname: undefined,
addrDetail: undefined, addrDetail: undefined,
everSchool: undefined, everSchool: undefined,
learnEnglish: undefined, learnEnglish: "Y",
source: undefined, source: undefined,
status: "0", status: "0",
enterDate: undefined, enterDate: undefined,
@ -387,6 +599,19 @@ export default {
createuserid: undefined, createuserid: undefined,
createTime: undefined createTime: undefined
}; };
this.diglogForm.province = "";
this.diglogForm.city = "";
this.diglogForm.area = "";
this.diglogForm1.province = "";
this.diglogForm1.city = "";
this.diglogForm1.area = "";
this.diglogForm2.province = "";
this.diglogForm2.city = "";
this.diglogForm2.area = "";
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -417,6 +642,19 @@ export default {
const id = row.id || this.ids; const id = row.id || this.ids;
getChild(id).then(response => { getChild(id).then(response => {
this.form = response.data; this.form = response.data;
this.diglogForm.province = response.data.birthProvincename;
this.diglogForm.city = response.data.birthCityname;
this.diglogForm.area = response.data.birthAreaname;
this.diglogForm1.province = response.data.registeredProvincename;
this.diglogForm1.city = response.data.registeredCityname;
this.diglogForm1.area = response.data.registeredAreaname;
this.diglogForm2.province = response.data.addrProvincename;
this.diglogForm2.city = response.data.addrCityname;
this.diglogForm2.area = response.data.addrAreaname;
this.open = true; this.open = true;
this.title = "修改幼儿信息"; this.title = "修改幼儿信息";
}); });
@ -445,6 +683,28 @@ export default {
} }
}); });
}, },
/** 提交按钮 */
submitForm_tb: function() {
this.$refs["form"].validate(valid => {
if (valid) {
console.log(this.ids + "---" + this.form.classid);
updateChild_tb(this.form, this.ids).then(response => {
if (response.code === 200) {
this.msgSuccess("调班成功");
this.open_tb = false;
this.getList();
}
});
}
});
},
/** 调班按钮操作 */
handleTiaoban(row) {
this.reset();
const ids = row.id || this.ids;
//console.log(ids);
this.open_tb = true;
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
@ -465,6 +725,60 @@ export default {
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}) })
.catch(function() {}); .catch(function() {});
},
//
onSelected_brith(data) {
console.log("onSelected_brith=" + data);
if (
data.province.code == undefined ||
data.city.code == undefined ||
data.area.code == undefined
) {
this.form.birthProvincename = undefined;
} else {
this.form.birthProvincename = data.province.value;
this.form.birthProvince = data.province.code;
this.form.birthCityname = data.city.value;
this.form.birthCity = data.city.code;
this.form.birthAreaname = data.area.value;
this.form.birthArea = data.area.code;
}
},
//
onSelected_registered(data) {
console.log("onSelected_registered=" + data);
if (
data.province.code == undefined ||
data.city.code == undefined ||
data.area.code == undefined
) {
this.form.registeredProvincename = undefined;
} else {
this.form.registeredProvincename = data.province.value;
this.form.registeredProvince = data.province.code;
this.form.registeredCityname = data.city.value;
this.form.registeredCity = data.city.code;
this.form.registeredAreaname = data.area.value;
this.form.registeredArea = data.area.code;
}
},
//
onSelected_addr(data) {
console.log("onSelected_addr=" + data);
if (
data.province.code == undefined ||
data.city.code == undefined ||
data.area.code == undefined
) {
this.form.addrProvincename = undefined;
} else {
this.form.addrProvincename = data.province.value;
this.form.addrProvince = data.province.code;
this.form.addrCityname = data.city.value;
this.form.addrCity = data.city.code;
this.form.addrAreaname = data.area.value;
this.form.addrArea = data.area.code;
}
} }
} }
}; };

View File

@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.common.SchoolCommon;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
public class ByChildController extends BaseController { public class ByChildController extends BaseController {
@Autowired @Autowired
private IByChildService byChildService; private IByChildService byChildService;
@Autowired
private SchoolCommon schoolCommon;
/** /**
* 查询幼儿信息列表 * 查询幼儿信息列表
@ -72,7 +76,20 @@ public class ByChildController extends BaseController {
@Log(title = "幼儿信息", businessType = BusinessType.INSERT) @Log(title = "幼儿信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByChild byChild) { public AjaxResult add(@RequestBody ByChild byChild) {
return toAjax(byChildService.insertByChild(byChild)); //首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool()) {
//学校id
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//创建人id
byChild.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
//班级id
if (schoolCommon.isStringEmpty(byChild.getClassid())) {
byChild.setClassid(schoolCommon.getClassId());
}
return toAjax(byChildService.insertByChild(byChild));
} else {
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿");
}
} }
/** /**
@ -85,6 +102,23 @@ public class ByChildController extends BaseController {
return toAjax(byChildService.updateByChild(byChild)); return toAjax(byChildService.updateByChild(byChild));
} }
/**
* 修改幼儿信息
*/
@PreAuthorize("@ss.hasPermi('benyi:child:edit')")
@Log(title = "幼儿信息", businessType = BusinessType.UPDATE)
@PutMapping("/{ids}")
public AjaxResult edit(@RequestBody ByChild byChild, @PathVariable Long[] ids) {
int iCount = 0;
for (int i = 0; i < ids.length; i++) {
Long id = ids[i];
System.out.println("classid=" + byChild.getClassid() + " " + "id=" + id);
byChild.setId(id);
iCount = iCount + byChildService.updateByChild(byChild);
}
return toAjax(iCount);
}
/** /**
* 删除幼儿信息 * 删除幼儿信息
*/ */

View File

@ -68,7 +68,7 @@ public class ByThemeController extends BaseController {
/** /**
* 获取主题整合详细信息 * 获取主题整合详细信息
*/ */
@PreAuthorize("@ss.hasPermi('benyi:theme:query')") @PreAuthorize("@ss.hasPermi('benyi:theme:query')" + "||@ss.hasPermi('benyi:theme:list')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byThemeService.selectByThemeById(id)); return AjaxResult.success(byThemeService.selectByThemeById(id));

View File

@ -12,7 +12,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
* 幼儿信息对象 by_child * 幼儿信息对象 by_child
* *
* @author tsbz * @author tsbz
* @date 2020-07-20 * @date 2020-07-21
*/ */
public class ByChild extends BaseEntity { public class ByChild extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -32,7 +32,7 @@ public class ByChild extends BaseEntity {
* 班级id * 班级id
*/ */
@Excel(name = "班级id") @Excel(name = "班级id")
private Long classid; private String classid;
/** /**
* 姓名 * 姓名
@ -89,54 +89,108 @@ public class ByChild extends BaseEntity {
@Excel(name = "出生所在省") @Excel(name = "出生所在省")
private String birthProvince; private String birthProvince;
/**
* 出生所在省名称
*/
@Excel(name = "出生所在省名称")
private String birthProvincename;
/** /**
* 出生所在地市 * 出生所在地市
*/ */
@Excel(name = "出生所在地市") @Excel(name = "出生所在地市")
private String birthCity; private String birthCity;
/**
* 出生所在市名称
*/
@Excel(name = "出生所在市名称")
private String birthCityname;
/** /**
* 出生地区 * 出生地区
*/ */
@Excel(name = "出生地区") @Excel(name = "出生地区")
private String birthArea; private String birthArea;
/**
* 出生所在区名称
*/
@Excel(name = "出生所在区名称")
private String birthAreaname;
/** /**
* 户口所在地 * 户口所在地
*/ */
@Excel(name = "户口所在地") @Excel(name = "户口所在地")
private String registeredProvince; private String registeredProvince;
/**
* 户口所在地名称
*/
@Excel(name = "户口所在地名称")
private String registeredProvincename;
/** /**
* 户口所在地市 * 户口所在地市
*/ */
@Excel(name = "户口所在地市") @Excel(name = "户口所在地市")
private String registeredCity; private String registeredCity;
/**
* 户口所在市名称
*/
@Excel(name = "户口所在市名称")
private String registeredCityname;
/** /**
* 户口所在区 * 户口所在区
*/ */
@Excel(name = "户口所在区") @Excel(name = "户口所在区")
private String registeredArea; private String registeredArea;
/**
* 户口所在区名称
*/
@Excel(name = "户口所在区名称")
private String registeredAreaname;
/** /**
* 住址省 * 住址省
*/ */
@Excel(name = "住址省") @Excel(name = "住址省")
private String addrProvince; private String addrProvince;
/**
* 住址省名称
*/
@Excel(name = "住址省名称")
private String addrProvincename;
/** /**
* 住址市 * 住址市
*/ */
@Excel(name = "住址市") @Excel(name = "住址市")
private String addrCity; private String addrCity;
/**
* 住址市名称
*/
@Excel(name = "住址市名称")
private String addrCityname;
/** /**
* 住址区 * 住址区
*/ */
@Excel(name = "住址区") @Excel(name = "住址区")
private String addrArea; private String addrArea;
/**
* 住址区名称
*/
@Excel(name = "住址区名称")
private String addrAreaname;
/** /**
* 详细地址 * 详细地址
*/ */
@ -221,11 +275,11 @@ public class ByChild extends BaseEntity {
return schoolid; return schoolid;
} }
public void setClassid(Long classid) { public void setClassid(String classid) {
this.classid = classid; this.classid = classid;
} }
public Long getClassid() { public String getClassid() {
return classid; return classid;
} }
@ -301,6 +355,14 @@ public class ByChild extends BaseEntity {
return birthProvince; return birthProvince;
} }
public void setBirthProvincename(String birthProvincename) {
this.birthProvincename = birthProvincename;
}
public String getBirthProvincename() {
return birthProvincename;
}
public void setBirthCity(String birthCity) { public void setBirthCity(String birthCity) {
this.birthCity = birthCity; this.birthCity = birthCity;
} }
@ -309,6 +371,14 @@ public class ByChild extends BaseEntity {
return birthCity; return birthCity;
} }
public void setBirthCityname(String birthCityname) {
this.birthCityname = birthCityname;
}
public String getBirthCityname() {
return birthCityname;
}
public void setBirthArea(String birthArea) { public void setBirthArea(String birthArea) {
this.birthArea = birthArea; this.birthArea = birthArea;
} }
@ -317,6 +387,14 @@ public class ByChild extends BaseEntity {
return birthArea; return birthArea;
} }
public void setBirthAreaname(String birthAreaname) {
this.birthAreaname = birthAreaname;
}
public String getBirthAreaname() {
return birthAreaname;
}
public void setRegisteredProvince(String registeredProvince) { public void setRegisteredProvince(String registeredProvince) {
this.registeredProvince = registeredProvince; this.registeredProvince = registeredProvince;
} }
@ -325,6 +403,14 @@ public class ByChild extends BaseEntity {
return registeredProvince; return registeredProvince;
} }
public void setRegisteredProvincename(String registeredProvincename) {
this.registeredProvincename = registeredProvincename;
}
public String getRegisteredProvincename() {
return registeredProvincename;
}
public void setRegisteredCity(String registeredCity) { public void setRegisteredCity(String registeredCity) {
this.registeredCity = registeredCity; this.registeredCity = registeredCity;
} }
@ -333,6 +419,14 @@ public class ByChild extends BaseEntity {
return registeredCity; return registeredCity;
} }
public void setRegisteredCityname(String registeredCityname) {
this.registeredCityname = registeredCityname;
}
public String getRegisteredCityname() {
return registeredCityname;
}
public void setRegisteredArea(String registeredArea) { public void setRegisteredArea(String registeredArea) {
this.registeredArea = registeredArea; this.registeredArea = registeredArea;
} }
@ -341,6 +435,14 @@ public class ByChild extends BaseEntity {
return registeredArea; return registeredArea;
} }
public void setRegisteredAreaname(String registeredAreaname) {
this.registeredAreaname = registeredAreaname;
}
public String getRegisteredAreaname() {
return registeredAreaname;
}
public void setAddrProvince(String addrProvince) { public void setAddrProvince(String addrProvince) {
this.addrProvince = addrProvince; this.addrProvince = addrProvince;
} }
@ -349,6 +451,14 @@ public class ByChild extends BaseEntity {
return addrProvince; return addrProvince;
} }
public void setAddrProvincename(String addrProvincename) {
this.addrProvincename = addrProvincename;
}
public String getAddrProvincename() {
return addrProvincename;
}
public void setAddrCity(String addrCity) { public void setAddrCity(String addrCity) {
this.addrCity = addrCity; this.addrCity = addrCity;
} }
@ -357,6 +467,14 @@ public class ByChild extends BaseEntity {
return addrCity; return addrCity;
} }
public void setAddrCityname(String addrCityname) {
this.addrCityname = addrCityname;
}
public String getAddrCityname() {
return addrCityname;
}
public void setAddrArea(String addrArea) { public void setAddrArea(String addrArea) {
this.addrArea = addrArea; this.addrArea = addrArea;
} }
@ -365,6 +483,14 @@ public class ByChild extends BaseEntity {
return addrArea; return addrArea;
} }
public void setAddrAreaname(String addrAreaname) {
this.addrAreaname = addrAreaname;
}
public String getAddrAreaname() {
return addrAreaname;
}
public void setAddrDetail(String addrDetail) { public void setAddrDetail(String addrDetail) {
this.addrDetail = addrDetail; this.addrDetail = addrDetail;
} }
@ -468,14 +594,23 @@ public class ByChild extends BaseEntity {
.append("zjhm", getZjhm()) .append("zjhm", getZjhm())
.append("csrq", getCsrq()) .append("csrq", getCsrq())
.append("birthProvince", getBirthProvince()) .append("birthProvince", getBirthProvince())
.append("birthProvincename", getBirthProvincename())
.append("birthCity", getBirthCity()) .append("birthCity", getBirthCity())
.append("birthCityname", getBirthCityname())
.append("birthArea", getBirthArea()) .append("birthArea", getBirthArea())
.append("birthAreaname", getBirthAreaname())
.append("registeredProvince", getRegisteredProvince()) .append("registeredProvince", getRegisteredProvince())
.append("registeredProvincename", getRegisteredProvincename())
.append("registeredCity", getRegisteredCity()) .append("registeredCity", getRegisteredCity())
.append("registeredCityname", getRegisteredCityname())
.append("registeredArea", getRegisteredArea()) .append("registeredArea", getRegisteredArea())
.append("registeredAreaname", getRegisteredAreaname())
.append("addrProvince", getAddrProvince()) .append("addrProvince", getAddrProvince())
.append("addrProvincename", getAddrProvincename())
.append("addrCity", getAddrCity()) .append("addrCity", getAddrCity())
.append("addrCityname", getAddrCityname())
.append("addrArea", getAddrArea()) .append("addrArea", getAddrArea())
.append("addrAreaname", getAddrAreaname())
.append("addrDetail", getAddrDetail()) .append("addrDetail", getAddrDetail())
.append("everSchool", getEverSchool()) .append("everSchool", getEverSchool())
.append("learnEnglish", getLearnEnglish()) .append("learnEnglish", getLearnEnglish())

View File

@ -5,78 +5,119 @@
<mapper namespace="com.ruoyi.project.benyi.mapper.ByChildMapper"> <mapper namespace="com.ruoyi.project.benyi.mapper.ByChildMapper">
<resultMap type="ByChild" id="ByChildResult"> <resultMap type="ByChild" id="ByChildResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="schoolid" column="schoolid" /> <result property="schoolid" column="schoolid"/>
<result property="classid" column="classid" /> <result property="classid" column="classid"/>
<result property="name" column="name" /> <result property="name" column="name"/>
<result property="enName" column="en_name" /> <result property="enName" column="en_name"/>
<result property="infantName" column="infant_name" /> <result property="infantName" column="infant_name"/>
<result property="phone" column="phone" /> <result property="phone" column="phone"/>
<result property="xb" column="xb" /> <result property="xb" column="xb"/>
<result property="mz" column="mz" /> <result property="mz" column="mz"/>
<result property="zjhm" column="zjhm" /> <result property="zjhm" column="zjhm"/>
<result property="csrq" column="csrq" /> <result property="csrq" column="csrq"/>
<result property="birthProvince" column="birth_province" /> <result property="birthProvince" column="birth_province"/>
<result property="birthCity" column="birth_city" /> <result property="birthProvincename" column="birth_provincename"/>
<result property="birthArea" column="birth_area" /> <result property="birthCity" column="birth_city"/>
<result property="registeredProvince" column="registered_province" /> <result property="birthCityname" column="birth_cityname"/>
<result property="registeredCity" column="registered_city" /> <result property="birthArea" column="birth_area"/>
<result property="registeredArea" column="registered_area" /> <result property="birthAreaname" column="birth_areaname"/>
<result property="addrProvince" column="addr_province" /> <result property="registeredProvince" column="registered_province"/>
<result property="addrCity" column="addr_city" /> <result property="registeredProvincename" column="registered_provincename"/>
<result property="addrArea" column="addr_area" /> <result property="registeredCity" column="registered_city"/>
<result property="addrDetail" column="addr_detail" /> <result property="registeredCityname" column="registered_cityname"/>
<result property="everSchool" column="ever_school" /> <result property="registeredArea" column="registered_area"/>
<result property="learnEnglish" column="learn_english" /> <result property="registeredAreaname" column="registered_areaname"/>
<result property="source" column="source" /> <result property="addrProvince" column="addr_province"/>
<result property="status" column="status" /> <result property="addrProvincename" column="addr_provincename"/>
<result property="enterDate" column="enter_date" /> <result property="addrCity" column="addr_city"/>
<result property="outDate" column="out_date" /> <result property="addrCityname" column="addr_cityname"/>
<result property="firstLanguage" column="first_language" /> <result property="addrArea" column="addr_area"/>
<result property="seconderLanguage" column="seconder_language" /> <result property="addrAreaname" column="addr_areaname"/>
<result property="otherLanguage" column="other_language" /> <result property="addrDetail" column="addr_detail"/>
<result property="createuserid" column="createuserid" /> <result property="everSchool" column="ever_school"/>
<result property="createTime" column="create_time" /> <result property="learnEnglish" column="learn_english"/>
</resultMap> <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"> <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 select id, schoolid, classid, name, en_name, infant_name, phone, xb, mz, zjhm, csrq, birth_province, birth_provincename, birth_city, birth_cityname, birth_area, birth_areaname, registered_province, registered_provincename, registered_city, registered_cityname, registered_area, registered_areaname, addr_province, addr_provincename, addr_city, addr_cityname, addr_area, addr_areaname, 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> </sql>
<select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult"> <select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult">
<include refid="selectByChildVo"/> <include refid="selectByChildVo"/>
<where> <where>
<if test="schoolid != null "> and schoolid = #{schoolid}</if> <if test="schoolid != null ">and schoolid = #{schoolid}</if>
<if test="classid != null "> and classid = #{classid}</if> <if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="enName != null and enName != ''"> and en_name like concat('%', #{enName}, '%')</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="infantName != null and infantName != ''">and infant_name like concat('%', #{infantName}, '%')
<if test="phone != null and phone != ''"> and phone = #{phone}</if> </if>
<if test="xb != null and xb != ''"> and xb = #{xb}</if> <if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="mz != null and mz != ''"> and mz = #{mz}</if> <if test="xb != null and xb != ''">and xb = #{xb}</if>
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if> <if test="mz != null and mz != ''">and mz = #{mz}</if>
<if test="csrq != null "> and csrq = #{csrq}</if> <if test="zjhm != null and zjhm != ''">and zjhm = #{zjhm}</if>
<if test="birthProvince != null and birthProvince != ''"> and birth_province = #{birthProvince}</if> <if test="csrq != null ">and csrq = #{csrq}</if>
<if test="birthCity != null and birthCity != ''"> and birth_city = #{birthCity}</if> <if test="birthProvince != null and birthProvince != ''">and birth_province = #{birthProvince}</if>
<if test="birthArea != null and birthArea != ''"> and birth_area = #{birthArea}</if> <if test="birthProvincename != null and birthProvincename != ''">and birth_provincename like concat('%',
<if test="registeredProvince != null and registeredProvince != ''"> and registered_province = #{registeredProvince}</if> #{birthProvincename}, '%')
<if test="registeredCity != null and registeredCity != ''"> and registered_city = #{registeredCity}</if> </if>
<if test="registeredArea != null and registeredArea != ''"> and registered_area = #{registeredArea}</if> <if test="birthCity != null and birthCity != ''">and birth_city = #{birthCity}</if>
<if test="addrProvince != null and addrProvince != ''"> and addr_province = #{addrProvince}</if> <if test="birthCityname != null and birthCityname != ''">and birth_cityname like concat('%',
<if test="addrCity != null and addrCity != ''"> and addr_city = #{addrCity}</if> #{birthCityname}, '%')
<if test="addrArea != null and addrArea != ''"> and addr_area = #{addrArea}</if> </if>
<if test="addrDetail != null and addrDetail != ''"> and addr_detail = #{addrDetail}</if> <if test="birthArea != null and birthArea != ''">and birth_area = #{birthArea}</if>
<if test="everSchool != null and everSchool != ''"> and ever_school = #{everSchool}</if> <if test="birthAreaname != null and birthAreaname != ''">and birth_areaname like concat('%',
<if test="learnEnglish != null and learnEnglish != ''"> and learn_english = #{learnEnglish}</if> #{birthAreaname}, '%')
<if test="source != null and source != ''"> and source = #{source}</if> </if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="registeredProvince != null and registeredProvince != ''">and registered_province =
<if test="enterDate != null "> and enter_date = #{enterDate}</if> #{registeredProvince}
<if test="outDate != null "> and out_date = #{outDate}</if> </if>
<if test="firstLanguage != null and firstLanguage != ''"> and first_language = #{firstLanguage}</if> <if test="registeredProvincename != null and registeredProvincename != ''">and registered_provincename like
<if test="seconderLanguage != null and seconderLanguage != ''"> and seconder_language = #{seconderLanguage}</if> concat('%', #{registeredProvincename}, '%')
<if test="otherLanguage != null and otherLanguage != ''"> and other_language = #{otherLanguage}</if> </if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if> <if test="registeredCity != null and registeredCity != ''">and registered_city = #{registeredCity}</if>
</where> <if test="registeredCityname != null and registeredCityname != ''">and registered_cityname like concat('%',
#{registeredCityname}, '%')
</if>
<if test="registeredArea != null and registeredArea != ''">and registered_area = #{registeredArea}</if>
<if test="registeredAreaname != null and registeredAreaname != ''">and registered_areaname like concat('%',
#{registeredAreaname}, '%')
</if>
<if test="addrProvince != null and addrProvince != ''">and addr_province = #{addrProvince}</if>
<if test="addrProvincename != null and addrProvincename != ''">and addr_provincename like concat('%',
#{addrProvincename}, '%')
</if>
<if test="addrCity != null and addrCity != ''">and addr_city = #{addrCity}</if>
<if test="addrCityname != null and addrCityname != ''">and addr_cityname like concat('%', #{addrCityname},
'%')
</if>
<if test="addrArea != null and addrArea != ''">and addr_area = #{addrArea}</if>
<if test="addrAreaname != null and addrAreaname != ''">and addr_areaname like concat('%', #{addrAreaname},
'%')
</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>
<select id="selectByChildById" parameterType="Long" resultMap="ByChildResult"> <select id="selectByChildById" parameterType="Long" resultMap="ByChildResult">
@ -87,108 +128,147 @@
<insert id="insertByChild" parameterType="ByChild" useGeneratedKeys="true" keyProperty="id"> <insert id="insertByChild" parameterType="ByChild" useGeneratedKeys="true" keyProperty="id">
insert into by_child insert into by_child
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolid != null ">schoolid,</if> <if test="schoolid != null ">schoolid,</if>
<if test="classid != null ">classid,</if> <if test="classid != null and classid != ''">classid,</if>
<if test="name != null and name != ''">name,</if> <if test="name != null and name != ''">name,</if>
<if test="enName != null and enName != ''">en_name,</if> <if test="enName != null and enName != ''">en_name,</if>
<if test="infantName != null and infantName != ''">infant_name,</if> <if test="infantName != null and infantName != ''">infant_name,</if>
<if test="phone != null and phone != ''">phone,</if> <if test="phone != null and phone != ''">phone,</if>
<if test="xb != null and xb != ''">xb,</if> <if test="xb != null and xb != ''">xb,</if>
<if test="mz != null and mz != ''">mz,</if> <if test="mz != null and mz != ''">mz,</if>
<if test="zjhm != null and zjhm != ''">zjhm,</if> <if test="zjhm != null and zjhm != ''">zjhm,</if>
<if test="csrq != null ">csrq,</if> <if test="csrq != null ">csrq,</if>
<if test="birthProvince != null and birthProvince != ''">birth_province,</if> <if test="birthProvince != null and birthProvince != ''">birth_province,</if>
<if test="birthCity != null and birthCity != ''">birth_city,</if> <if test="birthProvincename != null and birthProvincename != ''">birth_provincename,</if>
<if test="birthArea != null and birthArea != ''">birth_area,</if> <if test="birthCity != null and birthCity != ''">birth_city,</if>
<if test="registeredProvince != null and registeredProvince != ''">registered_province,</if> <if test="birthCityname != null and birthCityname != ''">birth_cityname,</if>
<if test="registeredCity != null and registeredCity != ''">registered_city,</if> <if test="birthArea != null and birthArea != ''">birth_area,</if>
<if test="registeredArea != null and registeredArea != ''">registered_area,</if> <if test="birthAreaname != null and birthAreaname != ''">birth_areaname,</if>
<if test="addrProvince != null and addrProvince != ''">addr_province,</if> <if test="registeredProvince != null and registeredProvince != ''">registered_province,</if>
<if test="addrCity != null and addrCity != ''">addr_city,</if> <if test="registeredProvincename != null and registeredProvincename != ''">registered_provincename,</if>
<if test="addrArea != null and addrArea != ''">addr_area,</if> <if test="registeredCity != null and registeredCity != ''">registered_city,</if>
<if test="addrDetail != null and addrDetail != ''">addr_detail,</if> <if test="registeredCityname != null and registeredCityname != ''">registered_cityname,</if>
<if test="everSchool != null and everSchool != ''">ever_school,</if> <if test="registeredArea != null and registeredArea != ''">registered_area,</if>
<if test="learnEnglish != null and learnEnglish != ''">learn_english,</if> <if test="registeredAreaname != null and registeredAreaname != ''">registered_areaname,</if>
<if test="source != null and source != ''">source,</if> <if test="addrProvince != null and addrProvince != ''">addr_province,</if>
<if test="status != null and status != ''">status,</if> <if test="addrProvincename != null and addrProvincename != ''">addr_provincename,</if>
<if test="enterDate != null ">enter_date,</if> <if test="addrCity != null and addrCity != ''">addr_city,</if>
<if test="outDate != null ">out_date,</if> <if test="addrCityname != null and addrCityname != ''">addr_cityname,</if>
<if test="firstLanguage != null and firstLanguage != ''">first_language,</if> <if test="addrArea != null and addrArea != ''">addr_area,</if>
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language,</if> <if test="addrAreaname != null and addrAreaname != ''">addr_areaname,</if>
<if test="otherLanguage != null and otherLanguage != ''">other_language,</if> <if test="addrDetail != null and addrDetail != ''">addr_detail,</if>
<if test="createuserid != null ">createuserid,</if> <if test="everSchool != null and everSchool != ''">ever_school,</if>
<if test="createTime != null ">create_time,</if> <if test="learnEnglish != null and learnEnglish != ''">learn_english,</if>
</trim> <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=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolid != null ">#{schoolid},</if> <if test="schoolid != null ">#{schoolid},</if>
<if test="classid != null ">#{classid},</if> <if test="classid != null and classid != ''">#{classid},</if>
<if test="name != null and name != ''">#{name},</if> <if test="name != null and name != ''">#{name},</if>
<if test="enName != null and enName != ''">#{enName},</if> <if test="enName != null and enName != ''">#{enName},</if>
<if test="infantName != null and infantName != ''">#{infantName},</if> <if test="infantName != null and infantName != ''">#{infantName},</if>
<if test="phone != null and phone != ''">#{phone},</if> <if test="phone != null and phone != ''">#{phone},</if>
<if test="xb != null and xb != ''">#{xb},</if> <if test="xb != null and xb != ''">#{xb},</if>
<if test="mz != null and mz != ''">#{mz},</if> <if test="mz != null and mz != ''">#{mz},</if>
<if test="zjhm != null and zjhm != ''">#{zjhm},</if> <if test="zjhm != null and zjhm != ''">#{zjhm},</if>
<if test="csrq != null ">#{csrq},</if> <if test="csrq != null ">#{csrq},</if>
<if test="birthProvince != null and birthProvince != ''">#{birthProvince},</if> <if test="birthProvince != null and birthProvince != ''">#{birthProvince},</if>
<if test="birthCity != null and birthCity != ''">#{birthCity},</if> <if test="birthProvincename != null and birthProvincename != ''">#{birthProvincename},</if>
<if test="birthArea != null and birthArea != ''">#{birthArea},</if> <if test="birthCity != null and birthCity != ''">#{birthCity},</if>
<if test="registeredProvince != null and registeredProvince != ''">#{registeredProvince},</if> <if test="birthCityname != null and birthCityname != ''">#{birthCityname},</if>
<if test="registeredCity != null and registeredCity != ''">#{registeredCity},</if> <if test="birthArea != null and birthArea != ''">#{birthArea},</if>
<if test="registeredArea != null and registeredArea != ''">#{registeredArea},</if> <if test="birthAreaname != null and birthAreaname != ''">#{birthAreaname},</if>
<if test="addrProvince != null and addrProvince != ''">#{addrProvince},</if> <if test="registeredProvince != null and registeredProvince != ''">#{registeredProvince},</if>
<if test="addrCity != null and addrCity != ''">#{addrCity},</if> <if test="registeredProvincename != null and registeredProvincename != ''">#{registeredProvincename},</if>
<if test="addrArea != null and addrArea != ''">#{addrArea},</if> <if test="registeredCity != null and registeredCity != ''">#{registeredCity},</if>
<if test="addrDetail != null and addrDetail != ''">#{addrDetail},</if> <if test="registeredCityname != null and registeredCityname != ''">#{registeredCityname},</if>
<if test="everSchool != null and everSchool != ''">#{everSchool},</if> <if test="registeredArea != null and registeredArea != ''">#{registeredArea},</if>
<if test="learnEnglish != null and learnEnglish != ''">#{learnEnglish},</if> <if test="registeredAreaname != null and registeredAreaname != ''">#{registeredAreaname},</if>
<if test="source != null and source != ''">#{source},</if> <if test="addrProvince != null and addrProvince != ''">#{addrProvince},</if>
<if test="status != null and status != ''">#{status},</if> <if test="addrProvincename != null and addrProvincename != ''">#{addrProvincename},</if>
<if test="enterDate != null ">#{enterDate},</if> <if test="addrCity != null and addrCity != ''">#{addrCity},</if>
<if test="outDate != null ">#{outDate},</if> <if test="addrCityname != null and addrCityname != ''">#{addrCityname},</if>
<if test="firstLanguage != null and firstLanguage != ''">#{firstLanguage},</if> <if test="addrArea != null and addrArea != ''">#{addrArea},</if>
<if test="seconderLanguage != null and seconderLanguage != ''">#{seconderLanguage},</if> <if test="addrAreaname != null and addrAreaname != ''">#{addrAreaname},</if>
<if test="otherLanguage != null and otherLanguage != ''">#{otherLanguage},</if> <if test="addrDetail != null and addrDetail != ''">#{addrDetail},</if>
<if test="createuserid != null ">#{createuserid},</if> <if test="everSchool != null and everSchool != ''">#{everSchool},</if>
<if test="createTime != null ">#{createTime},</if> <if test="learnEnglish != null and learnEnglish != ''">#{learnEnglish},</if>
</trim> <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> </insert>
<update id="updateByChild" parameterType="ByChild"> <update id="updateByChild" parameterType="ByChild">
update by_child update by_child
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="schoolid != null ">schoolid = #{schoolid},</if> <if test="schoolid != null ">schoolid = #{schoolid},</if>
<if test="classid != null ">classid = #{classid},</if> <if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="name != null and name != ''">name = #{name},</if> <if test="name != null and name != ''">name = #{name},</if>
<if test="enName != null and enName != ''">en_name = #{enName},</if> <if test="enName != null and enName != ''">en_name = #{enName},</if>
<if test="infantName != null and infantName != ''">infant_name = #{infantName},</if> <if test="infantName != null and infantName != ''">infant_name = #{infantName},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if> <if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="xb != null and xb != ''">xb = #{xb},</if> <if test="xb != null and xb != ''">xb = #{xb},</if>
<if test="mz != null and mz != ''">mz = #{mz},</if> <if test="mz != null and mz != ''">mz = #{mz},</if>
<if test="zjhm != null and zjhm != ''">zjhm = #{zjhm},</if> <if test="zjhm != null and zjhm != ''">zjhm = #{zjhm},</if>
<if test="csrq != null ">csrq = #{csrq},</if> <if test="csrq != null ">csrq = #{csrq},</if>
<if test="birthProvince != null and birthProvince != ''">birth_province = #{birthProvince},</if> <if test="birthProvince != null and birthProvince != ''">birth_province = #{birthProvince},</if>
<if test="birthCity != null and birthCity != ''">birth_city = #{birthCity},</if> <if test="birthProvincename != null and birthProvincename != ''">birth_provincename =
<if test="birthArea != null and birthArea != ''">birth_area = #{birthArea},</if> #{birthProvincename},
<if test="registeredProvince != null and registeredProvince != ''">registered_province = #{registeredProvince},</if> </if>
<if test="registeredCity != null and registeredCity != ''">registered_city = #{registeredCity},</if> <if test="birthCity != null and birthCity != ''">birth_city = #{birthCity},</if>
<if test="registeredArea != null and registeredArea != ''">registered_area = #{registeredArea},</if> <if test="birthCityname != null and birthCityname != ''">birth_cityname = #{birthCityname},</if>
<if test="addrProvince != null and addrProvince != ''">addr_province = #{addrProvince},</if> <if test="birthArea != null and birthArea != ''">birth_area = #{birthArea},</if>
<if test="addrCity != null and addrCity != ''">addr_city = #{addrCity},</if> <if test="birthAreaname != null and birthAreaname != ''">birth_areaname = #{birthAreaname},</if>
<if test="addrArea != null and addrArea != ''">addr_area = #{addrArea},</if> <if test="registeredProvince != null and registeredProvince != ''">registered_province =
<if test="addrDetail != null and addrDetail != ''">addr_detail = #{addrDetail},</if> #{registeredProvince},
<if test="everSchool != null and everSchool != ''">ever_school = #{everSchool},</if> </if>
<if test="learnEnglish != null and learnEnglish != ''">learn_english = #{learnEnglish},</if> <if test="registeredProvincename != null and registeredProvincename != ''">registered_provincename =
<if test="source != null and source != ''">source = #{source},</if> #{registeredProvincename},
<if test="status != null and status != ''">status = #{status},</if> </if>
<if test="enterDate != null ">enter_date = #{enterDate},</if> <if test="registeredCity != null and registeredCity != ''">registered_city = #{registeredCity},</if>
<if test="outDate != null ">out_date = #{outDate},</if> <if test="registeredCityname != null and registeredCityname != ''">registered_cityname =
<if test="firstLanguage != null and firstLanguage != ''">first_language = #{firstLanguage},</if> #{registeredCityname},
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language = #{seconderLanguage},</if> </if>
<if test="otherLanguage != null and otherLanguage != ''">other_language = #{otherLanguage},</if> <if test="registeredArea != null and registeredArea != ''">registered_area = #{registeredArea},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if> <if test="registeredAreaname != null and registeredAreaname != ''">registered_areaname =
<if test="createTime != null ">create_time = #{createTime},</if> #{registeredAreaname},
</trim> </if>
<if test="addrProvince != null and addrProvince != ''">addr_province = #{addrProvince},</if>
<if test="addrProvincename != null and addrProvincename != ''">addr_provincename = #{addrProvincename},
</if>
<if test="addrCity != null and addrCity != ''">addr_city = #{addrCity},</if>
<if test="addrCityname != null and addrCityname != ''">addr_cityname = #{addrCityname},</if>
<if test="addrArea != null and addrArea != ''">addr_area = #{addrArea},</if>
<if test="addrAreaname != null and addrAreaname != ''">addr_areaname = #{addrAreaname},</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} where id = #{id}
</update> </update>