123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- package com.bizmatics.controller.web;
- import com.bizmatics.common.core.bean.ApiResult;
- import com.bizmatics.common.core.bean.CommonPage;
- import com.bizmatics.model.PatrolInspectionContent;
- import com.bizmatics.model.PatrolInspectionScheme;
- import com.bizmatics.model.vo.PatrolCheckEntryVo;
- import com.bizmatics.model.vo.PatrolInspectionSchemeListVo;
- import com.bizmatics.model.vo.PatrolInspectionSchemeOneVo;
- import com.bizmatics.model.vo.PatrolInspectionSchemeVo;
- import com.bizmatics.service.PatrolInspectionSchemeService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * 巡检管理-巡检计划
- *
- * @author ya
- * @since 2021-10-18
- */
- @RestController
- @RequestMapping("/patrolInspectionScheme")
- public class PatrolInspectionSchemeController {
- @Autowired
- private PatrolInspectionSchemeService patrolInspectionSchemeService;
- /**
- * 巡检管理-巡检计划-计划新增
- *
- * @param patrolInspectionSchemeVo
- * @return
- */
- @PostMapping("patrolInspectionSchemeAdd")
- public ApiResult<Void> patrolInspectionSchemeAdd(@RequestBody PatrolInspectionSchemeVo patrolInspectionSchemeVo
- ) {
- patrolInspectionSchemeService.patrolInspectionSchemeAdd(patrolInspectionSchemeVo);
- return ApiResult.success();
- }
- /**
- * 巡检管理-巡检计划-计划修改
- *
- * @param patrolInspectionSchemeVo
- * @return
- */
- @PostMapping("patrolInspectionSchemeUpdate")
- public ApiResult<Void> patrolInspectionSchemeUpdate(@RequestBody PatrolInspectionSchemeVo patrolInspectionSchemeVo
- ) {
- patrolInspectionSchemeService.patrolInspectionSchemeUpdate(patrolInspectionSchemeVo);
- return ApiResult.success();
- }
- /**
- * 巡检管理-巡检计划-计划暂停
- *
- * @param id
- * @return
- */
- @GetMapping("patrolInspectionSchemeDel")
- public ApiResult<Void> patrolInspectionSchemeDel(@RequestParam Integer id
- ) {
- patrolInspectionSchemeService.patrolInspectionSchemeDel(id);
- return ApiResult.success();
- }
- /**
- * 巡检管理-巡检计划-计划列表查询
- *
- * @param status 0 暂停 1 启用 2 完成
- * @param inspectionSchemeName 巡检名称
- * @param size 页数默认 1
- * @param current 条数默认15
- * @return
- */
- @GetMapping("patrolInspectionSchemeList")
- public ApiResult<CommonPage<PatrolInspectionScheme>> patrolInspectionSchemeList(@RequestParam(value = "status",required = false, defaultValue = "3") Integer status,
- @RequestParam(required = false) String inspectionSchemeName,
- @RequestParam(value = "size", required = false, defaultValue = "1") Integer size,
- @RequestParam(value = "current", required = false, defaultValue = "15") Integer current
- ) {
- return ApiResult.success(patrolInspectionSchemeService.patrolInspectionSchemeList(inspectionSchemeName, status, size, current));
- }
- /**
- * 巡检管理-巡检计划-修改回显/查看详情
- *
- * @param id 计划ID
- * @return
- */
- @GetMapping("PatrolInspectionScheme")
- public ApiResult<List<PatrolInspectionSchemeOneVo>> PatrolInspectionScheme(@RequestParam Integer id
- ) {
- return ApiResult.success(patrolInspectionSchemeService.PatrolInspectionScheme(id));
- }
- /**
- * 巡检管理-巡检计划-检查项查看
- *
- * @param inspectionContentId 巡检内容ID
- * @return
- */
- @GetMapping("checkItemList")
- public ApiResult<List<PatrolCheckEntryVo>> checkItemList(@RequestParam Integer inspectionContentId
- ) {
- return ApiResult.success(patrolInspectionSchemeService.checkItemList(inspectionContentId));
- }
- /**
- * 巡检管理-巡检计划-巡检内容下拉框
- *
- * @param siteId 站点ID
- * @return
- */
- @GetMapping("patrolInspectionContentDroplist")
- public ApiResult<List<PatrolInspectionContent>> patrolInspectionContentDroplist(@RequestParam Integer siteId
- ) {
- return ApiResult.success(patrolInspectionSchemeService.patrolInspectionContentDroplist(siteId));
- }
- /**
- * 巡检管理-巡检计划-线路注销
- *
- * @param id 巡检线路ID
- * @return
- */
- @GetMapping("patrolInspectionRouteDel")
- public ApiResult<Void> patrolInspectionRouteDel(@RequestParam Integer id
- ) {
- patrolInspectionSchemeService.patrolInspectionRouteDel(id);
- return ApiResult.success();
- }
- /**
- * 巡检管理-巡检计划-计划日历/站点巡检日历数据查询
- *
- * @param id 计划ID
- * @return
- */
- @GetMapping("patrolInspectionSchemeCalendar")
- public ApiResult<List<PatrolInspectionSchemeListVo>> patrolInspectionSchemeCalendar(@RequestParam(value = "id", required = false, defaultValue = "0") Integer id
- ) {
- return ApiResult.success(patrolInspectionSchemeService.patrolInspectionSchemeCalendar(id));
- }
- }
|