spotless 적용

This commit is contained in:
2026-01-19 16:26:45 +09:00
parent 0ad1929364
commit 9a080deb31
5 changed files with 85 additions and 91 deletions

View File

@@ -34,8 +34,7 @@ public class ApiResponseAdvice implements ResponseBodyAdvice<Object> {
private final AuditLogRepository auditLogRepository;
private final MenuService menuService;
@Autowired
private ObjectMapper objectMapper;
@Autowired private ObjectMapper objectMapper;
public ApiResponseAdvice(AuditLogRepository auditLogRepository, MenuService menuService) {
this.auditLogRepository = auditLogRepository;

View File

@@ -56,14 +56,11 @@ public class MapSheetMngFileJobCoreService {
return mapSheetMngFileJobRepository.findByMngYyyyTargetMapSheetNotYetCount(mngYyyy);
}
public void mngDataState(int mngYyyy, String mngState)
{
public void mngDataState(int mngYyyy, String mngState) {
mapSheetMngFileJobRepository.mngDataState(mngYyyy, mngState);
}
public Integer findNotYetMapSheetMng()
{
public Integer findNotYetMapSheetMng() {
return mapSheetMngFileJobRepository.findNotYetMapSheetMng();
}
}

View File

@@ -40,7 +40,10 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
queryFactory
.select(mapSheetMngEntity.mngYyyy)
.from(mapSheetMngEntity)
.where(mapSheetMngEntity.mngState.eq("NOTYET")
.where(
mapSheetMngEntity
.mngState
.eq("NOTYET")
.or(mapSheetMngEntity.mngState.eq("PROCESSING")))
.limit(1)
.fetchOne();
@@ -126,7 +129,10 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
queryFactory
.select(mapSheetMngHstEntity.mngYyyy.count())
.from(mapSheetMngHstEntity)
.where(mapSheetMngHstEntity.mngYyyy.eq(mngYyyy)
.where(
mapSheetMngHstEntity
.mngYyyy
.eq(mngYyyy)
.and(mapSheetMngHstEntity.syncState.eq("NOTYET")))
.fetchOne();

View File

@@ -24,20 +24,24 @@ public class MapSheetMngFileJobController {
Integer mng = 0;
// isFileSyncSchedulerEnabled = false;
if(mapSheetMngFileJobService.checkMngFileSync() != null)
{
if (mapSheetMngFileJobService.checkMngFileSync() != null) {
mng = mapSheetMngFileJobService.checkMngFileSync();
this.isFileSyncSchedulerEnabled = true;
System.out.println("MngFileSyncJob ON --> mngYyyy : "+ mng + ", currentTime : " + System.currentTimeMillis());
}
else{
System.out.println(
"MngFileSyncJob ON --> mngYyyy : "
+ mng
+ ", currentTime : "
+ System.currentTimeMillis());
} else {
this.isFileSyncSchedulerEnabled = false;
System.out.println("MngFileSyncJob OFF --> mngYyyy : "+ mng + ", currentTime : " + System.currentTimeMillis());
System.out.println(
"MngFileSyncJob OFF --> mngYyyy : "
+ mng
+ ", currentTime : "
+ System.currentTimeMillis());
}
}
@Scheduled(fixedDelay = 1000 * 5)
public void mngFileSyncJob00() {
if (!isSchedulerEnabled || !isFileSyncSchedulerEnabled) return;
@@ -54,7 +58,6 @@ public class MapSheetMngFileJobController {
mapSheetMngFileJobService.checkMapSheetFileProcess(1, mngSyncPageSize);
}
@Scheduled(fixedDelay = 1000 * 5)
public void mngFileSyncJob02() {
if (!isSchedulerEnabled || !isFileSyncSchedulerEnabled) return;
@@ -119,8 +122,6 @@ public class MapSheetMngFileJobController {
mapSheetMngFileJobService.checkMapSheetFileProcess(9, mngSyncPageSize);
}
// 3. 외부에서 플래그를 변경할 수 있는 Setter 메서드
public void setSchedulerEnabled(boolean enabled) {
this.isSchedulerEnabled = enabled;

View File

@@ -45,9 +45,7 @@ public class MapSheetMngFileJobService {
@Value("${file.sync-file-extention}")
private String syncFileExtention;
public Integer checkMngFileSync()
{
public Integer checkMngFileSync() {
return mapSheetMngFileJobCoreService.findNotYetMapSheetMng();
}
@@ -178,11 +176,9 @@ public class MapSheetMngFileJobService {
if (syncState.isEmpty()) syncState = "DONE";
item.setSyncState(syncState);
mngHstDataSyncStateUpdate(item);
}
Long notyetCnt = this.mngDataStateDoneUpdate(mngYyyy);
}
public int checkIsNoFile(List<FileDto.Basic> basicList) {
@@ -196,15 +192,11 @@ public class MapSheetMngFileJobService {
public Long mngDataStateDoneUpdate(int mngYyyy) {
Long notyetCnt = 0L;
if( mngYyyy > 0 )
{
if (mngYyyy > 0) {
notyetCnt = findByMngYyyyTargetMapSheetNotYetCount(mngYyyy);
if( notyetCnt == 0 )
{
if (notyetCnt == 0) {
mapSheetMngFileJobCoreService.mngDataState(mngYyyy, "DONE");
}
else
{
} else {
mapSheetMngFileJobCoreService.mngDataState(mngYyyy, "PROCESSING");
}
}
@@ -216,7 +208,6 @@ public class MapSheetMngFileJobService {
return mapSheetMngFileJobCoreService.findTargetMapSheetFileList(targetNum, pageSize);
}
public Long findByMngYyyyTargetMapSheetNotYetCount(int mngYyyy) {
return mapSheetMngFileJobCoreService.findByMngYyyyTargetMapSheetNotYetCount(mngYyyy);
}