spotless 적용
This commit is contained in:
@@ -54,9 +54,7 @@ public class GukYuinApiLabelJobService {
|
|||||||
return "local".equalsIgnoreCase(profile);
|
return "local".equalsIgnoreCase(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 어제 라벨링 검수 완료된 것 -> 국유인에 전송 */
|
||||||
* 어제 라벨링 검수 완료된 것 -> 국유인에 전송
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0 0 1 * * *")
|
@Scheduled(cron = "0 0 1 * * *")
|
||||||
public void findLabelingCompleteSend() {
|
public void findLabelingCompleteSend() {
|
||||||
if (isLocalProfile()) {
|
if (isLocalProfile()) {
|
||||||
@@ -72,22 +70,22 @@ public class GukYuinApiLabelJobService {
|
|||||||
String url = gukyuinCdiUrl + "/rlb/objt/" + gto.getResultUid() + "/lbl/" + "Y";
|
String url = gukyuinCdiUrl + "/rlb/objt/" + gto.getResultUid() + "/lbl/" + "Y";
|
||||||
|
|
||||||
ExternalCallResult<ResultPnuDto> result =
|
ExternalCallResult<ResultPnuDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.POST,
|
HttpMethod.POST,
|
||||||
null,
|
null,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectContDto.ResultPnuDto.class);
|
ChngDetectContDto.ResultPnuDto.class);
|
||||||
|
|
||||||
ChngDetectContDto.ResultPnuDto dto = result.body();
|
ChngDetectContDto.ResultPnuDto dto = result.body();
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.MODIFIED.getId(),
|
EventType.MODIFIED.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
|
|
||||||
// inference_geom 에 label_send_dttm 업데이트 하기
|
// inference_geom 에 label_send_dttm 업데이트 하기
|
||||||
gukYuinLabelJobCoreService.updateAnalDataInferenceGeomSendDttm(gto.getGeoUid());
|
gukYuinLabelJobCoreService.updateAnalDataInferenceGeomSendDttm(gto.getGeoUid());
|
||||||
@@ -96,25 +94,25 @@ public class GukYuinApiLabelJobService {
|
|||||||
|
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
|
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
|
||||||
public void insertGukyuinAuditLog(
|
public void insertGukyuinAuditLog(
|
||||||
String actionType,
|
String actionType,
|
||||||
String myIp,
|
String myIp,
|
||||||
Long userUid,
|
Long userUid,
|
||||||
String requestUri,
|
String requestUri,
|
||||||
Object requestBody,
|
Object requestBody,
|
||||||
boolean successFail) {
|
boolean successFail) {
|
||||||
try {
|
try {
|
||||||
AuditLogEntity log =
|
AuditLogEntity log =
|
||||||
new AuditLogEntity(
|
new AuditLogEntity(
|
||||||
userUid,
|
userUid,
|
||||||
EventType.fromName(actionType),
|
EventType.fromName(actionType),
|
||||||
successFail ? EventStatus.SUCCESS : EventStatus.FAILED,
|
successFail ? EventStatus.SUCCESS : EventStatus.FAILED,
|
||||||
"GUKYUIN", // 메뉴도 국유인으로 하나 따기
|
"GUKYUIN", // 메뉴도 국유인으로 하나 따기
|
||||||
myIp,
|
myIp,
|
||||||
requestUri,
|
requestUri,
|
||||||
requestBody == null ? null : ApiLogFunction.cutRequestBody(requestBody.toString()),
|
requestBody == null ? null : ApiLogFunction.cutRequestBody(requestBody.toString()),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null);
|
null);
|
||||||
auditLogRepository.save(log);
|
auditLogRepository.save(log);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -56,9 +56,7 @@ public class GukYuinApiStbltJobService {
|
|||||||
return "local".equalsIgnoreCase(profile);
|
return "local".equalsIgnoreCase(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출 */
|
||||||
* 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0 0/10 * * * *")
|
@Scheduled(cron = "0 0/10 * * * *")
|
||||||
public void findGukYuinMastCompleteYn() {
|
public void findGukYuinMastCompleteYn() {
|
||||||
if (isLocalProfile()) {
|
if (isLocalProfile()) {
|
||||||
@@ -66,8 +64,8 @@ public class GukYuinApiStbltJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<LearnKeyDto> list =
|
List<LearnKeyDto> list =
|
||||||
gukYuinStbltJobCoreService.findGukyuinApplyStatusUidList(
|
gukYuinStbltJobCoreService.findGukyuinApplyStatusUidList(
|
||||||
List.of(GukYuinStatus.IN_PROGRESS.getId()));
|
List.of(GukYuinStatus.IN_PROGRESS.getId()));
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -77,20 +75,20 @@ public class GukYuinApiStbltJobService {
|
|||||||
String url = gukyuinCdiUrl + "/chn/mast/list/" + dto.getChnDtctMstId();
|
String url = gukyuinCdiUrl + "/chn/mast/list/" + dto.getChnDtctMstId();
|
||||||
|
|
||||||
ExternalCallResult<ResultDto> response =
|
ExternalCallResult<ResultDto> response =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
null,
|
null,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectMastDto.ResultDto.class);
|
ChngDetectMastDto.ResultDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.DETAIL.getId(),
|
EventType.DETAIL.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
response.body().getSuccess());
|
response.body().getSuccess());
|
||||||
|
|
||||||
ResultDto result = response.body();
|
ResultDto result = response.body();
|
||||||
|
|
||||||
@@ -102,10 +100,10 @@ public class GukYuinApiStbltJobService {
|
|||||||
ChngDetectMastDto.Basic basic = result.getResult().get(0);
|
ChngDetectMastDto.Basic basic = result.getResult().get(0);
|
||||||
|
|
||||||
Integer progress =
|
Integer progress =
|
||||||
basic.getExcnPgrt() == null ? null : Integer.parseInt(basic.getExcnPgrt().trim());
|
basic.getExcnPgrt() == null ? null : Integer.parseInt(basic.getExcnPgrt().trim());
|
||||||
if (progress != null && progress == 100) {
|
if (progress != null && progress == 100) {
|
||||||
gukYuinStbltJobCoreService.updateGukYuinApplyStateComplete(
|
gukYuinStbltJobCoreService.updateGukYuinApplyStateComplete(
|
||||||
dto.getId(), GukYuinStatus.GUK_COMPLETED);
|
dto.getId(), GukYuinStatus.GUK_COMPLETED);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
|
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
|
||||||
@@ -115,25 +113,25 @@ public class GukYuinApiStbltJobService {
|
|||||||
|
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
|
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
|
||||||
public void insertGukyuinAuditLog(
|
public void insertGukyuinAuditLog(
|
||||||
String actionType,
|
String actionType,
|
||||||
String myIp,
|
String myIp,
|
||||||
Long userUid,
|
Long userUid,
|
||||||
String requestUri,
|
String requestUri,
|
||||||
Object requestBody,
|
Object requestBody,
|
||||||
boolean successFail) {
|
boolean successFail) {
|
||||||
try {
|
try {
|
||||||
AuditLogEntity log =
|
AuditLogEntity log =
|
||||||
new AuditLogEntity(
|
new AuditLogEntity(
|
||||||
userUid,
|
userUid,
|
||||||
EventType.fromName(actionType),
|
EventType.fromName(actionType),
|
||||||
successFail ? EventStatus.SUCCESS : EventStatus.FAILED,
|
successFail ? EventStatus.SUCCESS : EventStatus.FAILED,
|
||||||
"GUKYUIN", // 메뉴도 국유인으로 하나 따기
|
"GUKYUIN", // 메뉴도 국유인으로 하나 따기
|
||||||
myIp,
|
myIp,
|
||||||
requestUri,
|
requestUri,
|
||||||
requestBody == null ? null : ApiLogFunction.cutRequestBody(requestBody.toString()),
|
requestBody == null ? null : ApiLogFunction.cutRequestBody(requestBody.toString()),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null);
|
null);
|
||||||
auditLogRepository.save(log);
|
auditLogRepository.save(log);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user