package com.bizmatics.controller.web; import com.bizmatics.common.core.bean.ApiResult; import com.bizmatics.model.PatrolContentEntry; import com.bizmatics.model.vo.PatrolInspectionContentListVo; import com.bizmatics.model.vo.PatrolInspectionContentVo; import com.bizmatics.model.vo.SiteDeviceCountVo; import com.bizmatics.service.PatrolInspectionContentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 巡检管理-巡检内容 * * @author ya * @since 2021-10-16 */ @RestController @RequestMapping("/patrolInspectionContent") public class PatrolInspectionContentController { @Autowired private PatrolInspectionContentService patrolInspectionContentService; /** * 巡检管理-巡检内容-新增 * * @param patrolInspectionContentVo * @return */ @PostMapping("patrolInspectionContentAdd") public ApiResult patrolInspectionContentAdd(@RequestBody PatrolInspectionContentVo patrolInspectionContentVo ) { patrolInspectionContentService.patrolInspectionContentAdd(patrolInspectionContentVo); return ApiResult.success(); } /** * 巡检管理-巡检内容-修改 * * @param patrolInspectionContentVo * @return */ @PostMapping("patrolInspectionContentUpdate") public ApiResult patrolInspectionContentUpdate(@RequestBody PatrolInspectionContentVo patrolInspectionContentVo ) { patrolInspectionContentService.patrolInspectionContentUpdate(patrolInspectionContentVo); return ApiResult.success(); } /** * 巡检管理-巡检内容-注销 * * @param id 巡检内容id * @return */ @GetMapping("patrolInspectionContentDel") public ApiResult patrolInspectionContentDel(@RequestParam Integer id ) { patrolInspectionContentService.patrolInspectionContentDel(id); return ApiResult.success(); } /** * 巡检管理-巡检内容-巡检设备列表 * * @param inspectionContentName * @return */ @GetMapping("patrolInspectionContentList") public ApiResult> patrolInspectionContentList(@RequestParam(required = false) String inspectionContentName ) { return ApiResult.success(patrolInspectionContentService.patrolInspectionContentList(inspectionContentName)); } /** * 巡检管理-巡检内容-巡检内容查看详情与回显 * * @param id 巡检内容ID * @return */ @GetMapping("patrolInspectionContentDetailsList") public ApiResult> patrolInspectionContentDetailsList(@RequestParam Integer id ) { return ApiResult.success(patrolInspectionContentService.patrolInspectionContentDetailsList(id)); } /** * 巡检管理-巡检内容-巡检内容检查项查询 * * @param id 巡检内容ID * @return */ @GetMapping("patrolContentEntryList") public ApiResult> patrolContentEntryList(@RequestParam Integer id ) { return ApiResult.success(patrolInspectionContentService.patrolContentEntryList(id)); } /** * 巡检管理-巡检内容-左侧站点目录 * * @param siteName 站点名称 * @return */ @GetMapping("patrolInspectionContentSiteList") public ApiResult> patrolInspectionContentSiteList(@RequestParam(required = false) String siteName ) { return ApiResult.success(patrolInspectionContentService.patrolInspectionContentSiteList(siteName)); } }