feat : jpa설정 및 프로퍼티 수정
parent
8abfcba617
commit
4626fabbda
@ -1 +1 @@
|
|||||||
rootProject.name = 'xit-framework'
|
rootProject.name = 'clean-parking'
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package egovframework.config.JPAConf;
|
||||||
|
|
||||||
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
|
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||||
|
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||||
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
|
||||||
|
import javax.persistence.EntityManagerFactory;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableJpaRepositories(
|
||||||
|
basePackages = "go.kr.project.domain.repo.cp", // Clean Parking용 레포지토리 경로
|
||||||
|
entityManagerFactoryRef = "cpEntityManagerFactory",
|
||||||
|
transactionManagerRef = "cpTransactionManager"
|
||||||
|
)
|
||||||
|
public class CpDbConf {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
@ConfigurationProperties("spring.datasource.cp")
|
||||||
|
public DataSourceProperties cpDataSourceProperties() {
|
||||||
|
return new DataSourceProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
public DataSource cpDataSource() {
|
||||||
|
return cpDataSourceProperties().initializeDataSourceBuilder().build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
public LocalContainerEntityManagerFactoryBean cpEntityManagerFactory(EntityManagerFactoryBuilder builder) {
|
||||||
|
return builder
|
||||||
|
.dataSource(cpDataSource())
|
||||||
|
.packages("go.kr.project.domain.entity")
|
||||||
|
.persistenceUnit("cp")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
public PlatformTransactionManager cpTransactionManager(
|
||||||
|
@Qualifier("cpEntityManagerFactory") EntityManagerFactory cpEntityManagerFactory) {
|
||||||
|
return new JpaTransactionManager(cpEntityManagerFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
public JPAQueryFactory cpQueryFactory(@Qualifier("cpEntityManagerFactory") EntityManagerFactory emf) {
|
||||||
|
return new JPAQueryFactory(emf.createEntityManager());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package egovframework.config.JPAConf;
|
||||||
|
|
||||||
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
|
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||||
|
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||||
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
|
||||||
|
import javax.persistence.EntityManagerFactory;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableJpaRepositories(
|
||||||
|
basePackages = "go.kr.project.domain.repo.ep", // Electric Parking용 레포지토리 경로
|
||||||
|
entityManagerFactoryRef = "epEntityManagerFactory",
|
||||||
|
transactionManagerRef = "epTransactionManager"
|
||||||
|
)
|
||||||
|
public class EpDbConf {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConfigurationProperties("spring.datasource.ep")
|
||||||
|
public DataSourceProperties epDataSourceProperties() {
|
||||||
|
return new DataSourceProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public DataSource epDataSource() {
|
||||||
|
return epDataSourceProperties().initializeDataSourceBuilder().build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public LocalContainerEntityManagerFactoryBean epEntityManagerFactory(EntityManagerFactoryBuilder builder) {
|
||||||
|
return builder
|
||||||
|
.dataSource(epDataSource())
|
||||||
|
.packages("go.kr.project.domain.entity")
|
||||||
|
.persistenceUnit("ep")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public PlatformTransactionManager epTransactionManager(
|
||||||
|
@Qualifier("epEntityManagerFactory") EntityManagerFactory epEntityManagerFactory) {
|
||||||
|
return new JpaTransactionManager(epEntityManagerFactory);
|
||||||
|
}
|
||||||
|
@Bean
|
||||||
|
public JPAQueryFactory epQueryFactory(@Qualifier("epEntityManagerFactory") EntityManagerFactory emf) {
|
||||||
|
return new JPAQueryFactory(emf.createEntityManager());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package egovframework.config.JPAConf;//package com.worker.framework.JPAConf;
|
||||||
|
//
|
||||||
|
//import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
|
//import jakarta.persistence.EntityManager;
|
||||||
|
//import jakarta.persistence.PersistenceContext;
|
||||||
|
//import org.springframework.context.annotation.Bean;
|
||||||
|
//import org.springframework.context.annotation.Configuration;
|
||||||
|
//
|
||||||
|
//@Configuration
|
||||||
|
//public class JPAConfig {
|
||||||
|
//
|
||||||
|
// @PersistenceContext
|
||||||
|
// private EntityManager em;
|
||||||
|
//
|
||||||
|
// @Bean
|
||||||
|
// public JPAQueryFactory jpaQueryFactory() {
|
||||||
|
// return new JPAQueryFactory(em);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
// 멀티 db 환경으로 conf 수정 수정
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_answer")
|
||||||
|
@Getter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class CpAnswer {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "AS_MMCODE", length = 16)
|
||||||
|
private String asMmcode;
|
||||||
|
|
||||||
|
@Column(name = "AS_SGGCODE", length = 5)
|
||||||
|
private String asSggcode;
|
||||||
|
|
||||||
|
@Column(name = "AS_INGB", length = 3)
|
||||||
|
private String asIngb;
|
||||||
|
|
||||||
|
@Column(name = "AS_JSDATE", length = 8)
|
||||||
|
private String asJsdate;
|
||||||
|
|
||||||
|
@Column(name = "AS_JSNO", length = 30)
|
||||||
|
private String asJsno;
|
||||||
|
|
||||||
|
@Column(name = "AS_JSNO_M", length = 30)
|
||||||
|
private String asJsnoM;
|
||||||
|
|
||||||
|
@Column(name = "AS_BBS_NO", length = 15)
|
||||||
|
private String asBbsNo;
|
||||||
|
|
||||||
|
@Column(name = "AS_LIMIT_DT", length = 16)
|
||||||
|
private String asLimitDt;
|
||||||
|
|
||||||
|
@Column(name = "AS_USER", length = 50)
|
||||||
|
private String asUser;
|
||||||
|
|
||||||
|
@Column(name = "AS_TEL", length = 20)
|
||||||
|
private String asTel;
|
||||||
|
|
||||||
|
@Column(name = "AS_CELL", length = 20)
|
||||||
|
private String asCell;
|
||||||
|
|
||||||
|
@Column(name = "AS_EMAIL", length = 50)
|
||||||
|
private String asEmail;
|
||||||
|
|
||||||
|
@Column(name = "AS_STATE", length = 1)
|
||||||
|
private String asState;
|
||||||
|
|
||||||
|
@Column(name = "AS_POST_CD", length = 1)
|
||||||
|
private String asPostCd;
|
||||||
|
|
||||||
|
@Column(name = "AS_POST_DT", length = 14)
|
||||||
|
private String asPostDt;
|
||||||
|
|
||||||
|
@Column(name = "AS_STATE_DT", length = 14)
|
||||||
|
private String asStateDt;
|
||||||
|
|
||||||
|
@Column(name = "AS_TEXT", length = 1000)
|
||||||
|
private String asText;
|
||||||
|
|
||||||
|
@Column(name = "AS_REUSER")
|
||||||
|
private Integer asReuser;
|
||||||
|
|
||||||
|
@Column(name = "AS_INLINE", length = 1)
|
||||||
|
private String asInline;
|
||||||
|
|
||||||
|
@Column(name = "AS_SYS_GUBUN_C", length = 8)
|
||||||
|
private String asSysGubunC;
|
||||||
|
|
||||||
|
@Column(name = "AS_PETI_ANC_CODE_V", length = 7)
|
||||||
|
private String asPetiAncCodeV;
|
||||||
|
|
||||||
|
@Column(name = "AS_PETI_NO_C", length = 30)
|
||||||
|
private String asPetiNoC;
|
||||||
|
|
||||||
|
|
||||||
|
public void changeState(String newState) {
|
||||||
|
this.asState = newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void changePostDtNow() {
|
||||||
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||||
|
this.asPostDt = LocalDateTime.now().format(dtf);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_bdong", indexes = {
|
||||||
|
@Index(name = "CP_BDONG_IDX1", columnList = "BD_CODE, BD_DONGNAME")
|
||||||
|
})
|
||||||
|
@Getter
|
||||||
|
public class CpBdong {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "BD_CODE", length = 10, nullable = false)
|
||||||
|
private String bdCode;
|
||||||
|
|
||||||
|
@Column(name = "BD_SGGNAME", length = 40)
|
||||||
|
private String bdSggName;
|
||||||
|
|
||||||
|
@Column(name = "BD_DONGNAME", length = 40)
|
||||||
|
private String bdDongName;
|
||||||
|
|
||||||
|
@Column(name = "BD_ENABLE", length = 1)
|
||||||
|
private String bdEnable;
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_cancel", indexes = {
|
||||||
|
@Index(name = "CP_CANCEL_IDX1", columnList = "CC_MMCODE"),
|
||||||
|
@Index(name = "CP_CANCEL_IDX2", columnList = "CC_SGGCODE, CC_DATE")
|
||||||
|
})
|
||||||
|
@Getter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class CpCancel {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "CC_CODE")
|
||||||
|
private Long ccCode;
|
||||||
|
|
||||||
|
@Column(name = "CC_SGGCODE", length = 5)
|
||||||
|
private String ccSggcode;
|
||||||
|
|
||||||
|
@Column(name = "CC_MMCODE", length = 16)
|
||||||
|
private String ccMmcode;
|
||||||
|
|
||||||
|
@Column(name = "CC_DATE", length = 8)
|
||||||
|
private String ccDate;
|
||||||
|
|
||||||
|
@Column(name = "CC_CAUSE", length = 3)
|
||||||
|
private String ccCause;
|
||||||
|
|
||||||
|
@Column(name = "CC_ETC", length = 1000)
|
||||||
|
private String ccEtc;
|
||||||
|
|
||||||
|
@Column(name = "CC_INDT", length = 14)
|
||||||
|
private String ccIndt;
|
||||||
|
|
||||||
|
@Column(name = "CC_INUSER")
|
||||||
|
private Integer ccInuser;
|
||||||
|
}
|
||||||
@ -0,0 +1,162 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_main")
|
||||||
|
@Getter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class CpMain {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "MM_CODE", length = 16)
|
||||||
|
private String mmCode;
|
||||||
|
|
||||||
|
@Column(name = "MM_SGGCODE", length = 5)
|
||||||
|
private String mmSggcode;
|
||||||
|
|
||||||
|
@Column(name = "MM_DLGB", length = 1)
|
||||||
|
private String mmDlgb;
|
||||||
|
|
||||||
|
@Column(name = "MM_INGB", length = 2)
|
||||||
|
private String mmIngb;
|
||||||
|
|
||||||
|
@Column(name = "MM_DATE", length = 8)
|
||||||
|
private String mmDate;
|
||||||
|
|
||||||
|
@Column(name = "MM_TIME", length = 4)
|
||||||
|
private String mmTime;
|
||||||
|
|
||||||
|
@Column(name = "MM_LAWGB", length = 2)
|
||||||
|
private String mmLawgb;
|
||||||
|
|
||||||
|
@Column(name = "MM_SGNM", length = 500)
|
||||||
|
private String mmSgnm;
|
||||||
|
|
||||||
|
@Column(name = "MM_SGTEL", length = 100)
|
||||||
|
private String mmSgtel;
|
||||||
|
|
||||||
|
@Column(name = "MM_SGCONT", length = 1000)
|
||||||
|
private String mmSgcont;
|
||||||
|
|
||||||
|
@Column(name = "MM_SGPOS", length = 200)
|
||||||
|
private String mmSgpos;
|
||||||
|
|
||||||
|
@Column(name = "MM_BDCODE", length = 10)
|
||||||
|
private String mmBdcode;
|
||||||
|
|
||||||
|
@Column(name = "MM_GPS_X", length = 20)
|
||||||
|
private String mmGpsX;
|
||||||
|
|
||||||
|
@Column(name = "MM_GPS_Y", length = 20)
|
||||||
|
private String mmGpsY;
|
||||||
|
|
||||||
|
@Column(name = "MM_TRAC", length = 1)
|
||||||
|
private String mmTrac;
|
||||||
|
|
||||||
|
@Column(name = "MM_SNO", length = 20)
|
||||||
|
private String mmSno;
|
||||||
|
|
||||||
|
@Column(name = "MM_IMAGECNT")
|
||||||
|
private Integer mmImagecnt;
|
||||||
|
|
||||||
|
@Column(name = "MM_IMAGEGB", length = 1)
|
||||||
|
private String mmImagegb;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARNO", length = 20)
|
||||||
|
private String mmCarno;
|
||||||
|
|
||||||
|
@Column(name = "MM_VHMNO", length = 25)
|
||||||
|
private String mmVhmno;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARGB", length = 1)
|
||||||
|
private String mmCargb;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARKIND", length = 1)
|
||||||
|
private String mmCarkind;
|
||||||
|
|
||||||
|
@Column(name = "MM_OMCODE", length = 13)
|
||||||
|
private String mmOmcode;
|
||||||
|
|
||||||
|
@Column(name = "MM_SDATE", length = 8)
|
||||||
|
private String mmSdate;
|
||||||
|
|
||||||
|
@Column(name = "MM_EDATE", length = 8)
|
||||||
|
private String mmEdate;
|
||||||
|
|
||||||
|
@Column(name = "MM_KEUM1")
|
||||||
|
private Integer mmKeum1;
|
||||||
|
|
||||||
|
@Column(name = "MM_KEUM2")
|
||||||
|
private Integer mmKeum2;
|
||||||
|
|
||||||
|
@Column(name = "MM_SUKEUM")
|
||||||
|
private Integer mmSukeum;
|
||||||
|
|
||||||
|
@Column(name = "MM_MINUS_KEUM")
|
||||||
|
private Integer mmMinusKeum;
|
||||||
|
|
||||||
|
@Column(name = "MM_ADD_KEUM")
|
||||||
|
private Integer mmAddKeum;
|
||||||
|
|
||||||
|
@Column(name = "MM_RECALL", length = 1)
|
||||||
|
private String mmRecall;
|
||||||
|
|
||||||
|
@Column(name = "MM_INUSER")
|
||||||
|
private Integer mmInuser;
|
||||||
|
|
||||||
|
@Column(name = "MM_INDT", length = 14)
|
||||||
|
private String mmIndt;
|
||||||
|
|
||||||
|
@Column(name = "MM_STATE", length = 2)
|
||||||
|
private String mmState;
|
||||||
|
|
||||||
|
@Column(name = "MM_STATE_DT", length = 14)
|
||||||
|
private String mmStateDt;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARCHECK", length = 1)
|
||||||
|
private String mmCarcheck;
|
||||||
|
|
||||||
|
@Column(name = "MM_PRECODE", length = 13)
|
||||||
|
private String mmPrecode;
|
||||||
|
|
||||||
|
@Column(name = "MM_ETC", length = 1000)
|
||||||
|
private String mmEtc;
|
||||||
|
|
||||||
|
@Column(name = "MM_VIDEOFILENM", length = 30)
|
||||||
|
private String mmVideofilenm;
|
||||||
|
|
||||||
|
@Column(name = "MM_SAFEZONE", length = 1)
|
||||||
|
private String mmSafezone;
|
||||||
|
|
||||||
|
@Column(name = "MM_VIORCNT", length = 4)
|
||||||
|
private String mmViorcnt;
|
||||||
|
|
||||||
|
@Column(name = "MM_TIME2", length = 4)
|
||||||
|
private String mmTime2;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARNAME", length = 60)
|
||||||
|
private String mmCarname;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARCOLOR", length = 20)
|
||||||
|
private String mmCarcolor;
|
||||||
|
|
||||||
|
@Column(name = "MM_CARFUEL", length = 10)
|
||||||
|
private String mmCarfuel;
|
||||||
|
|
||||||
|
@Column(name = "MM_TRANSMIT_SGG", length = 50)
|
||||||
|
private String mmTransmitSgg;
|
||||||
|
|
||||||
|
@Column(name = "MM_TRANSMIT_TEAM", length = 50)
|
||||||
|
private String mmTransmitTeam;
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_main_etc1")
|
||||||
|
@Getter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class CpMainEtc1 {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "MM_CODE", length = 16)
|
||||||
|
private String mmCode;
|
||||||
|
|
||||||
|
@Column(name = "MM_JSDATE", length = 8)
|
||||||
|
private String mmJsdate;
|
||||||
|
|
||||||
|
@Column(name = "MM_KEY", length = 30)
|
||||||
|
private String mmKey;
|
||||||
|
|
||||||
|
@Column(name = "MM_TEXT", length = 4000)
|
||||||
|
private String mmText;
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.EmbeddedId;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_setinfo")
|
||||||
|
@Getter
|
||||||
|
public class CpSetinfo {
|
||||||
|
|
||||||
|
// @Id
|
||||||
|
// @Column(name = "CODE_NAME", length = 50)
|
||||||
|
// private String codeName;
|
||||||
|
//
|
||||||
|
// @Id
|
||||||
|
// @Column(name = "GROUP_CODE", length = 50)
|
||||||
|
// private String groupCode;
|
||||||
|
//
|
||||||
|
// @Id
|
||||||
|
// @Column(name = "DETAIL_CODE", length = 50)
|
||||||
|
// private String detailCode;
|
||||||
|
|
||||||
|
@EmbeddedId
|
||||||
|
private CpSetinfoId id;
|
||||||
|
|
||||||
|
|
||||||
|
//SGG_CODE 시군구 코드
|
||||||
|
@Column(name = "INT_VALUE1")
|
||||||
|
private Integer intValue1;
|
||||||
|
|
||||||
|
@Column(name = "INT_VALUE2")
|
||||||
|
private Integer intValue2;
|
||||||
|
|
||||||
|
@Column(name = "INT_VALUE3")
|
||||||
|
private Integer intValue3;
|
||||||
|
|
||||||
|
@Column(name = "INT_VALUE4")
|
||||||
|
private Integer intValue4;
|
||||||
|
|
||||||
|
@Column(name = "INT_VALUE5")
|
||||||
|
private Integer intValue5;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE1", length = 1000)
|
||||||
|
private String strValue1;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE2", length = 1000)
|
||||||
|
private String strValue2;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE3", length = 1000)
|
||||||
|
private String strValue3;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE4", length = 1000)
|
||||||
|
private String strValue4;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE5", length = 1000)
|
||||||
|
private String strValue5;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE6", length = 1000)
|
||||||
|
private String strValue6;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE7", length = 1000)
|
||||||
|
private String strValue7;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE8", length = 1000)
|
||||||
|
private String strValue8;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE9", length = 1000)
|
||||||
|
private String strValue9;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE10", length = 1000)
|
||||||
|
private String strValue10;
|
||||||
|
|
||||||
|
@Column(name = "STR_VALUE11", length = 1000)
|
||||||
|
private String strValue11;
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Embeddable;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CpSetinfoId implements Serializable {
|
||||||
|
|
||||||
|
@Column(name = "CODE_NAME")
|
||||||
|
private String codeName;
|
||||||
|
|
||||||
|
@Column(name = "GROUP_CODE")
|
||||||
|
private String groupCode;
|
||||||
|
|
||||||
|
@Column(name = "DETAIL_CODE")
|
||||||
|
private String detailCode;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (!(o instanceof CpSetinfoId)) return false;
|
||||||
|
CpSetinfoId that = (CpSetinfoId) o;
|
||||||
|
return Objects.equals(codeName, that.codeName)
|
||||||
|
&& Objects.equals(groupCode, that.groupCode)
|
||||||
|
&& Objects.equals(detailCode, that.detailCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(codeName, groupCode, detailCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_sgg")
|
||||||
|
@Getter
|
||||||
|
public class CpSgg {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "SG_SGGCODE", length = 5, nullable = false)
|
||||||
|
private String sgSggCode;
|
||||||
|
|
||||||
|
@Column(name = "SG_SGGNAME", length = 20)
|
||||||
|
private String sgSggName;
|
||||||
|
|
||||||
|
@Column(name = "SG_ENABLE", length = 1)
|
||||||
|
private String sgEnable;
|
||||||
|
|
||||||
|
@Column(name = "SG_DEPCODE", length = 10)
|
||||||
|
private String sgDepCode;
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_user", indexes = {
|
||||||
|
@Index(name = "CP_USER_IDX1", columnList = "UM_SGGCODE")
|
||||||
|
})
|
||||||
|
@Getter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class CpUser {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "UM_CODE")
|
||||||
|
private Integer umCode;
|
||||||
|
|
||||||
|
@Column(name = "UM_SGGCODE", length = 5)
|
||||||
|
private String umSggcode;
|
||||||
|
|
||||||
|
@Column(name = "UM_LEVELCD", length = 1)
|
||||||
|
private String umLevelcd;
|
||||||
|
|
||||||
|
@Column(name = "UM_LEVEL", length = 50)
|
||||||
|
private String umLevel;
|
||||||
|
|
||||||
|
@Column(name = "UM_NAME", length = 50)
|
||||||
|
private String umName;
|
||||||
|
|
||||||
|
@Column(name = "UM_TELNO", length = 50)
|
||||||
|
private String umTelno;
|
||||||
|
|
||||||
|
@Column(name = "UM_EMAIL", length = 50)
|
||||||
|
private String umEmail;
|
||||||
|
|
||||||
|
@Column(name = "UM_HWPDIRC", length = 100)
|
||||||
|
private String umHwpdirc;
|
||||||
|
|
||||||
|
@Column(name = "UM_PASS", length = 100)
|
||||||
|
private String umPass;
|
||||||
|
|
||||||
|
@Column(name = "UM_PERMISION", length = 100)
|
||||||
|
private String umPermision;
|
||||||
|
|
||||||
|
@Column(name = "UM_SEALL_USER", length = 100)
|
||||||
|
private String umSeallUser;
|
||||||
|
|
||||||
|
@Column(name = "UM_TAXE_USER", length = 100)
|
||||||
|
private String umTaxeUser;
|
||||||
|
|
||||||
|
@Column(name = "UM_INDT", length = 14)
|
||||||
|
private String umIndt;
|
||||||
|
|
||||||
|
@Column(name = "UM_ENABLE", length = 1)
|
||||||
|
private String umEnable;
|
||||||
|
|
||||||
|
@Column(name = "UM_JOB_GROUP", length = 3)
|
||||||
|
private String umJobGroup;
|
||||||
|
|
||||||
|
@Column(name = "UM_DELDT", length = 14)
|
||||||
|
private String umDeldt;
|
||||||
|
|
||||||
|
@Column(name = "UM_IP", length = 30)
|
||||||
|
private String umIp;
|
||||||
|
|
||||||
|
@Column(name = "UM_PASS_UPDT", length = 14)
|
||||||
|
private String umPassUpdt;
|
||||||
|
|
||||||
|
@Column(name = "um_car_user", length = 100)
|
||||||
|
private String umCarUser;
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.EmbeddedId;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "cp_violation")
|
||||||
|
@Getter
|
||||||
|
public class CpViolation {
|
||||||
|
|
||||||
|
// @Id
|
||||||
|
// @Column(name = "VL_SGGCODE", length = 5, nullable = false)
|
||||||
|
// private String vlSggcode;
|
||||||
|
//
|
||||||
|
// @Id
|
||||||
|
// @Column(name = "VL_JOBGROUP", length = 2, nullable = false)
|
||||||
|
// private String vlJobgroup;
|
||||||
|
//
|
||||||
|
// @Id
|
||||||
|
// @Column(name = "VL_CODE", length = 2, nullable = false)
|
||||||
|
// private String vlCode;
|
||||||
|
|
||||||
|
@EmbeddedId
|
||||||
|
private CpViolationId id;
|
||||||
|
|
||||||
|
@Column(name = "VL_ID", length = 30, nullable = false)
|
||||||
|
private String vlId;
|
||||||
|
|
||||||
|
@Column(name = "VL_LAW1", length = 100, nullable = false)
|
||||||
|
private String vlLaw1;
|
||||||
|
|
||||||
|
@Column(name = "VL_LAW2", length = 3, nullable = false)
|
||||||
|
private String vlLaw2;
|
||||||
|
|
||||||
|
@Column(name = "VL_LAW3", length = 3, nullable = false)
|
||||||
|
private String vlLaw3;
|
||||||
|
|
||||||
|
@Column(name = "VL_ENABLE", length = 1, nullable = false)
|
||||||
|
private String vlEnable;
|
||||||
|
|
||||||
|
@Column(name = "VL_SEMOK1", length = 2, nullable = false)
|
||||||
|
private String vlSemok1;
|
||||||
|
|
||||||
|
@Column(name = "VL_SEMOK2", length = 6, nullable = false)
|
||||||
|
private String vlSemok2;
|
||||||
|
|
||||||
|
@Column(name = "VL_KEUM", nullable = false)
|
||||||
|
private Integer vlKeum;
|
||||||
|
|
||||||
|
@Column(name = "VL_ANSWER", length = 500, nullable = false)
|
||||||
|
private String vlAnswer;
|
||||||
|
|
||||||
|
@Column(name = "VL_SEMOK3", length = 3)
|
||||||
|
private String vlSemok3;
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package go.kr.project.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Embeddable;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CpViolationId implements Serializable {
|
||||||
|
@Column(name = "VL_SGGCODE", length = 5, nullable = false)
|
||||||
|
private String vlSggcode;
|
||||||
|
|
||||||
|
@Column(name = "VL_JOBGROUP", length = 2, nullable = false)
|
||||||
|
private String vlJobgroup;
|
||||||
|
|
||||||
|
@Column(name = "VL_CODE", length = 2, nullable = false)
|
||||||
|
private String vlCode;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (!(o instanceof CpViolationId)) return false;
|
||||||
|
CpViolationId that = (CpViolationId) o;
|
||||||
|
return Objects.equals(vlSggcode, that.vlSggcode)
|
||||||
|
&& Objects.equals(vlJobgroup, that.vlJobgroup)
|
||||||
|
&& Objects.equals(vlCode, that.vlCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(vlSggcode, vlJobgroup, vlCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpAnswer;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface CpAnswerRepository extends JpaRepository<CpAnswer,String> {
|
||||||
|
List<CpAnswer> findAllByAsState(String number);
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpBdong;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface CpBdongRepository extends CrudRepository<CpBdong, Long> {
|
||||||
|
|
||||||
|
List<CpBdong> findAllByBdCodeStartingWith(String string);
|
||||||
|
|
||||||
|
List<CpBdong> findAllByBdSggName(String bdSggName);
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpCancel;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface CpCancelRepository extends JpaRepository<CpCancel,Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpMainEtc1;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface CpMainEtc1Repository extends JpaRepository<CpMainEtc1, Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpMain;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CpMainRepository extends JpaRepository<CpMain,String> {
|
||||||
|
|
||||||
|
CpMain findTopByMmCodeStartingWithOrderByMmCodeDesc(String prefix);
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpSetinfo;
|
||||||
|
import go.kr.project.domain.entity.CpSetinfoId;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CpSetinfoRepository extends JpaRepository<CpSetinfo, CpSetinfoId> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpSgg;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface CpSggRepository extends JpaRepository<CpSgg, Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpUser;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface CpUserRepository extends JpaRepository<CpUser, Long> {
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
package go.kr.project.domain.repo.cp;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpViolation;
|
||||||
|
import go.kr.project.domain.entity.CpViolationId;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface CpViolationRepository extends JpaRepository<CpViolation, CpViolationId> {
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpAnswer;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface EpAnswerRepository extends JpaRepository<CpAnswer,String> {
|
||||||
|
List<CpAnswer> findAllByAsState(String number);
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpBdong;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface EpBdongRepository extends JpaRepository<CpBdong, Integer> {
|
||||||
|
List<CpBdong> findAllByBdCodeStartingWith(String string);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpMainEtc1;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface EpMainEtc1Repository extends JpaRepository<CpMainEtc1, Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpMain;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface EpMainRepository extends JpaRepository<CpMain,String> {
|
||||||
|
|
||||||
|
CpMain findTopByMmCodeStartingWithOrderByMmCodeDesc(String prefix);
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpSetinfo;
|
||||||
|
import go.kr.project.domain.entity.CpSetinfoId;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface EpSetinfoRepository extends JpaRepository<CpSetinfo, CpSetinfoId> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpSgg;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface EpSggRepository extends JpaRepository<CpSgg, Long> {
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpUser;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface EpUserRepository extends JpaRepository<CpUser, Long> {
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
package go.kr.project.domain.repo.ep;
|
||||||
|
|
||||||
|
import go.kr.project.domain.entity.CpViolation;
|
||||||
|
import go.kr.project.domain.entity.CpViolationId;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface EpViolationRepository extends JpaRepository<CpViolation, CpViolationId> {
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue