添加儿童体检表
This commit is contained in:
parent
3d552ff313
commit
ef1603dcea
53
ruoyi-ui/src/api/benyi/healthcheck.js
Normal file
53
ruoyi-ui/src/api/benyi/healthcheck.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询儿童常规体检记录列表
|
||||||
|
export function listHealthcheck(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/healthcheck/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询儿童常规体检记录详细
|
||||||
|
export function getHealthcheck(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/healthcheck/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增儿童常规体检记录
|
||||||
|
export function addHealthcheck(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/healthcheck',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改儿童常规体检记录
|
||||||
|
export function updateHealthcheck(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/healthcheck',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除儿童常规体检记录
|
||||||
|
export function delHealthcheck(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/healthcheck/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出儿童常规体检记录
|
||||||
|
export function exportHealthcheck(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/healthcheck/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
520
ruoyi-ui/src/views/benyi/healthcheck/index.vue
Normal file
520
ruoyi-ui/src/views/benyi/healthcheck/index.vue
Normal file
@ -0,0 +1,520 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||||
|
|
||||||
|
<el-form-item label="班级信息" prop="classInfo">
|
||||||
|
<el-select v-model="queryParams.classInfo" placeholder="请选择班级信息" clearable size="small">
|
||||||
|
<el-option label="请选择字典生成" value />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检查日期" prop="checkTime">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="queryParams.checkTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择检查日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保健师" prop="doctorName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.doctorName"
|
||||||
|
placeholder="请输入保健师"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="总评价" prop="totalAssessment">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.totalAssessment"
|
||||||
|
placeholder="请选择总评价"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in totalAssessmentOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createtime">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="queryParams.createtime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择创建时间"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['benyi:healthcheck: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:healthcheck: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:healthcheck:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['benyi:healthcheck:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="healthcheckList" @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="childId" />
|
||||||
|
<el-table-column label="班级信息" align="center" prop="classInfo" />
|
||||||
|
<el-table-column label="检查日期" align="center" prop="checkTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="保健师" align="center" prop="doctorName" />
|
||||||
|
<el-table-column
|
||||||
|
label="视力评价"
|
||||||
|
align="center"
|
||||||
|
prop="visionAssessment"
|
||||||
|
:formatter="visionAssessmentFormat"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="体重评价"
|
||||||
|
align="center"
|
||||||
|
prop="weightAssessment"
|
||||||
|
:formatter="weightAssessmentFormat"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="身高评价"
|
||||||
|
align="center"
|
||||||
|
prop="heightAssessment"
|
||||||
|
:formatter="heightAssessmentFormat"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="总评价"
|
||||||
|
align="center"
|
||||||
|
prop="totalAssessment"
|
||||||
|
:formatter="totalAssessmentFormat"
|
||||||
|
/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createtime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['benyi:healthcheck:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['benyi:healthcheck: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="班级信息">
|
||||||
|
<el-select v-model="form.classInfo" placeholder="请选择班级信息">
|
||||||
|
<el-option label="请选择字典生成" value />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学校名称" prop="schoolName">
|
||||||
|
<el-input v-model="form.schoolName" placeholder="请输入学校名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检查日期" prop="checkTime">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="form.checkTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择检查日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保健师" prop="doctorName">
|
||||||
|
<el-input v-model="form.doctorName" placeholder="请输入保健师" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="左眼视力" prop="eyesVisionLeft">
|
||||||
|
<el-input v-model="form.eyesVisionLeft" placeholder="请输入左眼视力" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="右眼视力" prop="eyesVisionRight">
|
||||||
|
<el-input v-model="form.eyesVisionRight" placeholder="请输入右眼视力" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="视力评价">
|
||||||
|
<el-select v-model="form.visionAssessment" placeholder="请选择视力评价">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in visionAssessmentOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否龋齿">
|
||||||
|
<el-select v-model="form.decayedTooth" placeholder="请选择是否龋齿">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in decayedToothOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="体重" prop="weight">
|
||||||
|
<el-input v-model="form.weight" placeholder="请输入体重" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="体重评价">
|
||||||
|
<el-select v-model="form.weightAssessment" placeholder="请选择体重评价">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in weightAssessmentOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身高" prop="height">
|
||||||
|
<el-input v-model="form.height" placeholder="请输入身高" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身高评价">
|
||||||
|
<el-select v-model="form.heightAssessment" placeholder="请选择身高评价">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in heightAssessmentOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="总评价">
|
||||||
|
<el-select v-model="form.totalAssessment" placeholder="请选择总评价">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in totalAssessmentOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建人" prop="createuser">
|
||||||
|
<el-input v-model="form.createuser" 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 {
|
||||||
|
listHealthcheck,
|
||||||
|
getHealthcheck,
|
||||||
|
delHealthcheck,
|
||||||
|
addHealthcheck,
|
||||||
|
updateHealthcheck,
|
||||||
|
exportHealthcheck
|
||||||
|
} from "@/api/benyi/healthcheck";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Healthcheck",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 儿童常规体检记录表格数据
|
||||||
|
healthcheckList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 视力评价字典
|
||||||
|
visionAssessmentOptions: [],
|
||||||
|
// 是否龋齿字典
|
||||||
|
decayedToothOptions: [],
|
||||||
|
// 体重评价字典
|
||||||
|
weightAssessmentOptions: [],
|
||||||
|
// 身高评价字典
|
||||||
|
heightAssessmentOptions: [],
|
||||||
|
// 总评价字典
|
||||||
|
totalAssessmentOptions: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
childId: undefined,
|
||||||
|
classInfo: undefined,
|
||||||
|
schoolName: undefined,
|
||||||
|
checkTime: undefined,
|
||||||
|
doctorName: undefined,
|
||||||
|
eyesVisionLeft: undefined,
|
||||||
|
eyesVisionRight: undefined,
|
||||||
|
visionAssessment: undefined,
|
||||||
|
decayedTooth: undefined,
|
||||||
|
weight: undefined,
|
||||||
|
weightAssessment: undefined,
|
||||||
|
height: undefined,
|
||||||
|
heightAssessment: undefined,
|
||||||
|
totalAssessment: undefined,
|
||||||
|
createtime: undefined,
|
||||||
|
createuser: undefined
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getDicts("sys_vision_assessment").then(response => {
|
||||||
|
this.visionAssessmentOptions = response.data;
|
||||||
|
});
|
||||||
|
this.getDicts("sys_decayed_tooth").then(response => {
|
||||||
|
this.decayedToothOptions = response.data;
|
||||||
|
});
|
||||||
|
this.getDicts("sys_weight_assessment").then(response => {
|
||||||
|
this.weightAssessmentOptions = response.data;
|
||||||
|
});
|
||||||
|
this.getDicts("sys_height_assessment").then(response => {
|
||||||
|
this.heightAssessmentOptions = response.data;
|
||||||
|
});
|
||||||
|
this.getDicts("sys_dm_tyjg").then(response => {
|
||||||
|
this.totalAssessmentOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询儿童常规体检记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listHealthcheck(this.queryParams).then(response => {
|
||||||
|
this.healthcheckList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 视力评价字典翻译
|
||||||
|
visionAssessmentFormat(row, column) {
|
||||||
|
return this.selectDictLabel(
|
||||||
|
this.visionAssessmentOptions,
|
||||||
|
row.visionAssessment
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 是否龋齿字典翻译
|
||||||
|
decayedToothFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.decayedToothOptions, row.decayedTooth);
|
||||||
|
},
|
||||||
|
// 体重评价字典翻译
|
||||||
|
weightAssessmentFormat(row, column) {
|
||||||
|
return this.selectDictLabel(
|
||||||
|
this.weightAssessmentOptions,
|
||||||
|
row.weightAssessment
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 身高评价字典翻译
|
||||||
|
heightAssessmentFormat(row, column) {
|
||||||
|
return this.selectDictLabel(
|
||||||
|
this.heightAssessmentOptions,
|
||||||
|
row.heightAssessment
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 总评价字典翻译
|
||||||
|
totalAssessmentFormat(row, column) {
|
||||||
|
return this.selectDictLabel(
|
||||||
|
this.totalAssessmentOptions,
|
||||||
|
row.totalAssessment
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
childId: undefined,
|
||||||
|
classInfo: undefined,
|
||||||
|
schoolName: undefined,
|
||||||
|
checkTime: undefined,
|
||||||
|
doctorName: undefined,
|
||||||
|
eyesVisionLeft: undefined,
|
||||||
|
eyesVisionRight: undefined,
|
||||||
|
visionAssessment: undefined,
|
||||||
|
decayedTooth: undefined,
|
||||||
|
weight: undefined,
|
||||||
|
weightAssessment: undefined,
|
||||||
|
height: undefined,
|
||||||
|
heightAssessment: undefined,
|
||||||
|
totalAssessment: undefined,
|
||||||
|
createtime: undefined,
|
||||||
|
createuser: 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;
|
||||||
|
getHealthcheck(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) {
|
||||||
|
updateHealthcheck(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addHealthcheck(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 delHealthcheck(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(function() {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm("是否确认导出所有儿童常规体检记录数据项?", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(function() {
|
||||||
|
return exportHealthcheck(queryParams);
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
.catch(function() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.ruoyi.project.benyi.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByChildHealthCheck;
|
||||||
|
import com.ruoyi.project.benyi.service.IByChildHealthCheckService;
|
||||||
|
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-08-07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/benyi/healthcheck")
|
||||||
|
public class ByChildHealthCheckController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IByChildHealthCheckService byChildHealthCheckService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ByChildHealthCheck> list = byChildHealthCheckService.selectByChildHealthCheckList(byChildHealthCheck);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出儿童常规体检记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:export')")
|
||||||
|
@Log(title = "儿童常规体检记录", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
List<ByChildHealthCheck> list = byChildHealthCheckService.selectByChildHealthCheckList(byChildHealthCheck);
|
||||||
|
ExcelUtil<ByChildHealthCheck> util = new ExcelUtil<ByChildHealthCheck>(ByChildHealthCheck.class);
|
||||||
|
return util.exportExcel(list, "healthcheck");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取儿童常规体检记录详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(byChildHealthCheckService.selectByChildHealthCheckById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增儿童常规体检记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:add')")
|
||||||
|
@Log(title = "儿童常规体检记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
return toAjax(byChildHealthCheckService.insertByChildHealthCheck(byChildHealthCheck));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改儿童常规体检记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:edit')")
|
||||||
|
@Log(title = "儿童常规体检记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
return toAjax(byChildHealthCheckService.updateByChildHealthCheck(byChildHealthCheck));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除儿童常规体检记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:remove')")
|
||||||
|
@Log(title = "儿童常规体检记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(byChildHealthCheckService.deleteByChildHealthCheckByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,293 @@
|
|||||||
|
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_health_check
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-08-07
|
||||||
|
*/
|
||||||
|
public class ByChildHealthCheck extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体检表编号
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 幼儿ID
|
||||||
|
*/
|
||||||
|
@Excel(name = "幼儿ID")
|
||||||
|
private Long childId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息
|
||||||
|
*/
|
||||||
|
@Excel(name = "班级信息")
|
||||||
|
private String classInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "学校名称")
|
||||||
|
private String schoolName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "检查日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date checkTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保健师
|
||||||
|
*/
|
||||||
|
@Excel(name = "保健师")
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 左眼视力
|
||||||
|
*/
|
||||||
|
@Excel(name = "左眼视力")
|
||||||
|
private String eyesVisionLeft;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右眼视力
|
||||||
|
*/
|
||||||
|
@Excel(name = "右眼视力")
|
||||||
|
private String eyesVisionRight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视力评价
|
||||||
|
*/
|
||||||
|
@Excel(name = "视力评价")
|
||||||
|
private String visionAssessment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否龋齿
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否龋齿")
|
||||||
|
private String decayedTooth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体重
|
||||||
|
*/
|
||||||
|
@Excel(name = "体重")
|
||||||
|
private Integer weight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体重评价
|
||||||
|
*/
|
||||||
|
@Excel(name = "体重评价")
|
||||||
|
private String weightAssessment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身高
|
||||||
|
*/
|
||||||
|
@Excel(name = "身高")
|
||||||
|
private Double height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身高评价
|
||||||
|
*/
|
||||||
|
@Excel(name = "身高评价")
|
||||||
|
private String heightAssessment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总评价
|
||||||
|
*/
|
||||||
|
@Excel(name = "总评价")
|
||||||
|
private String totalAssessment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "创建时间")
|
||||||
|
private Date createtime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Excel(name = "创建人")
|
||||||
|
|
||||||
|
private ByChild byChild;
|
||||||
|
|
||||||
|
private Long createuser;
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildId(Long childId) {
|
||||||
|
this.childId = childId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getChildId() {
|
||||||
|
return childId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClassInfo(String classInfo) {
|
||||||
|
this.classInfo = classInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassInfo() {
|
||||||
|
return classInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSchoolName(String schoolName) {
|
||||||
|
this.schoolName = schoolName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSchoolName() {
|
||||||
|
return schoolName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckTime(Date checkTime) {
|
||||||
|
this.checkTime = checkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCheckTime() {
|
||||||
|
return checkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorName(String doctorName) {
|
||||||
|
this.doctorName = doctorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDoctorName() {
|
||||||
|
return doctorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEyesVisionLeft(String eyesVisionLeft) {
|
||||||
|
this.eyesVisionLeft = eyesVisionLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEyesVisionLeft() {
|
||||||
|
return eyesVisionLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEyesVisionRight(String eyesVisionRight) {
|
||||||
|
this.eyesVisionRight = eyesVisionRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEyesVisionRight() {
|
||||||
|
return eyesVisionRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVisionAssessment(String visionAssessment) {
|
||||||
|
this.visionAssessment = visionAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVisionAssessment() {
|
||||||
|
return visionAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDecayedTooth(String decayedTooth) {
|
||||||
|
this.decayedTooth = decayedTooth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDecayedTooth() {
|
||||||
|
return decayedTooth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(Integer weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeightAssessment(String weightAssessment) {
|
||||||
|
this.weightAssessment = weightAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWeightAssessment() {
|
||||||
|
return weightAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Double height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeightAssessment(String heightAssessment) {
|
||||||
|
this.heightAssessment = heightAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHeightAssessment() {
|
||||||
|
return heightAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalAssessment(String totalAssessment) {
|
||||||
|
this.totalAssessment = totalAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTotalAssessment() {
|
||||||
|
return totalAssessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateuser(Long createuser) {
|
||||||
|
this.createuser = createuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateuser() {
|
||||||
|
return createuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("childId", getChildId())
|
||||||
|
.append("classInfo", getClassInfo())
|
||||||
|
.append("schoolName", getSchoolName())
|
||||||
|
.append("checkTime", getCheckTime())
|
||||||
|
.append("doctorName", getDoctorName())
|
||||||
|
.append("eyesVisionLeft", getEyesVisionLeft())
|
||||||
|
.append("eyesVisionRight", getEyesVisionRight())
|
||||||
|
.append("visionAssessment", getVisionAssessment())
|
||||||
|
.append("decayedTooth", getDecayedTooth())
|
||||||
|
.append("weight", getWeight())
|
||||||
|
.append("weightAssessment", getWeightAssessment())
|
||||||
|
.append("height", getHeight())
|
||||||
|
.append("heightAssessment", getHeightAssessment())
|
||||||
|
.append("totalAssessment", getTotalAssessment())
|
||||||
|
.append("createtime", getCreatetime())
|
||||||
|
.append("createuser", getCreateuser())
|
||||||
|
.append("byChild", getByChild())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatetime(Date createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ByChild getByChild() {
|
||||||
|
return byChild;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setByChild(ByChild byChild) {
|
||||||
|
this.byChild = byChild;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.project.benyi.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByChildHealthCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 儿童常规体检记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-08-07
|
||||||
|
*/
|
||||||
|
public interface ByChildHealthCheckMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param id 儿童常规体检记录ID
|
||||||
|
* @return 儿童常规体检记录
|
||||||
|
*/
|
||||||
|
public ByChildHealthCheck selectByChildHealthCheckById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录列表
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 儿童常规体检记录集合
|
||||||
|
*/
|
||||||
|
public List<ByChildHealthCheck> selectByChildHealthCheckList(ByChildHealthCheck byChildHealthCheck);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertByChildHealthCheck(ByChildHealthCheck byChildHealthCheck);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateByChildHealthCheck(ByChildHealthCheck byChildHealthCheck);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param id 儿童常规体检记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByChildHealthCheckById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByChildHealthCheckByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.project.benyi.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByChildHealthCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 儿童常规体检记录Service接口
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-08-07
|
||||||
|
*/
|
||||||
|
public interface IByChildHealthCheckService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param id 儿童常规体检记录ID
|
||||||
|
* @return 儿童常规体检记录
|
||||||
|
*/
|
||||||
|
public ByChildHealthCheck selectByChildHealthCheckById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录列表
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 儿童常规体检记录集合
|
||||||
|
*/
|
||||||
|
public List<ByChildHealthCheck> selectByChildHealthCheckList(ByChildHealthCheck byChildHealthCheck);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertByChildHealthCheck(ByChildHealthCheck byChildHealthCheck);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateByChildHealthCheck(ByChildHealthCheck byChildHealthCheck);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的儿童常规体检记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByChildHealthCheckByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除儿童常规体检记录信息
|
||||||
|
*
|
||||||
|
* @param id 儿童常规体检记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByChildHealthCheckById(Long id);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.project.benyi.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.project.benyi.mapper.ByChildHealthCheckMapper;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByChildHealthCheck;
|
||||||
|
import com.ruoyi.project.benyi.service.IByChildHealthCheckService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 儿童常规体检记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author tsbz
|
||||||
|
* @date 2020-08-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ByChildHealthCheckServiceImpl implements IByChildHealthCheckService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ByChildHealthCheckMapper byChildHealthCheckMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param id 儿童常规体检记录ID
|
||||||
|
* @return 儿童常规体检记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ByChildHealthCheck selectByChildHealthCheckById(Long id)
|
||||||
|
{
|
||||||
|
return byChildHealthCheckMapper.selectByChildHealthCheckById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询儿童常规体检记录列表
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 儿童常规体检记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ByChildHealthCheck> selectByChildHealthCheckList(ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
return byChildHealthCheckMapper.selectByChildHealthCheckList(byChildHealthCheck);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertByChildHealthCheck(ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
return byChildHealthCheckMapper.insertByChildHealthCheck(byChildHealthCheck);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param byChildHealthCheck 儿童常规体检记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateByChildHealthCheck(ByChildHealthCheck byChildHealthCheck)
|
||||||
|
{
|
||||||
|
return byChildHealthCheckMapper.updateByChildHealthCheck(byChildHealthCheck);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除儿童常规体检记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的儿童常规体检记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteByChildHealthCheckByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return byChildHealthCheckMapper.deleteByChildHealthCheckByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除儿童常规体检记录信息
|
||||||
|
*
|
||||||
|
* @param id 儿童常规体检记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteByChildHealthCheckById(Long id)
|
||||||
|
{
|
||||||
|
return byChildHealthCheckMapper.deleteByChildHealthCheckById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,192 @@
|
|||||||
|
<?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.ByChildHealthCheckMapper">
|
||||||
|
|
||||||
|
<resultMap type="ByChildHealthCheck" id="ByChildHealthCheckResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="childId" column="child_id"/>
|
||||||
|
<result property="classInfo" column="class_info"/>
|
||||||
|
<result property="schoolName" column="school_name"/>
|
||||||
|
<result property="checkTime" column="check_time"/>
|
||||||
|
<result property="doctorName" column="doctor_name"/>
|
||||||
|
<result property="eyesVisionLeft" column="eyes_vision_left"/>
|
||||||
|
<result property="eyesVisionRight" column="eyes_vision_right"/>
|
||||||
|
<result property="visionAssessment" column="vision_assessment"/>
|
||||||
|
<result property="decayedTooth" column="decayed_tooth"/>
|
||||||
|
<result property="weight" column="weight"/>
|
||||||
|
<result property="weightAssessment" column="weight_assessment"/>
|
||||||
|
<result property="height" column="height"/>
|
||||||
|
<result property="heightAssessment" column="height_assessment"/>
|
||||||
|
<result property="totalAssessment" column="total_assessment"/>
|
||||||
|
<result property="createtime" column="createtime"/>
|
||||||
|
<result property="createuser" column="createuser"/>
|
||||||
|
<association property="byChild" column="id" javaType="ByChild" resultMap="ByChildResult" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<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="birthProvincename" column="birth_provincename"/>
|
||||||
|
<result property="birthCity" column="birth_city"/>
|
||||||
|
<result property="birthCityname" column="birth_cityname"/>
|
||||||
|
<result property="birthArea" column="birth_area"/>
|
||||||
|
<result property="birthAreaname" column="birth_areaname"/>
|
||||||
|
<result property="registeredProvince" column="registered_province"/>
|
||||||
|
<result property="registeredProvincename" column="registered_provincename"/>
|
||||||
|
<result property="registeredCity" column="registered_city"/>
|
||||||
|
<result property="registeredCityname" column="registered_cityname"/>
|
||||||
|
<result property="registeredArea" column="registered_area"/>
|
||||||
|
<result property="registeredAreaname" column="registered_areaname"/>
|
||||||
|
<result property="addrProvince" column="addr_province"/>
|
||||||
|
<result property="addrProvincename" column="addr_provincename"/>
|
||||||
|
<result property="addrCity" column="addr_city"/>
|
||||||
|
<result property="addrCityname" column="addr_cityname"/>
|
||||||
|
<result property="addrArea" column="addr_area"/>
|
||||||
|
<result property="addrAreaname" column="addr_areaname"/>
|
||||||
|
<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="selectByChildHealthCheckVo">
|
||||||
|
select h.id, h.child_id, h.class_info, h.school_name, h.check_time, h.doctor_name, h.eyes_vision_left, h.eyes_vision_right, h.vision_assessment, h.decayed_tooth, h.weight, h.weight_assessment, h.height, h.height_assessment, h.total_assessment, h.createtime, h.createuser,
|
||||||
|
c.id, c.schoolid, c.classid, c.name
|
||||||
|
from by_child_health_check h
|
||||||
|
left join by_child c on h.child_id = c.id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectByChildHealthCheckList" parameterType="ByChildHealthCheck" resultMap="ByChildHealthCheckResult">
|
||||||
|
<include refid="selectByChildHealthCheckVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="childId != null ">and child_id = #{childId}</if>
|
||||||
|
<if test="classInfo != null and classInfo != ''">and class_info = #{classInfo}</if>
|
||||||
|
<if test="schoolName != null and schoolName != ''">and school_name like concat('%', #{schoolName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="checkTime != null ">and check_time = #{checkTime}</if>
|
||||||
|
<if test="doctorName != null and doctorName != ''">and doctor_name like concat('%', #{doctorName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="eyesVisionLeft != null and eyesVisionLeft != ''">and eyes_vision_left = #{eyesVisionLeft}</if>
|
||||||
|
<if test="eyesVisionRight != null and eyesVisionRight != ''">and eyes_vision_right = #{eyesVisionRight}
|
||||||
|
</if>
|
||||||
|
<if test="visionAssessment != null and visionAssessment != ''">and vision_assessment =
|
||||||
|
#{visionAssessment}
|
||||||
|
</if>
|
||||||
|
<if test="decayedTooth != null and decayedTooth != ''">and decayed_tooth = #{decayedTooth}</if>
|
||||||
|
<if test="weight != null ">and weight = #{weight}</if>
|
||||||
|
<if test="weightAssessment != null and weightAssessment != ''">and weight_assessment =
|
||||||
|
#{weightAssessment}
|
||||||
|
</if>
|
||||||
|
<if test="height != null ">and height = #{height}</if>
|
||||||
|
<if test="heightAssessment != null and heightAssessment != ''">and height_assessment =
|
||||||
|
#{heightAssessment}
|
||||||
|
</if>
|
||||||
|
<if test="totalAssessment != null and totalAssessment != ''">and total_assessment = #{totalAssessment}</if>
|
||||||
|
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||||
|
<if test="createuser != null ">and createuser = #{createuser}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByChildHealthCheckById" parameterType="Long" resultMap="ByChildHealthCheckResult">
|
||||||
|
<include refid="selectByChildHealthCheckVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertByChildHealthCheck" parameterType="ByChildHealthCheck" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into by_child_health_check
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="childId != null ">child_id,</if>
|
||||||
|
<if test="classInfo != null and classInfo != ''">class_info,</if>
|
||||||
|
<if test="schoolName != null and schoolName != ''">school_name,</if>
|
||||||
|
<if test="checkTime != null ">check_time,</if>
|
||||||
|
<if test="doctorName != null and doctorName != ''">doctor_name,</if>
|
||||||
|
<if test="eyesVisionLeft != null and eyesVisionLeft != ''">eyes_vision_left,</if>
|
||||||
|
<if test="eyesVisionRight != null and eyesVisionRight != ''">eyes_vision_right,</if>
|
||||||
|
<if test="visionAssessment != null and visionAssessment != ''">vision_assessment,</if>
|
||||||
|
<if test="decayedTooth != null and decayedTooth != ''">decayed_tooth,</if>
|
||||||
|
<if test="weight != null ">weight,</if>
|
||||||
|
<if test="weightAssessment != null and weightAssessment != ''">weight_assessment,</if>
|
||||||
|
<if test="height != null ">height,</if>
|
||||||
|
<if test="heightAssessment != null and heightAssessment != ''">height_assessment,</if>
|
||||||
|
<if test="totalAssessment != null and totalAssessment != ''">total_assessment,</if>
|
||||||
|
<if test="createtime != null ">createtime,</if>
|
||||||
|
<if test="createuser != null ">createuser,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="childId != null ">#{childId},</if>
|
||||||
|
<if test="classInfo != null and classInfo != ''">#{classInfo},</if>
|
||||||
|
<if test="schoolName != null and schoolName != ''">#{schoolName},</if>
|
||||||
|
<if test="checkTime != null ">#{checkTime},</if>
|
||||||
|
<if test="doctorName != null and doctorName != ''">#{doctorName},</if>
|
||||||
|
<if test="eyesVisionLeft != null and eyesVisionLeft != ''">#{eyesVisionLeft},</if>
|
||||||
|
<if test="eyesVisionRight != null and eyesVisionRight != ''">#{eyesVisionRight},</if>
|
||||||
|
<if test="visionAssessment != null and visionAssessment != ''">#{visionAssessment},</if>
|
||||||
|
<if test="decayedTooth != null and decayedTooth != ''">#{decayedTooth},</if>
|
||||||
|
<if test="weight != null ">#{weight},</if>
|
||||||
|
<if test="weightAssessment != null and weightAssessment != ''">#{weightAssessment},</if>
|
||||||
|
<if test="height != null ">#{height},</if>
|
||||||
|
<if test="heightAssessment != null and heightAssessment != ''">#{heightAssessment},</if>
|
||||||
|
<if test="totalAssessment != null and totalAssessment != ''">#{totalAssessment},</if>
|
||||||
|
<if test="createtime != null ">#{createtime},</if>
|
||||||
|
<if test="createuser != null ">#{createuser},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateByChildHealthCheck" parameterType="ByChildHealthCheck">
|
||||||
|
update by_child_health_check
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="childId != null ">child_id = #{childId},</if>
|
||||||
|
<if test="classInfo != null and classInfo != ''">class_info = #{classInfo},</if>
|
||||||
|
<if test="schoolName != null and schoolName != ''">school_name = #{schoolName},</if>
|
||||||
|
<if test="checkTime != null ">check_time = #{checkTime},</if>
|
||||||
|
<if test="doctorName != null and doctorName != ''">doctor_name = #{doctorName},</if>
|
||||||
|
<if test="eyesVisionLeft != null and eyesVisionLeft != ''">eyes_vision_left = #{eyesVisionLeft},</if>
|
||||||
|
<if test="eyesVisionRight != null and eyesVisionRight != ''">eyes_vision_right = #{eyesVisionRight},</if>
|
||||||
|
<if test="visionAssessment != null and visionAssessment != ''">vision_assessment = #{visionAssessment},
|
||||||
|
</if>
|
||||||
|
<if test="decayedTooth != null and decayedTooth != ''">decayed_tooth = #{decayedTooth},</if>
|
||||||
|
<if test="weight != null ">weight = #{weight},</if>
|
||||||
|
<if test="weightAssessment != null and weightAssessment != ''">weight_assessment = #{weightAssessment},
|
||||||
|
</if>
|
||||||
|
<if test="height != null ">height = #{height},</if>
|
||||||
|
<if test="heightAssessment != null and heightAssessment != ''">height_assessment = #{heightAssessment},
|
||||||
|
</if>
|
||||||
|
<if test="totalAssessment != null and totalAssessment != ''">total_assessment = #{totalAssessment},</if>
|
||||||
|
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||||
|
<if test="createuser != null ">createuser = #{createuser},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteByChildHealthCheckById" parameterType="Long">
|
||||||
|
delete from by_child_health_check where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByChildHealthCheckByIds" parameterType="String">
|
||||||
|
delete from by_child_health_check where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user