Merge pull request '영상관리 년도 수정' (#88) from feat/dev_251201 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/88
This commit is contained in:
@@ -19,7 +19,9 @@ import com.querydsl.jpa.impl.JPAQueryFactory;
|
|||||||
import jakarta.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import jakarta.persistence.PersistenceContext;
|
import jakarta.persistence.PersistenceContext;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -170,6 +172,8 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> findMapSheetMngYyyyList() {
|
public List<Integer> findMapSheetMngYyyyList() {
|
||||||
|
|
||||||
|
/*
|
||||||
List<Integer> foundContent =
|
List<Integer> foundContent =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetMngEntity.mngYyyy)
|
.select(mapSheetMngEntity.mngYyyy)
|
||||||
@@ -177,6 +181,45 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.where(mapSheetMngEntity.mngState.ne("COMPLETE"))
|
.where(mapSheetMngEntity.mngState.ne("COMPLETE"))
|
||||||
.orderBy(mapSheetMngEntity.mngYyyy.desc())
|
.orderBy(mapSheetMngEntity.mngYyyy.desc())
|
||||||
.fetch();
|
.fetch();
|
||||||
|
*/
|
||||||
|
|
||||||
|
int currentYear = LocalDate.now().getYear();
|
||||||
|
|
||||||
|
List<Integer> foundContentCurrent =
|
||||||
|
queryFactory
|
||||||
|
.select(mapSheetMngEntity.mngYyyy)
|
||||||
|
.from(mapSheetMngEntity)
|
||||||
|
.where(mapSheetMngEntity.mngYyyy.eq(currentYear))
|
||||||
|
.orderBy(mapSheetMngEntity.mngYyyy.desc())
|
||||||
|
.fetch();
|
||||||
|
|
||||||
|
List<Integer> foundContent1 =
|
||||||
|
queryFactory
|
||||||
|
.select(mapSheetMngEntity.mngYyyy)
|
||||||
|
.from(mapSheetMngEntity)
|
||||||
|
.where(
|
||||||
|
mapSheetMngEntity
|
||||||
|
.mngYyyy
|
||||||
|
.ne(currentYear)
|
||||||
|
.and(
|
||||||
|
mapSheetMngEntity
|
||||||
|
.mngState
|
||||||
|
.ne("NOTYET")
|
||||||
|
.or(mapSheetMngEntity.mngState.ne("DELETE"))))
|
||||||
|
.orderBy(mapSheetMngEntity.mngYyyy.desc())
|
||||||
|
.fetch();
|
||||||
|
|
||||||
|
// if( foundContentCurrent == null || foundContentCurrent.size() == 0)
|
||||||
|
// {
|
||||||
|
// foundContent.add(currentYear);
|
||||||
|
// }
|
||||||
|
|
||||||
|
List<Integer> foundContent = new ArrayList<>();
|
||||||
|
|
||||||
|
foundContent.add(2025);
|
||||||
|
foundContent.add(2024);
|
||||||
|
foundContent.add(2023);
|
||||||
|
foundContent.add(2022);
|
||||||
|
|
||||||
return foundContent;
|
return foundContent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user