Merge pull request 'feat/infer_dev_260107' (#37) from feat/infer_dev_260107 into develop
Reviewed-on: #37
This commit was merged in pull request #37.
This commit is contained in:
@@ -216,4 +216,16 @@ public class ChngDetectMastDto {
|
|||||||
private ZonedDateTime reviewerWorkDttm;
|
private ZonedDateTime reviewerWorkDttm;
|
||||||
private ZonedDateTime labelSendDttm;
|
private ZonedDateTime labelSendDttm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class ErrorResDto {
|
||||||
|
|
||||||
|
private String timestamp;
|
||||||
|
private Integer status;
|
||||||
|
private String error;
|
||||||
|
private String path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.gukyuin.service;
|
package com.kamco.cd.kamcoback.gukyuin.service;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.kamco.cd.kamcoback.common.utils.NetUtils;
|
import com.kamco.cd.kamcoback.common.utils.NetUtils;
|
||||||
import com.kamco.cd.kamcoback.common.utils.UserUtil;
|
import com.kamco.cd.kamcoback.common.utils.UserUtil;
|
||||||
import com.kamco.cd.kamcoback.config.api.ApiLogFunction;
|
import com.kamco.cd.kamcoback.config.api.ApiLogFunction;
|
||||||
@@ -13,6 +15,7 @@ import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectContDto.ResultContDto;
|
|||||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectContDto.ResultPnuDto;
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectContDto.ResultPnuDto;
|
||||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto;
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto;
|
||||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ChnDetectMastReqDto;
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ChnDetectMastReqDto;
|
||||||
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ErrorResDto;
|
||||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.LabelSendDto;
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.LabelSendDto;
|
||||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResReturn;
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResReturn;
|
||||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResultDto;
|
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResultDto;
|
||||||
@@ -51,6 +54,7 @@ public class GukYuinApiService {
|
|||||||
|
|
||||||
private final UserUtil userUtil;
|
private final UserUtil userUtil;
|
||||||
private final AuditLogRepository auditLogRepository;
|
private final AuditLogRepository auditLogRepository;
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
@Value("${spring.profiles.active:local}")
|
@Value("${spring.profiles.active:local}")
|
||||||
private String profile;
|
private String profile;
|
||||||
@@ -80,15 +84,30 @@ public class GukYuinApiService {
|
|||||||
ChngDetectMastDto.RegistResDto.class);
|
ChngDetectMastDto.RegistResDto.class);
|
||||||
|
|
||||||
ChngDetectMastDto.RegistResDto resultBody = result.body();
|
ChngDetectMastDto.RegistResDto resultBody = result.body();
|
||||||
Boolean success = false;
|
boolean success = false;
|
||||||
if (resultBody != null) {
|
if (resultBody != null && resultBody.getSuccess() != null) {
|
||||||
ChngDetectMastDto.Basic registRes = resultBody.getResult();
|
ChngDetectMastDto.Basic registRes = resultBody.getResult();
|
||||||
|
|
||||||
|
success = resultBody.getSuccess();
|
||||||
// 추론 회차에 applyStatus, applyStatusDttm 업데이트
|
// 추론 회차에 applyStatus, applyStatusDttm 업데이트
|
||||||
gukyuinCoreService.updateGukYuinMastRegResult(registRes);
|
gukyuinCoreService.updateGukYuinMastRegResult(registRes);
|
||||||
|
|
||||||
// anal_inference 에도 국유인 반영여부, applyDttm 업데이트
|
// anal_inference 에도 국유인 반영여부, applyDttm 업데이트
|
||||||
gukyuinCoreService.updateAnalInferenceApplyDttm(registRes);
|
gukyuinCoreService.updateAnalInferenceApplyDttm(registRes);
|
||||||
success = resultBody.getSuccess();
|
} else {
|
||||||
|
String errBody = result.errBody();
|
||||||
|
ErrorResDto error = null;
|
||||||
|
try {
|
||||||
|
error = objectMapper.readValue(errBody, ErrorResDto.class);
|
||||||
|
return new ChngDetectMastDto.RegistResDto(error.getStatus(), error.getError(), null, false);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
log.error("에러 응답 파싱 실패. rawBody={}", errBody, e);
|
||||||
|
return new ChngDetectMastDto.RegistResDto(
|
||||||
|
result.statusCode(), // HTTP status
|
||||||
|
errBody, // 원문 그대로
|
||||||
|
null,
|
||||||
|
false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
@@ -98,6 +117,7 @@ public class GukYuinApiService {
|
|||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
chnDetectMastReq,
|
chnDetectMastReq,
|
||||||
success);
|
success);
|
||||||
|
|
||||||
return resultBody;
|
return resultBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,9 +418,12 @@ public class GukYuinApiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 국유인 /chn/mast/regist 전송
|
// 국유인 /chn/mast/regist 전송
|
||||||
this.regist(reqDto);
|
ChngDetectMastDto.RegistResDto result = this.regist(reqDto);
|
||||||
|
if (result.getSuccess()) {
|
||||||
return new ResponseObj(ApiResponseCode.OK, "");
|
return new ResponseObj(ApiResponseCode.OK, "연동되었습니다.");
|
||||||
|
} else {
|
||||||
|
return new ResponseObj(ApiResponseCode.INTERNAL_SERVER_ERROR, result.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday) {
|
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday) {
|
||||||
|
|||||||
@@ -34,8 +34,11 @@ public class LayerService {
|
|||||||
@Value("${layer.geoserver-url}")
|
@Value("${layer.geoserver-url}")
|
||||||
private String geoserverUrl;
|
private String geoserverUrl;
|
||||||
|
|
||||||
@Value("${layer.path}")
|
@Value("${layer.wms-path}")
|
||||||
private String geoserverPath;
|
private String wmsPath;
|
||||||
|
|
||||||
|
@Value("${layer.wmts-path}")
|
||||||
|
private String wmtsPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 지도 레이어 관리 목록
|
* 지도 레이어 관리 목록
|
||||||
@@ -184,12 +187,20 @@ public class LayerService {
|
|||||||
List<LayerMapDto> layerMapDtoList = mapLayerCoreService.findLayerMapList(type);
|
List<LayerMapDto> layerMapDtoList = mapLayerCoreService.findLayerMapList(type);
|
||||||
layerMapDtoList.forEach(
|
layerMapDtoList.forEach(
|
||||||
dto -> {
|
dto -> {
|
||||||
if (dto.getLayerType().equals("WMS") || dto.getLayerType().equals("WMTS")) {
|
if (dto.getLayerType().equals("WMS")) {
|
||||||
dto.setUrl(
|
dto.setUrl(
|
||||||
String.format(
|
String.format(
|
||||||
"%s/%s/%s",
|
"%s/%s/%s",
|
||||||
trimSlash(geoserverUrl),
|
trimSlash(geoserverUrl),
|
||||||
trimSlash(geoserverPath),
|
trimSlash(wmsPath),
|
||||||
|
dto.getLayerType().toLowerCase()));
|
||||||
|
}
|
||||||
|
else if (dto.getLayerType().equals("WMTS")) {
|
||||||
|
dto.setUrl(
|
||||||
|
String.format(
|
||||||
|
"%s/%s/%s",
|
||||||
|
trimSlash(geoserverUrl),
|
||||||
|
trimSlash(wmtsPath),
|
||||||
dto.getLayerType().toLowerCase()));
|
dto.getLayerType().toLowerCase()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
|||||||
Expressions.numberTemplate(Integer.class, "coalesce({0}, 0)", mapSheetLearnEntity.stage);
|
Expressions.numberTemplate(Integer.class, "coalesce({0}, 0)", mapSheetLearnEntity.stage);
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(stageExpr.max())
|
.select(stageExpr.max().coalesce(0))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(
|
.where(
|
||||||
mapSheetLearnEntity.compareYyyy.eq(compareYyyy),
|
mapSheetLearnEntity.compareYyyy.eq(compareYyyy),
|
||||||
|
|||||||
@@ -124,5 +124,6 @@ training-data:
|
|||||||
|
|
||||||
layer:
|
layer:
|
||||||
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
||||||
path: geoserver/cd/gwc/service
|
wms-path: geoserver/cd
|
||||||
|
wmts-path: geoserver/cd/gwc/service
|
||||||
workspace: cd
|
workspace: cd
|
||||||
|
|||||||
@@ -79,5 +79,6 @@ training-data:
|
|||||||
|
|
||||||
layer:
|
layer:
|
||||||
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
||||||
path: /geoserver/cd/gwc/service/
|
wms-path: geoserver/cd
|
||||||
|
wmts-path: geoserver/cd/gwc/service
|
||||||
workspace: cd
|
workspace: cd
|
||||||
|
|||||||
Reference in New Issue
Block a user