LegendPipeController.kt 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package com.persagy.legend.controller
  2. import com.persagy.legend.models.entities.LegendPipe
  3. import com.persagy.legend.services.LegendPipeService
  4. import com.sybotan.service.models.requests.SCountRequest
  5. import com.sybotan.service.models.requests.SCreateRequest
  6. import com.sybotan.service.models.requests.SQueryRequest
  7. import com.sybotan.service.models.requests.SUpdateRequest
  8. import com.sybotan.service.models.responses.SBaseResponse
  9. import com.sybotan.service.models.responses.SCountResponse
  10. import com.sybotan.service.models.responses.SCreateResponse
  11. import com.sybotan.service.models.responses.SQueryResponse
  12. import io.swagger.v3.oas.annotations.Operation
  13. import io.swagger.v3.oas.annotations.tags.Tag
  14. import org.springframework.web.bind.annotation.PostMapping
  15. import org.springframework.web.bind.annotation.RequestBody
  16. import org.springframework.web.bind.annotation.RequestMapping
  17. import org.springframework.web.bind.annotation.RestController
  18. /**
  19. * 管线图例接口类
  20. *
  21. * @author zy
  22. */
  23. @Tag(name = "002、管线图例")
  24. @RestController
  25. @RequestMapping("/pipe")
  26. class LegendPipeController {
  27. /**
  28. * 创建管线图例
  29. */
  30. @Operation(summary= "创建管线图例-批量")
  31. @PostMapping("/create")
  32. fun create(@RequestBody request: SCreateRequest<LegendPipe>): SCreateResponse<LegendPipe> {
  33. return LegendPipeService.createList(request)
  34. }
  35. /**
  36. * 更新管线图例
  37. */
  38. @Operation(summary = "管线图例修改-批量")
  39. @PostMapping(value = ["/update"])
  40. fun update(@RequestBody request: SUpdateRequest<LegendPipe>): SBaseResponse {
  41. return LegendPipeService.updateList(request)
  42. }
  43. /**
  44. * 保存图例
  45. */
  46. @Operation(summary = "管线图例保存")
  47. @PostMapping(value = ["/save"])
  48. fun save(@RequestBody request: LegendPipe): SBaseResponse {
  49. return LegendPipeService.save(request)
  50. }
  51. /**
  52. * 根据id删除管线图例
  53. */
  54. @Operation(summary = "管线图例删除", description = "")
  55. @PostMapping(value = ["/delete"])
  56. fun delete(@RequestBody idList: ArrayList<LegendPipe>): SBaseResponse {
  57. return LegendPipeService.deleteByKeysList(idList)
  58. }
  59. /**
  60. * 查询管线图例信息
  61. */
  62. @Operation(summary = "查询管线图例-批量", description = " 级联:类型信息(classInfo) 状态信息(stateList)")
  63. @PostMapping(value = ["/query"])
  64. fun query(@RequestBody request: SQueryRequest): SQueryResponse<LegendPipe> {
  65. return LegendPipeService.pageQuery(request)
  66. }
  67. /**
  68. * 统计管线图例
  69. */
  70. @Operation(summary = "统计管线图例")
  71. @PostMapping(value = ["/count"])
  72. fun count(@RequestBody request: SCountRequest): SCountResponse {
  73. return LegendPipeService.count(request)
  74. }
  75. }