parent
1b291ba337
commit
a9daf6d43b
@ -0,0 +1,211 @@
|
||||
package com.worker.domain.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Table(name = "cp_goji_prt",
|
||||
indexes = {
|
||||
@Index(name = "CP_GOJI_PRT_IDX1", columnList = "GP_MMCODE, GP_SDATE"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX2", columnList = "GP_SGGCODE, GP_LAWGB, GP_PRTGB, GP_STATE, GP_SEND_DATE, GP_SEND_TIME"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX3", columnList = "GP_SGGCODE, GP_TTCODE"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX4", columnList = "GP_SGGCODE, GP_GTCODE"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX6", columnList = "GP_REGIST_NO"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX7", columnList = "GP_SGGCODE, GP_MM_CARNO"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX8", columnList = "GP_SGGCODE, GP_ACC_YEAR, GP_LVY_NO"),
|
||||
@Index(name = "CP_GOJI_PRT_IDX9", columnList = "GP_CON_KEY, GP_REGIST_NO")
|
||||
})
|
||||
public class CpGojiPrt {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "GP_CODE", nullable = false)
|
||||
private Long gpCode;
|
||||
|
||||
@Column(name = "GP_LAWGB", length = 2)
|
||||
private String gpLawgb;
|
||||
|
||||
@Column(name = "GP_PRTGB", length = 1)
|
||||
private String gpPrtgb;
|
||||
|
||||
@Column(name = "GP_TTCODE")
|
||||
private Long gpTtcode;
|
||||
|
||||
@Column(name = "GP_GTCODE")
|
||||
private Long gpGtcode;
|
||||
|
||||
@Column(name = "GP_SGGCODE", length = 5)
|
||||
private String gpSggcode;
|
||||
|
||||
@Column(name = "GP_MMCODE", length = 16)
|
||||
private String gpMmcode;
|
||||
|
||||
@Column(name = "GP_MM_CARNO", length = 100)
|
||||
private String gpMmCarno;
|
||||
|
||||
@Column(name = "GP_MM_WDATETIME", length = 30)
|
||||
private String gpMmWdatetime;
|
||||
|
||||
@Column(name = "GP_MM_SGPOS", length = 200)
|
||||
private String gpMmSgpos;
|
||||
|
||||
@Column(name = "GP_LVY_KEY", length = 20)
|
||||
private String gpLvyKey;
|
||||
|
||||
@Column(name = "GP_ACC_YEAR", length = 6)
|
||||
private String gpAccYear;
|
||||
|
||||
@Column(name = "GP_LVY_NO", length = 6)
|
||||
private String gpLvyNo;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO", length = 20)
|
||||
private String gpAccountNo;
|
||||
|
||||
@Column(name = "GP_ERC_NO", length = 19)
|
||||
private String gpErcNo;
|
||||
|
||||
@Column(name = "GP_SDATE", length = 8)
|
||||
private String gpSdate;
|
||||
|
||||
@Column(name = "GP_EDATE", length = 8)
|
||||
private String gpEdate;
|
||||
|
||||
@Column(name = "GP_KEUM_T")
|
||||
private Integer gpKeumT;
|
||||
|
||||
@Column(name = "GP_KEUM_A")
|
||||
private Integer gpKeumA;
|
||||
|
||||
@Column(name = "GP_KEUM_B")
|
||||
private Integer gpKeumB;
|
||||
|
||||
@Column(name = "GP_NAME", length = 100)
|
||||
private String gpName;
|
||||
|
||||
@Column(name = "GP_JNO", length = 100)
|
||||
private String gpJno;
|
||||
|
||||
@Column(name = "GP_JUSO", length = 100)
|
||||
private String gpJuso;
|
||||
|
||||
@Column(name = "GP_BUNJI", length = 100)
|
||||
private String gpBunji;
|
||||
|
||||
@Column(name = "GP_ZIP", length = 6)
|
||||
private String gpZip;
|
||||
|
||||
@Column(name = "GP_REGIST_NO", length = 15)
|
||||
private String gpRegistNo;
|
||||
|
||||
@Column(name = "GP_SEND_DATE", length = 8)
|
||||
private String gpSendDate;
|
||||
|
||||
@Column(name = "GP_SEND_TIME", length = 8)
|
||||
private String gpSendTime;
|
||||
|
||||
@Column(name = "GP_RETURN_CD", length = 100)
|
||||
private String gpReturnCd;
|
||||
|
||||
@Column(name = "GP_RECV_NAME", length = 30)
|
||||
private String gpRecvName;
|
||||
|
||||
@Column(name = "GP_RECV_RELT", length = 30)
|
||||
private String gpRecvRelt;
|
||||
|
||||
@Column(name = "GP_STATE", length = 1)
|
||||
private String gpState;
|
||||
|
||||
@Column(name = "GP_STATE_OLD", length = 1)
|
||||
private String gpStateOld;
|
||||
|
||||
@Column(name = "GP_SEND_DATE_OLD", length = 8)
|
||||
private String gpSendDateOld;
|
||||
|
||||
@Column(name = "GP_SEND_TIME_OLD", length = 8)
|
||||
private String gpSendTimeOld;
|
||||
|
||||
@Column(name = "GP_SUNAP", length = 1)
|
||||
private String gpSunap;
|
||||
|
||||
@Column(name = "GP_ADDR_UPDATE", length = 1)
|
||||
private String gpAddrUpdate;
|
||||
|
||||
@Column(name = "GP_KEUM", length = 7)
|
||||
private String gpKeum;
|
||||
|
||||
@Column(name = "GP_CON_KEY", length = 30)
|
||||
private String gpConKey;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO2", length = 20)
|
||||
private String gpAccountNo2;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO3", length = 20)
|
||||
private String gpAccountNo3;
|
||||
|
||||
@Column(name = "GP_BANK_NM", length = 20)
|
||||
private String gpBankNm;
|
||||
|
||||
@Column(name = "GP_BANK_NM2", length = 20)
|
||||
private String gpBankNm2;
|
||||
|
||||
@Column(name = "GP_BANK_NM3", length = 20)
|
||||
private String gpBankNm3;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO4", length = 20)
|
||||
private String gpAccountNo4;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO5", length = 20)
|
||||
private String gpAccountNo5;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO6", length = 20)
|
||||
private String gpAccountNo6;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO7", length = 20)
|
||||
private String gpAccountNo7;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO8", length = 20)
|
||||
private String gpAccountNo8;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO9", length = 20)
|
||||
private String gpAccountNo9;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO10", length = 20)
|
||||
private String gpAccountNo10;
|
||||
|
||||
@Column(name = "GP_ACCOUNT_NO11", length = 20)
|
||||
private String gpAccountNo11;
|
||||
|
||||
@Column(name = "GP_BANK_NM4", length = 20)
|
||||
private String gpBankNm4;
|
||||
|
||||
@Column(name = "GP_BANK_NM5", length = 20)
|
||||
private String gpBankNm5;
|
||||
|
||||
@Column(name = "GP_BANK_NM6", length = 20)
|
||||
private String gpBankNm6;
|
||||
|
||||
@Column(name = "GP_BANK_NM7", length = 20)
|
||||
private String gpBankNm7;
|
||||
|
||||
@Column(name = "GP_BANK_NM8", length = 20)
|
||||
private String gpBankNm8;
|
||||
|
||||
@Column(name = "GP_BANK_NM9", length = 20)
|
||||
private String gpBankNm9;
|
||||
|
||||
@Column(name = "GP_BANK_NM10", length = 20)
|
||||
private String gpBankNm10;
|
||||
|
||||
@Column(name = "GP_BANK_NM11", length = 20)
|
||||
private String gpBankNm11;
|
||||
|
||||
@Column(name = "GP_TAXNO", length = 40)
|
||||
private String gpTaxno;
|
||||
|
||||
@Column(name = "GP_PAY_OUT_DATE", length = 8)
|
||||
private String gpPayOutDate;
|
||||
|
||||
@Column(name = "GP_ELPOST_STATE", length = 2)
|
||||
private String gpElpostState;
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
package com.worker.domain.entity;
|
||||
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Entity
|
||||
@Table(name = "cp_match")
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class CpMatch {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "MC_CODE", nullable = false)
|
||||
private Long mcCode;
|
||||
|
||||
@Column(name = "MC_MMCODE", length = 16)
|
||||
private String mcMmcode;
|
||||
|
||||
@Column(name = "MC_MM_WDATETIME", length = 30)
|
||||
private String mcMmWdatetime;
|
||||
|
||||
@Column(name = "MC_MM_SGPOS", length = 200)
|
||||
private String mcMmSgpos;
|
||||
|
||||
@Column(name = "MC_BDONG", length = 30)
|
||||
private String mcBdong;
|
||||
|
||||
@Column(name = "MC_LVY_KEY_0", length = 20)
|
||||
private String mcLvyKey0;
|
||||
|
||||
@Column(name = "MC_LVY_KEY", length = 20)
|
||||
private String mcLvyKey;
|
||||
|
||||
@Column(name = "MC_ACC_YEAR", length = 6)
|
||||
private String mcAccYear;
|
||||
|
||||
@Column(name = "MC_LVY_NO", length = 6)
|
||||
private String mcLvyNo;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO", length = 20)
|
||||
private String mcAccountNo;
|
||||
|
||||
@Column(name = "MC_ERC_NO", length = 19)
|
||||
private String mcErcNo;
|
||||
|
||||
@Column(name = "MC_KEUM_T", length = 8)
|
||||
private String mcKeumT;
|
||||
|
||||
@Column(name = "MC_KEUM_A", length = 8)
|
||||
private String mcKeumA;
|
||||
|
||||
@Column(name = "MC_KEUM_B", length = 8)
|
||||
private String mcKeumB;
|
||||
|
||||
@Column(name = "MC_INDT", length = 14)
|
||||
private String mcIndt;
|
||||
|
||||
@Column(name = "MC_EDITDT", length = 14)
|
||||
private String mcEditdt;
|
||||
|
||||
@Column(name = "MC_STATE", length = 1)
|
||||
private String mcState;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO2", length = 20)
|
||||
private String mcAccountNo2;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO3", length = 20)
|
||||
private String mcAccountNo3;
|
||||
|
||||
@Column(name = "MC_BANK_NM", length = 20)
|
||||
private String mcBankNm;
|
||||
|
||||
@Column(name = "MC_BANK_NM2", length = 20)
|
||||
private String mcBankNm2;
|
||||
|
||||
@Column(name = "MC_BANK_NM3", length = 20)
|
||||
private String mcBankNm3;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO4", length = 20)
|
||||
private String mcAccountNo4;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO5", length = 20)
|
||||
private String mcAccountNo5;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO6", length = 20)
|
||||
private String mcAccountNo6;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO7", length = 20)
|
||||
private String mcAccountNo7;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO8", length = 20)
|
||||
private String mcAccountNo8;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO9", length = 20)
|
||||
private String mcAccountNo9;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO10", length = 20)
|
||||
private String mcAccountNo10;
|
||||
|
||||
@Column(name = "MC_ACCOUNT_NO11", length = 20)
|
||||
private String mcAccountNo11;
|
||||
|
||||
@Column(name = "MC_BANK_NM4", length = 20)
|
||||
private String mcBankNm4;
|
||||
|
||||
@Column(name = "MC_BANK_NM5", length = 20)
|
||||
private String mcBankNm5;
|
||||
|
||||
@Column(name = "MC_BANK_NM6", length = 20)
|
||||
private String mcBankNm6;
|
||||
|
||||
@Column(name = "MC_BANK_NM7", length = 20)
|
||||
private String mcBankNm7;
|
||||
|
||||
@Column(name = "MC_BANK_NM8", length = 20)
|
||||
private String mcBankNm8;
|
||||
|
||||
@Column(name = "MC_BANK_NM9", length = 20)
|
||||
private String mcBankNm9;
|
||||
|
||||
@Column(name = "MC_BANK_NM10", length = 20)
|
||||
private String mcBankNm10;
|
||||
|
||||
@Column(name = "MC_BANK_NM11", length = 20)
|
||||
private String mcBankNm11;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package com.worker.domain.repo.cp;
|
||||
|
||||
import com.worker.domain.entity.CpGojiPrt;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
public interface CpGojiPrtRepository extends CrudRepository<CpGojiPrt, Integer> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.worker.domain.repo.cp;
|
||||
|
||||
import com.worker.domain.entity.CpMatch;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface CpMatchRepository extends JpaRepository<CpMatch,String> {
|
||||
CpMatch findByMcMmcode(String mngItemSn6);
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package com.worker.domain.repo.ep;
|
||||
|
||||
import com.worker.domain.entity.CpGojiPrt;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
public interface EpGojiPrtRepository extends CrudRepository<CpGojiPrt, Integer> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.worker.domain.repo.ep;
|
||||
|
||||
import com.worker.domain.entity.CpMatch;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface EpMatchRepository extends JpaRepository<CpMatch,String> {
|
||||
CpMatch findByMcMmcode(String mngItemSn6);
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.worker.scheduler.tax.repository;
|
||||
|
||||
import com.querydsl.core.types.Projections;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import com.worker.scheduler.tax.dto.TaxSunapDto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.worker.domain.entity.QCpGojiPrt.cpGojiPrt;
|
||||
import static com.worker.domain.entity.QCpMain.cpMain;
|
||||
import static com.worker.domain.entity.QCpSgg.cpSgg;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class TaxSunapQueryDslRepository {
|
||||
|
||||
private final JPAQueryFactory queryFactory;
|
||||
|
||||
public List<TaxSunapDto.Request.GojiTarget> findGojiTarget(){
|
||||
return queryFactory
|
||||
.select(
|
||||
Projections.fields(
|
||||
TaxSunapDto.Request.GojiTarget.class,
|
||||
cpGojiPrt.gpLvyNo,
|
||||
cpGojiPrt.gpLawgb,
|
||||
cpGojiPrt.gpAccYear
|
||||
)
|
||||
)
|
||||
.from(cpGojiPrt)
|
||||
.innerJoin(cpMain).on(cpMain.mmCode.eq(cpGojiPrt.gpMmcode))
|
||||
.innerJoin(cpSgg).on(cpSgg.sgSggcode.eq(cpGojiPrt.gpSggcode))
|
||||
.where(
|
||||
cpGojiPrt.gpSdate.loe("20250704"),
|
||||
cpGojiPrt.gpEdate.goe("20250717"),
|
||||
cpGojiPrt.gpState.goe("2"),
|
||||
cpGojiPrt.gpSunap.isNull().or(cpGojiPrt.gpSunap.lt("1"))
|
||||
)
|
||||
.fetch();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue