diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index a05e0588e..88298ae74 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -313,6 +313,22 @@ export const constantRoutes = [ } ] }, + { + path: "/benyi_course/weekplan", + component: Layout, + hidden: true, + children: [ + { + path: "themestudy/:id(\\d+)/:wid(\\d+)", + component: () => import("@/views/benyi/themestudy_weekplan"), + name: "Theme3", + meta: { + title: "主题整合周计划详情", + icon: "" + } + } + ] + }, { path: "/benyi_course/mathtermplan", component: Layout, @@ -480,7 +496,8 @@ export const constantRoutes = [ children: [ { path: "approval/:id", - component: () => import("@/views/benyi/thememonthplanapproval/approval"), + component: () => + import("@/views/benyi/thememonthplanapproval/approval"), name: "ThememonthplanApproval", meta: { title: "主题整合月计划审批", diff --git a/ruoyi-ui/src/utils/index.js b/ruoyi-ui/src/utils/index.js index 6c3017c76..2893bc83a 100644 --- a/ruoyi-ui/src/utils/index.js +++ b/ruoyi-ui/src/utils/index.js @@ -1,3 +1,5 @@ +import { parseTime } from './ruoyi' + /** * 表格时间格式化 */ @@ -124,19 +126,21 @@ export function param(json) { * @returns {Object} */ export function param2Obj(url) { - const search = url.split('?')[1] + const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') if (!search) { return {} } - return JSON.parse( - '{"' + - decodeURIComponent(search) - .replace(/"/g, '\\"') - .replace(/&/g, '","') - .replace(/=/g, '":"') - .replace(/\+/g, ' ') + - '"}' - ) + const obj = {} + const searchArr = search.split('&') + searchArr.forEach(v => { + const index = v.indexOf('=') + if (index !== -1) { + const name = v.substring(0, index) + const val = v.substring(index + 1, v.length) + obj[name] = val + } + }) + return obj } /** @@ -383,4 +387,4 @@ export function camelCase(str) { export function isNumberStr(str) { return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) } - \ No newline at end of file + diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index bbf4fb2ed..bbdbde8dd 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -3,117 +3,140 @@ * Copyright (c) 2019 ruoyi */ -const baseURL = process.env.VUE_APP_BASE_API +const baseURL = process.env.VUE_APP_BASE_API; // 日期格式化 export function parseTime(time, pattern) { - if (arguments.length === 0 || !time) { - return null - } - const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { - time = parseInt(time) - } else if (typeof time === 'string') { - time = time.replace(new RegExp(/-/gm), '/'); - } - if ((typeof time === 'number') && (time.toString().length === 10)) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { - let value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } - if (result.length > 0 && value < 10) { - value = '0' + value - } - return value || 0 - }) - return time_str + if (arguments.length === 0 || !time) { + return null; + } + //console.log(time, pattern); + const format = pattern || "{y}-{m}-{d} {h}:{i}:{s}"; + //console.log(format); + let date; + //console.log(typeof time); + if (typeof time === "object") { + date = time; + } else { + if (typeof time === "string" && /^[0-9]+$/.test(time)) { + time = parseInt(time); + //console.log("1:" + time); + } else if (typeof time === "string") { + time = time + .replace(new RegExp(/-/gm), "/") + .replace("T", " ") + .replace(new RegExp(/\.[\d]{3}/gm), ""); + + if (time.length == 7) { + time = time + "/01"; + } + //console.log(time); + } + if (typeof time === "number" && time.toString().length === 10) { + time = time * 1000; + } + date = new Date(time); + } + //console.log(date); + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + }; + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { + let value = formatObj[key]; + // Note: getDay() returns 0 on Sunday + if (key === "a") { + return ["日", "一", "二", "三", "四", "五", "六"][value]; + } + if (result.length > 0 && value < 10) { + value = "0" + value; + } + return value || 0; + }); + //console.log(time_str); + return time_str; } // 表单重置 export function resetForm(refName) { - if (this.$refs[refName]) { - this.$refs[refName].resetFields(); - } + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } } // 添加日期范围 export function addDateRange(params, dateRange) { - var search = params; - search.beginTime = ""; - search.endTime = ""; - if (null != dateRange && '' != dateRange) { - search.beginTime = this.dateRange[0]; - search.endTime = this.dateRange[1]; - } - return search; + var search = params; + search.beginTime = ""; + search.endTime = ""; + if (null != dateRange && "" != dateRange) { + search.beginTime = this.dateRange[0]; + search.endTime = this.dateRange[1]; + } + return search; } // 回显数据字典 export function selectDictLabel(datas, value) { - var actions = []; - Object.keys(datas).map((key) => { - if (datas[key].dictValue == ('' + value)) { - actions.push(datas[key].dictLabel); - return false; - } - }) - return actions.join(''); + var actions = []; + Object.keys(datas).map(key => { + if (datas[key].dictValue == "" + value) { + actions.push(datas[key].dictLabel); + return false; + } + }); + return actions.join(""); } // 回显数据字典 export function selectMoeDictLabel(datas, value) { - var actions = []; - Object.keys(datas).map((key) => { - if (datas[key].id == ('' + value)) { - actions.push(datas[key].name); - return false; - } - }) - return actions.join(''); + var actions = []; + Object.keys(datas).map(key => { + if (datas[key].id == "" + value) { + actions.push(datas[key].name); + return false; + } + }); + return actions.join(""); } // 通用下载方法 export function download(fileName) { - window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; + window.location.href = + baseURL + + "/common/download?fileName=" + + encodeURI(fileName) + + "&delete=" + + true; } // 字符串格式化(%s ) export function sprintf(str) { - var args = arguments, flag = true, i = 1; - str = str.replace(/%s/g, function () { - var arg = args[i++]; - if (typeof arg === 'undefined') { - flag = false; - return ''; - } - return arg; - }); - return flag ? str : ''; + var args = arguments, + flag = true, + i = 1; + str = str.replace(/%s/g, function() { + var arg = args[i++]; + if (typeof arg === "undefined") { + flag = false; + return ""; + } + return arg; + }); + return flag ? str : ""; } // 转换字符串,undefined,null等转化为"" export function praseStrEmpty(str) { - if (!str || str == "undefined" || str == "null") { - return ""; - } - return str; + if (!str || str == "undefined" || str == "null") { + return ""; + } + return str; } /** @@ -125,22 +148,21 @@ export function praseStrEmpty(str) { * @param {*} rootId 根Id 默认 0 */ export function handleTree(data, id, parentId, children, rootId) { - id = id || 'id' - parentId = parentId || 'parentId' - children = children || 'children' - rootId = rootId || 0 - //对源数据深度克隆 - const cloneData = JSON.parse(JSON.stringify(data)) - //循环所有项 - const treeData = cloneData.filter(father => { - let branchArr = cloneData.filter(child => { - //返回每一项的子级数组 - return father[id] === child[parentId] - }); - branchArr.length > 0 ? father.children = branchArr : ''; - //返回第一层 - return father[parentId] === rootId; - }); - return treeData != '' ? treeData : data; - } - \ No newline at end of file + id = id || "id"; + parentId = parentId || "parentId"; + children = children || "children"; + rootId = rootId || 0; + //对源数据深度克隆 + const cloneData = JSON.parse(JSON.stringify(data)); + //循环所有项 + const treeData = cloneData.filter(father => { + let branchArr = cloneData.filter(child => { + //返回每一项的子级数组 + return father[id] === child[parentId]; + }); + branchArr.length > 0 ? (father.children = branchArr) : ""; + //返回第一层 + return father[parentId] === rootId; + }); + return treeData != "" ? treeData : data; +} diff --git a/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue b/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue index 0c4cfb976..102f5cbfe 100644 --- a/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue +++ b/ruoyi-ui/src/views/benyi/dayflowassessment/index.vue @@ -77,14 +77,12 @@ { - if (datas[key].bjbh == "" + row.classid) { - actions.push(datas[key].bjmc); - return false; - } - }); - return actions.join(""); - }, // 学年学期类型--字典状态字典翻译 xnxqFormat(row, column) { return this.selectDictLabel(this.xnxqOptions, row.xnxq); @@ -249,18 +235,6 @@ export default { }); }, // 教师字典翻译 - pgdxFormat(row, column) { - var actions = []; - var datas = this.userOptions; - Object.keys(datas).map((key) => { - if (datas[key].userId == "" + row.pgdx) { - actions.push(datas[key].nickName); - return false; - } - }); - return actions.join(""); - }, - // 教师字典翻译 createUserFormat(row, column) { var actions = []; var datas = this.userOptions; diff --git a/ruoyi-ui/src/views/benyi/experience/index.vue b/ruoyi-ui/src/views/benyi/experience/index.vue index 1e60957d0..195ce4697 100644 --- a/ruoyi-ui/src/views/benyi/experience/index.vue +++ b/ruoyi-ui/src/views/benyi/experience/index.vue @@ -359,7 +359,7 @@ import { getUserProfile } from "@/api/system/user"; import Clipboard from "clipboard"; export default { - name: "Experience", + name: "Experience1", data() { return { inviteCode: "", diff --git a/ruoyi-ui/src/views/benyi/filelibrary/index.vue b/ruoyi-ui/src/views/benyi/filelibrary/index.vue index 65812604a..0041d8ea3 100644 --- a/ruoyi-ui/src/views/benyi/filelibrary/index.vue +++ b/ruoyi-ui/src/views/benyi/filelibrary/index.vue @@ -59,13 +59,20 @@ label="操作" align="center" fixed="right" - class-name="small-padding fixed-width edit-btns" + class-name="small-padding fixed-width" > diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/table.vue b/ruoyi-ui/src/views/benyi/themeweekplan/table.vue index 651377373..f8f5869ba 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/table.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/table.vue @@ -58,9 +58,9 @@ {{ themeactivityFormat(index) }} @@ -102,7 +102,7 @@ export default { data() { return { //url - url: "/benyi_course/tremplan/themestudy/", + url: "/benyi_course/weekplan/themestudy/", tableData: [], title: "", zc: "", @@ -287,6 +287,7 @@ export default { async getList() { //console.log(this.queryParams.wpid); await listWeekplanitem(this.queryParams).then((response) => { + //console.log(response.rows); this.bodyData.weekplanitemList = response.rows; //获取所有的活动id diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 999bc4c19..545512fd9 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -266,7 +266,8 @@ placeholder="请选择归属部门" /> - + - + @@ -320,7 +322,8 @@ > --> - + @@ -346,7 +349,8 @@ > - + @@ -359,7 +363,8 @@ > - + list = byMathTermplanitemService.selectByMathTermplanitemList(byMathTermplanitem); if (list != null && list.size() > 0) { - return AjaxResult.error("选中的计划下存在计划明细,无法删除"); + //return AjaxResult.error("选中的计划下存在计划明细,无法删除"); + for (int j = 0; j < list.size(); j++) { + byMathTermplanitemService.deleteByMathTermplanitemById(list.get(j).getId()); + } } } return toAjax(byMathTermplanService.deleteByMathTermplanByIds(ids)); diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/BySchoolchargeController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/BySchoolchargeController.java index 6e696c4c4..56ab2a47c 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/BySchoolchargeController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/BySchoolchargeController.java @@ -51,14 +51,24 @@ public class BySchoolchargeController extends BaseController { @PreAuthorize("@ss.hasPermi('benyi:schoolcharge:list')") @GetMapping("/child/list") public TableDataInfo childlist(BySchoolcharge bySchoolcharge) { - startPage(); - List list = bySchoolchargeService.selectByChildchargeList(bySchoolcharge); - if (list != null && list.size() > 0) { - for (int i = 0; i < list.size(); i++) { - list.get(i).setZj(getZongji(list.get(i))); + System.out.println("month---" + bySchoolcharge.getMonth()); + bySchoolcharge.setMonthday(bySchoolcharge.getMonth() + "-15"); + List listScope = bySchoolchargeService.selectByChildchargeListByMonth(bySchoolcharge); + if (listScope != null && listScope.size() > 0) { + bySchoolcharge.setId(listScope.get(0).getId()); + startPage(); + List list = bySchoolchargeService.selectByChildchargeList(bySchoolcharge); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + list.get(i).setZj(getZongji(list.get(i))); + } } + return getDataTable(list); + } else { + bySchoolcharge.setId(Long.valueOf(0)); + List list = bySchoolchargeService.selectByChildchargeList(bySchoolcharge); + return getDataTable(list); } - return getDataTable(list); } //根据每条幼儿统计数计算总费用 @@ -154,7 +164,23 @@ public class BySchoolchargeController extends BaseController { @Log(title = "园所收费标准", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody BySchoolcharge bySchoolcharge) { - return toAjax(bySchoolchargeService.updateBySchoolcharge(bySchoolcharge)); + int iCount = 0; + BySchoolcharge bySchoolchargeNew = bySchoolchargeService.selectBySchoolchargeById(bySchoolcharge.getId()); + if (bySchoolcharge.getStartTime().equals(bySchoolchargeNew.getStartTime())) { + if (bySchoolcharge.getEndtime().equals(bySchoolchargeNew.getEndtime())) { + iCount = iCount + bySchoolchargeService.updateBySchoolcharge(bySchoolcharge); + } else { + bySchoolchargeNew.setIsdel("1"); + iCount = iCount + bySchoolchargeService.updateBySchoolcharge(bySchoolchargeNew); + iCount = iCount + bySchoolchargeService.insertBySchoolcharge(bySchoolcharge); + } + } else { + bySchoolchargeNew.setIsdel("1"); + iCount = iCount + bySchoolchargeService.updateBySchoolcharge(bySchoolchargeNew); + iCount = iCount + bySchoolchargeService.insertBySchoolcharge(bySchoolcharge); + } + + return toAjax(iCount); } /** diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java index ab12c759b..606bcd543 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java @@ -63,11 +63,16 @@ public class ByThemeMonthplanController extends BaseController { @GetMapping("/list") public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) { byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); - String classId = schoolCommon.getClassId(); + //参数传进来的班级编号 + String strClassId = byThemeMonthplan.getClassid(); List list = null; - //首先判断当前账户是否为幼儿园账号 - if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { - byThemeMonthplan.setClassid(classId); + //如果传进来的班级编号为空,那么就认为是本身查询 + if (schoolCommon.isStringEmpty(strClassId)) { + String classId = schoolCommon.getClassId(); + //首先判断当前账户是否为幼儿园账号 + if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { + byThemeMonthplan.setClassid(classId); + } } startPage(); list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan); @@ -105,11 +110,11 @@ public class ByThemeMonthplanController extends BaseController { @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { - AjaxResult ajax=AjaxResult.success(); - ByThemeMonthplan byThemeMonthplan=byThemeMonthplanService.selectByThemeMonthplanById(id); + AjaxResult ajax = AjaxResult.success(); + ByThemeMonthplan byThemeMonthplan = byThemeMonthplanService.selectByThemeMonthplanById(id); ajax.put(AjaxResult.DATA_TAG, byThemeMonthplan); - ajax.put("classname",byClassService.selectByClassById(byThemeMonthplan.getClassid()).getBjmc()); - ajax.put("createusername",userService.selectUserById(byThemeMonthplan.getCreateuserid()).getNickName()); + ajax.put("classname", byClassService.selectByClassById(byThemeMonthplan.getClassid()).getBjmc()); + ajax.put("createusername", userService.selectUserById(byThemeMonthplan.getCreateuserid()).getNickName()); return ajax; } @@ -127,7 +132,7 @@ public class ByThemeMonthplanController extends BaseController { String bjtypeNew = byClassService.selectByClassById(classId).getBjtype(); if (bjtypeNew.equals("1")) { return AjaxResult.error("当前班级为托班,无法创建计划"); - }else { + } else { //根据当前月份 查找学期计划的主题 ByThemeTermplan byThemeTermplan = new ByThemeTermplan(); byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); @@ -168,10 +173,21 @@ public class ByThemeMonthplanController extends BaseController { byThemeMonthplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")"); + + // 默认创建4个周内容项,如果当前月份5个周 那么由用户自己删 或 增 + ByThemeMonthplanitem byThemeMonthplanitem=null; + for(int i=1;i<5;i++){ + byThemeMonthplanitem=new ByThemeMonthplanitem(); + byThemeMonthplanitem.setId(schoolCommon.getUuid()); + byThemeMonthplanitem.setMpid(uuid); + byThemeMonthplanitem.setZc(Long.valueOf(i)); + byThemeonthplanitemService.insertByThemeMonthplanitem(byThemeMonthplanitem); + } + return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan)); } } else { - return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划"); + return AjaxResult.error("当前用户非幼儿园班级教师,无法创建月计划"); } } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanitemController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanitemController.java index 7f6a52cb7..3bcf64c0d 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanitemController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanitemController.java @@ -52,7 +52,7 @@ public class ByThemeMonthplanitemController extends BaseController { * 导出主题整合周计划列表 */ @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')") - @Log(title = "主题整合周计划", businessType = BusinessType.EXPORT) + @Log(title = "主题整合月计划", businessType = BusinessType.EXPORT) @GetMapping("/export") public AjaxResult export(ByThemeMonthplanitem byThemeMonthplanitem) { List list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem); @@ -73,7 +73,7 @@ public class ByThemeMonthplanitemController extends BaseController { * 新增主题整合周计划 */ @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')") - @Log(title = "主题整合周计划", businessType = BusinessType.INSERT) + @Log(title = "主题整合月计划", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem) { String uuid = schoolCommon.getUuid(); @@ -86,7 +86,7 @@ public class ByThemeMonthplanitemController extends BaseController { * 修改主题整合周计划 */ @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')") - @Log(title = "主题整合周计划", businessType = BusinessType.UPDATE) + @Log(title = "主题整合月计划", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem) { return toAjax(byThemeWeekplanService.updateByThemeMonthplanitem(byThemeMonthplanitem)); @@ -96,7 +96,7 @@ public class ByThemeMonthplanitemController extends BaseController { * 删除主题整合周计划 */ @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')") - @Log(title = "主题整合周计划", businessType = BusinessType.DELETE) + @Log(title = "主题整合月计划", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { return toAjax(byThemeWeekplanService.deleteByThemeMonthplanitemByIds(ids)); diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java index 69cbba755..4b37c018f 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java @@ -151,7 +151,7 @@ public class ByThemeTermplanController extends BaseController { } } } else { - return AjaxResult.error("当前用户非幼儿园教师,无法创建计划"); + return AjaxResult.error("当前用户非幼儿园班级教师,无法创建计划"); } } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java index b001febef..7d0d50c30 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java @@ -112,11 +112,11 @@ public class ByThemeWeekplanController extends BaseController { @PreAuthorize("@ss.hasPermi('benyi:themeweekplan:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { - AjaxResult ajax=AjaxResult.success(); - ByThemeWeekplan byThemeWeekplan=byThemeWeekplanService.selectByThemeWeekplanById(id); + AjaxResult ajax = AjaxResult.success(); + ByThemeWeekplan byThemeWeekplan = byThemeWeekplanService.selectByThemeWeekplanById(id); ajax.put(AjaxResult.DATA_TAG, byThemeWeekplan); - ajax.put("classname",byClassService.selectByClassById(byThemeWeekplan.getClassid()).getBjmc()); - ajax.put("createusername",userService.selectUserById(byThemeWeekplan.getCreateuserid()).getNickName()); + ajax.put("classname", byClassService.selectByClassById(byThemeWeekplan.getClassid()).getBjmc()); + ajax.put("createusername", userService.selectUserById(byThemeWeekplan.getCreateuserid()).getNickName()); return ajax; } @@ -134,7 +134,7 @@ public class ByThemeWeekplanController extends BaseController { String bjtypeNew = byClassService.selectByClassById(classId).getBjtype(); if (bjtypeNew.equals("1")) { return AjaxResult.error("当前班级为托班,无法创建计划"); - }else { + } else { //判断当前班级是否创建月计划 ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan(); byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); @@ -203,7 +203,7 @@ public class ByThemeWeekplanController extends BaseController { return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan)); } } else { - return AjaxResult.error("当前用户非幼儿园教师,无法创建周计划"); + return AjaxResult.error("当前用户非幼儿园班级教师,无法创建周计划"); } } @@ -224,6 +224,10 @@ public class ByThemeWeekplanController extends BaseController { @Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { + //先删除子项 + for (int i = 0; i < ids.length; i++) { + byThemeWeekplanitemService.deleteByThemeWeekplanitemByPId(ids[i]); + } return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids)); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/BySchoolcharge.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/BySchoolcharge.java index 83eeb3f66..af208ea4f 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/BySchoolcharge.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/BySchoolcharge.java @@ -1,11 +1,14 @@ package com.ruoyi.project.benyi.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.project.system.domain.SysDept; 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; +import java.util.Date; + /** * 园所收费标准对象 by_schoolcharge * @@ -80,10 +83,58 @@ public class BySchoolcharge extends BaseEntity { @Excel(name = "伙食费中班") private Double hsfZ; + /** + * 起止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startTime; + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndtime() { + return endtime; + } + + public void setEndtime(Date endtime) { + this.endtime = endtime; + } + + /** + * 起止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date endtime; + + public String getIsdel() { + return isdel; + } + + public void setIsdel(String isdel) { + this.isdel = isdel; + } + + private String isdel; + private SysDept dept; // 幼儿考勤系统属性 private String month; + + public String getMonthday() { + return monthday; + } + + public void setMonthday(String monthday) { + this.monthday = monthday; + } + + private String monthday; private String name; private String classid; private Long days; @@ -256,6 +307,10 @@ public class BySchoolcharge extends BaseEntity { .append("bjtype", getBjtype()) .append("days", getDays()) .append("zj", getZj()) + .append("startTime",getStartTime()) + .append("endtime",getEndtime()) + .append("isdel",getIsdel()) + .append("monthday",getMonthday()) .toString(); } } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTeacherassessment.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTeacherassessment.java index a2a2899fe..78f4e874f 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTeacherassessment.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTeacherassessment.java @@ -1,5 +1,6 @@ package com.ruoyi.project.benyi.domain; +import com.ruoyi.project.system.domain.ByClass; import com.ruoyi.project.system.domain.SysDept; import com.ruoyi.project.system.domain.SysUser; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -91,6 +92,16 @@ public class ByTeacherassessment extends BaseEntity { private SysUser sysUser; + public ByClass getByClass() { + return byClass; + } + + public void setByClass(ByClass byClass) { + this.byClass = byClass; + } + + private ByClass byClass; + public void setId(Long id) { this.id = id; } @@ -194,7 +205,8 @@ public class ByTeacherassessment extends BaseEntity { .append("wsbl", getWsbl()) .append("zfbl", getZfbl()) .append("createTime", getCreateTime()) - .append("sysUser",getSysUser()) + .append("sysUser", getSysUser()) + .append("byClass", getByClass()) .toString(); } } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/BySchoolchargeMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/BySchoolchargeMapper.java index 94d65d50b..22f9d0c6c 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/BySchoolchargeMapper.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/BySchoolchargeMapper.java @@ -35,6 +35,14 @@ public interface BySchoolchargeMapper { */ public List selectByChildchargeList(BySchoolcharge bySchoolcharge); + /** + * 查询幼儿收费列表 + * + * @param bySchoolcharge 收费标准 + * @return 幼儿收费集合 + */ + public List selectByChildchargeListByMonth(BySchoolcharge bySchoolcharge); + /** * 新增园所收费标准 * diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeWeekplanitemMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeWeekplanitemMapper.java index 5d93b13f4..afd4f4d24 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeWeekplanitemMapper.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeWeekplanitemMapper.java @@ -58,4 +58,12 @@ public interface ByThemeWeekplanitemMapper { * @return 结果 */ public int deleteByThemeWeekplanitemByIds(Long[] ids); + + /** + * 删除主题整合周计划明细信息 + * + * @param pid 主题周计划主键 + * @return 结果 + */ + public int deleteByThemeWeekplanitemByPId(String pid); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IBySchoolchargeService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IBySchoolchargeService.java index ba3d9654c..e2174534e 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IBySchoolchargeService.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IBySchoolchargeService.java @@ -35,6 +35,15 @@ public interface IBySchoolchargeService { */ public List selectByChildchargeList(BySchoolcharge bySchoolcharge); + /** + * 查询幼儿收费列表 + * + * @param bySchoolcharge 收费标准 + * @return 幼儿收费集合 + */ + public List selectByChildchargeListByMonth(BySchoolcharge bySchoolcharge); + + /** * 新增园所收费标准 * diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeWeekplanitemService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeWeekplanitemService.java index 5aba4a0b4..066159d82 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeWeekplanitemService.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeWeekplanitemService.java @@ -58,4 +58,13 @@ public interface IByThemeWeekplanitemService { * @return 结果 */ public int deleteByThemeWeekplanitemById(Long id); + + + /** + * 删除主题整合周计划明细信息 + * + * @param pid 主题周计划主键 + * @return 结果 + */ + public int deleteByThemeWeekplanitemByPId(String pid); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/BySchoolchargeServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/BySchoolchargeServiceImpl.java index 1245e9119..133e6d25f 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/BySchoolchargeServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/BySchoolchargeServiceImpl.java @@ -52,10 +52,22 @@ public class BySchoolchargeServiceImpl implements IBySchoolchargeService { */ @Override @DataScope(deptAlias = "b") - public List selectByChildchargeList(BySchoolcharge bySchoolcharge){ + public List selectByChildchargeList(BySchoolcharge bySchoolcharge) { return bySchoolchargeMapper.selectByChildchargeList(bySchoolcharge); } + /** + * 查询幼儿收费列表 + * + * @param bySchoolcharge 收费标准 + * @return 幼儿收费集合 + */ + @Override + @DataScope(deptAlias = "b") + public List selectByChildchargeListByMonth(BySchoolcharge bySchoolcharge) { + return bySchoolchargeMapper.selectByChildchargeListByMonth(bySchoolcharge); + } + /** * 新增园所收费标准 * diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeWeekplanitemServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeWeekplanitemServiceImpl.java index 7462aa791..91574efb0 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeWeekplanitemServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeWeekplanitemServiceImpl.java @@ -87,4 +87,15 @@ public class ByThemeWeekplanitemServiceImpl implements IByThemeWeekplanitemServi public int deleteByThemeWeekplanitemById(Long id) { return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemById(id); } + + /** + * 删除主题整合周计划明细信息 + * + * @param pid 主题周计划主键 + * @return 结果 + */ + @Override + public int deleteByThemeWeekplanitemByPId(String pid) { + return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemByPId(pid); + } } diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml index 245334b93..53d6fd334 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml @@ -85,7 +85,9 @@ (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='规则与纪律约束')) as gzyjlyspjf, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='微型课程')) as wxkcpjf, (select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='潜课程')) as qkcpjf - from by_dayflowassessment d left join by_class e on d.classid=e.bjbh left join sys_user f on d.pgdx=f.user_id + from by_dayflowassessment d + left join by_class e on d.classid=e.bjbh + left join sys_user f on d.pgdx=f.user_id - where school_id is not null and del_flag=0 + where school_id is not null and del_flag=0 and isdel=0 and byf = #{byf} and hsf = #{hsf} and create_userid = #{createUserid} @@ -49,6 +53,19 @@ ${dataScope} + + @@ -83,6 +100,9 @@ hsf_t, byf_z, hsf_z, + start_time, + endtime, + isdel, #{deptId}, @@ -96,6 +116,9 @@ #{hsfT}, #{byfZ}, #{hsfZ}, + #{startTime}, + #{endtime}, + #{isdel}, @@ -113,6 +136,9 @@ hsf_t = #{hsfT}, byf_z = #{byfZ}, hsf_z = #{hsfZ}, + start_time = #{startTime}, + endtime = #{endtime}, + isdel = #{isdel}, where id = #{id} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByTeacherassessmentMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByTeacherassessmentMapper.xml index 02829c6c3..3553da248 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByTeacherassessmentMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByTeacherassessmentMapper.xml @@ -18,6 +18,7 @@ + @@ -26,9 +27,29 @@ + + + + + + + + + + + + + + + + + + + - select a.id, a.jsid, a.classid, a.dept_id, a.month, a.yrlcbl, a.jskqbl, a.yekqbl, a.sgbl, a.wsbl, a.zfbl, a.create_time,b.nick_name from by_teacherassessment a + select a.id, a.jsid, a.classid, c.bjmc, a.dept_id, a.month, a.yrlcbl, a.jskqbl, a.yekqbl, a.sgbl, a.wsbl, a.zfbl, a.create_time,b.nick_name from by_teacherassessment a left join sys_user b on a.jsid=b.user_id + left join by_class c on a.classid=c.bjbh diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMonthplanMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMonthplanMapper.xml index bb5c5d6cc..6a93d30df 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMonthplanMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMonthplanMapper.xml @@ -54,7 +54,7 @@ and a.classid = #{classid} and a.xnxq = #{xnxq} and a.month = #{month} - and a.themes = #{themes} + and a.themes like concat('%;', #{themes}, ';%') and a.selfthemes = #{selfthemes} and a.wxkc = #{wxkc} and a.support = #{support} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanitemMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanitemMapper.xml index 661e12a8b..43a9b3364 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanitemMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanitemMapper.xml @@ -92,6 +92,10 @@ delete from by_theme_weekplanitem where id = #{id} + + delete from by_theme_weekplanitem where wpid = #{wpid} + + delete from by_theme_weekplanitem where id in diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml index 01b5f1dc0..c6e8d2250 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByTrainVideoMapper.xml @@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and classtype = #{classtype} and createuserid = #{createuserid} and createtime = #{createtime} + and id = #{id}