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