| | |
| | | package com.ruoyi.web.controller.oa; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.annotation.DataDictClass; |
| | | import com.ruoyi.common.annotation.Log; |
| | |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import com.ruoyi.common.core.validate.QueryGroup; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.oa.domain.BsSchool; |
| | | import com.ruoyi.oa.domain.bo.BsSchoolBo; |
| | | import com.ruoyi.oa.domain.vo.BsSchoolVo; |
| | | import com.ruoyi.oa.service.IBsSchoolService; |
| | |
| | | */ |
| | | @ApiOperation("学校下拉列表") |
| | | @GetMapping("/select") |
| | | public AjaxResult selectList() { |
| | | return AjaxResult.success(iBsSchoolService.list(new QueryWrapper<>())); |
| | | public AjaxResult selectList(BsSchoolBo bo) { |
| | | return AjaxResult.success(iBsSchoolService.list(new LambdaQueryWrapper<BsSchool>() |
| | | .ne(BsSchool::getCode, "0000") |
| | | .like(StringUtils.isNotBlank(bo.getName()), BsSchool::getName, bo.getName()))); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('oa:school:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<BsSchoolVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | return AjaxResult.success(iBsSchoolService.queryById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("删除学校") |
| | | @PreAuthorize("@ss.hasPermi('oa:school:remove')") |
| | | @Log(title = "学校" , businessType = BusinessType.DELETE) |
| | | @Log(title = "学校", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@ApiParam("主键串") |
| | | @NotEmpty(message = "主键不能为空") |
| | | @PathVariable Long[] ids) { |
| | | @NotEmpty(message = "主键不能为空") |
| | | @PathVariable Long[] ids) { |
| | | return toAjax(iBsSchoolService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); |
| | | } |
| | | } |