| | |
| | | package com.ard.web.controller.inspection; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ard.common.annotation.Log; |
| | | import com.ard.common.core.controller.BaseController; |
| | | import com.ard.common.core.domain.AjaxResult; |
| | | import com.ard.common.core.page.TableDataInfo; |
| | | import com.ard.common.enums.BusinessType; |
| | | import com.ard.common.utils.poi.ExcelUtil; |
| | | import com.ard.inspection.domain.ArdInspectionGroup; |
| | | import com.ard.inspection.service.IArdInspectionGroupService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | * 查询精细化巡检分组列表 |
| | | */ |
| | | @ApiOperation("查询精细化巡检分组列表") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:list')") |
| | | //@PreAuthorize("@ss.hasPermi('inspection:group:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(ArdInspectionGroup ardInspectionGroup) { |
| | | List<ArdInspectionGroup> list = ardInspectionGroupService.selectArdInspectionGroupList(ardInspectionGroup); |
| | |
| | | * 获取精细化巡检分组详细信息 |
| | | */ |
| | | @ApiOperation("获取精细化巡检分组详细信息") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:query')") |
| | | //@PreAuthorize("@ss.hasPermi('inspection:group:query')") |
| | | @GetMapping(value = "/{groupId}") |
| | | public AjaxResult getInfo(@PathVariable("groupId") Long groupId) { |
| | | //ardInspectionGroupService.checkInspectionGroupDataScope(groupId); |
| | |
| | | * 新增精细化巡检分组 |
| | | */ |
| | | @ApiOperation("新增精细化巡检分组") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:add')") |
| | | //@PreAuthorize("@ss.hasPermi('inspection:group:add')") |
| | | @Log(title = "精细化巡检分组", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdInspectionGroup ardInspectionGroup) { |
| | | if (ardInspectionGroupService.checkInspectionGroupNameUnique(ardInspectionGroup)){ |
| | | if (!ardInspectionGroupService.checkInspectionGroupNameUnique(ardInspectionGroup)){ |
| | | return error("新增分组'" + ardInspectionGroup.getGroupName() + "'失败,分组名称已存在"); |
| | | } |
| | | ardInspectionGroup.setCreateBy(getUsername()); |
| | |
| | | * 修改精细化巡检分组 |
| | | */ |
| | | @ApiOperation("修改精细化巡检分组") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:edit')") |
| | | //@PreAuthorize("@ss.hasPermi('inspection:group:edit')") |
| | | @Log(title = "精细化巡检分组", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdInspectionGroup ardInspectionGroup) { |
| | |
| | | * 删除精细化巡检分组 |
| | | */ |
| | | @ApiOperation("删除精细化巡检分组") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:remove')") |
| | | //@PreAuthorize("@ss.hasPermi('inspection:group:remove')") |
| | | @Log(title = "精细化巡检分组", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{groupId}") |
| | | public AjaxResult remove(@PathVariable Long groupId) { |
| | |
| | | return toAjax(ardInspectionGroupService.deleteArdInspectionGroupByGroupId(groupId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取巡检分组树列表 |
| | | */ |
| | | @ApiOperation("获取巡检分组树列表") |
| | | //@PreAuthorize("@ss.hasPermi('inspection:group:groupTree')") |
| | | @GetMapping("/groupTree") |
| | | public AjaxResult deptTree(ArdInspectionGroup ardInspectionGroup) { |
| | | return success(ardInspectionGroupService.selectGroupTreeList(ardInspectionGroup)); |
| | | } |
| | | |
| | | } |