TbVmsSymbLibControllerVMP0.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package com.its.op.controller.vms;
  2. import com.its.op.model.dto.vms.TbVmsSymbLibDto;
  3. import com.its.op.service.vms.TbVmsSymbLibServiceVMP0;
  4. import io.swagger.annotations.Api;
  5. import io.swagger.annotations.ApiOperation;
  6. import lombok.RequiredArgsConstructor;
  7. import org.springframework.validation.annotation.Validated;
  8. import org.springframework.web.bind.annotation.*;
  9. import javax.validation.Valid;
  10. import java.util.List;
  11. @Api(tags = "12.VMS-1.VMS 관리-4.VMS 심벌이미지 관리")
  12. @Validated
  13. @RestController
  14. @RequiredArgsConstructor
  15. @RequestMapping("/api/vms/manager/symbl-vmp0")
  16. public class TbVmsSymbLibControllerVMP0 {
  17. private final TbVmsSymbLibServiceVMP0 service;
  18. @ApiOperation(value = "VMS 심벌이미지 전체조회(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  19. @GetMapping(value = "", produces = {"application/json; charset=utf8"})
  20. public List<TbVmsSymbLibDto> findAll() {
  21. return service.findAll();
  22. }
  23. @ApiOperation(value = "VMS 심벌이미지 개별조회(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  24. @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
  25. public TbVmsSymbLibDto findById(@PathVariable final Short id) {
  26. return this.service.findById(id);
  27. }
  28. /*
  29. @ApiOperation(value = "VMS 심벌이미지 정보변경(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  30. @PutMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
  31. public TbVmsSymbLibDto updateById(@PathVariable final Short id, @RequestBody @Valid final TbVmsSymbLibDto.TbVmsSymbLibUpdReq req) {
  32. return this.service.updateById(id, req);
  33. }
  34. */
  35. @ApiOperation(value = "VMS 심벌이미지 정보변경/생성-개별(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  36. @PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
  37. public TbVmsSymbLibDto mergeInfo(@PathVariable("id") Short id, @RequestBody @Valid final TbVmsSymbLibDto.TbVmsSymbLibUpdReq req) {
  38. return this.service.mergeInfo(req);
  39. }
  40. @ApiOperation(value = "VMS 심벌이미지 정보삭제-개별(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  41. @DeleteMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
  42. public TbVmsSymbLibDto deleteDataById(@PathVariable("id") Short id) {
  43. return this.service.deleteDataById(id);
  44. }
  45. /*
  46. @ApiOperation(value = "VMS 심벌이미지 정보변경/생성-목록(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  47. @PostMapping(value = "", produces = {"application/json; charset=utf8"})
  48. public List<TbVmsSymbLibDto> mergeInfoList(@RequestBody @Valid final List<TbVmsSymbLibDto.TbVmsSymbLibUpdReq> listReq) {
  49. return this.service.mergeInfoList(listReq);
  50. }
  51. @ApiOperation(value = "VMS 심벌이미지 정보삭제-목록(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
  52. @DeleteMapping(value = "", produces = {"application/json; charset=utf8"})
  53. public List<TbVmsSymbLibDto> deleteDataByIds(@RequestBody @Valid final List<Short> ids) {
  54. return this.service.deleteByIds(ids);
  55. }
  56. */
  57. @ApiOperation(value = "VMS 심벌이미지 사용여부 조회(TB_VMS_SYMB_LIB)", response = Integer.class)
  58. @GetMapping(value = "/usage/{id}", produces = {"application/json; charset=utf8"})
  59. public Integer findUsageCountBySymbolId(@PathVariable final Short id) {
  60. return this.service.findUsageCountBySymbolId(id);
  61. }
  62. @ApiOperation(value = "VMS 심벌이미지 신규 ID 조회(TB_VMS_SYMB_LIB)", response = Short.class)
  63. @GetMapping(value = "/new-id", produces = {"application/json; charset=utf8"})
  64. public Short getNewSymbolId() {
  65. return this.service.getNewSymbolId();
  66. }
  67. }