Merge pull request '집계 테이블 수정' (#24) from feat/demo-20251205 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/24
This commit is contained in:
@@ -8,7 +8,6 @@ import jakarta.persistence.Id;
|
|||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -111,14 +110,14 @@ public class MapSheetAnalDataEntity {
|
|||||||
private String downState;
|
private String downState;
|
||||||
|
|
||||||
@Column(name = "down_state_dttm")
|
@Column(name = "down_state_dttm")
|
||||||
private OffsetDateTime downStateDttm;
|
private ZonedDateTime downStateDttm;
|
||||||
|
|
||||||
@Size(max = 20)
|
@Size(max = 20)
|
||||||
@Column(name = "fit_state", length = 20)
|
@Column(name = "fit_state", length = 20)
|
||||||
private String fitState;
|
private String fitState;
|
||||||
|
|
||||||
@Column(name = "fit_state_dttm")
|
@Column(name = "fit_state_dttm")
|
||||||
private OffsetDateTime fitStateDttm;
|
private ZonedDateTime fitStateDttm;
|
||||||
|
|
||||||
@Column(name = "labeler_uid")
|
@Column(name = "labeler_uid")
|
||||||
private Long labelerUid;
|
private Long labelerUid;
|
||||||
@@ -129,7 +128,7 @@ public class MapSheetAnalDataEntity {
|
|||||||
private String labelState;
|
private String labelState;
|
||||||
|
|
||||||
@Column(name = "label_state_dttm")
|
@Column(name = "label_state_dttm")
|
||||||
private OffsetDateTime labelStateDttm;
|
private ZonedDateTime labelStateDttm;
|
||||||
|
|
||||||
@Column(name = "tester_uid")
|
@Column(name = "tester_uid")
|
||||||
private Long testerUid;
|
private Long testerUid;
|
||||||
@@ -139,7 +138,7 @@ public class MapSheetAnalDataEntity {
|
|||||||
private String testState;
|
private String testState;
|
||||||
|
|
||||||
@Column(name = "test_state_dttm")
|
@Column(name = "test_state_dttm")
|
||||||
private OffsetDateTime testStateDttm;
|
private ZonedDateTime testStateDttm;
|
||||||
|
|
||||||
@Column(name = "fit_state_cmmnt", length = Integer.MAX_VALUE)
|
@Column(name = "fit_state_cmmnt", length = Integer.MAX_VALUE)
|
||||||
private String fitStateCmmnt;
|
private String fitStateCmmnt;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import jakarta.persistence.Id;
|
|||||||
import jakarta.persistence.SequenceGenerator;
|
import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
@@ -69,14 +69,14 @@ public class MapSheetAnalDataGeomEntity {
|
|||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "created_dttm")
|
@Column(name = "created_dttm")
|
||||||
private OffsetDateTime createdDttm;
|
private ZonedDateTime createdDttm;
|
||||||
|
|
||||||
@Column(name = "created_uid")
|
@Column(name = "created_uid")
|
||||||
private Long createdUid;
|
private Long createdUid;
|
||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "updated_dttm")
|
@Column(name = "updated_dttm")
|
||||||
private OffsetDateTime updatedDttm;
|
private ZonedDateTime updatedDttm;
|
||||||
|
|
||||||
@Column(name = "updated_uid")
|
@Column(name = "updated_uid")
|
||||||
private Long updatedUid;
|
private Long updatedUid;
|
||||||
@@ -96,7 +96,7 @@ public class MapSheetAnalDataGeomEntity {
|
|||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "fit_state_dttm")
|
@Column(name = "fit_state_dttm")
|
||||||
private OffsetDateTime fitStateDttm;
|
private ZonedDateTime fitStateDttm;
|
||||||
|
|
||||||
@Column(name = "labeler_uid")
|
@Column(name = "labeler_uid")
|
||||||
private Long labelerUid;
|
private Long labelerUid;
|
||||||
@@ -108,7 +108,7 @@ public class MapSheetAnalDataGeomEntity {
|
|||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "label_state_dttm")
|
@Column(name = "label_state_dttm")
|
||||||
private OffsetDateTime labelStateDttm;
|
private ZonedDateTime labelStateDttm;
|
||||||
|
|
||||||
@Column(name = "tester_uid")
|
@Column(name = "tester_uid")
|
||||||
private Long testerUid;
|
private Long testerUid;
|
||||||
@@ -120,7 +120,7 @@ public class MapSheetAnalDataGeomEntity {
|
|||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "test_state_dttm")
|
@Column(name = "test_state_dttm")
|
||||||
private OffsetDateTime testStateDttm;
|
private ZonedDateTime testStateDttm;
|
||||||
|
|
||||||
@Column(name = "fit_state_cmmnt", length = Integer.MAX_VALUE)
|
@Column(name = "fit_state_cmmnt", length = Integer.MAX_VALUE)
|
||||||
private String fitStateCmmnt;
|
private String fitStateCmmnt;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import jakarta.persistence.EmbeddedId;
|
|||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
@@ -26,14 +26,14 @@ public class MapSheetAnalSttcEntity {
|
|||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "created_dttm")
|
@Column(name = "created_dttm")
|
||||||
private OffsetDateTime createdDttm;
|
private ZonedDateTime createdDttm;
|
||||||
|
|
||||||
@Column(name = "created_uid")
|
@Column(name = "created_uid")
|
||||||
private Long createdUid;
|
private Long createdUid;
|
||||||
|
|
||||||
@ColumnDefault("now()")
|
@ColumnDefault("now()")
|
||||||
@Column(name = "updated_dttm")
|
@Column(name = "updated_dttm")
|
||||||
private OffsetDateTime updatedDttm;
|
private ZonedDateTime updatedDttm;
|
||||||
|
|
||||||
@Column(name = "updated_uid")
|
@Column(name = "updated_uid")
|
||||||
private Long updatedUid;
|
private Long updatedUid;
|
||||||
|
|||||||
@@ -51,18 +51,18 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
ChangeDetectionDto.CountDto.class,
|
ChangeDetectionDto.CountDto.class,
|
||||||
mapSheetAnalSttcEntity.classAfterCd.as("classCd"),
|
mapSheetAnalSttcEntity.id.classAfterCd.as("classCd"),
|
||||||
mapSheetAnalSttcEntity.classAfterCd.as("classNm"), // 앞단 CoreService 에서 한글명으로 변환
|
mapSheetAnalSttcEntity.id.classAfterCd.as("classNm"), // 앞단 CoreService 에서 한글명으로 변환
|
||||||
mapSheetAnalSttcEntity.classAfterCnt.sum()))
|
mapSheetAnalSttcEntity.classAfterCnt.sum()))
|
||||||
.from(mapSheetAnalEntity)
|
.from(mapSheetAnalEntity)
|
||||||
.innerJoin(mapSheetAnalDataEntity)
|
.innerJoin(mapSheetAnalDataEntity)
|
||||||
.on(mapSheetAnalDataEntity.analUid.eq(mapSheetAnalEntity.id))
|
.on(mapSheetAnalDataEntity.analUid.eq(mapSheetAnalEntity.id))
|
||||||
.innerJoin(mapSheetAnalSttcEntity)
|
.innerJoin(mapSheetAnalSttcEntity)
|
||||||
.on(mapSheetAnalSttcEntity.dataUid.eq(mapSheetAnalDataEntity.id))
|
.on(mapSheetAnalSttcEntity.id.dataUid.eq(mapSheetAnalDataEntity.id))
|
||||||
.where(
|
.where(
|
||||||
mapSheetAnalEntity.id.eq(id),
|
mapSheetAnalEntity.id.eq(id),
|
||||||
mapSheetAnalSttcEntity.id.mapSheetNum.eq(Long.valueOf(mapSheetNum)))
|
mapSheetAnalSttcEntity.id.mapSheetNum.eq(Long.valueOf(mapSheetNum)))
|
||||||
.groupBy(mapSheetAnalSttcEntity.classAfterCd)
|
.groupBy(mapSheetAnalSttcEntity.id.classAfterCd)
|
||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user