|
@@ -14,6 +14,7 @@ import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -37,7 +38,7 @@ public class TbAtrdController {
|
|
|
return new ResponseEntity<>(result, HttpStatus.OK);
|
|
return new ResponseEntity<>(result, HttpStatus.OK);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value = "서비스링크개별조회(TB_ATRD)", response = AtrdDto.AtrdInfo.class)
|
|
|
|
|
|
|
+ @ApiOperation(value = "개별조회(TB_ATRD)", response = AtrdDto.AtrdInfo.class)
|
|
|
@GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
@GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<AtrdDto.AtrdInfo> findById(@PathVariable final String id) {
|
|
public ResponseEntity<AtrdDto.AtrdInfo> findById(@PathVariable final String id) {
|
|
|
Atrd obj = this.service.findById(id);
|
|
Atrd obj = this.service.findById(id);
|
|
@@ -58,9 +59,9 @@ public class TbAtrdController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation(value = "간선도로구간개별구성정보조회(TB_ATRD_ROAD_RLTN)", response = RoadIfscRltnDto.RoadIfscRltnUpdateReq.class)
|
|
@ApiOperation(value = "간선도로구간개별구성정보조회(TB_ATRD_ROAD_RLTN)", response = RoadIfscRltnDto.RoadIfscRltnUpdateReq.class)
|
|
|
- @GetMapping(value = "/atrd-rltn/{id}", produces = {"application/json; charset=utf8"})
|
|
|
|
|
|
|
+ @GetMapping(value = "/road-rltn/{id}", produces = {"application/json; charset=utf8"})
|
|
|
public ResponseEntity<List<AtrdRoadRltnDto.AtrdRoadRltnInfo>> findLinkRltnById(@PathVariable final String id) {
|
|
public ResponseEntity<List<AtrdRoadRltnDto.AtrdRoadRltnInfo>> findLinkRltnById(@PathVariable final String id) {
|
|
|
- List<AtrdRoadRltn> objs = this.service.findLinkRltnById(id);
|
|
|
|
|
|
|
+ List<AtrdRoadRltn> objs = this.service.findRltnById(id);
|
|
|
if (objs != null) {
|
|
if (objs != null) {
|
|
|
List<AtrdRoadRltnDto.AtrdRoadRltnInfo> result = new ArrayList<>();
|
|
List<AtrdRoadRltnDto.AtrdRoadRltnInfo> result = new ArrayList<>();
|
|
|
for (AtrdRoadRltn obj : objs) {
|
|
for (AtrdRoadRltn obj : objs) {
|
|
@@ -71,16 +72,31 @@ public class TbAtrdController {
|
|
|
return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
|
|
return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 간선도로정보 + 도로구성정보
|
|
|
@ApiOperation(value = "간선도로구간개별구성정보변경/생성(TB_ATRD_ROAD_RLTN)", response = AtrdDto.AtrdInfo.class)
|
|
@ApiOperation(value = "간선도로구간개별구성정보변경/생성(TB_ATRD_ROAD_RLTN)", response = AtrdDto.AtrdInfo.class)
|
|
|
- @PutMapping(value = "/atrd-rltn/{id}", produces = {"application/json; charset=utf8"})
|
|
|
|
|
- public ResponseEntity<List<AtrdRoadRltnDto.AtrdRoadRltnUpdateReq>> updateNameById(
|
|
|
|
|
|
|
+ @PostMapping(value = "/road-rltn/{id}", produces = {"application/json; charset=utf8"})
|
|
|
|
|
+ public ResponseEntity<List<AtrdRoadRltnDto.AtrdRoadRltnUpdateReq>> updateRltn(
|
|
|
@PathVariable final String id,
|
|
@PathVariable final String id,
|
|
|
@RequestBody final List<AtrdRoadRltnDto.AtrdRoadRltnUpdateReq> req) {
|
|
@RequestBody final List<AtrdRoadRltnDto.AtrdRoadRltnUpdateReq> req) {
|
|
|
- List<AtrdRoadRltnDto.AtrdRoadRltnUpdateReq> obj = this.service.updateLinkRltn(id, req);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ List<AtrdRoadRltnDto.AtrdRoadRltnUpdateReq> obj = this.service.updateRltn(id, req);
|
|
|
if (obj != null) {
|
|
if (obj != null) {
|
|
|
return new ResponseEntity<>(obj, HttpStatus.OK);
|
|
return new ResponseEntity<>(obj, HttpStatus.OK);
|
|
|
}
|
|
}
|
|
|
return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
|
|
return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 간선도로정보 생성-업데이트
|
|
|
|
|
+ @ApiOperation(value = "간선도로정보변경/생성(TB_ATRD)", response = AtrdDto.AtrdInfo.class)
|
|
|
|
|
+ @PostMapping(value = "", produces = {"application/json; charset=utf8"})
|
|
|
|
|
+ public ResponseEntity<AtrdDto.AtrdInfo> mergeInfo(@RequestBody @Valid final AtrdDto.AtrdUpdateReq req) {
|
|
|
|
|
+
|
|
|
|
|
+ log.error("{}", req);
|
|
|
|
|
+ Atrd obj = this.service.mergeInfo(req);
|
|
|
|
|
+ if (obj != null) {
|
|
|
|
|
+ return new ResponseEntity<>(new AtrdDto.AtrdInfo(obj), HttpStatus.OK);
|
|
|
|
|
+ }
|
|
|
|
|
+ return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|