From b2811387f8721b74d566aac4d8cc7e1db9f45e2f Mon Sep 17 00:00:00 2001 From: sk1551 <15175617877@163.com> Date: Wed, 23 Sep 2020 18:41:19 +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 --- ruoyi-ui/src/api/system/class.js | 74 +-- .../benyi/checkinstatisticsclass/index.vue | 584 +++++++----------- .../benyi/controller/ByChildController.java | 11 + .../ruoyi/project/benyi/domain/ByChild.java | 326 ++++++++++ .../project/benyi/mapper/ByChildMapper.java | 8 + .../benyi/service/IByChildService.java | 8 + .../service/impl/ByChildServiceImpl.java | 14 + .../resources/mybatis/benyi/ByChildMapper.xml | 135 ++++ 8 files changed, 751 insertions(+), 409 deletions(-) diff --git a/ruoyi-ui/src/api/system/class.js b/ruoyi-ui/src/api/system/class.js index a01d9ca95..c88bb5a2e 100644 --- a/ruoyi-ui/src/api/system/class.js +++ b/ruoyi-ui/src/api/system/class.js @@ -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 + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue index 51eea4dfb..9b35dde40 100644 --- a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue +++ b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue @@ -1,174 +1,105 @@ @@ -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 : []; //三元表达式,如果val的值为true,那么就把当前默认选中的值赋值给自身,这样页面页面上所有的元素就都选中了。如果为false,就是取消全选 - 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; - } } }; - \ No newline at end of file + + + \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java index 043272c78..ca5c372d7 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java @@ -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 list = byChildService.selectststicstClassList(byClass); + return getDataTable(list); + } } 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 06af92970..8b42de0f8 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 @@ -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(); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildMapper.java index dcf4944ad..3a5332075 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildMapper.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildMapper.java @@ -66,4 +66,12 @@ public interface ByChildMapper { * @return 结果 */ public int deleteByChildByIds(Long[] ids); + + /** + * 查询班级信息列表 + * + * @param byChild 班级信息 + * @return 班级信息集合 + */ + public List selectststicstClassList(ByChild byChild); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildService.java index 63f2debe5..0a1e70391 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildService.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildService.java @@ -66,4 +66,12 @@ public interface IByChildService { * @return 结果 */ public int deleteByChildById(Long id); + + /** + * 查询幼儿信息列表 + * + * @param byChild 幼儿信息 + * @return 班级信息集合 + */ + public List selectststicstClassList(ByChild byChild); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildServiceImpl.java index 1da25b3a6..34c11e26e 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildServiceImpl.java @@ -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 selectststicstClassList(ByChild byChild) { + return byChildMapper.selectststicstClassList(byChild); + } } diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml index 9884b9e1d..02685f1b7 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml @@ -46,6 +46,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -377,4 +409,107 @@ + + \ No newline at end of file