| | |
| | | @ApiOperation("查询精细化巡检分组列表") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdInspectionGroup ardInspectionGroup) { |
| | | startPage(); |
| | | public AjaxResult list(ArdInspectionGroup ardInspectionGroup) { |
| | | List<ArdInspectionGroup> list = ardInspectionGroupService.selectArdInspectionGroupList(ardInspectionGroup); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出精细化巡检分组列表 |
| | | */ |
| | | @ApiOperation("导出精细化巡检分组列表") |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:export')") |
| | | @Log(title = "精细化巡检分组", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdInspectionGroup ardInspectionGroup) { |
| | | List<ArdInspectionGroup> list = ardInspectionGroupService.selectArdInspectionGroupList(ardInspectionGroup); |
| | | ExcelUtil<ArdInspectionGroup> util = new ExcelUtil<ArdInspectionGroup>(ArdInspectionGroup.class); |
| | | util.exportExcel(response, list, "精细化巡检分组数据"); |
| | | return success(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('inspection:group:query')") |
| | | @GetMapping(value = "/{groupId}") |
| | | public AjaxResult getInfo(@PathVariable("groupId") Long groupId) { |
| | | ardInspectionGroupService.checkInspectionGroupDataScope(groupId); |
| | | //ardInspectionGroupService.checkInspectionGroupDataScope(groupId); |
| | | return success(ardInspectionGroupService.selectArdInspectionGroupByGroupId(groupId)); |
| | | } |
| | | |
| | |
| | | if (ardInspectionGroupService.hasChildByInspectionGroupId(groupId)){ |
| | | return warn("存在下级分组,不允许删除"); |
| | | } |
| | | if (ardInspectionGroupService.checkInspectionGroupExistUser(groupId)){ |
| | | return warn("分组存在用户,不允许删除"); |
| | | } |
| | | ardInspectionGroupService.checkInspectionGroupDataScope(groupId); |
| | | //if (ardInspectionGroupService.checkInspectionGroupExistUser(groupId)){ |
| | | // return warn("分组存在用户,不允许删除"); |
| | | //} |
| | | //ardInspectionGroupService.checkInspectionGroupDataScope(groupId); |
| | | return toAjax(ardInspectionGroupService.deleteArdInspectionGroupByGroupId(groupId)); |
| | | } |
| | | |