추론관리 > 분석결과 템플릿 추가
추론관리 Entity 추가
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package com.kamco.cd.kamcoback.inference;
|
package com.kamco.cd.kamcoback.inference;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -10,4 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
public class InferenceResultApiController {
|
public class InferenceResultApiController {
|
||||||
|
|
||||||
|
private final InferenceResultService inferenceResultService;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.kamco.cd.kamcoback.inference.service;
|
package com.kamco.cd.kamcoback.inference.service;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.postgres.core.InferenceResultCoreService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -9,4 +10,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public class InferenceResultService {
|
public class InferenceResultService {
|
||||||
|
|
||||||
|
private final InferenceResultCoreService inferenceResultCoreService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.core;
|
package com.kamco.cd.kamcoback.postgres.core;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.common.service.BaseCoreService;
|
||||||
|
import com.kamco.cd.kamcoback.postgres.repository.Inference.InferenceResultRepository;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -9,4 +15,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public class InferenceResultCoreService {
|
public class InferenceResultCoreService {
|
||||||
|
|
||||||
|
private final InferenceResultRepository inferenceResultRepository;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ import org.hibernate.type.SqlTypes;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "tb_map_sheet_learn_data")
|
@Table(name = "tb_map_sheet_anal_data")
|
||||||
public class MapSheetLearnDataEntity {
|
public class MapSheetAnalDataEntity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_map_sheet_learn_data_id_gen")
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_map_sheet_anal_data_id_gen")
|
||||||
@SequenceGenerator(name = "tb_map_sheet_learn_data_id_gen", sequenceName = "tb_map_sheet_learn_data_data_uid", allocationSize = 1)
|
@SequenceGenerator(name = "tb_map_sheet_anal_data_id_gen", sequenceName = "tb_map_sheet_learn_data_data_uid", allocationSize = 1)
|
||||||
@Column(name = "data_uid", nullable = false)
|
@Column(name = "data_uid", nullable = false)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -66,8 +66,8 @@ public class MapSheetLearnDataEntity {
|
|||||||
@Column(name = "compare_yyyy")
|
@Column(name = "compare_yyyy")
|
||||||
private Integer compareYyyy;
|
private Integer compareYyyy;
|
||||||
|
|
||||||
@Column(name = "data_yyyy")
|
@Column(name = "target_yyyy")
|
||||||
private Integer dataYyyy;
|
private Integer targetYyyy;
|
||||||
|
|
||||||
@Column(name = "data_json")
|
@Column(name = "data_json")
|
||||||
@JdbcTypeCode(SqlTypes.JSON)
|
@JdbcTypeCode(SqlTypes.JSON)
|
||||||
@@ -81,14 +81,6 @@ public class MapSheetLearnDataEntity {
|
|||||||
@Column(name = "data_state_dttm")
|
@Column(name = "data_state_dttm")
|
||||||
private Instant dataStateDttm;
|
private Instant dataStateDttm;
|
||||||
|
|
||||||
@Size(max = 255)
|
|
||||||
@Column(name = "data_title")
|
|
||||||
private String dataTitle;
|
|
||||||
|
|
||||||
@Size(max = 255)
|
|
||||||
@Column(name = "anal_map_sheet")
|
|
||||||
private String analMapSheet;
|
|
||||||
|
|
||||||
@Column(name = "anal_strt_dttm")
|
@Column(name = "anal_strt_dttm")
|
||||||
private Instant analStrtDttm;
|
private Instant analStrtDttm;
|
||||||
|
|
||||||
@@ -98,15 +90,14 @@ public class MapSheetLearnDataEntity {
|
|||||||
@Column(name = "anal_sec")
|
@Column(name = "anal_sec")
|
||||||
private Long analSec;
|
private Long analSec;
|
||||||
|
|
||||||
@Size(max = 20)
|
|
||||||
@Column(name = "gukuin_used", length = 20)
|
|
||||||
private String gukuinUsed;
|
|
||||||
|
|
||||||
@Column(name = "gukuin_used_dttm")
|
|
||||||
private Instant gukuinUsedDttm;
|
|
||||||
|
|
||||||
@Size(max = 20)
|
@Size(max = 20)
|
||||||
@Column(name = "anal_state", length = 20)
|
@Column(name = "anal_state", length = 20)
|
||||||
private String analState;
|
private String analState;
|
||||||
|
|
||||||
|
@Column(name = "anal_uid")
|
||||||
|
private Long analUid;
|
||||||
|
|
||||||
|
@Column(name = "map_sheep_num")
|
||||||
|
private Long mapSheepNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.entity;
|
package com.kamco.cd.kamcoback.postgres.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
import jakarta.persistence.Column;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import jakarta.persistence.Entity;
|
||||||
import com.kamco.cd.kamcoback.common.utils.geometry.GeometryDeserializer;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import com.kamco.cd.kamcoback.common.utils.geometry.GeometrySerializer;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.SequenceGenerator;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
|
import java.time.Instant;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.locationtech.jts.geom.Geometry;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "tb_map_sheet_learn_data_geom")
|
@Table(name = "tb_map_sheet_anal_data_geom")
|
||||||
public class MapSheetLearnDataGeomEntity {
|
public class MapSheetAnalDataGeomEntity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_map_sheet_learn_data_geom_id_gen")
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_map_sheet_anal_data_geom_id_gen")
|
||||||
@SequenceGenerator(name = "tb_map_sheet_learn_data_geom_id_gen", sequenceName = "tb_map_sheet_learn_data_geom_geom_uid", allocationSize = 1)
|
@SequenceGenerator(name = "tb_map_sheet_anal_data_geom_id_gen", sequenceName = "tb_map_sheet_learn_data_geom_geom_uid", allocationSize = 1)
|
||||||
@Column(name = "geo_uid", nullable = false)
|
@Column(name = "geo_uid", nullable = false)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -44,20 +44,15 @@ public class MapSheetLearnDataGeomEntity {
|
|||||||
@Column(name = "map_sheet_num")
|
@Column(name = "map_sheet_num")
|
||||||
private Long mapSheetNum;
|
private Long mapSheetNum;
|
||||||
|
|
||||||
@Column(name = "before_yyyy")
|
@Column(name = "compare_yyyy")
|
||||||
private Integer beforeYyyy;
|
private Integer compareYyyy;
|
||||||
|
|
||||||
@Column(name = "after_yyyy")
|
@Column(name = "target_yyyy")
|
||||||
private Integer afterYyyy;
|
private Integer targetYyyy;
|
||||||
|
|
||||||
@Column(name = "area")
|
@Column(name = "area")
|
||||||
private Double area;
|
private Double area;
|
||||||
|
|
||||||
@JsonDeserialize(using = GeometryDeserializer.class)
|
|
||||||
@JsonSerialize(using = GeometrySerializer.class)
|
|
||||||
@Column(name = "geom")
|
|
||||||
private Geometry geom;
|
|
||||||
|
|
||||||
@Size(max = 100)
|
@Size(max = 100)
|
||||||
@Column(name = "geo_type", length = 100)
|
@Column(name = "geo_type", length = 100)
|
||||||
private String geoType;
|
private String geoType;
|
||||||
@@ -75,4 +70,11 @@ public class MapSheetLearnDataGeomEntity {
|
|||||||
private Instant updatedDttm;
|
private Instant updatedDttm;
|
||||||
@Column(name = "updated_uid")
|
@Column(name = "updated_uid")
|
||||||
private Long updatedUid;
|
private Long updatedUid;
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO [Reverse Engineering] create field to map the 'geom' column
|
||||||
|
Available actions: Define target Java type | Uncomment as is | Remove column mapping
|
||||||
|
@Column(name = "geom", columnDefinition = "geometry")
|
||||||
|
private Object geom;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.kamco.cd.kamcoback.postgres.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.SequenceGenerator;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import java.time.Instant;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@Table(name = "tb_map_sheet_anal")
|
||||||
|
public class MapSheetAnalEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_map_sheet_anal_id_gen")
|
||||||
|
@SequenceGenerator(name = "tb_map_sheet_anal_id_gen", sequenceName = "tb_map_sheet_anal_anal_uid", allocationSize = 1)
|
||||||
|
@Column(name = "anal_uid", nullable = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "compare_yyyy")
|
||||||
|
private Integer compareYyyy;
|
||||||
|
|
||||||
|
@Column(name = "target_yyyy")
|
||||||
|
private Integer targetYyyy;
|
||||||
|
|
||||||
|
@Column(name = "model_uid")
|
||||||
|
private Long modelUid;
|
||||||
|
|
||||||
|
@Size(max = 100)
|
||||||
|
@Column(name = "server_ids", length = 100)
|
||||||
|
private String serverIds;
|
||||||
|
|
||||||
|
@Column(name = "anal_map_sheet", length = Integer.MAX_VALUE)
|
||||||
|
private String analMapSheet;
|
||||||
|
|
||||||
|
@Column(name = "anal_strt_dttm")
|
||||||
|
private Instant analStrtDttm;
|
||||||
|
|
||||||
|
@Column(name = "anal_end_dttm")
|
||||||
|
private Instant analEndDttm;
|
||||||
|
|
||||||
|
@Column(name = "anal_ss")
|
||||||
|
private Integer analSs;
|
||||||
|
|
||||||
|
@Size(max = 20)
|
||||||
|
@Column(name = "anal_state", length = 20)
|
||||||
|
private String analState;
|
||||||
|
|
||||||
|
@Size(max = 20)
|
||||||
|
@Column(name = "gukyuin_used", length = 20)
|
||||||
|
private String gukyuinUsed;
|
||||||
|
|
||||||
|
@Column(name = "accuracy")
|
||||||
|
private Double accuracy;
|
||||||
|
|
||||||
|
@Size(max = 255)
|
||||||
|
@Column(name = "result_url")
|
||||||
|
private String resultUrl;
|
||||||
|
|
||||||
|
@ColumnDefault("now()")
|
||||||
|
@Column(name = "created_dttm")
|
||||||
|
private Instant createdDttm;
|
||||||
|
|
||||||
|
@Column(name = "created_uid")
|
||||||
|
private Long createdUid;
|
||||||
|
|
||||||
|
@ColumnDefault("now()")
|
||||||
|
@Column(name = "updated_dttm")
|
||||||
|
private Instant updatedDttm;
|
||||||
|
|
||||||
|
@Column(name = "updated_uid")
|
||||||
|
private Long updatedUid;
|
||||||
|
|
||||||
|
@Size(max = 255)
|
||||||
|
@Column(name = "anal_title")
|
||||||
|
private String analTitle;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.kamco.cd.kamcoback.postgres.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.SequenceGenerator;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import java.time.Instant;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@Table(name = "tb_model_mng")
|
||||||
|
public class ModelMngEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_model_mng_id_gen")
|
||||||
|
@SequenceGenerator(name = "tb_model_mng_id_gen", sequenceName = "tb_model_mng_model_uid", allocationSize = 1)
|
||||||
|
@Column(name = "model_uid", nullable = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Size(max = 100)
|
||||||
|
@ColumnDefault("'NULL::character varying'")
|
||||||
|
@Column(name = "model_nm", length = 100)
|
||||||
|
private String modelNm;
|
||||||
|
|
||||||
|
@Size(max = 64)
|
||||||
|
@ColumnDefault("'NULL::character varying'")
|
||||||
|
@Column(name = "model_cate", length = 64)
|
||||||
|
private String modelCate;
|
||||||
|
|
||||||
|
@Size(max = 255)
|
||||||
|
@ColumnDefault("'NULL::character varying'")
|
||||||
|
@Column(name = "model_path")
|
||||||
|
private String modelPath;
|
||||||
|
|
||||||
|
@Column(name = "created_dttm")
|
||||||
|
private Instant createdDttm;
|
||||||
|
|
||||||
|
@Column(name = "created_uid")
|
||||||
|
private Long createdUid;
|
||||||
|
|
||||||
|
@Column(name = "updated_dttm")
|
||||||
|
private Instant updatedDttm;
|
||||||
|
|
||||||
|
@Column(name = "updated_uid")
|
||||||
|
private Long updatedUid;
|
||||||
|
|
||||||
|
@Column(name = "model_cntnt", length = Integer.MAX_VALUE)
|
||||||
|
private String modelCntnt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.kamco.cd.kamcoback.postgres.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.SequenceGenerator;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import java.time.Instant;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@Table(name = "tb_model_ver")
|
||||||
|
public class TbModelVerEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_model_ver_id_gen")
|
||||||
|
@SequenceGenerator(name = "tb_model_ver_id_gen", sequenceName = "tb_model_ver_model_ver_uid", allocationSize = 1)
|
||||||
|
@Column(name = "model_ver_uid", nullable = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Column(name = "model_uid", nullable = false)
|
||||||
|
private Long modelUid;
|
||||||
|
|
||||||
|
@Size(max = 64)
|
||||||
|
@Column(name = "model_cate", length = 64)
|
||||||
|
private String modelCate;
|
||||||
|
|
||||||
|
@Size(max = 64)
|
||||||
|
@Column(name = "model_ver", length = 64)
|
||||||
|
private String modelVer;
|
||||||
|
|
||||||
|
@Size(max = 20)
|
||||||
|
@Column(name = "used_state", length = 20)
|
||||||
|
private String usedState;
|
||||||
|
|
||||||
|
@Size(max = 20)
|
||||||
|
@Column(name = "model_state", length = 20)
|
||||||
|
private String modelState;
|
||||||
|
|
||||||
|
@Column(name = "quality_prob")
|
||||||
|
private Double qualityProb;
|
||||||
|
|
||||||
|
@Size(max = 20)
|
||||||
|
@Column(name = "deploy_state", length = 20)
|
||||||
|
private String deployState;
|
||||||
|
|
||||||
|
@Size(max = 255)
|
||||||
|
@Column(name = "model_path")
|
||||||
|
private String modelPath;
|
||||||
|
|
||||||
|
@ColumnDefault("now()")
|
||||||
|
@Column(name = "created_dttm")
|
||||||
|
private Instant createdDttm;
|
||||||
|
|
||||||
|
@Column(name = "created_uid")
|
||||||
|
private Long createdUid;
|
||||||
|
|
||||||
|
@Column(name = "updated_dttm")
|
||||||
|
private Instant updatedDttm;
|
||||||
|
|
||||||
|
@Column(name = "updated_uid")
|
||||||
|
private Long updatedUid;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||||
|
|
||||||
public interface InferenceResultRepository {
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnDataEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface InferenceResultRepository extends JpaRepository<MapSheetLearnDataEntity, Long>, InferenceResultRepositoryCustom {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||||
|
|
||||||
public class InferenceResultRepositoryImpl {
|
|
||||||
|
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnDataEntity;
|
||||||
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class InferenceResultRepositoryImpl implements InferenceResultRepositoryCustom {
|
||||||
|
|
||||||
|
private final JPAQueryFactory queryFactory;
|
||||||
|
private final QMapSheetLearnDataEntity qSheetLearnData = QMapSheetLearnDataEntity.mapSheetLearnDataEntity;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user