Compare commits
No commits in common. 'dev' and 'krc/receipt_waiting' have entirely different histories.
dev
...
krc/receip
@ -1,38 +0,0 @@
|
||||
package egovframework.config.WebClient;
|
||||
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||
import io.netty.handler.timeout.WriteTimeoutHandler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.reactive.function.client.ExchangeStrategies;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
import reactor.netty.http.client.HttpClient;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Component
|
||||
public class WebClientConf {
|
||||
|
||||
@Bean
|
||||
public WebClient webClient() {
|
||||
HttpClient httpClient = HttpClient.create()
|
||||
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000)
|
||||
.responseTimeout(Duration.ofSeconds(10))
|
||||
.doOnConnected(conn -> conn
|
||||
.addHandlerLast(new ReadTimeoutHandler(10, TimeUnit.SECONDS))
|
||||
.addHandlerLast(new WriteTimeoutHandler(10, TimeUnit.SECONDS)));
|
||||
|
||||
return WebClient.builder()
|
||||
.clientConnector(new ReactorClientHttpConnector(httpClient))
|
||||
.exchangeStrategies(
|
||||
ExchangeStrategies.builder()
|
||||
.codecs(c -> c.defaultCodecs().maxInMemorySize(4 * 1024 * 1024))
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
package egovframework.exception;
|
||||
|
||||
public class DtoConvertException extends RuntimeException {
|
||||
public DtoConvertException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
@ -1,53 +0,0 @@
|
||||
package egovframework.util;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.ObjectReader;
|
||||
import egovframework.exception.DtoConvertException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class DtoConverter {
|
||||
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
/**
|
||||
* Map<String, Object> → DTO 변환
|
||||
* unknown 필드 허용
|
||||
*/
|
||||
public <T> T toDto(Map<String, Object> body, Class<T> clazz) {
|
||||
return toDto(body, clazz, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* strict모드 가독 헬퍼
|
||||
* */
|
||||
public <T> T toStrictDto(Map<String, Object> body, Class<T> clazz) {
|
||||
return toDto(body, clazz, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Map<String, Object> → DTO 변환
|
||||
* @param strict true > unknown 필드에 대한 예외 발생
|
||||
*/
|
||||
public <T> T toDto(Map<String, Object> body, Class<T> clazz, boolean strict) {
|
||||
try {
|
||||
ObjectReader reader = objectMapper.readerFor(clazz);
|
||||
if (strict) {
|
||||
reader = reader.with(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
||||
}
|
||||
return reader.readValue(objectMapper.writeValueAsBytes(body));
|
||||
} catch (IOException e) {
|
||||
throw new DtoConvertException("DTO 변환 실패: " + clazz.getSimpleName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,382 +0,0 @@
|
||||
package go.kr.project.biz.common.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WebClientCallDto {
|
||||
|
||||
public static class CarInfoRequest {
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public static class BodyWrapper {
|
||||
@JsonProperty("data")
|
||||
private List<Body> data;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public static class Body {
|
||||
|
||||
// ===== 헤더 영역 =====
|
||||
@JsonProperty("INFO_SYS_ID")
|
||||
private String infoSysId;
|
||||
|
||||
@JsonProperty("INFO_SYS_IP")
|
||||
private String infoSysIp;
|
||||
|
||||
@JsonProperty("SIGUNGU_CODE")
|
||||
private String sigunguCode;
|
||||
|
||||
@JsonProperty("CNTC_INFO_CODE")
|
||||
private String cntcInfoCode;
|
||||
|
||||
@JsonProperty("CHARGER_ID")
|
||||
private String chargerId;
|
||||
|
||||
@JsonProperty("CHARGER_IP")
|
||||
private String chargerIp;
|
||||
|
||||
@JsonProperty("CHARGER_NM")
|
||||
private String chargerNm;
|
||||
|
||||
// record 배열
|
||||
@JsonProperty("record")
|
||||
private List<IfBody> record;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public static class IfBody {
|
||||
|
||||
@JsonProperty("VHRNO")
|
||||
private String vhrno; // 자동차등록번호
|
||||
|
||||
@JsonProperty("VIN")
|
||||
private String vin; // 차대번호
|
||||
|
||||
@JsonProperty("LEVY_STDDE")
|
||||
private String levyStdde; // 부과기준일
|
||||
|
||||
@JsonProperty("INQIRE_SE_CODE")
|
||||
private String inqireSeCode; // 조회구분코드
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static class CoverRequest {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public static class CarInfoResponse {
|
||||
@JsonProperty("LINK_RSLT_CD")
|
||||
private String linkRsltCd;
|
||||
@JsonProperty("LINK_RSLT_DTL")
|
||||
private String linkRsltDtl;
|
||||
private List<CarInfoIfBody> record;
|
||||
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public static class CarInfoIfBody {
|
||||
|
||||
@JsonProperty("VHRNO")
|
||||
private String vhrno; // 차량번호
|
||||
|
||||
// ===== 상단 (연식 / 등록정보 / 사용본거지) =====
|
||||
@JsonProperty("PRYE")
|
||||
private String prye; // 연식
|
||||
|
||||
@JsonProperty("REGIST_DE")
|
||||
private String registDe; // 등록일(변경일)
|
||||
|
||||
@JsonProperty("ERSR_REGIST_SE_CODE")
|
||||
private String ersrRegistSeCode; // 말소등록구분코드
|
||||
|
||||
@JsonProperty("ERSR_REGIST_SE_NM")
|
||||
private String ersrRegistSeNm; // 말소등록구분명
|
||||
|
||||
@JsonProperty("ERSR_REGIST_DE")
|
||||
private String ersrRegistDe; // 말소등록일
|
||||
|
||||
@JsonProperty("REGIST_DETAIL_CODE")
|
||||
private String registDetailCode; // 등록상세코드
|
||||
|
||||
@JsonProperty("DSPLVL")
|
||||
private String dsplvl; // 배기량
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_LEGALDONG_CODE")
|
||||
private String useStrnghldLegaldongCode; // 사용본거지법정동코드
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_ADSTRD_CODE")
|
||||
private String useStrnghldAdstrdCode; // 사용본거지행정동코드
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_MNTN")
|
||||
private String useStrnghldMntn; // 사용본거지산
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_LNBR")
|
||||
private String useStrnghldLnbr; // 사용본거지번지
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_HO")
|
||||
private String useStrnghldHo; // 사용본거지호
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_ADRES_NM")
|
||||
private String useStrnghldAdresNm; // 사용본거지상세주소
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_ROAD_NM_CODE")
|
||||
private String useStrnghldRoadNmCode; // 사용본거지도로명코드
|
||||
|
||||
@JsonProperty("USGSRHLD_UNDGRND_BULD_SE_CODE")
|
||||
private String usgsrhldUndgrndBuldSeCode; // 사용본거지지하건물구분코드
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_BULD_MAIN_NO")
|
||||
private String useStrnghldBuldMainNo; // 사용본거지건물주요번호
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_BULD_SUB_NO")
|
||||
private String useStrnghldBuldSubNo; // 사용본거지건물부번호
|
||||
|
||||
@JsonProperty("USGSRHLD_ADRES_FULL")
|
||||
private String usgsrhldAdresFull; // 사용본거지전체주소
|
||||
|
||||
// ===== 대표소유자/소유자 정보 =====
|
||||
@JsonProperty("MBER_SE_CODE")
|
||||
private String mberSeCode; // 대표소유자회원구분코드
|
||||
|
||||
@JsonProperty("MBER_NM")
|
||||
private String mberNm; // 대표소유자성명
|
||||
|
||||
@JsonProperty("MBER_SE_NO")
|
||||
private String mberSeNo; // 대표소유자회원번호
|
||||
|
||||
@JsonProperty("TELNO")
|
||||
private String telno; // 대표소유자전화번호
|
||||
|
||||
@JsonProperty("OWNER_LEGALDONG_CODE")
|
||||
private String ownerLegaldongCode; // 소유자법정동코드
|
||||
|
||||
@JsonProperty("OWNER_ADSTRD_CODE")
|
||||
private String ownerAdstrdCode; // 소유자행정동코드
|
||||
|
||||
@JsonProperty("OWNER_MNTN")
|
||||
private String ownerMntn; // 소유자산
|
||||
|
||||
@JsonProperty("OWNER_LNBR")
|
||||
private String ownerLnbr; // 소유자번지
|
||||
|
||||
@JsonProperty("OWNER_HO")
|
||||
private String ownerHo; // 소유자호
|
||||
|
||||
@JsonProperty("OWNER_ADRES_NM")
|
||||
private String ownerAdresNm; // 소유자상세주소
|
||||
|
||||
@JsonProperty("OWNER_ROAD_NM_CODE")
|
||||
private String ownerRoadNmCode; // 소유자도로명코드
|
||||
|
||||
@JsonProperty("OWNER_UNDGRND_BULD_SE_CODE")
|
||||
private String ownerUndgrndBuldSeCode; // 소유자지하건물구분코드
|
||||
|
||||
@JsonProperty("OWNER_BULD_MAIN_NO")
|
||||
private String ownerBuldMainNo; // 소유자건물주요번호
|
||||
|
||||
@JsonProperty("OWNER_BULD_SUB_NO")
|
||||
private String ownerBuldSubNo; // 소유자건물부번호
|
||||
|
||||
@JsonProperty("OWNER_ADRES_FULL")
|
||||
private String ownerAdresFull; // 소유자전체주소
|
||||
|
||||
// ===== 차량번호/차량 기본 =====
|
||||
@JsonProperty("AFTR_VHRNO")
|
||||
private String aftrVhrno; // 신차량번호
|
||||
|
||||
@JsonProperty("FRNT_VHRNO")
|
||||
private String frntVhrno; // 이전차량번호
|
||||
|
||||
@JsonProperty("VIN")
|
||||
private String vin; // 차대번호
|
||||
|
||||
@JsonProperty("CNM")
|
||||
private String cnm; // 차명
|
||||
|
||||
@JsonProperty("VHCTLE_TOT_WT")
|
||||
private String vhctleTotWt; // 차량총중량
|
||||
|
||||
@JsonProperty("CAAG_ENDDE")
|
||||
private String caagEndde; // 차량만료일자
|
||||
|
||||
@JsonProperty("CHANGE_DE")
|
||||
private String changeDe; // 차변변경시기
|
||||
|
||||
@JsonProperty("USE_FUEL_CODE")
|
||||
private String useFuelCode; // 사용연료코드
|
||||
|
||||
@JsonProperty("PRPOS_SE_CODE")
|
||||
private String prposSeCode; // 용도구분코드
|
||||
|
||||
@JsonProperty("MTRS_FOM_NM")
|
||||
private String mtrsFomNm; // 원동기형식명
|
||||
|
||||
// ===== 차종/제원 =====
|
||||
@JsonProperty("VHCTY_ASORT_CODE")
|
||||
private String vhctyAsortCode; // 차종종별코드
|
||||
|
||||
@JsonProperty("VHCTY_TY_CODE")
|
||||
private String vhctyTyCode; // 차종유형코드
|
||||
|
||||
@JsonProperty("VHCTY_SE_CODE")
|
||||
private String vhctySeCode; // 차종분류코드
|
||||
|
||||
@JsonProperty("MXMM_LDG")
|
||||
private String mxmmLdg; // 최대적재량
|
||||
|
||||
@JsonProperty("VHCTY_ASORT_NM")
|
||||
private String vhctyAsortNm; // 차종종별명
|
||||
|
||||
@JsonProperty("VHCTY_TY_NM")
|
||||
private String vhctyTyNm; // 차종유형명
|
||||
|
||||
@JsonProperty("VHCTY_SE_NM")
|
||||
private String vhctySeNm; // 차종분류명
|
||||
|
||||
@JsonProperty("FRST_REGIST_DE")
|
||||
private String frstRegistDe; // 최초등록일
|
||||
|
||||
@JsonProperty("FOM_NM")
|
||||
private String fomNm; // 형식
|
||||
|
||||
@JsonProperty("ACQS_DE")
|
||||
private String acqsDe; // 취득일자
|
||||
|
||||
@JsonProperty("ACQS_END_DE")
|
||||
private String acqsEndDe; // 취득종료일자
|
||||
|
||||
@JsonProperty("YBL_MD")
|
||||
private String yblMd; // 제작년월일
|
||||
|
||||
@JsonProperty("TRANSR_REGIST_DE")
|
||||
private String transrRegistDe; // 이전등록일(양수일)
|
||||
|
||||
// ===== 상태 / 검사 / 금액 =====
|
||||
@JsonProperty("SPCF_REGIST_STTUS_CODE")
|
||||
private String spcfRegistSttusCode; // 제원등록상태코드
|
||||
|
||||
@JsonProperty("COLOR_NM")
|
||||
private String colorNm; // 색상명
|
||||
|
||||
@JsonProperty("MRTG_CO")
|
||||
private String mrtgCo; // 저당수
|
||||
|
||||
@JsonProperty("SEIZR_CO")
|
||||
private String seizrCo; // 압류건수
|
||||
|
||||
@JsonProperty("STMD_CO")
|
||||
private String stmdCo; // 구조변경수
|
||||
|
||||
@JsonProperty("NMPL_CSDY_AT")
|
||||
private String nmplCsdyAt; // 번호판영치여부
|
||||
|
||||
@JsonProperty("NMPL_CSDY_REMNR_DE")
|
||||
private String nmplCsdyRemnrDe; // 번호판영치최고일
|
||||
|
||||
@JsonProperty("ORIGIN_SE_CODE")
|
||||
private String originSeCode; // 출처구분코드
|
||||
|
||||
@JsonProperty("NMPL_STNDRD_CODE")
|
||||
private String nmplStndrdCode; // 번호판규격코드
|
||||
|
||||
@JsonProperty("ACQS_AMOUNT")
|
||||
private String acqsAmount; // 취득금액(최종/최초)
|
||||
|
||||
@JsonProperty("INSPT_VALID_PD_BGNDE")
|
||||
private String insptValidPdBgnde; // 검사유효기간시작일
|
||||
|
||||
@JsonProperty("INSPT_VALID_PD_ENDDE")
|
||||
private String insptValidPdEndde; // 검사유효기간종료일
|
||||
|
||||
@JsonProperty("USE_STRNGHLD_GRC_CODE")
|
||||
private String useStrnghldGrcCode; // 사용본거지관청코드
|
||||
|
||||
@JsonProperty("TKCAR_PSCAP_CO")
|
||||
private String tkcarPscapCo; // 승차정원수
|
||||
|
||||
@JsonProperty("SPMNNO")
|
||||
private String spmnno; // 제원관리번호
|
||||
|
||||
@JsonProperty("TRVL_DSTNC")
|
||||
private String trvlDstnc; // 주행거리
|
||||
|
||||
@JsonProperty("FRST_REGIST_RQRCNO")
|
||||
private String frstRegistRqrcno; // 최초등록접수번호
|
||||
|
||||
@JsonProperty("VLNT_ERSR_PRVNTC_NTICE_DE")
|
||||
private String vlntErsrPrvntcNticeDe; // 예고통지일
|
||||
|
||||
@JsonProperty("REGIST_INSTT_NM")
|
||||
private String registInsttNm; // 등록기관명
|
||||
|
||||
@JsonProperty("PROCESS_IMPRTY_RESN_CODE")
|
||||
private String processImprtyResnCode; // 처리불가사유코드
|
||||
|
||||
@JsonProperty("PROCESS_IMPRTY_RESN_DTLS")
|
||||
private String processImprtyResnDtls; // 처리불가사유명세
|
||||
|
||||
@JsonProperty("CBD_LT")
|
||||
private String cbdLt; // 차체길이
|
||||
|
||||
@JsonProperty("CBD_BT")
|
||||
private String cbdBt; // 차체너비
|
||||
|
||||
@JsonProperty("CBD_HG")
|
||||
private String cbdHg; // 차체높이
|
||||
|
||||
@JsonProperty("FRST_MXMM_LDG")
|
||||
private String frstMxmmLdg; // 최초최대적재량
|
||||
|
||||
@JsonProperty("FUEL_CNSMP_RT")
|
||||
private String fuelCnsmpRt; // 연료소비율
|
||||
|
||||
@JsonProperty("ELCTY_CMPND_FUEL_CNSMP_RT")
|
||||
private String elctyCmpndFuelCnsmpRt; // 전기복합연료소비율
|
||||
}
|
||||
|
||||
|
||||
|
||||
// @Getter
|
||||
// @Setter
|
||||
// @AllArgsConstructor
|
||||
// @NoArgsConstructor
|
||||
// @Builder
|
||||
// public static class CoverInfoResponse {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,195 +0,0 @@
|
||||
package go.kr.project.biz.common.repository;
|
||||
|
||||
import com.querydsl.core.types.Projections;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import go.kr.project.biz.common.dto.CommonDto;
|
||||
import go.kr.project.biz.common.dto.WebClientCallDto;
|
||||
import go.kr.project.domain.entity.CpOwner;
|
||||
import go.kr.project.vo.CpBdongVO;
|
||||
import go.kr.project.vo.CpCancelAnswerVO;
|
||||
import go.kr.project.vo.CpInstructAnswerVO;
|
||||
import go.kr.project.vo.CpViolationVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.persistence.LockModeType;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
import static go.kr.project.domain.entity.QCpBdong.cpBdong;
|
||||
import static go.kr.project.domain.entity.QCpCancelAnswer.cpCancelAnswer;
|
||||
import static go.kr.project.domain.entity.QCpInstructAnswer.cpInstructAnswer;
|
||||
import static go.kr.project.domain.entity.QCpMain.cpMain;
|
||||
import static go.kr.project.domain.entity.QCpOwner.cpOwner;
|
||||
import static go.kr.project.domain.entity.QCpSetinfo.cpSetinfo;
|
||||
import static go.kr.project.domain.entity.QCpViolation.cpViolation;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class CommonQueryDslRepository {
|
||||
|
||||
|
||||
private final JPAQueryFactory queryFactory;
|
||||
|
||||
|
||||
public List<CpViolationVO> findViolationCode(CommonDto.Request.Code commonDto) {
|
||||
|
||||
commonDto.setSggCode("41590");
|
||||
commonDto.setJobGroup("1");
|
||||
|
||||
List<CpViolationVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpViolationVO.class,
|
||||
cpViolation.id.vlCode,
|
||||
cpViolation.id.vlJobgroup,
|
||||
cpViolation.id.vlSggcode,
|
||||
cpViolation.vlId,
|
||||
cpViolation.vlAnswer,
|
||||
cpViolation.vlEnable,
|
||||
cpViolation.vlKeum,
|
||||
cpViolation.vlLaw1,
|
||||
cpViolation.vlLaw2,
|
||||
cpViolation.vlLaw3,
|
||||
cpViolation.vlSemok1,
|
||||
cpViolation.vlSemok2,
|
||||
cpViolation.vlSemok3
|
||||
)
|
||||
)
|
||||
.from(cpViolation)
|
||||
.where(
|
||||
cpViolation.id.vlJobgroup.eq(commonDto.getJobGroup()),
|
||||
cpViolation.id.vlSggcode.eq(commonDto.getSggCode())
|
||||
)
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<CpBdongVO> findBdongCode() {
|
||||
List<CpBdongVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpBdongVO.class,
|
||||
cpBdong.bdCode,
|
||||
cpBdong.bdDongName,
|
||||
cpBdong.bdSggName
|
||||
)
|
||||
)
|
||||
.from(cpBdong)
|
||||
.where(cpBdong.bdEnable.eq("1"))
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<CpCancelAnswerVO> findCancelAnswerCode(CommonDto.Request.Code commonDto) {
|
||||
|
||||
commonDto.setSggCode("41590");
|
||||
|
||||
List<CpCancelAnswerVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpCancelAnswerVO.class,
|
||||
cpCancelAnswer.id.caSggCode,
|
||||
cpCancelAnswer.id.caCode,
|
||||
cpCancelAnswer.caId,
|
||||
cpCancelAnswer.caAnswerText,
|
||||
cpCancelAnswer.caIsAnswer
|
||||
)
|
||||
)
|
||||
.from(cpCancelAnswer)
|
||||
.where(cpCancelAnswer.id.caSggCode.eq(commonDto.getSggCode()))
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<CpInstructAnswerVO> findInstructAnswer(CommonDto.Request.Code commonDto) {
|
||||
|
||||
commonDto.setSggCode("41590");
|
||||
|
||||
List<CpInstructAnswerVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpInstructAnswerVO.class,
|
||||
cpInstructAnswer.id.iaSggcode,
|
||||
cpInstructAnswer.id.iaCode,
|
||||
cpInstructAnswer.iaId
|
||||
)
|
||||
)
|
||||
.from(cpInstructAnswer)
|
||||
.where(cpInstructAnswer.id.iaSggcode.eq(commonDto.getSggCode()))
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/** CpMain 차적조회 결과 업데이트 */
|
||||
public void updateCarinfoFromCpMain(String mmCode, CpOwner cpOwner, WebClientCallDto.CarInfoResponse.CarInfoIfBody carInfoIfBody) {
|
||||
|
||||
long resultCnt = queryFactory.update(cpMain)
|
||||
.set(cpMain.mmCarno, carInfoIfBody.getVhrno())
|
||||
.set(cpMain.mmVhmno, carInfoIfBody.getVin())
|
||||
.set(cpMain.mmCargb, carInfoIfBody.getVhctySeCode())
|
||||
.set(cpMain.mmCarkind, carInfoIfBody.getVhctyAsortCode())
|
||||
.set(cpMain.mmOmcode, cpOwner.getOmCode())
|
||||
.set(cpMain.mmState, "21")
|
||||
.set(cpMain.mmStateDt, LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")))
|
||||
// .set(cpMain.mmViorcnt, "위반횟수")
|
||||
.set(cpMain.mmCarname, carInfoIfBody.getCnm())
|
||||
.set(cpMain.mmCarcheck, "1")
|
||||
.where(
|
||||
cpMain.mmCode.eq(mmCode)
|
||||
)
|
||||
.execute();
|
||||
|
||||
|
||||
if (resultCnt == 0) {
|
||||
throw new IllegalStateException("cp_main 업데이트 대상이 없습니다. mmCode=" + mmCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Boolean isGateWay() {
|
||||
String result = queryFactory
|
||||
.select(
|
||||
cpSetinfo.strValue1
|
||||
)
|
||||
.from(cpSetinfo)
|
||||
.where(
|
||||
cpSetinfo.id.codeName.eq("GATEWAY"),
|
||||
cpSetinfo.id.groupCode.eq("YN"),
|
||||
cpSetinfo.id.detailCode.eq("LOCAL")
|
||||
)
|
||||
.fetchOne();
|
||||
|
||||
return "Y".equals(result);
|
||||
}
|
||||
|
||||
public String pairProjectIp() {
|
||||
return queryFactory
|
||||
.select(
|
||||
cpSetinfo.strValue1
|
||||
)
|
||||
.from(cpSetinfo)
|
||||
.where(
|
||||
cpSetinfo.id.codeName.eq("GATEWAY"),
|
||||
cpSetinfo.id.groupCode.eq("PAIR"),
|
||||
cpSetinfo.id.detailCode.eq("LOCAL")
|
||||
)
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
|
||||
public String findMaxOmCode() {
|
||||
return queryFactory
|
||||
.select(cpOwner.omCode.max())
|
||||
.from(cpOwner)
|
||||
.setLockMode(LockModeType.PESSIMISTIC_WRITE)
|
||||
.fetchOne();
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package go.kr.project.biz.common.repository;
|
||||
|
||||
import com.querydsl.core.types.Projections;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import go.kr.project.biz.common.dto.CommonDto;
|
||||
import go.kr.project.domain.entity.CpBdong;
|
||||
import go.kr.project.domain.entity.CpViolation;
|
||||
import go.kr.project.vo.CpBdongVO;
|
||||
import go.kr.project.vo.CpCancelAnswerVO;
|
||||
import go.kr.project.vo.CpViolationVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static go.kr.project.domain.entity.QCpBdong.cpBdong;
|
||||
import static go.kr.project.domain.entity.QCpCancelAnswer.cpCancelAnswer;
|
||||
import static go.kr.project.domain.entity.QCpViolation.cpViolation;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class CommonRepository {
|
||||
|
||||
|
||||
private final JPAQueryFactory queryFactory;
|
||||
|
||||
|
||||
public List<CpViolationVO> findViolationCode(CommonDto.Request commonDto) {
|
||||
|
||||
commonDto.setSggCode("41590");
|
||||
commonDto.setJobGroup("1");
|
||||
|
||||
List<CpViolationVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpViolationVO.class,
|
||||
cpViolation.id.vlCode,
|
||||
cpViolation.id.vlJobgroup,
|
||||
cpViolation.id.vlSggcode,
|
||||
cpViolation.vlId,
|
||||
cpViolation.vlAnswer,
|
||||
cpViolation.vlEnable,
|
||||
cpViolation.vlKeum,
|
||||
cpViolation.vlLaw1,
|
||||
cpViolation.vlLaw2,
|
||||
cpViolation.vlLaw3,
|
||||
cpViolation.vlSemok1,
|
||||
cpViolation.vlSemok2,
|
||||
cpViolation.vlSemok3
|
||||
)
|
||||
)
|
||||
.from(cpViolation)
|
||||
.where(
|
||||
cpViolation.id.vlJobgroup.eq(commonDto.getJobGroup()),
|
||||
cpViolation.id.vlSggcode.eq(commonDto.getSggCode())
|
||||
)
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<CpBdongVO> findBdongCode() {
|
||||
List<CpBdongVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpBdongVO.class,
|
||||
cpBdong.bdCode,
|
||||
cpBdong.bdDongName,
|
||||
cpBdong.bdSggName
|
||||
)
|
||||
)
|
||||
.from(cpBdong)
|
||||
.where(cpBdong.bdEnable.eq("1"))
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<CpCancelAnswerVO> findCancelAnswerCode(CommonDto.Request commonDto) {
|
||||
|
||||
commonDto.setSggCode("41590");
|
||||
|
||||
List<CpCancelAnswerVO> result = queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
CpCancelAnswerVO.class,
|
||||
cpCancelAnswer.id.caSggCode,
|
||||
cpCancelAnswer.id.caCode,
|
||||
cpCancelAnswer.caId,
|
||||
cpCancelAnswer.caAnswerText,
|
||||
cpCancelAnswer.caIsAnswer
|
||||
)
|
||||
)
|
||||
.from(cpCancelAnswer)
|
||||
.where(cpCancelAnswer.id.caSggCode.eq(commonDto.getSggCode()))
|
||||
.fetch();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,21 +1,11 @@
|
||||
package go.kr.project.biz.common.service;
|
||||
|
||||
import go.kr.project.biz.common.dto.CommonDto;
|
||||
import go.kr.project.biz.common.dto.WebClientCallDto;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CommonService {
|
||||
CommonDto.Response.CodeResult findCode(CommonDto.Request.Code commonDto);
|
||||
|
||||
WebClientCallDto.CarInfoResponse findCarInfo(String carNo, String mmDate);
|
||||
|
||||
// void updateCarInfoFromCpMain(String mmCode, WebClientCallDto.CarInfoResponse.CarInfoIfBody carInfoIfBody);
|
||||
|
||||
Boolean findCoverInfo(String carNo) throws Exception;
|
||||
|
||||
void updateState(String reqMmCode, String reqState, Map<String, Object> req);
|
||||
CommonDto.Response.CodeResult findCode(CommonDto.Request commonDto);
|
||||
|
||||
}
|
||||
|
||||
@ -1,95 +0,0 @@
|
||||
package go.kr.project.biz.common.service.impl;
|
||||
|
||||
import go.kr.project.biz.common.dto.WebClientCallDto;
|
||||
import go.kr.project.biz.common.repository.CommonQueryDslRepository;
|
||||
import go.kr.project.domain.entity.CpMainhist;
|
||||
import go.kr.project.domain.entity.CpOwner;
|
||||
import go.kr.project.domain.repo.cp.CpMainhistRepository;
|
||||
import go.kr.project.domain.repo.cp.CpOwnerRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class UpdateStateService {
|
||||
|
||||
private final CommonQueryDslRepository commonQueryDslRepository;
|
||||
|
||||
private final CpOwnerRepository cpOwnerRepository;
|
||||
private final CpMainhistRepository cpMainhistRepository;
|
||||
|
||||
@Transactional
|
||||
public void updateCarInfoFromCpMain(String mmCode, WebClientCallDto.CarInfoResponse.CarInfoIfBody carInfoIfBody) {
|
||||
|
||||
long maxOmCode = Long.parseLong(commonQueryDslRepository.findMaxOmCode());
|
||||
|
||||
// owner 인서트
|
||||
CpOwner cpOwner = CpOwner.builder()
|
||||
.omCode(String.valueOf(maxOmCode + 1))
|
||||
// .omSggcode()
|
||||
.omName(carInfoIfBody.getMberNm())
|
||||
.omNo1(carInfoIfBody.getMberSeNo().substring(0,6))
|
||||
.omJno(carInfoIfBody.getMberSeNo())
|
||||
.omNOGb(carInfoIfBody.getMberSeCode())
|
||||
.omJuso(carInfoIfBody.getUsgsrhldAdresFull())
|
||||
.omBunji(carInfoIfBody.getOwnerLnbr())
|
||||
.omZip(carInfoIfBody.getUseStrnghldBuldMainNo())
|
||||
.omDoroCode(carInfoIfBody.getOwnerRoadNmCode())
|
||||
.omBldPosition(carInfoIfBody.getUsgsrhldUndgrndBuldSeCode())
|
||||
.omBldNo1(carInfoIfBody.getUseStrnghldBuldMainNo())
|
||||
.omBldNo2(carInfoIfBody.getUseStrnghldBuldSubNo())
|
||||
// .omBldAdmno()
|
||||
.omIngb(carInfoIfBody.getErsrRegistSeCode())
|
||||
.omIndt(carInfoIfBody.getTransrRegistDe())
|
||||
.build();
|
||||
cpOwnerRepository.save(cpOwner);
|
||||
|
||||
// main 업데이트
|
||||
commonQueryDslRepository.updateCarinfoFromCpMain(mmCode, cpOwner, carInfoIfBody);
|
||||
|
||||
// main hist 인서트
|
||||
StateChangeHistSaveToMainHist("21", mmCode);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void StateChangeHistSaveToMainHist(String mmState, String mmCode) {
|
||||
|
||||
Optional<CpMainhist> prevOpt = cpMainhistRepository.findTopByMhMmcodeOrderByMhIndtDesc(mmCode);
|
||||
|
||||
CpMainhist prevCpMainHist = prevOpt.orElse(null);
|
||||
|
||||
String mhStateOld = null;
|
||||
String mhStateOldDt = null;
|
||||
|
||||
if (prevCpMainHist != null) {
|
||||
mhStateOld = prevCpMainHist.getMhStateNew();
|
||||
mhStateOldDt = prevCpMainHist.getMhIndt();
|
||||
}
|
||||
|
||||
CpMainhist cpMainhist = CpMainhist.builder()
|
||||
.mhMmcode(mmCode)
|
||||
.mhStateOld(mhStateOld)
|
||||
.mhStateOldDt(mhStateOldDt)
|
||||
.mhStateNew(mmState)
|
||||
.mhIndt(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")))
|
||||
/** todo : 세션에 있는 inuser 세팅*/
|
||||
// .mhInuser()
|
||||
.build();
|
||||
cpMainhistRepository.save(cpMainhist);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,111 +0,0 @@
|
||||
package go.kr.project.biz.common.service.impl;
|
||||
|
||||
import go.kr.project.biz.common.dto.WebClientCallDto;
|
||||
import go.kr.project.domain.entity.CpSetinfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class WebClientCallService {
|
||||
|
||||
private final Environment env;
|
||||
private final WebClient webClient;
|
||||
|
||||
public WebClientCallDto.CarInfoResponse carInfoCall(String mmCarno, String mmDate, String pairProjectIp) {
|
||||
|
||||
|
||||
WebClientCallDto.CarInfoRequest.BodyWrapper reqBody = WebClientCallDto.CarInfoRequest.BodyWrapper.builder()
|
||||
.data(
|
||||
Arrays.asList(
|
||||
WebClientCallDto.CarInfoRequest.Body.builder()
|
||||
.infoSysId("")
|
||||
.infoSysIp("")
|
||||
.sigunguCode("")
|
||||
.cntcInfoCode("")
|
||||
.chargerId("")
|
||||
.chargerIp("")
|
||||
.chargerNm("")
|
||||
.record(
|
||||
Arrays.asList(
|
||||
WebClientCallDto.CarInfoRequest.IfBody.builder()
|
||||
.vhrno(mmCarno)
|
||||
.levyStdde(mmDate)
|
||||
.build()
|
||||
))
|
||||
.build())
|
||||
)
|
||||
.build();
|
||||
|
||||
// pair or gateway set
|
||||
String PROTOCOL = env.getProperty("car-info.protocol");
|
||||
String DOMAIN = pairProjectIp != null ? env.getProperty("car-info.domain") : pairProjectIp;
|
||||
String PORT = pairProjectIp != null ? env.getProperty("car-info.port") : "";
|
||||
String DIR = pairProjectIp != null ? env.getProperty("car-info.path.basic") : "/common/car/info/find.ajax";
|
||||
|
||||
Mono<WebClientCallDto.CarInfoResponse> carInfoMono = webClient.post()
|
||||
.uri(PROTOCOL + DOMAIN + PORT + DIR)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.accept(MediaType.APPLICATION_JSON)
|
||||
.bodyValue(reqBody)
|
||||
.retrieve()
|
||||
.bodyToMono(WebClientCallDto.CarInfoResponse.class);
|
||||
WebClientCallDto.CarInfoResponse res = carInfoMono.block();
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public Boolean CoverInfoCall(CpSetinfo cpSetinfo, String carNo) {
|
||||
|
||||
String soapXml = String.format(
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" +
|
||||
" xmlns:typ=\"http://ccais.mopas.go.kr/dh/rid/services/swsdn/DisabledParkingYn/types\">\n" +
|
||||
" <soap:Header>\n" +
|
||||
" <typ:commonHeader>\n" +
|
||||
" <serviceName>DisabledParkingYnService</serviceName>\n" +
|
||||
" <useSystemCode>ESBTEST</useSystemCode>\n" +
|
||||
" <certServerId>SVR1311000030</certServerId>\n" +
|
||||
" <transactionUniqueId>2010111020382700773722611</transactionUniqueId>\n" +
|
||||
" <userDeptCode>1234567</userDeptCode>\n" +
|
||||
" <userName>김공무</userName>\n" +
|
||||
" </typ:commonHeader>\n" +
|
||||
" </soap:Header>\n" +
|
||||
" <soap:Body>\n" +
|
||||
" <typ:getDisabledParkingYn>\n" +
|
||||
" <ReqOrgCd>%s</ReqOrgCd>\n" +
|
||||
" <ReqBizCd>%s</ReqBizCd>\n" +
|
||||
" <CARS_NO>%s</CARS_NO>\n" +
|
||||
" </typ:getDisabledParkingYn>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>",
|
||||
cpSetinfo.getStrValue7(), cpSetinfo.getStrValue8(), carNo
|
||||
);
|
||||
|
||||
String PROTOCOL = env.getProperty("cover-info.protocol");
|
||||
String DOMAIN = env.getProperty("cover-info.domain");
|
||||
String PORT = env.getProperty("cover-info.port");
|
||||
String DIR = env.getProperty("cover-info.path");
|
||||
|
||||
|
||||
String response = webClient.post()
|
||||
.uri(PROTOCOL + DOMAIN + PORT + DIR)
|
||||
.header(HttpHeaders.CONTENT_TYPE, "text/xml; charset=UTF-8")
|
||||
.bodyValue(soapXml)
|
||||
.retrieve()
|
||||
.bodyToMono(String.class)
|
||||
.block();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,132 +0,0 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: kurt
|
||||
Date: 2025. 11. 28.
|
||||
Time: 오후 1:46
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
|
||||
|
||||
<div id="guidance_dialog" style="display:none;">
|
||||
<div class="left">
|
||||
<div class="form-grid">
|
||||
|
||||
<!-- 1줄 -->
|
||||
<div class="form-row">
|
||||
<div class="field-group">
|
||||
<div class="lbl">처리사유</div>
|
||||
<div class="fld">
|
||||
<select name="cpInstructAnswer" id="cpInstructAnswer">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field-group empty"></div>
|
||||
</div>
|
||||
|
||||
<!-- 2줄 -->
|
||||
<div class="form-row">
|
||||
<div class="field-group">
|
||||
<div class="lbl">처리일자</div>
|
||||
<div class="fld">
|
||||
<input type="text" id="desDate" name="desDate" class="input calender datepicker" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field-group empty"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="disdoc-btn-area">
|
||||
<button type="button" class="btn btn-light disdoc-btn" name="" id="guide">계도처리</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
let fnGuide = {
|
||||
init: () => {
|
||||
|
||||
|
||||
},
|
||||
|
||||
setCode: () => {
|
||||
|
||||
},
|
||||
|
||||
updateGuide: () => {
|
||||
$.ajax({
|
||||
url: "",
|
||||
type: "post",
|
||||
contentType: 'application/json',
|
||||
success: function(response) {
|
||||
|
||||
//다이얼로그 하이드
|
||||
|
||||
|
||||
//네이게이팅 다음으로
|
||||
|
||||
|
||||
|
||||
//로컬스토리지 mmCodes에 해당 mmCode 제거
|
||||
|
||||
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$("#result").text("서손처리 실패");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
eventListener: () => {
|
||||
$("#guide").on("click", () => {
|
||||
// 처리사유 벨리데이션
|
||||
|
||||
// 날짜 벨리데이션
|
||||
fnGuide.updateGuide();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
/* 다이얼로그 설정 */
|
||||
$("#guidance_dialog").dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: true,
|
||||
// width: "auto",
|
||||
width: 1000,
|
||||
maxHeight: 800,
|
||||
show: { effect: "drop", direction: "left", duration: 200 },
|
||||
hide: { effect: "drop", direction: "left", duration: 200 },
|
||||
title: "계도처리",
|
||||
open: function () {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/* 오늘날짜 기본세팅 */
|
||||
$('#desDate').datepicker('setDate', new Date());
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -1,54 +0,0 @@
|
||||
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_mainhist")
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class CpMainhist {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "MH_CODE", columnDefinition = "bigint unsigned")
|
||||
private Long mhCode;
|
||||
|
||||
// CP_MAIN.MM_CODE
|
||||
@Column(name = "MH_MMCODE", length = 16)
|
||||
private String mhMmcode;
|
||||
|
||||
// 이전 상태
|
||||
@Column(name = "MH_STATE_OLD", length = 2)
|
||||
private String mhStateOld;
|
||||
|
||||
// 변경 후 상태
|
||||
@Column(name = "MH_STATE_NEW", length = 2)
|
||||
private String mhStateNew;
|
||||
|
||||
// 이전 상태 일시 (YYYYMMDDHH24MISS)
|
||||
@Column(name = "MH_STATE_OLD_DT", length = 14)
|
||||
private String mhStateOldDt;
|
||||
|
||||
// 사용 여부
|
||||
@Column(name = "MH_ENABLE", length = 1)
|
||||
private String mhEnable;
|
||||
|
||||
// 비고
|
||||
@Column(name = "MH_ETC", length = 50)
|
||||
private String mhEtc;
|
||||
|
||||
// 등록일시 (YYYYMMDDHH24MISS)
|
||||
@Column(name = "MH_INDT", length = 14)
|
||||
private String mhIndt;
|
||||
|
||||
// 등록자
|
||||
@Column(name = "MH_INUSER")
|
||||
private Integer mhInuser;
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
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_mainhist")
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class CpMainhist {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "CRDN_LOG_ID", columnDefinition = "bigint unsigned")
|
||||
private Long mhCode;
|
||||
|
||||
// CP_MAIN.MM_CODE
|
||||
@Column(name = "CRDN_ID", length = 16)
|
||||
private String mhMmcode;
|
||||
|
||||
// 이전 상태
|
||||
@Column(name = "BFR_PRCS_STTS", length = 2)
|
||||
private String mhStateOld;
|
||||
|
||||
// 변경 후 상태
|
||||
@Column(name = "CHG_PRCS_STTS", length = 2)
|
||||
private String mhStateNew;
|
||||
|
||||
// 이전 상태 일시 (YYYYMMDDHH24MISS)
|
||||
@Column(name = "BFR_REG_DT", length = 14)
|
||||
private String mhStateOldDt;
|
||||
|
||||
// 사용 여부
|
||||
@Column(name = "USE_YN", length = 1)
|
||||
private String mhEnable;
|
||||
|
||||
// 비고
|
||||
@Column(name = "EXCPTNMTTR", length = 50)
|
||||
private String mhEtc;
|
||||
|
||||
// 등록일시 (YYYYMMDDHH24MISS)
|
||||
@Column(name = "REG_DT", length = 14)
|
||||
private String mhIndt;
|
||||
|
||||
// 등록자
|
||||
@Column(name = "PIC_CD")
|
||||
private Integer mhInuser;
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package go.kr.project.domain.repo.cp;
|
||||
|
||||
import go.kr.project.domain.entity.CpMainhist;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public interface CpMainhistRepository extends JpaRepository<CpMainhist, Long> {
|
||||
CpMainhist findByMhMmcode(String mmCode);
|
||||
|
||||
Optional<CpMainhist> findTopByMhMmcodeOrderByMhIndtDesc(String mmCode);
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
package go.kr.project.domain.repo.cp;
|
||||
|
||||
import go.kr.project.domain.entity.CpOwner;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface CpOwnerRepository extends JpaRepository<CpOwner, String> {
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package go.kr.project.domain.repo.cp;
|
||||
|
||||
import go.kr.project.domain.entity.CpMainhist;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public interface CpMainhistRepository extends JpaRepository<CpMainhist, Long> {
|
||||
CpMainhist findByMhMmcode(String mmCode);
|
||||
|
||||
Optional<CpMainhist> findTopByMhMmcodeOrderByMhIndtDesc(String mmCode);
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
package go.kr.project.domain.repo.cp;
|
||||
|
||||
import go.kr.project.domain.entity.CpOwner;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface CpOwnerRepository extends JpaRepository<CpOwner, String> {
|
||||
}
|
||||
Loading…
Reference in New Issue