From 0a5400379ed120233762792c8663ec706dc958cf Mon Sep 17 00:00:00 2001 From: sk1551 <15175617877@163.com> Date: Fri, 25 Sep 2020 13:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E8=80=83=E5=8B=A4=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../benyi/checkinstatisticsclass/index.vue | 61 +++++++++++++------ .../ruoyi/project/benyi/domain/ByChild.java | 21 +++++++ .../resources/mybatis/benyi/ByChildMapper.xml | 6 ++ 3 files changed, 71 insertions(+), 17 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue index e4f737be0..c32eaa2df 100644 --- a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue +++ b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue @@ -16,18 +16,30 @@ 搜索 重置 + 打印 - - - +
+

儿童考勤表

+

+ 班级名称:{{ this.bjmc }}------ + 考勤月份:{{ this.month }}------ + 在册人数:{{ this.childcount }}人 ------ + 班长姓名:{{ this.jsmc }} ------ + +

+ + + +
{ + await listDatetime(this.queryParams).then(response => { console.log(response.rows); this.tableHead.push({ + column_name: "name", - sort: "姓名", + sort: "姓名" }); - response.rows.forEach((res) => { + response.rows.forEach(res => { this.tableHead.push({ column_name: "", - sort: res.sort, + sort: res.sort }); }); }); @@ -131,8 +150,11 @@ export default { if (this.queryParams.month == "") { this.queryParams.month = this.month; } - listChildCheck(this.queryParams).then((response) => { + listChildCheck(this.queryParams).then(response => { console.log(response.rows); + this.bjmc =response.rows[0].bjmc; + this.childcount = response.rows.length; + this.jsmc = response.rows[0].zbjsmc; this.tableData = response.rows; this.total = response.total; this.loading = false; @@ -148,6 +170,11 @@ export default { this.resetForm("queryForm"); this.handleQuery(); }, - }, + //打印 + prints() { + //console.log(this.$refs.printMe); + this.$print(this.$refs.printMe); + }, + } }; \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java index cf203e817..3788e4668 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java @@ -297,6 +297,8 @@ public class ByChild extends BaseEntity { private String day29; private String day30; private String day31; + private String bjmc; + private String zbjsmc; public String getDay1() { return day1; @@ -958,6 +960,8 @@ public class ByChild extends BaseEntity { .append("day29", getDay29()) .append("day30", getDay30()) .append("day31", getDay31()) + .append("bjmc", getBjmc()) + .append("zbjsmc", getZbjsmc()) .toString(); } @@ -968,4 +972,21 @@ public class ByChild extends BaseEntity { public void setByChildContactpeople(ByChildContactpeople byChildContactpeople) { this.byChildContactpeople = byChildContactpeople; } + + public String getBjmc() { + return bjmc; + } + + public void setBjmc(String bjmc) { + this.bjmc = bjmc; + } + + + public String getZbjsmc() { + return zbjsmc; + } + + public void setZbjsmc(String zbjsmc) { + this.zbjsmc = zbjsmc; + } } \ No newline at end of file diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml index 036b7f10f..c35e49838 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml @@ -78,6 +78,8 @@ + + @@ -413,6 +415,10 @@ resultMap="ByChildResult"> select c.id, c.classid, c.name, + (select bjmc from by_class where bjbh=c.classid) as bjmc, + + (select nick_name from sys_user where user_id in (select zbjs from by_class where bjbh=c.classid)) as zbjsmc, + (select (select dict_label from sys_dict_data where dict_type='sys_dm_cqzt' and dict_value= type) from by_child_checkin_detail where childid=c.id