| | |
| | | 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.annotation.RepeatSubmit; |
| | |
| | | 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(BsSchoolBo bo) { |
| | | return AjaxResult.success(iBsSchoolService.list(new LambdaQueryWrapper<BsSchool>() |
| | | .ne(BsSchool::getCode, "0000") |
| | | .like(StringUtils.isNotBlank(bo.getName()), BsSchool::getName, bo.getName()))); |
| | | } |
| | | |
| | | /** |
| | | * 导出学校列表 |
| | | */ |
| | | @ApiOperation("导出学校列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:school:export')") |
| | | @Log(title = "学校", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated BsSchoolBo bo, HttpServletResponse response) { |
| | | List<BsSchoolVo> list = iBsSchoolService.queryList(bo); |
| | | @PostMapping("/export") |
| | | public void export(BsSchoolBo bo, HttpServletResponse response) { |
| | | List<BsSchoolVo> list = iBsSchoolService.exportList(bo); |
| | | ExcelUtil.exportExcel(list, "学校", BsSchoolVo.class, response); |
| | | } |
| | | |
| | |
| | | @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); |
| | | } |
| | | } |