| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- package com.its.op.controller.vms;
- import com.its.op.model.dto.vms.TbVmsSymbLibDto;
- import com.its.op.service.vms.TbVmsSymbLibServiceVMP0;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.springframework.validation.annotation.Validated;
- import org.springframework.web.bind.annotation.*;
- import javax.validation.Valid;
- import java.util.List;
- @Api(tags = "12.VMS-1.VMS 관리-4.VMS 심벌이미지 관리")
- @Validated
- @RestController
- @RequiredArgsConstructor
- @RequestMapping("/api/vms/manager/symbl-vmp0")
- public class TbVmsSymbLibControllerVMP0 {
- private final TbVmsSymbLibServiceVMP0 service;
- @ApiOperation(value = "VMS 심벌이미지 전체조회(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @GetMapping(value = "", produces = {"application/json; charset=utf8"})
- public List<TbVmsSymbLibDto> findAll() {
- return service.findAll();
- }
- @ApiOperation(value = "VMS 심벌이미지 개별조회(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
- public TbVmsSymbLibDto findById(@PathVariable final Short id) {
- return this.service.findById(id);
- }
- /*
- @ApiOperation(value = "VMS 심벌이미지 정보변경(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @PutMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
- public TbVmsSymbLibDto updateById(@PathVariable final Short id, @RequestBody @Valid final TbVmsSymbLibDto.TbVmsSymbLibUpdReq req) {
- return this.service.updateById(id, req);
- }
- */
- @ApiOperation(value = "VMS 심벌이미지 정보변경/생성-개별(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
- public TbVmsSymbLibDto mergeInfo(@PathVariable("id") Short id, @RequestBody @Valid final TbVmsSymbLibDto.TbVmsSymbLibUpdReq req) {
- return this.service.mergeInfo(req);
- }
- @ApiOperation(value = "VMS 심벌이미지 정보삭제-개별(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @DeleteMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
- public TbVmsSymbLibDto deleteDataById(@PathVariable("id") Short id) {
- return this.service.deleteDataById(id);
- }
- /*
- @ApiOperation(value = "VMS 심벌이미지 정보변경/생성-목록(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @PostMapping(value = "", produces = {"application/json; charset=utf8"})
- public List<TbVmsSymbLibDto> mergeInfoList(@RequestBody @Valid final List<TbVmsSymbLibDto.TbVmsSymbLibUpdReq> listReq) {
- return this.service.mergeInfoList(listReq);
- }
- @ApiOperation(value = "VMS 심벌이미지 정보삭제-목록(TB_VMS_SYMB_LIB)", response = TbVmsSymbLibDto.class)
- @DeleteMapping(value = "", produces = {"application/json; charset=utf8"})
- public List<TbVmsSymbLibDto> deleteDataByIds(@RequestBody @Valid final List<Short> ids) {
- return this.service.deleteByIds(ids);
- }
- */
- @ApiOperation(value = "VMS 심벌이미지 사용여부 조회(TB_VMS_SYMB_LIB)", response = Integer.class)
- @GetMapping(value = "/usage/{id}", produces = {"application/json; charset=utf8"})
- public Integer findUsageCountBySymbolId(@PathVariable final Short id) {
- return this.service.findUsageCountBySymbolId(id);
- }
- @ApiOperation(value = "VMS 심벌이미지 신규 ID 조회(TB_VMS_SYMB_LIB)", response = Short.class)
- @GetMapping(value = "/new-id", produces = {"application/json; charset=utf8"})
- public Short getNewSymbolId() {
- return this.service.getNewSymbolId();
- }
- }
|