PatrolInspectionContentController.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. package com.bizmatics.controller.web;
  2. import com.bizmatics.common.core.bean.ApiResult;
  3. import com.bizmatics.model.PatrolContentEntry;
  4. import com.bizmatics.model.vo.PatrolInspectionContentListVo;
  5. import com.bizmatics.model.vo.PatrolInspectionContentVo;
  6. import com.bizmatics.model.vo.SiteDeviceCountVo;
  7. import com.bizmatics.service.PatrolInspectionContentService;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.*;
  10. import java.util.List;
  11. /**
  12. * 巡检管理-巡检内容
  13. *
  14. * @author ya
  15. * @since 2021-10-16
  16. */
  17. @RestController
  18. @RequestMapping("/patrolInspectionContent")
  19. public class PatrolInspectionContentController {
  20. @Autowired
  21. private PatrolInspectionContentService patrolInspectionContentService;
  22. /**
  23. * 巡检管理-巡检内容-新增
  24. *
  25. * @param patrolInspectionContentVo
  26. * @return
  27. */
  28. @PostMapping("patrolInspectionContentAdd")
  29. public ApiResult<Void> patrolInspectionContentAdd(@RequestBody PatrolInspectionContentVo patrolInspectionContentVo
  30. ) {
  31. patrolInspectionContentService.patrolInspectionContentAdd(patrolInspectionContentVo);
  32. return ApiResult.success();
  33. }
  34. /**
  35. * 巡检管理-巡检内容-修改
  36. *
  37. * @param patrolInspectionContentVo
  38. * @return
  39. */
  40. @PostMapping("patrolInspectionContentUpdate")
  41. public ApiResult<Void> patrolInspectionContentUpdate(@RequestBody PatrolInspectionContentVo patrolInspectionContentVo
  42. ) {
  43. patrolInspectionContentService.patrolInspectionContentUpdate(patrolInspectionContentVo);
  44. return ApiResult.success();
  45. }
  46. /**
  47. * 巡检管理-巡检内容-注销
  48. *
  49. * @param id 巡检内容id
  50. * @return
  51. */
  52. @GetMapping("patrolInspectionContentDel")
  53. public ApiResult<Void> patrolInspectionContentDel(@RequestParam Integer id
  54. ) {
  55. patrolInspectionContentService.patrolInspectionContentDel(id);
  56. return ApiResult.success();
  57. }
  58. /**
  59. * 巡检管理-巡检内容-巡检设备列表
  60. *
  61. * @param inspectionContentName
  62. * @return
  63. */
  64. @GetMapping("patrolInspectionContentList")
  65. public ApiResult<List<PatrolInspectionContentListVo>> patrolInspectionContentList(@RequestParam(required = false) String inspectionContentName
  66. ) {
  67. return ApiResult.success(patrolInspectionContentService.patrolInspectionContentList(inspectionContentName));
  68. }
  69. /**
  70. * 巡检管理-巡检内容-巡检内容查看详情与回显
  71. *
  72. * @param id 巡检内容ID
  73. * @return
  74. */
  75. @GetMapping("patrolInspectionContentDetailsList")
  76. public ApiResult<List<PatrolInspectionContentListVo>> patrolInspectionContentDetailsList(@RequestParam Integer id
  77. ) {
  78. return ApiResult.success(patrolInspectionContentService.patrolInspectionContentDetailsList(id));
  79. }
  80. /**
  81. * 巡检管理-巡检内容-巡检内容检查项查询
  82. *
  83. * @param id 巡检内容ID
  84. * @return
  85. */
  86. @GetMapping("patrolContentEntryList")
  87. public ApiResult<List<PatrolContentEntry>> patrolContentEntryList(@RequestParam Integer id
  88. ) {
  89. return ApiResult.success(patrolInspectionContentService.patrolContentEntryList(id));
  90. }
  91. /**
  92. * 巡检管理-巡检内容-左侧站点目录
  93. *
  94. * @param siteName 站点名称
  95. * @return
  96. */
  97. @GetMapping("patrolInspectionContentSiteList")
  98. public ApiResult<List<SiteDeviceCountVo>> patrolInspectionContentSiteList(@RequestParam(required = false) String siteName
  99. ) {
  100. return ApiResult.success(patrolInspectionContentService.patrolInspectionContentSiteList(siteName));
  101. }
  102. }