|
@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.commons.lang.time.StopWatch;
|
|
import org.jdom2.Element;
|
|
import org.jdom2.Element;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -32,6 +33,7 @@ import java.util.Map;
|
|
@Api(tags = "01.교차로계획정보서비스")
|
|
@Api(tags = "01.교차로계획정보서비스")
|
|
public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
|
|
|
|
|
|
+ private final String serviceName = "PlanCrossRoadInfoService";
|
|
private final PlanCrossRoadInfoService service;
|
|
private final PlanCrossRoadInfoService service;
|
|
|
|
|
|
@SigOpenApiElapsed
|
|
@SigOpenApiElapsed
|
|
@@ -46,13 +48,12 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
- @ApiParam(name = "srchCTId", value = "지역코드", example = "L01")
|
|
|
|
|
|
+ @ApiParam(name = "srchCTId", value = "지역코드", example = "L02")
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
- @ApiParam(name = "srchCRNm", value = "교차로명", example = "시청입구")
|
|
|
|
|
|
+ @ApiParam(name = "srchCRNm", value = "교차로명", example = "옥골4거리")
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
HttpServletRequest req, HttpServletResponse res
|
|
HttpServletRequest req, HttpServletResponse res
|
|
) throws IOException {
|
|
) throws IOException {
|
|
- final String serviceName = "PlanCrossRoadInfoService";
|
|
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
|
|
|
|
String type_ = (type == null) ? "json" : type;
|
|
String type_ = (type == null) ? "json" : type;
|
|
@@ -64,6 +65,19 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
numOfRows_ = 100;
|
|
numOfRows_ = 100;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ServiceHistDto hist = ServiceHistDto.builder()
|
|
|
|
+ .OPENAPI_ID(1)
|
|
|
|
+ .OPEN_DATA_KEY(serviceKey)
|
|
|
|
+ .HOST_IP(remoteIP)
|
|
|
|
+ .DATA_TYPE(type)
|
|
|
|
+ .EXECUTE_TIME(0)
|
|
|
|
+ .STATUS(0)
|
|
|
|
+ .REGION_CD("".equals(srchCTId_) ? "ALL" : srchCTId_)
|
|
|
|
+ .startTime(System.currentTimeMillis())
|
|
|
|
+ .build();
|
|
|
|
+ StopWatch stopWatch = new StopWatch();
|
|
|
|
+ stopWatch.start();
|
|
|
|
+
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
log.info("getPlanCRHDInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
log.info("getPlanCRHDInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
@@ -79,6 +93,8 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCRHDInfo", remoteIP, serviceKey);
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCRHDInfo", remoteIP, serviceKey);
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
sendErrorResponse(type_, "PlanCrossRoadInfoService", headerVo, res);
|
|
sendErrorResponse(type_, "PlanCrossRoadInfoService", headerVo, res);
|
|
|
|
+ hist.setSTATUS("30".equals(headerVo.getResultCode()) ? 1 : 2);
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -144,6 +160,7 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
}
|
|
}
|
|
sendResponseJson(jsonList, res);
|
|
sendResponseJson(jsonList, res);
|
|
}
|
|
}
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
}
|
|
}
|
|
|
|
|
|
@SigOpenApiElapsed
|
|
@SigOpenApiElapsed
|
|
@@ -158,13 +175,12 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
- @ApiParam(name = "srchCTId", value = "지역코드", example = "L01")
|
|
|
|
|
|
+ @ApiParam(name = "srchCTId", value = "지역코드", example = "L02")
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
- @ApiParam(name = "srchCRNm", value = "교차로명", example = "시청입구")
|
|
|
|
|
|
+ @ApiParam(name = "srchCRNm", value = "교차로명", example = "옥골4거리")
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
HttpServletRequest req, HttpServletResponse res
|
|
HttpServletRequest req, HttpServletResponse res
|
|
) throws IOException {
|
|
) throws IOException {
|
|
- final String serviceName = "PlanCrossRoadInfoService";
|
|
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
|
|
|
|
String type_ = (type == null) ? "json" : type;
|
|
String type_ = (type == null) ? "json" : type;
|
|
@@ -176,6 +192,19 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
numOfRows_ = 100;
|
|
numOfRows_ = 100;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ServiceHistDto hist = ServiceHistDto.builder()
|
|
|
|
+ .OPENAPI_ID(2)
|
|
|
|
+ .OPEN_DATA_KEY(serviceKey)
|
|
|
|
+ .HOST_IP(remoteIP)
|
|
|
|
+ .DATA_TYPE(type)
|
|
|
|
+ .EXECUTE_TIME(0)
|
|
|
|
+ .STATUS(0)
|
|
|
|
+ .REGION_CD("".equals(srchCTId_) ? "ALL" : srchCTId_)
|
|
|
|
+ .startTime(System.currentTimeMillis())
|
|
|
|
+ .build();
|
|
|
|
+ StopWatch stopWatch = new StopWatch();
|
|
|
|
+ stopWatch.start();
|
|
|
|
+
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
log.info("getPlanCRWDInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
log.info("getPlanCRWDInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
@@ -191,6 +220,8 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCRWDInfo", remoteIP, serviceKey);
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCRWDInfo", remoteIP, serviceKey);
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
sendErrorResponse(type_, "PlanCrossRoadInfoService", headerVo, res);
|
|
sendErrorResponse(type_, "PlanCrossRoadInfoService", headerVo, res);
|
|
|
|
+ hist.setSTATUS("30".equals(headerVo.getResultCode()) ? 1 : 2);
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -248,6 +279,7 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
}
|
|
}
|
|
sendResponseJson(jsonList, res);
|
|
sendResponseJson(jsonList, res);
|
|
}
|
|
}
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
}
|
|
}
|
|
|
|
|
|
@SigOpenApiElapsed
|
|
@SigOpenApiElapsed
|
|
@@ -262,13 +294,12 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
- @ApiParam(name = "srchCTId", value = "지역코드", example = "L01")
|
|
|
|
|
|
+ @ApiParam(name = "srchCTId", value = "지역코드", example = "L02")
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
- @ApiParam(name = "srchCRNm", value = "교차로명", example = "시청입구")
|
|
|
|
|
|
+ @ApiParam(name = "srchCRNm", value = "교차로명", example = "옥골4거리")
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
HttpServletRequest req, HttpServletResponse res
|
|
HttpServletRequest req, HttpServletResponse res
|
|
) throws IOException {
|
|
) throws IOException {
|
|
- final String serviceName = "PlanCrossRoadInfoService";
|
|
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
|
|
|
|
String type_ = (type == null) ? "json" : type;
|
|
String type_ = (type == null) ? "json" : type;
|
|
@@ -280,6 +311,19 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
numOfRows_ = 100;
|
|
numOfRows_ = 100;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ServiceHistDto hist = ServiceHistDto.builder()
|
|
|
|
+ .OPENAPI_ID(3)
|
|
|
|
+ .OPEN_DATA_KEY(serviceKey)
|
|
|
|
+ .HOST_IP(remoteIP)
|
|
|
|
+ .DATA_TYPE(type)
|
|
|
|
+ .EXECUTE_TIME(0)
|
|
|
|
+ .STATUS(0)
|
|
|
|
+ .REGION_CD("".equals(srchCTId_) ? "ALL" : srchCTId_)
|
|
|
|
+ .startTime(System.currentTimeMillis())
|
|
|
|
+ .build();
|
|
|
|
+ StopWatch stopWatch = new StopWatch();
|
|
|
|
+ stopWatch.start();
|
|
|
|
+
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
log.info("getPlanCRRSInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
log.info("getPlanCRRSInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
@@ -295,6 +339,8 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCRRSInfo", remoteIP, serviceKey);
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCRRSInfo", remoteIP, serviceKey);
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
sendErrorResponse(type_, "PlanCrossRoadInfoService", headerVo, res);
|
|
sendErrorResponse(type_, "PlanCrossRoadInfoService", headerVo, res);
|
|
|
|
+ hist.setSTATUS("30".equals(headerVo.getResultCode()) ? 1 : 2);
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -379,6 +425,7 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
}
|
|
}
|
|
sendResponseJson(jsonList, res);
|
|
sendResponseJson(jsonList, res);
|
|
}
|
|
}
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
}
|
|
}
|
|
|
|
|
|
@SigOpenApiElapsed
|
|
@SigOpenApiElapsed
|
|
@@ -393,13 +440,12 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@RequestParam(name="numOfRows", required = false) @Nullable Integer numOfRows,
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@ApiParam(name = "pageNo", value = "페이지 번호", example = "1")
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
@RequestParam(name="pageNo", required = false) @Nullable Integer pageNo,
|
|
- @ApiParam(name = "srchCTId", value = "지역코드", example = "L01")
|
|
|
|
|
|
+ @ApiParam(name = "srchCTId", value = "지역코드", example = "L02")
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
@RequestParam(name="srchCTId", required = false) @Nullable String srchCTId,
|
|
- @ApiParam(name = "srchCRNm", value = "교차로명", example = "시청입구")
|
|
|
|
|
|
+ @ApiParam(name = "srchCRNm", value = "교차로명", example = "옥골4거리")
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
@RequestParam(name="srchCRNm", required = false) @Nullable String srchCRNm,
|
|
HttpServletRequest req, HttpServletResponse res
|
|
HttpServletRequest req, HttpServletResponse res
|
|
) throws IOException {
|
|
) throws IOException {
|
|
- final String serviceName = "PlanCrossRoadInfoService";
|
|
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
final String remoteIP = ApiUtils.getRemoteIP(req);
|
|
|
|
|
|
String type_ = (type == null) ? "json" : type;
|
|
String type_ = (type == null) ? "json" : type;
|
|
@@ -411,6 +457,19 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
numOfRows_ = 100;
|
|
numOfRows_ = 100;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ServiceHistDto hist = ServiceHistDto.builder()
|
|
|
|
+ .OPENAPI_ID(4)
|
|
|
|
+ .OPEN_DATA_KEY(serviceKey)
|
|
|
|
+ .HOST_IP(remoteIP)
|
|
|
|
+ .DATA_TYPE(type)
|
|
|
|
+ .EXECUTE_TIME(0)
|
|
|
|
+ .STATUS(0)
|
|
|
|
+ .REGION_CD("".equals(srchCTId_) ? "ALL" : srchCTId_)
|
|
|
|
+ .startTime(System.currentTimeMillis())
|
|
|
|
+ .build();
|
|
|
|
+ StopWatch stopWatch = new StopWatch();
|
|
|
|
+ stopWatch.start();
|
|
|
|
+
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
Integer [] calcPageReturn = this.service.calcPageStartEndNo(pageNo_, numOfRows_);
|
|
log.info("getPlanCROPInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
log.info("getPlanCROPInfo: type_:{}, numOfRows_:{}, pageNo_:{}, srchCTId_:{}, srchCRNm_:{}, startRow:{}, endRow:{}",
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
type_, numOfRows_, pageNo_, srchCTId_, srchCRNm_, calcPageReturn[0], calcPageReturn[1]);
|
|
@@ -426,6 +485,8 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCROPInfo", remoteIP, serviceKey);
|
|
SigOpenApiHeaderDto headerVo = this.service.checkServiceKey("/PlanCrossRoadInfoService/getPlanCROPInfo", remoteIP, serviceKey);
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
if (!"0".equalsIgnoreCase(headerVo.getResultCode())) {
|
|
sendErrorResponse(type_, serviceName, headerVo, res);
|
|
sendErrorResponse(type_, serviceName, headerVo, res);
|
|
|
|
+ hist.setSTATUS("30".equals(headerVo.getResultCode()) ? 1 : 2);
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -558,6 +619,7 @@ public class PlanCrossRoadInfoController extends SigOpenApiCommonController {
|
|
}
|
|
}
|
|
sendResponseJson(jsonList, res);
|
|
sendResponseJson(jsonList, res);
|
|
}
|
|
}
|
|
|
|
+ this.service.saveServiceHistory(hist);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|