分页优化

This commit is contained in:
zhanglipeng 2020-11-18 12:16:19 +08:00
parent 3e7b84de0a
commit 27ae0e1755
22 changed files with 143 additions and 195 deletions

@ -181,7 +181,7 @@
<el-table-column
label="操作"
align="center"
width="100"
width="120"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">

@ -1,6 +1,7 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -28,31 +29,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/assessmentrecordchild")
public class ByAssessmentrecordchildController extends BaseController
{
public class ByAssessmentrecordchildController extends BaseController {
@Autowired
private IByAssessmentrecordchildService byAssessmentrecordchildService;
/**
* 查询幼儿评估记录列表
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:list')")
@GetMapping("/list")
public TableDataInfo list(ByAssessmentrecordchild byAssessmentrecordchild)
{
/**
* 查询幼儿评估记录列表
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:list')")
@GetMapping("/list")
public TableDataInfo list(ByAssessmentrecordchild byAssessmentrecordchild) {
startPage();
List<ByAssessmentrecordchild> list = byAssessmentrecordchildService.selectByAssessmentrecordchildList(byAssessmentrecordchild);
return getDataTable(list);
}
/**
* 导出幼儿评估记录列表
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:export')")
@Log(title = "幼儿评估记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByAssessmentrecordchild byAssessmentrecordchild)
{
public AjaxResult export(ByAssessmentrecordchild byAssessmentrecordchild) {
List<ByAssessmentrecordchild> list = byAssessmentrecordchildService.selectByAssessmentrecordchildList(byAssessmentrecordchild);
ExcelUtil<ByAssessmentrecordchild> util = new ExcelUtil<ByAssessmentrecordchild>(ByAssessmentrecordchild.class);
return util.exportExcel(list, "assessmentrecordchild");
@ -63,8 +61,7 @@ public class ByAssessmentrecordchildController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byAssessmentrecordchildService.selectByAssessmentrecordchildById(id));
}
@ -74,8 +71,7 @@ public class ByAssessmentrecordchildController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:add')")
@Log(title = "幼儿评估记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByAssessmentrecordchild byAssessmentrecordchild)
{
public AjaxResult add(@RequestBody ByAssessmentrecordchild byAssessmentrecordchild) {
return toAjax(byAssessmentrecordchildService.insertByAssessmentrecordchild(byAssessmentrecordchild));
}
@ -85,8 +81,7 @@ public class ByAssessmentrecordchildController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:edit')")
@Log(title = "幼儿评估记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByAssessmentrecordchild byAssessmentrecordchild)
{
public AjaxResult edit(@RequestBody ByAssessmentrecordchild byAssessmentrecordchild) {
return toAjax(byAssessmentrecordchildService.updateByAssessmentrecordchild(byAssessmentrecordchild));
}
@ -96,8 +91,7 @@ public class ByAssessmentrecordchildController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:assessmentrecordchild:remove')")
@Log(title = "幼儿评估记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byAssessmentrecordchildService.deleteByAssessmentrecordchildByIds(ids));
}
}

@ -48,7 +48,6 @@ public class ByChildCheckinDetailController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:list')")
@GetMapping("/list")
public TableDataInfo list(ByChildCheckinDetail byChildCheckinDetail) {
startPage();
System.out.println("checkintime=" + byChildCheckinDetail.getCreateTime());
if (byChildCheckinDetail.getCreateTime() == null) {
byChildCheckinDetail.setCreateTime(new Date());
@ -60,7 +59,7 @@ public class ByChildCheckinDetailController extends BaseController {
if (!schoolCommon.isStringEmpty(classId)) {
byChildCheckinDetail.setClassid(classId);
}
startPage();
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
return getDataTable(list);
}

@ -43,13 +43,13 @@ public class ByChildContactpeopleController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:contactpeople:list')")
@GetMapping("/list")
public TableDataInfo list(ByChildContactpeople byChildContactpeople) {
startPage();
byChildContactpeople.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId)) {
byChildContactpeople.setClassid(classId);
}
startPage();
List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople);
return getDataTable(list);
}

@ -63,13 +63,14 @@ public class ByChildController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:child:list')" + "||@ss.hasPermi('benyi:checkinstatisticsschool:list')")
@GetMapping("/list")
public TableDataInfo list(ByChild byChild) {
startPage();
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId) && classId != "-1") {
if (!schoolCommon.isStringEmpty(classId)) {
byChild.setClassid(classId);
}
startPage();
List<ByChild> list = byChildService.selectByChildList(byChild);
return getDataTable(list);
}
@ -84,7 +85,7 @@ public class ByChildController extends BaseController {
//判断是否为班主任
//System.out.println(schoolCommon.getClassId());
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId) && classId != "-1") {
if (!schoolCommon.isStringEmpty(classId)) {
byChild.setClassid(classId);
}
List<ByChild> list = byChildService.selectByCheckList(byChild);

@ -2,6 +2,7 @@ package com.ruoyi.project.benyi.controller;
import java.util.Date;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -29,31 +30,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/healthcheck")
public class ByChildHealthCheckController extends BaseController
{
public class ByChildHealthCheckController extends BaseController {
@Autowired
private IByChildHealthCheckService byChildHealthCheckService;
/**
* 查询儿童常规体检记录列表
*/
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:list')")
@GetMapping("/list")
public TableDataInfo list(ByChildHealthCheck byChildHealthCheck)
{
/**
* 查询儿童常规体检记录列表
*/
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:list')")
@GetMapping("/list")
public TableDataInfo list(ByChildHealthCheck byChildHealthCheck) {
startPage();
List<ByChildHealthCheck> list = byChildHealthCheckService.selectByChildHealthCheckList(byChildHealthCheck);
return getDataTable(list);
}
/**
* 导出儿童常规体检记录列表
*/
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:export')")
@Log(title = "儿童常规体检记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByChildHealthCheck byChildHealthCheck)
{
public AjaxResult export(ByChildHealthCheck byChildHealthCheck) {
List<ByChildHealthCheck> list = byChildHealthCheckService.selectByChildHealthCheckList(byChildHealthCheck);
ExcelUtil<ByChildHealthCheck> util = new ExcelUtil<ByChildHealthCheck>(ByChildHealthCheck.class);
return util.exportExcel(list, "healthcheck");
@ -64,8 +62,7 @@ public class ByChildHealthCheckController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byChildHealthCheckService.selectByChildHealthCheckById(id));
}
@ -75,8 +72,7 @@ public class ByChildHealthCheckController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:add')")
@Log(title = "儿童常规体检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByChildHealthCheck byChildHealthCheck)
{
public AjaxResult add(@RequestBody ByChildHealthCheck byChildHealthCheck) {
byChildHealthCheck.setCreatetime(new Date());
return toAjax(byChildHealthCheckService.insertByChildHealthCheck(byChildHealthCheck));
}
@ -87,8 +83,7 @@ public class ByChildHealthCheckController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:edit')")
@Log(title = "儿童常规体检记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByChildHealthCheck byChildHealthCheck)
{
public AjaxResult edit(@RequestBody ByChildHealthCheck byChildHealthCheck) {
return toAjax(byChildHealthCheckService.updateByChildHealthCheck(byChildHealthCheck));
}
@ -99,8 +94,7 @@ public class ByChildHealthCheckController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:healthcheck:remove')")
@Log(title = "儿童常规体检记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byChildHealthCheckService.deleteByChildHealthCheckByIds(ids));
}
}

@ -43,12 +43,12 @@ public class ByChildLearndevelopmentFamilyController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:learndevelopmentfamily:list')")
@GetMapping("/list")
public TableDataInfo list(ByChildLearndevelopmentFamily byChildLearndevelopmentFamily) {
startPage();
byChildLearndevelopmentFamily.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
byChildLearndevelopmentFamily.setClassid(schoolCommon.getClassId());
}
startPage();
List<ByChildLearndevelopmentFamily> list = byChildLearndevelopmentFamilyService.selectByChildLearndevelopmentFamilyList(byChildLearndevelopmentFamily);
return getDataTable(list);
}

@ -43,12 +43,12 @@ public class ByChildLearndevelopmentTeacherController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:learndevelopmentteacher:list')")
@GetMapping("/list")
public TableDataInfo list(ByChildLearndevelopmentTeacher byChildLearndevelopmentTeacher) {
startPage();
byChildLearndevelopmentTeacher.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
byChildLearndevelopmentTeacher.setClassid(schoolCommon.getClassId());
}
startPage();
List<ByChildLearndevelopmentTeacher> list = byChildLearndevelopmentTeacherService.selectByChildLearndevelopmentTeacherList(byChildLearndevelopmentTeacher);
return getDataTable(list);
}

@ -1,6 +1,7 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -28,31 +29,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/unscramble")
public class ByDayFlowUnscrambleController extends BaseController
{
public class ByDayFlowUnscrambleController extends BaseController {
@Autowired
private IByDayFlowUnscrambleService byDayFlowUnscrambleService;
/**
* 查询一日流程解读列表
*/
@PreAuthorize("@ss.hasPermi('benyi:unscramble:list')"+ "||@ss.hasPermi('benyi:dayflowmanger:list')")
@GetMapping("/list")
public TableDataInfo list(ByDayFlowUnscramble byDayFlowUnscramble)
{
/**
* 查询一日流程解读列表
*/
@PreAuthorize("@ss.hasPermi('benyi:unscramble:list')" + "||@ss.hasPermi('benyi:dayflowmanger:list')")
@GetMapping("/list")
public TableDataInfo list(ByDayFlowUnscramble byDayFlowUnscramble) {
startPage();
List<ByDayFlowUnscramble> list = byDayFlowUnscrambleService.selectByDayFlowUnscrambleList(byDayFlowUnscramble);
return getDataTable(list);
}
/**
* 导出一日流程解读列表
*/
@PreAuthorize("@ss.hasPermi('benyi:unscramble:export')")
@Log(title = "一日流程解读", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByDayFlowUnscramble byDayFlowUnscramble)
{
public AjaxResult export(ByDayFlowUnscramble byDayFlowUnscramble) {
List<ByDayFlowUnscramble> list = byDayFlowUnscrambleService.selectByDayFlowUnscrambleList(byDayFlowUnscramble);
ExcelUtil<ByDayFlowUnscramble> util = new ExcelUtil<ByDayFlowUnscramble>(ByDayFlowUnscramble.class);
return util.exportExcel(list, "unscramble");
@ -63,8 +61,7 @@ public class ByDayFlowUnscrambleController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:unscramble:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byDayFlowUnscrambleService.selectByDayFlowUnscrambleById(id));
}
@ -74,8 +71,7 @@ public class ByDayFlowUnscrambleController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:unscramble:add')")
@Log(title = "一日流程解读", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByDayFlowUnscramble byDayFlowUnscramble)
{
public AjaxResult add(@RequestBody ByDayFlowUnscramble byDayFlowUnscramble) {
return toAjax(byDayFlowUnscrambleService.insertByDayFlowUnscramble(byDayFlowUnscramble));
}
@ -85,8 +81,7 @@ public class ByDayFlowUnscrambleController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:unscramble:edit')")
@Log(title = "一日流程解读", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByDayFlowUnscramble byDayFlowUnscramble)
{
public AjaxResult edit(@RequestBody ByDayFlowUnscramble byDayFlowUnscramble) {
return toAjax(byDayFlowUnscrambleService.updateByDayFlowUnscramble(byDayFlowUnscramble));
}
@ -96,8 +91,7 @@ public class ByDayFlowUnscrambleController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:unscramble:remove')")
@Log(title = "一日流程解读", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byDayFlowUnscrambleService.deleteByDayFlowUnscrambleByIds(ids));
}
}

@ -43,8 +43,8 @@ public class ByExperienceController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:experience:list')")
@GetMapping("/list")
public TableDataInfo list(ByExperience byExperience) {
startPage();
byExperience.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
startPage();
List<ByExperience> list = byExperienceService.selectByExperienceList(byExperience);
return getDataTable(list);
}

@ -1,6 +1,7 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -28,31 +29,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/math")
public class ByMathController extends BaseController
{
public class ByMathController extends BaseController {
@Autowired
private IByMathService byMathService;
/**
* 查询游戏数学列表
*/
@PreAuthorize("@ss.hasPermi('benyi:math:list')")
@GetMapping("/list")
public TableDataInfo list(ByMath byMath)
{
/**
* 查询游戏数学列表
*/
@PreAuthorize("@ss.hasPermi('benyi:math:list')")
@GetMapping("/list")
public TableDataInfo list(ByMath byMath) {
startPage();
List<ByMath> list = byMathService.selectByMathList(byMath);
return getDataTable(list);
}
/**
* 导出游戏数学列表
*/
@PreAuthorize("@ss.hasPermi('benyi:math:export')")
@Log(title = "游戏数学", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByMath byMath)
{
public AjaxResult export(ByMath byMath) {
List<ByMath> list = byMathService.selectByMathList(byMath);
ExcelUtil<ByMath> util = new ExcelUtil<ByMath>(ByMath.class);
return util.exportExcel(list, "math");
@ -63,8 +61,7 @@ public class ByMathController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:math:query')" + "||@ss.hasPermi('benyi:math:list')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byMathService.selectByMathById(id));
}
@ -86,8 +83,7 @@ public class ByMathController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:math:add')")
@Log(title = "游戏数学", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByMath byMath)
{
public AjaxResult add(@RequestBody ByMath byMath) {
return toAjax(byMathService.insertByMath(byMath));
}
@ -97,8 +93,7 @@ public class ByMathController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:math:edit')")
@Log(title = "游戏数学", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByMath byMath)
{
public AjaxResult edit(@RequestBody ByMath byMath) {
return toAjax(byMathService.updateByMath(byMath));
}
@ -108,8 +103,7 @@ public class ByMathController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:math:remove')")
@Log(title = "游戏数学", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byMathService.deleteByMathByIds(ids));
}
}

@ -36,8 +36,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/mathtermplan")
public class ByMathTermplanController extends BaseController
{
public class ByMathTermplanController extends BaseController {
@Autowired
private IByMathTermplanService byMathTermplanService;
@Autowired
@ -49,14 +48,12 @@ public class ByMathTermplanController extends BaseController
@Autowired
private ISysUserService userService;
/**
* 查询游戏数学学期计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByMathTermplan byMathTermplan)
{
startPage();
/**
* 查询游戏数学学期计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByMathTermplan byMathTermplan) {
byMathTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByMathTermplan> list = null;
@ -64,18 +61,18 @@ public class ByMathTermplanController extends BaseController
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byMathTermplan.setClassid(classId);
}
startPage();
list = byMathTermplanService.selectByMathTermplanList(byMathTermplan);
return getDataTable(list);
}
/**
* 导出游戏数学学期计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:export')")
@Log(title = "游戏数学学期计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByMathTermplan byMathTermplan)
{
public AjaxResult export(ByMathTermplan byMathTermplan) {
List<ByMathTermplan> list = byMathTermplanService.selectByMathTermplanList(byMathTermplan);
ExcelUtil<ByMathTermplan> util = new ExcelUtil<ByMathTermplan>(ByMathTermplan.class);
return util.exportExcel(list, "mathtermplan");
@ -86,8 +83,7 @@ public class ByMathTermplanController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
public AjaxResult getInfo(@PathVariable("id") String id) {
AjaxResult ajax = AjaxResult.success();
ByMathTermplan byMathTermplan = byMathTermplanService.selectByMathTermplanById(id);
ajax.put(AjaxResult.DATA_TAG, byMathTermplan);
@ -102,8 +98,7 @@ public class ByMathTermplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:add')")
@Log(title = "游戏数学学期计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByMathTermplan byMathTermplan)
{
public AjaxResult add(@RequestBody ByMathTermplan byMathTermplan) {
String classId = schoolCommon.getClassId();
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
@ -129,7 +124,7 @@ public class ByMathTermplanController extends BaseController
byMathTermplanitemService.insertByMathTermplanitem(byMathTermplanitem);
}
return toAjax(byMathTermplanService.insertByMathTermplan(byMathTermplan));
}else {
} else {
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
}
}
@ -140,8 +135,7 @@ public class ByMathTermplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:edit')")
@Log(title = "游戏数学学期计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByMathTermplan byMathTermplan)
{
public AjaxResult edit(@RequestBody ByMathTermplan byMathTermplan) {
return toAjax(byMathTermplanService.updateByMathTermplan(byMathTermplan));
}
@ -151,8 +145,7 @@ public class ByMathTermplanController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:remove')")
@Log(title = "游戏数学学期计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
public AjaxResult remove(@PathVariable String[] ids) {
//首先判断当前id下是否存在子目录
for (int i = 0; i < ids.length; i++) {
ByMathTermplanitem byMathTermplanitem = new ByMathTermplanitem();

@ -1,6 +1,7 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -28,31 +29,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/mathtermplanitem")
public class ByMathTermplanitemController extends BaseController
{
public class ByMathTermplanitemController extends BaseController {
@Autowired
private IByMathTermplanitemService byMathTermplanitemService;
/**
* 查询游戏数学学期计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByMathTermplanitem byMathTermplanitem)
{
/**
* 查询游戏数学学期计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByMathTermplanitem byMathTermplanitem) {
startPage();
List<ByMathTermplanitem> list = byMathTermplanitemService.selectByMathTermplanitemList(byMathTermplanitem);
return getDataTable(list);
}
/**
* 导出游戏数学学期计划明细列表
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:export')")
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByMathTermplanitem byMathTermplanitem)
{
public AjaxResult export(ByMathTermplanitem byMathTermplanitem) {
List<ByMathTermplanitem> list = byMathTermplanitemService.selectByMathTermplanitemList(byMathTermplanitem);
ExcelUtil<ByMathTermplanitem> util = new ExcelUtil<ByMathTermplanitem>(ByMathTermplanitem.class);
return util.exportExcel(list, "mathtermplanitem");
@ -63,8 +61,7 @@ public class ByMathTermplanitemController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byMathTermplanitemService.selectByMathTermplanitemById(id));
}
@ -74,8 +71,7 @@ public class ByMathTermplanitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:add')")
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByMathTermplanitem byMathTermplanitem)
{
public AjaxResult add(@RequestBody ByMathTermplanitem byMathTermplanitem) {
return toAjax(byMathTermplanitemService.insertByMathTermplanitem(byMathTermplanitem));
}
@ -85,8 +81,7 @@ public class ByMathTermplanitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:edit')")
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByMathTermplanitem byMathTermplanitem)
{
public AjaxResult edit(@RequestBody ByMathTermplanitem byMathTermplanitem) {
return toAjax(byMathTermplanitemService.updateByMathTermplanitem(byMathTermplanitem));
}
@ -96,8 +91,7 @@ public class ByMathTermplanitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:remove')")
@Log(title = "游戏数学学期计划明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byMathTermplanitemService.deleteByMathTermplanitemByIds(ids));
}
}

@ -57,13 +57,13 @@ public class ByPlanweekController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:planweek:list')")
@GetMapping("/list")
public TableDataInfo list(ByPlanweek byPlanweek) {
startPage();
byPlanweek.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByPlanweek> list =null;
//首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byPlanweek.setClassid(classId);
startPage();
list = byPlanweekService.selectByPlanweekList(byPlanweek);
}

@ -31,33 +31,30 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/planweekitem")
public class ByPlanweekitemController extends BaseController
{
public class ByPlanweekitemController extends BaseController {
@Autowired
private IByPlanweekitemService byPlanweekitemService;
@Autowired
private SchoolCommon schoolCommon;
/**
* 查询周计划(家长和教育部门细化)列表
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:list')")
@GetMapping("/list")
public TableDataInfo list(ByPlanweekitem byPlanweekitem)
{
/**
* 查询周计划(家长和教育部门细化)列表
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:list')")
@GetMapping("/list")
public TableDataInfo list(ByPlanweekitem byPlanweekitem) {
startPage();
List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem);
return getDataTable(list);
}
/**
* 导出周计划(家长和教育部门细化)列表
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:export')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByPlanweekitem byPlanweekitem)
{
public AjaxResult export(ByPlanweekitem byPlanweekitem) {
List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem);
ExcelUtil<ByPlanweekitem> util = new ExcelUtil<ByPlanweekitem>(ByPlanweekitem.class);
return util.exportExcel(list, "planweekitem");
@ -68,8 +65,7 @@ public class ByPlanweekitemController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:planweek:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byPlanweekitemService.selectByPlanweekitemById(id));
}
@ -79,23 +75,22 @@ public class ByPlanweekitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:planweek:add')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem)
{
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem) {
byPlanweekitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
String dayTurn = String.valueOf(schoolCommon.dateToWeek(byPlanweekitem.getActivitytime()));
if (dayTurn.equals("1")) {
dayTurn = "";
}else if (dayTurn.equals("2")) {
} else if (dayTurn.equals("2")) {
dayTurn = "";
}else if (dayTurn.equals("3")) {
} else if (dayTurn.equals("3")) {
dayTurn = "";
}else if (dayTurn.equals("4")) {
} else if (dayTurn.equals("4")) {
dayTurn = "";
}else if (dayTurn.equals("5")) {
} else if (dayTurn.equals("5")) {
dayTurn = "";
}else if (dayTurn.equals("6")) {
} else if (dayTurn.equals("6")) {
dayTurn = "";
}else if (dayTurn.equals("7")) {
} else if (dayTurn.equals("7")) {
dayTurn = "";
}
byPlanweekitem.setDay("星期" + dayTurn);
@ -108,23 +103,22 @@ public class ByPlanweekitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:planweek:edit')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem)
{
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem) {
byPlanweekitem.setUpdateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
String dayTurn = String.valueOf(schoolCommon.dateToWeek(byPlanweekitem.getActivitytime()));
if (dayTurn.equals("1")) {
dayTurn = "";
}else if (dayTurn.equals("2")) {
} else if (dayTurn.equals("2")) {
dayTurn = "";
}else if (dayTurn.equals("3")) {
} else if (dayTurn.equals("3")) {
dayTurn = "";
}else if (dayTurn.equals("4")) {
} else if (dayTurn.equals("4")) {
dayTurn = "";
}else if (dayTurn.equals("5")) {
} else if (dayTurn.equals("5")) {
dayTurn = "";
}else if (dayTurn.equals("6")) {
} else if (dayTurn.equals("6")) {
dayTurn = "";
}else if (dayTurn.equals("7")) {
} else if (dayTurn.equals("7")) {
dayTurn = "";
}
byPlanweekitem.setDay("星期" + dayTurn);
@ -137,8 +131,7 @@ public class ByPlanweekitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:planweek:remove')")
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byPlanweekitemService.deleteByPlanweekitemByIds(ids));
}
}

@ -49,8 +49,8 @@ public class BySchoolcalendarClassController extends BaseController {
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass) {
String strClassId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(strClassId)) {
startPage();
bySchoolcalendarClass.setClassid(strClassId);
startPage();
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
//System.out.println("---------------------分页"+list);
return getDataTable(list);

@ -62,7 +62,6 @@ public class ByThemeMonthplanController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) {
startPage();
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByThemeMonthplan> list = null;
@ -70,6 +69,7 @@ public class ByThemeMonthplanController extends BaseController {
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeMonthplan.setClassid(classId);
}
startPage();
list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
return getDataTable(list);
}

@ -31,33 +31,30 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/benyi/thememonthplanitem")
public class ByThemeMonthplanitemController extends BaseController
{
public class ByThemeMonthplanitemController extends BaseController {
@Autowired
private IByThemeMonthplanitemService byThemeWeekplanService;
@Autowired
private SchoolCommon schoolCommon;
/**
* 查询主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeMonthplanitem byThemeMonthplanitem)
{
/**
* 查询主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeMonthplanitem byThemeMonthplanitem) {
startPage();
List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
return getDataTable(list);
}
/**
* 导出主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')")
@Log(title = "主题整合周计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeMonthplanitem byThemeMonthplanitem)
{
public AjaxResult export(ByThemeMonthplanitem byThemeMonthplanitem) {
List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem);
ExcelUtil<ByThemeMonthplanitem> util = new ExcelUtil<ByThemeMonthplanitem>(ByThemeMonthplanitem.class);
return util.exportExcel(list, "weekplan");
@ -68,8 +65,7 @@ public class ByThemeMonthplanitemController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byThemeWeekplanService.selectByThemeMonthplanitemById(id));
}
@ -79,9 +75,8 @@ public class ByThemeMonthplanitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')")
@Log(title = "主题整合周计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem)
{
String uuid=schoolCommon.getUuid();
public AjaxResult add(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem) {
String uuid = schoolCommon.getUuid();
byThemeMonthplanitem.setId(uuid);
byThemeMonthplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeWeekplanService.insertByThemeMonthplanitem(byThemeMonthplanitem));
@ -93,8 +88,7 @@ public class ByThemeMonthplanitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
@Log(title = "主题整合周计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem)
{
public AjaxResult edit(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem) {
return toAjax(byThemeWeekplanService.updateByThemeMonthplanitem(byThemeMonthplanitem));
}
@ -104,8 +98,7 @@ public class ByThemeMonthplanitemController extends BaseController
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')")
@Log(title = "主题整合周计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(byThemeWeekplanService.deleteByThemeMonthplanitemByIds(ids));
}
}

@ -57,7 +57,6 @@ public class ByThemeTermplanController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeTermplan byThemeTermplan) {
startPage();
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
List<ByThemeTermplan> list = null;
@ -65,6 +64,7 @@ public class ByThemeTermplanController extends BaseController {
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeTermplan.setClassid(classId);
}
startPage();
list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
return getDataTable(list);
}

@ -65,7 +65,6 @@ public class ByThemeWeekplanController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeWeekplan byThemeWeekplan) {
startPage();
byThemeWeekplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
String classId = schoolCommon.getClassId();
@ -74,6 +73,7 @@ public class ByThemeWeekplanController extends BaseController {
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byThemeWeekplan.setClassid(classId);
}
startPage();
list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
return getDataTable(list);

@ -52,11 +52,12 @@ public class ByTrainVideoController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:video:list')")
@GetMapping("/list")
public TableDataInfo list(ByTrainVideo byTrainVideo) {
startPage();
//判断type是否为空
if (!schoolCommon.isStringEmpty(byTrainVideo.getType())) {
byTrainVideo.setType(byTrainVideo.getType() + ",");
}
startPage();
List<ByTrainVideo> list = byTrainVideoService.selectByTrainVideoList(byTrainVideo);
if (list != null && list.size() > 0) {

@ -50,17 +50,15 @@ public class ByClassController extends BaseController {
//@PreAuthorize("@ss.hasPermi('system:class:list')"+ "||@ss.hasPermi('system:school:list')")
@GetMapping("/list")
public TableDataInfo list(ByClass byClass) {
startPage();
List<ByClass> list = null;
String classId = schoolCommon.getClassId();
//如果是幼儿园教师 只显示当前班级
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
byClass.setBjbh(classId);
list = byClassService.selectByClassList(byClass);
} else {
list = byClassService.selectByClassList(byClass);
}
startPage();
list = byClassService.selectByClassList(byClass);
return getDataTable(list);
}