Blame view

src/main/java/daeucna/system/code/CodeController.java 1.4 KB
2034b5b1   함상기   Init Version 2024...
1
2
3
4
  package daeucna.system.code;

  

  import java.util.ArrayList;

  import java.util.List;

5b5ab7e5   함상기   20240409
5
  import java.util.Map;

2034b5b1   함상기   Init Version 2024...
6
7
8
9
10
11
12
  

  import org.springframework.beans.factory.annotation.Autowired;

  import org.springframework.http.ResponseEntity;

  import org.springframework.web.bind.annotation.GetMapping;

  import org.springframework.web.bind.annotation.PostMapping;

  import org.springframework.web.bind.annotation.RequestBody;

  import org.springframework.web.bind.annotation.RequestMapping;

5b5ab7e5   함상기   20240409
13
  import org.springframework.web.bind.annotation.RequestParam;

2034b5b1   함상기   Init Version 2024...
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  import org.springframework.web.bind.annotation.RestController;

  

  import daeucna.system.code.CodeDto;

  import lombok.RequiredArgsConstructor;

  

  @RestController

  @RequiredArgsConstructor

  @RequestMapping("/api/code")

  public class CodeController {

  	@Autowired

      private final CodeService codeService;

  

      @PostMapping("/cmmncode")

      public ResponseEntity<List<CodeDto>> getCmmnCode(@RequestBody CodeDto param) {

      	List<CodeDto> rtnVal = new ArrayList<CodeDto>();

      	

      	rtnVal = codeService.getCmmnCode(param);

      	

          return ResponseEntity.ok(rtnVal);

      }

  

5b5ab7e5   함상기   20240409
35
36
37
38
39
40
41
42
43
44
      @PostMapping("/saveCmmncode")

      public ResponseEntity<List<CodeDto>> saveCmmnCode(@RequestBody CodeSaveDto params) {

      	

      	List<CodeDto> rtnVal = new ArrayList<CodeDto>();

      	

      	rtnVal = codeService.saveCmmnCode(params);

      	

          return ResponseEntity.ok(rtnVal);

      }

      

2034b5b1   함상기   Init Version 2024...
45
  }