班级考勤部分代码
This commit is contained in:
parent
3305b83710
commit
279f7b30e7
@ -78,3 +78,12 @@ export function exportChild(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询班级信息列表
|
||||||
|
export function listChildCheck(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/child/checklist',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
@ -1,303 +1,153 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-container" ref="printMe">
|
<div class="app-container">
|
||||||
<h2 class="title">{{title}}</h2>
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||||
<div class="table">
|
<el-form-item label="选择月份" prop="month">
|
||||||
<div class="print no-print">
|
<el-date-picker
|
||||||
<el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints"></el-button>
|
clearable
|
||||||
</div>
|
size="small"
|
||||||
<table>
|
style="width: 200px"
|
||||||
<tr class="align-center">
|
v-model="queryParams.month"
|
||||||
<!-- <td v-for="h in headerData" :key="h.title">
|
type="month"
|
||||||
<b class="table-title">{{h.title}}</b>
|
value-format="yyyy-MM"
|
||||||
{{h.name}}
|
:default-value="new Date()"
|
||||||
</td>-->
|
placeholder="选择计划月份"
|
||||||
<td class="w140">
|
></el-date-picker>
|
||||||
<b class="table-title">班级:</b>
|
</el-form-item>
|
||||||
{{classid}}
|
<el-form-item>
|
||||||
</td>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<td>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
<b class="table-title">班级人数:</b>
|
</el-form-item>
|
||||||
{{30}}
|
</el-form>
|
||||||
</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">
|
<el-table v-loading="loading" style="width: 100%" border :data="tableData">
|
||||||
<td rowspan="5">
|
<template v-for="(item,index) in tableHead">
|
||||||
<span>周教学目标</span>
|
<el-table-column
|
||||||
</td>
|
:prop=" item.column_name==''?'day'+(item.sort+1) : item.column_name"
|
||||||
<td style="width: 140px;">社会</td>
|
:label=" item.column_name==''?(item.sort+1)+'' : item.sort"
|
||||||
<td>{{sh}}</td>
|
:key="index"
|
||||||
<td colspan="4"></td>
|
></el-table-column>
|
||||||
</tr>
|
</template>
|
||||||
<tr class="align-center">
|
</el-table>
|
||||||
<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">
|
<pagination
|
||||||
<td v-if="item.activitytime" :rowspan="bodyData.planweekitemList.length" class="align-center">
|
v-show="total>0"
|
||||||
<span>{{item.activitytime}}</span>
|
:total="total"
|
||||||
</td>
|
:page.sync="queryParams.pageNum"
|
||||||
<td class="align-center">{{item.activitytime}}</td>
|
:limit.sync="queryParams.pageSize"
|
||||||
<td colspan="4">{{item.activitytime}}</td>
|
@pagination="getList"
|
||||||
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { listDatetime } from "@/api/benyi/checkindetail";
|
||||||
listDetail,
|
import { listChildCheck } from "@/api/benyi/child";
|
||||||
getDetail,
|
|
||||||
delDetail,
|
|
||||||
addDetail,
|
|
||||||
updateDetail,
|
|
||||||
exportDetail
|
|
||||||
} from "@/api/benyi/checkindetail";
|
|
||||||
|
|
||||||
import { listByCheck, listChild } from "@/api/benyi/child";
|
|
||||||
|
|
||||||
import { listClass } from "@/api/system/class";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Detail",
|
name: "checkinstatisticsschool",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData: [],
|
|
||||||
title: "教学与游戏活动周计划表",
|
|
||||||
schoolid: "",
|
|
||||||
classid: "",
|
|
||||||
childid: "",
|
|
||||||
childname: "",
|
|
||||||
type: "",
|
|
||||||
createuserid: "",
|
|
||||||
month: "",
|
month: "",
|
||||||
bodyData: {
|
// 遮罩层
|
||||||
title: [
|
loading: true,
|
||||||
{
|
// 总条数
|
||||||
label: "日期",
|
total: 0,
|
||||||
prop: "activitytime",
|
//javascript
|
||||||
},
|
// 表头数据
|
||||||
{
|
tableHead: [
|
||||||
label: "星期",
|
|
||||||
prop: "day",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "区域活动形式",
|
|
||||||
prop: "activitytype",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "活动详情",
|
|
||||||
prop: "content",
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// label: "周四",
|
// column_name: "column_name",
|
||||||
// prop: "help",
|
// column_comment: "姓名",
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// label: "周五",
|
// column_name: "column_age",
|
||||||
// prop: "help",
|
// column_comment: "年龄",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// column_name: "column_sex",
|
||||||
|
// column_comment: "性别",
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
planweekitemList: [
|
// 表格数据
|
||||||
{
|
tableData: [
|
||||||
theme: "春天的颜色",
|
// {
|
||||||
},
|
// column_age: "3",
|
||||||
|
// column_name: "鞠婧祎",
|
||||||
|
// column_sex: "女",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// column_age: "25",
|
||||||
|
// column_name: "魏大勋",
|
||||||
|
// column_sex: "男",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// column_age: "18",
|
||||||
|
// column_name: "关晓彤",
|
||||||
|
// column_sex: "女",
|
||||||
|
// },
|
||||||
],
|
],
|
||||||
},
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
month: "",
|
||||||
pageSize: 10,
|
|
||||||
schoolid: undefined,
|
|
||||||
classid: undefined,
|
|
||||||
childid: undefined,
|
|
||||||
childname: undefined,
|
|
||||||
type: undefined,
|
|
||||||
createuserid: undefined,
|
|
||||||
createTime: undefined
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getNowTime(); //得到月份
|
||||||
this.getClassList();
|
this.getHeadList();
|
||||||
this.getDicts("sys_dm_cqzt").then(response => {
|
|
||||||
this.checkinOptions = response.data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//控制按钮可用
|
getNowTime() {
|
||||||
checkSelectable(row) {
|
var now = new Date();
|
||||||
var date = new Date();
|
var year = now.getFullYear(); // 得到年份
|
||||||
//console.log(date.toLocaleDateString());
|
var month = now.getMonth(); // 得到月份
|
||||||
return this.CompareDate(row.createTime, date.toLocaleDateString());
|
month = month + 1;
|
||||||
|
month = month.toString().padStart(2, "0");
|
||||||
|
this.month = `${year}-${month}`;
|
||||||
},
|
},
|
||||||
//比较日期大小
|
async getHeadList() {
|
||||||
CompareDate(d1, d2) {
|
this.tableHead = [];
|
||||||
return new Date(d1.replace(/-/g, "/")) > new Date(d2.replace(/-/g, "/"));
|
if (this.queryParams.month == "") {
|
||||||
},
|
this.queryParams.month = this.month;
|
||||||
//班级列表
|
|
||||||
getClassList() {
|
|
||||||
listClass(null).then(response => {
|
|
||||||
this.classOptions = response.rows;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 字典翻译
|
|
||||||
typeFormat(row, column) {
|
|
||||||
return this.selectDictLabel(this.checkinOptions, row.type);
|
|
||||||
},
|
|
||||||
// 字典翻译
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
await listDatetime(this.queryParams).then((response) => {
|
||||||
|
console.log(response.rows);
|
||||||
|
this.tableHead.push({
|
||||||
|
column_name: "name",
|
||||||
|
sort: "姓名",
|
||||||
});
|
});
|
||||||
return actions.join("");
|
response.rows.forEach((res) => {
|
||||||
|
this.tableHead.push({
|
||||||
|
column_name: "",
|
||||||
|
sort: res.sort,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 查询幼儿考勤列表 */
|
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listDetail(this.queryParams).then(response => {
|
if (this.queryParams.month == "") {
|
||||||
this.detailList = response.rows;
|
this.queryParams.month = this.month;
|
||||||
// console.log(response.rows);
|
}
|
||||||
|
listChildCheck(this.queryParams).then((response) => {
|
||||||
|
console.log(response.rows);
|
||||||
|
this.tableData = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
prints() {
|
/** 搜索按钮操作 */
|
||||||
//console.log(this.$refs.printMe);
|
handleQuery() {
|
||||||
this.$print(this.$refs.printMe);
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getHeadList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</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>
|
|
@ -2,6 +2,7 @@ package com.ruoyi.project.benyi.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.project.common.SchoolCommon;
|
import com.ruoyi.project.common.SchoolCommon;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -172,13 +173,21 @@ public class ByChildController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询班级信息列表
|
* 查询幼儿考勤信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:child:list')" + "||@ss.hasPermi('benyi:checkindetail:list')")
|
@PreAuthorize("@ss.hasPermi('system:child:list')" + "||@ss.hasPermi('benyi:checkindetail:list')")
|
||||||
@GetMapping("/checklist")
|
@GetMapping("/checklist")
|
||||||
public TableDataInfo checklist(ByChild byClass) {
|
public TableDataInfo checklist(ByChild byClass) {
|
||||||
|
String strClassId = schoolCommon.getClassId();
|
||||||
|
if (!schoolCommon.isStringEmpty(strClassId)) {
|
||||||
startPage();
|
startPage();
|
||||||
|
byClass.setClassid(strClassId);
|
||||||
List<ByChild> list = byChildService.selectststicstClassList(byClass);
|
List<ByChild> list = byChildService.selectststicstClassList(byClass);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
} else {
|
||||||
|
List<ByChild> list = new ArrayList<>();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,104 +412,286 @@
|
|||||||
<select id="selectststicstClassList" parameterType="ByChild"
|
<select id="selectststicstClassList" parameterType="ByChild"
|
||||||
resultMap="ByChildResult">
|
resultMap="ByChildResult">
|
||||||
select c.id,c.classid,c.name,
|
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-01') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-01')
|
||||||
classid=d.bjbh)) as day1,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-02') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day2,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-01')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day1,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-04') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-02')
|
||||||
classid=d.bjbh)) as day4,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-05') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day5,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-02')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day2,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-07') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-03')
|
||||||
classid=d.bjbh)) as day7,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-08') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day8,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-03')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day3,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-04')
|
||||||
classid=d.bjbh)) as day10,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day11,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-04')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day4,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-05')
|
||||||
classid=d.bjbh)) as day13,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day14,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-05')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day5,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-06')
|
||||||
classid=d.bjbh)) as day16,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day17,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-06')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day6,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-07')
|
||||||
classid=d.bjbh)) as day19,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day20,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-07')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day7,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-08')
|
||||||
classid=d.bjbh)) as day22,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day23,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-08')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day8,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-09')
|
||||||
classid=d.bjbh)) as day25,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day26,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-09')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day9,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10')
|
||||||
classid=d.bjbh)) as day28,
|
and type='01')/
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
(select count(*) from by_child_checkin_detail
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29') and type='01')/(select count(*) from by_child where
|
where childid=c.id
|
||||||
classid=d.bjbh)) as day29,
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10')
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
and type='01')) as day10,
|
||||||
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
|
||||||
((select count(*) from by_child_checkin_detail where classid=d.bjbh and
|
where childid=c.id
|
||||||
date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31') and type='01')/(select count(*) from by_child where
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11')
|
||||||
classid=d.bjbh)) as day31
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11')
|
||||||
|
and type='01')) as day11,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-12')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-12')
|
||||||
|
and type='01')) as day12,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13')
|
||||||
|
and type='01')) as day13,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14')
|
||||||
|
and type='01')) as day14,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-15')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-15')
|
||||||
|
and type='01')) as day15,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16')
|
||||||
|
and type='01')) as day16,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17')
|
||||||
|
and type='01')) as day17,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-18')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-18')
|
||||||
|
and type='01')) as day18,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19')
|
||||||
|
and type='01')) as day19,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20')
|
||||||
|
and type='01')) as day20,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-21')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-21')
|
||||||
|
and type='01')) as day21,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22')
|
||||||
|
and type='01')) as day22,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23')
|
||||||
|
and type='01')) as day23,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-24')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-24')
|
||||||
|
and type='01')) as day24,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25')
|
||||||
|
and type='01')) as day25,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26')
|
||||||
|
and type='01')) as day26,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-27')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-27')
|
||||||
|
and type='01')) as day27,
|
||||||
|
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28')
|
||||||
|
and type='01')) as day28,
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29')
|
||||||
|
and type='01')) as day29,
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-30')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-30')
|
||||||
|
and type='01')) as day30,
|
||||||
|
((select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31')
|
||||||
|
and type='01')/
|
||||||
|
(select count(*) from by_child_checkin_detail
|
||||||
|
where childid=c.id
|
||||||
|
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31')
|
||||||
|
and type='01')) as day31
|
||||||
from by_child c
|
from by_child c
|
||||||
where d.isdel='0'
|
where c.status='0' and c.classid
|
||||||
|
<if test="classid != null and classid != ''">and c.classid = #{classid}</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${dataScope}
|
-- ${dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user