班级考勤部分代码

This commit is contained in:
sk1551 2020-09-23 18:41:19 +08:00
parent 08588a7324
commit b2811387f8
8 changed files with 751 additions and 409 deletions

View File

@ -2,69 +2,69 @@ import request from '@/utils/request'
// 查询班级信息列表
export function listClass(query) {
return request({
url: '/system/class/list',
method: 'get',
params: query
})
return request({
url: '/system/class/list',
method: 'get',
params: query
})
}
// 查询班级信息详细
export function getClass(bjbh) {
return request({
url: '/system/class/' + bjbh,
method: 'get'
})
return request({
url: '/system/class/' + bjbh,
method: 'get'
})
}
// 新增班级信息
export function addClass(data) {
return request({
url: '/system/class',
method: 'post',
data: data
})
return request({
url: '/system/class',
method: 'post',
data: data
})
}
// 修改班级信息
export function updateClass(data) {
return request({
url: '/system/class',
method: 'put',
data: data
})
return request({
url: '/system/class',
method: 'put',
data: data
})
}
// 删除班级信息
export function delClass(bjbh) {
return request({
url: '/system/class/' + bjbh,
method: 'delete'
})
return request({
url: '/system/class/' + bjbh,
method: 'delete'
})
}
// 清空班级教师信息
export function delJsClass(bjbh) {
return request({
url: '/system/class/deljs/' + bjbh,
method: 'delete'
})
return request({
url: '/system/class/deljs/' + bjbh,
method: 'delete'
})
}
// 导出班级信息
export function exportClass(query) {
return request({
url: '/system/class/export',
method: 'get',
params: query
})
return request({
url: '/system/class/export',
method: 'get',
params: query
})
}
// 查询班级信息列表
export function listClassCheck(query) {
return request({
url: '/system/class/checklist',
method: 'get',
params: query
})
return request({
url: '/system/class/checklist',
method: 'get',
params: query
})
}

View File

@ -1,174 +1,105 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="班级编码" prop="classid">
<el-select v-model="queryParams.classid" placeholder="请选择班级">
<el-option
v-for="dict in classOptions"
:key="dict.bjbh"
:label="dict.bjmc"
:value="dict.bjbh"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="幼儿姓名" prop="childname">
<el-input
v-model="queryParams.childname"
placeholder="请输入幼儿姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="出勤类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择出勤类型" clearable size="small">
<el-option
v-for="dict in checkinOptions"
: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:checkindetail: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:checkindetail: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:checkindetail: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:checkindetail:export']"
>导出</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="checkSelectable" />
<el-table-column label="编号" align="center" prop="id" />
<!-- <el-table-column label="学校编码" align="center" prop="schoolid" /> -->
<el-table-column label="班级编码" align="center" prop="classid" :formatter="classFormat" />
<!-- <el-table-column label="幼儿编码" align="center" prop="childid" /> -->
<el-table-column label="幼儿姓名" align="center" prop="childname" />
<el-table-column label="出勤类型" align="center" prop="type" :formatter="typeFormat" />
<el-table-column label="考勤时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="创建人" align="center" prop="createuserid" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:checkindetail:edit']"
:disabled="!checkSelectable(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:checkindetail:remove']"
:disabled="!checkSelectable(scope.row)"
>删除</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="选择幼儿" prop="childname">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
:disabled="isable"
>全选</el-checkbox>
<div style="margin: 15px 0;"></div>
<el-checkbox-group v-model="checkedChilds" @change="handlecheckedChildsChange">
<el-checkbox
v-for="child in childs"
:label="child.id"
:key="child.id"
:disabled="isable"
>{{child.name}}</el-checkbox>
</el-checkbox-group>
<el-input v-model="form.childname" v-if="false" />
</el-form-item>
<el-form-item label="出勤类型" prop="type">
<el-select v-model="form.type" placeholder="请选择出勤类型">
<el-option
v-for="dict in checkinOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</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 class="table-container" ref="printMe">
<h2 class="title">{{title}}</h2>
<div class="table">
<div class="print no-print">
<el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints"></el-button>
</div>
</el-dialog>
<table>
<tr class="align-center">
<!-- <td v-for="h in headerData" :key="h.title">
<b class="table-title">{{h.title}}</b>
{{h.name}}
</td>-->
<td class="w140">
<b class="table-title">班级</b>
{{classid}}
</td>
<td>
<b class="table-title">班级人数</b>
{{30}}
</td>
<td>
<b class="table-title">月份</b>
{{9}}
</td>
<td>
<b class="table-title">学期</b>
{{1}}学期
</td>
<td>
<b class="table-title">学年</b>
{{2020}}
</td>
<td>
<b class="table-title">班主任</b>
{{month}}
</td>
<td>
<b class="table-title">本月出勤率</b>
{{month}}%
</td>
<td colspan="3">
<b class="table-title">本月出勤率</b>
{{month}}%
</td>
</tr>
<tr class="align-center">
<td rowspan="5">
<span>周教学目标</span>
</td>
<td style="width: 140px;">社会</td>
<td>{{sh}}</td>
<td colspan="4"></td>
</tr>
<tr class="align-center">
<td>语言</td>
<td>{{yy}}</td>
<td colspan="4"></td>
</tr>
<tr class="align-center">
<td>健康</td>
<td>{{jk}}</td>
<td colspan="4"></td>
</tr>
<tr class="align-center">
<td>科学</td>
<td>{{kx}}</td>
<td colspan="4"></td>
</tr>
<tr class="align-center">
<td>艺术</td>
<td>{{ys}}</td>
<td colspan="4"></td>
</tr>
<tr v-for="item in planweekitemList" :key="item.id">
<td v-if="item.activitytime" :rowspan="bodyData.planweekitemList.length" class="align-center">
<span>{{item.activitytime}}</span>
</td>
<td class="align-center">{{item.activitytime}}</td>
<td colspan="4">{{item.activitytime}}</td>
</tr>
<tr class="align-center table-bg">
<td v-for="h in bodyData.title" :key="h.prop">
<b>{{h.label}}</b>
</td>
</tr>
<tr v-for="item in bodyData.planweekitemList" :key="item.id">
<td v-if="item.theme" :rowspan="bodyData.planweekitemList.length" class="align-center">
<span>{{item.theme}}</span>
</td>
<td class="align-center">{{item.activitytime}}</td>
<td class="align-center">{{item.day}}</td>
<td class="align-center">{{activitytypeFormat(item.activitytype)}}</td>
<td class="align-center">{{(item.content)}}</td>
</tr>
</table>
<!-- <p
class="warning"
>此周计划表不需要发给家长只需上报教学主管制定班级一周教学与活动计划表请使用班级管理模块中教学与游戏活动周计划表以上报教学主管和作为周计划通知发给家长</p>-->
</div>
</div>
</template>
@ -190,31 +121,49 @@ export default {
name: "Detail",
data() {
return {
isable: false,
checkAll: false,
checkedChilds: [],
childs: [],
isIndeterminate: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
//
detailList: [],
//
checkinOptions: [],
//
classOptions: [],
//
title: "",
//
open: false,
tableData: [],
title: "教学与游戏活动周计划表",
schoolid: "",
classid: "",
childid: "",
childname: "",
type: "",
createuserid: "",
month: "",
bodyData: {
title: [
{
label: "日期",
prop: "activitytime",
},
{
label: "星期",
prop: "day",
},
{
label: "区域活动形式",
prop: "activitytype",
},
{
label: "活动详情",
prop: "content",
},
// {
// label: "",
// prop: "help",
// },
// {
// label: "",
// prop: "help",
// },
],
planweekitemList: [
{
theme: "春天的颜色",
},
],
},
//
queryParams: {
pageNum: 1,
@ -227,19 +176,6 @@ export default {
createuserid: undefined,
createTime: undefined
},
//
form: {},
//
rules: {
childname: [
{
required: true,
message: "请至少选择一个幼儿",
trigger: "blur"
}
],
type: [{ required: true, message: "出勤类型不能为空", trigger: "blur" }]
}
};
},
created() {
@ -293,171 +229,75 @@ export default {
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
prints() {
//console.log(this.$refs.printMe);
this.$print(this.$refs.printMe);
},
//
reset() {
this.form = {
id: undefined,
schoolid: undefined,
classid: undefined,
childid: undefined,
childname: undefined,
type: undefined,
createuserid: undefined,
createTime: undefined
};
this.resetForm("form");
this.checkedChilds = [];
},
/** 搜索按钮操作 */
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.isable = false;
this.open = true;
this.title = "幼儿考勤";
listByCheck(null).then(response => {
this.childs = response.rows;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.isable = true;
const id = row.id || this.ids;
getDetail(id).then(response => {
this.form = response.data;
listChild(null).then(response => {
this.childs = response.rows;
});
this.checkedChilds.push(response.data.childid);
this.open = true;
this.title = "修改幼儿考勤";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.childname == "") {
this.msgError("请至少选择一个幼儿");
return;
}
if (valid) {
if (this.form.id != undefined) {
updateDetail(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改考勤成功");
this.open = false;
this.getList();
}
});
} else {
//
addDetail(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 delDetail(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function() {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有幼儿考勤数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(function() {
return exportDetail(queryParams);
})
.then(response => {
this.download(response.msg);
})
.catch(function() {});
},
handleCheckAllChange(val) {
// this.checkedChilds = val ? this.childs : [];
// this.isIndeterminate = false;
this.checkedChilds = [];
this.childs.forEach(item => {
//
this.checkedChilds.push(item.id);
});
this.checkedChilds = val ? this.checkedChilds : []; //valtruefalse
this.isIndeterminate = false; //
//console.log(this.checkedChilds);
var cids = "";
this.checkedChilds.forEach(item => {
//
cids = cids + item + ",";
});
console.log(cids);
this.form.childname = cids;
},
handlecheckedChildsChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.childs.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.childs.length;
//console.log(this.checkedChilds);
var cids = "";
this.checkedChilds.forEach(item => {
//
cids = cids + item + ",";
});
console.log(cids);
this.form.childname = cids;
}
}
};
</script>
<style lang="scss">
.table-container {
padding: 30px 10%;
.w140 {
width: 140px;
}
.w200 {
width: 200px;
}
.title {
margin: 0;
font-size: 18px;
text-align: center;
padding: 15px 0;
}
.align-center {
text-align: center;
}
.table {
font-size: 14px;
.print {
display: flex;
justify-content: flex-end;
padding-bottom: 10px;
}
p {
margin: 0;
}
table {
width: 100%;
border-collapse: collapse;
}
table td {
border: #ccc solid 1px;
line-height: 24px;
padding: 8px 5px;
}
.table-title {
font-size: 16px;
}
.table-bg {
background: #f8f8f8;
}
}
.warning {
padding-top: 20px;
font-size: 12px;
color: #666;
}
}
@media print {
.table-container {
padding: 30px 0;
}
.print {
opacity: 0;
}
}
/*去除页眉页脚*/
@page {
size: auto; /* auto is the initial value */
margin: 3mm; /* this affects the margin in the printer settings */
}
</style>

View File

@ -170,4 +170,15 @@ public class ByChildController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byChildService.deleteByChildByIds(ids));
}
/**
* 查询班级信息列表
*/
@PreAuthorize("@ss.hasPermi('system:child:list')" + "||@ss.hasPermi('benyi:checkindetail:list')")
@GetMapping("/checklist")
public TableDataInfo checklist(ByChild byClass) {
startPage();
List<ByChild> list = byChildService.selectststicstClassList(byClass);
return getDataTable(list);
}
}

View File

@ -257,10 +257,47 @@ public class ByChild extends BaseEntity {
* 创建人
*/
@Excel(name = "创建人")
private Long createuserid;
private ByChildContactpeople byChildContactpeople;
// 幼儿考勤系统属性
private String month;
private float day1;
private float day2;
private float day3;
private float day4;
private float day5;
private float day6;
private float day7;
private float day8;
private float day9;
private float day10;
private float day11;
private float day12;
private float day13;
private float day14;
private float day15;
private float day16;
private float day17;
private float day18;
private float day19;
private float day20;
private float day21;
private float day22;
private float day23;
private float day24;
private float day25;
private float day26;
private float day27;
private float day28;
private float day29;
private float day30;
private float day31;
public void setId(Long id) {
this.id = id;
}
@ -581,6 +618,263 @@ public class ByChild extends BaseEntity {
return createuserid;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
public float getDay1() {
return day1;
}
public void setDay1(float day1) {
this.day1 = day1;
}
public float getDay2() {
return day2;
}
public void setDay2(float day2) {
this.day2 = day2;
}
public float getDay3() {
return day3;
}
public void setDay3(float day3) {
this.day3 = day3;
}
public float getDay4() {
return day4;
}
public void setDay4(float day4) {
this.day4 = day4;
}
public float getDay5() {
return day5;
}
public void setDay5(float day5) {
this.day5 = day5;
}
public float getDay6() {
return day6;
}
public void setDay6(float day6) {
this.day6 = day6;
}
public float getDay7() {
return day7;
}
public void setDay7(float day7) {
this.day7 = day7;
}
public float getDay8() {
return day8;
}
public void setDay8(float day8) {
this.day8 = day8;
}
public float getDay9() {
return day9;
}
public void setDay9(float day9) {
this.day9 = day9;
}
public float getDay10() {
return day10;
}
public void setDay10(float day10) {
this.day10 = day10;
}
public float getDay11() {
return day11;
}
public void setDay11(float day11) {
this.day11 = day11;
}
public float getDay12() {
return day12;
}
public void setDay12(float day12) {
this.day12 = day12;
}
public float getDay13() {
return day13;
}
public void setDay13(float day13) {
this.day13 = day13;
}
public float getDay14() {
return day14;
}
public void setDay14(float day14) {
this.day14 = day14;
}
public float getDay15() {
return day15;
}
public void setDay15(float day15) {
this.day15 = day15;
}
public float getDay16() {
return day16;
}
public void setDay16(float day16) {
this.day16 = day16;
}
public float getDay17() {
return day17;
}
public void setDay17(float day17) {
this.day17 = day17;
}
public float getDay18() {
return day18;
}
public void setDay18(float day18) {
this.day18 = day18;
}
public float getDay19() {
return day19;
}
public void setDay19(float day19) {
this.day19 = day19;
}
public float getDay20() {
return day20;
}
public void setDay20(float day20) {
this.day20 = day20;
}
public float getDay21() {
return day21;
}
public void setDay21(float day21) {
this.day21 = day21;
}
public float getDay22() {
return day22;
}
public void setDay22(float day22) {
this.day22 = day22;
}
public float getDay23() {
return day23;
}
public void setDay23(float day23) {
this.day23 = day23;
}
public float getDay24() {
return day24;
}
public void setDay24(float day24) {
this.day24 = day24;
}
public float getDay25() {
return day25;
}
public void setDay25(float day25) {
this.day25 = day25;
}
public float getDay26() {
return day26;
}
public void setDay26(float day26) {
this.day26 = day26;
}
public float getDay27() {
return day27;
}
public void setDay27(float day27) {
this.day27 = day27;
}
public float getDay28() {
return day28;
}
public void setDay28(float day28) {
this.day28 = day28;
}
public float getDay29() {
return day29;
}
public void setDay29(float day29) {
this.day29 = day29;
}
public float getDay30() {
return day30;
}
public void setDay30(float day30) {
this.day30 = day30;
}
public float getDay31() {
return day31;
}
public void setDay31(float day31) {
this.day31 = day31;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@ -626,6 +920,38 @@ public class ByChild extends BaseEntity {
.append("createuserid", getCreateuserid())
.append("createTime", getCreateTime())
.append("byChildContactpeople", getByChildContactpeople())
.append("month", getMonth())
.append("day1", getDay1())
.append("day2", getDay2())
.append("day3", getDay3())
.append("day4", getDay4())
.append("day5", getDay5())
.append("day6", getDay6())
.append("day7", getDay7())
.append("day8", getDay8())
.append("day9", getDay9())
.append("day10", getDay10())
.append("day11", getDay11())
.append("day12", getDay12())
.append("day13", getDay13())
.append("day14", getDay14())
.append("day15", getDay15())
.append("day16", getDay16())
.append("day17", getDay17())
.append("day18", getDay18())
.append("day19", getDay19())
.append("day20", getDay20())
.append("day21", getDay21())
.append("day22", getDay22())
.append("day23", getDay23())
.append("day24", getDay24())
.append("day25", getDay25())
.append("day26", getDay26())
.append("day27", getDay27())
.append("day28", getDay28())
.append("day29", getDay29())
.append("day30", getDay30())
.append("day31", getDay31())
.toString();
}

View File

@ -66,4 +66,12 @@ public interface ByChildMapper {
* @return 结果
*/
public int deleteByChildByIds(Long[] ids);
/**
* 查询班级信息列表
*
* @param byChild 班级信息
* @return 班级信息集合
*/
public List<ByChild> selectststicstClassList(ByChild byChild);
}

View File

@ -66,4 +66,12 @@ public interface IByChildService {
* @return 结果
*/
public int deleteByChildById(Long id);
/**
* 查询幼儿信息列表
*
* @param byChild 幼儿信息
* @return 班级信息集合
*/
public List<ByChild> selectststicstClassList(ByChild byChild);
}

View File

@ -3,6 +3,7 @@ package com.ruoyi.project.benyi.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.benyi.mapper.ByChildMapper;
@ -97,4 +98,17 @@ public class ByChildServiceImpl implements IByChildService {
public int deleteByChildById(Long id) {
return byChildMapper.deleteByChildById(id);
}
/**
* 查询幼儿考勤信息列表
*
* @param byChild 班级信息
* @return 班级信息集合
*/
@Override
@DataScope(deptAlias = "d")
public List<ByChild> selectststicstClassList(ByChild byChild) {
return byChildMapper.selectststicstClassList(byChild);
}
}

View File

@ -46,6 +46,38 @@
<result property="otherLanguage" column="other_language"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
<result property="month" column="month"/>
<result property="day1" column="day1"/>
<result property="day2" column="day2"/>
<result property="day3" column="day3"/>
<result property="day4" column="day4"/>
<result property="day5" column="day5"/>
<result property="day6" column="day6"/>
<result property="day7" column="day7"/>
<result property="day8" column="day8"/>
<result property="day9" column="day9"/>
<result property="day10" column="day10"/>
<result property="day11" column="day11"/>
<result property="day12" column="day12"/>
<result property="day13" column="day13"/>
<result property="day14" column="day14"/>
<result property="day15" column="day15"/>
<result property="day16" column="day16"/>
<result property="day17" column="day17"/>
<result property="day18" column="day18"/>
<result property="day19" column="day19"/>
<result property="day20" column="day20"/>
<result property="day21" column="day21"/>
<result property="day22" column="day22"/>
<result property="day23" column="day23"/>
<result property="day24" column="day24"/>
<result property="day25" column="day25"/>
<result property="day26" column="day26"/>
<result property="day27" column="day27"/>
<result property="day28" column="day28"/>
<result property="day29" column="day29"/>
<result property="day30" column="day30"/>
<result property="day31" column="day31"/>
<association property="byChildContactpeople" column="childid" javaType="ByChildContactpeople" resultMap="ByChildContactpeopleResult" />
</resultMap>
@ -377,4 +409,107 @@
</foreach>
</delete>
<select id="selectststicstClassList" parameterType="ByChild"
resultMap="ByClassResult">
select c.id,c.classid,c.name,
(select count(*) from by_child where id=c.id) as childcount,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-01') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day1,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-02') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day2,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-03') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day3,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-04') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day4,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-05') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day5,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-06') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day6,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-07') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day7,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-08') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day8,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-09') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day9,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day10,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day11,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-12') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day12,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day13,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day14,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-15') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day15,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day16,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day17,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-18') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day18,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day19,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day20,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-21') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day21,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day22,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day23,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-24') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day24,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day25,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day26,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-27') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day27,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day28,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day29,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-30') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day30,
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31') and type='01')/(select count(*) from by_child where
classid=d.bjbh)) as day31
from by_child c
where d.isdel='0'
<!-- 数据范围过滤 -->
${dataScope}
</select>
</mapper>