동기화
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.ga.core.mapper.approval;
|
||||
|
||||
import com.ga.core.vo.approval.ApprovalHistoryResp;
|
||||
import com.ga.core.vo.approval.ApprovalHistorySearchParam;
|
||||
import com.ga.core.vo.approval.ApprovalHistoryVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ApprovalHistoryMapper {
|
||||
List<ApprovalHistoryResp> selectByRequest(@Param("requestId") Long requestId);
|
||||
List<ApprovalHistoryResp> selectList(ApprovalHistorySearchParam param);
|
||||
int insert(ApprovalHistoryVO vo);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ga.core.mapper.approval;
|
||||
|
||||
import com.ga.core.vo.approval.ApprovalLineResp;
|
||||
import com.ga.core.vo.approval.ApprovalLineSearchParam;
|
||||
import com.ga.core.vo.approval.ApprovalLineVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ApprovalLineMapper {
|
||||
ApprovalLineResp selectById(@Param("lineId") Long lineId);
|
||||
ApprovalLineVO selectByCode(@Param("lineCode") String lineCode);
|
||||
List<ApprovalLineResp> selectList(ApprovalLineSearchParam param);
|
||||
int insert(ApprovalLineVO vo);
|
||||
int update(ApprovalLineVO vo);
|
||||
int updateActive(@Param("lineId") Long lineId, @Param("isActive") boolean isActive);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ga.core.mapper.approval;
|
||||
|
||||
import com.ga.core.vo.approval.ApprovalLineStepResp;
|
||||
import com.ga.core.vo.approval.ApprovalLineStepSearchParam;
|
||||
import com.ga.core.vo.approval.ApprovalLineStepVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ApprovalLineStepMapper {
|
||||
ApprovalLineStepVO selectByLineAndStep(@Param("lineId") Long lineId, @Param("stepNo") int stepNo);
|
||||
List<ApprovalLineStepResp> selectByLine(@Param("lineId") Long lineId);
|
||||
List<ApprovalLineStepResp> selectList(ApprovalLineStepSearchParam param);
|
||||
int insert(ApprovalLineStepVO vo);
|
||||
int delete(@Param("stepId") Long stepId);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ga.core.mapper.approval;
|
||||
|
||||
import com.ga.core.vo.approval.ApprovalRequestResp;
|
||||
import com.ga.core.vo.approval.ApprovalRequestSearchParam;
|
||||
import com.ga.core.vo.approval.ApprovalRequestVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* approval_request Mapper — 결재 요청.
|
||||
*/
|
||||
@Mapper
|
||||
public interface ApprovalRequestMapper {
|
||||
|
||||
ApprovalRequestResp selectById(@Param("requestId") Long requestId);
|
||||
|
||||
List<ApprovalRequestResp> selectList(ApprovalRequestSearchParam param);
|
||||
|
||||
int insert(ApprovalRequestVO vo);
|
||||
|
||||
/**
|
||||
* 결재 단계 진행 — approval_history 삽입 + current_step 갱신 + 최종 상태 반영.
|
||||
* Service에서 트랜잭션으로 묶는 것이 원칙이나,
|
||||
* 핵심 단계 진행 UPDATE를 단일 메서드로 제공.
|
||||
*
|
||||
* @param requestId 결재 요청 PK
|
||||
* @param approverId 결재자 user_id
|
||||
* @param action APPROVE / REJECT / RETURN
|
||||
* @param comment 결재 코멘트
|
||||
* @return 업데이트 행 수
|
||||
*/
|
||||
int advanceStep(@Param("requestId") Long requestId,
|
||||
@Param("approverId") Long approverId,
|
||||
@Param("action") String action,
|
||||
@Param("comment") String comment);
|
||||
|
||||
int updateStatus(@Param("requestId") Long requestId, @Param("status") String status);
|
||||
|
||||
int cancel(@Param("requestId") Long requestId);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.attachment;
|
||||
|
||||
import com.ga.core.vo.attachment.AttachmentResp;
|
||||
import com.ga.core.vo.attachment.AttachmentSearchParam;
|
||||
import com.ga.core.vo.attachment.AttachmentVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AttachmentMapper {
|
||||
AttachmentResp selectById(@Param("attachmentId") Long attachmentId);
|
||||
/** ref_type + ref_id 기준 첨부 목록 — 도메인별 첨부 조회 핵심 메서드 */
|
||||
List<AttachmentResp> selectByRef(@Param("refType") String refType, @Param("refId") Long refId);
|
||||
List<AttachmentResp> selectList(AttachmentSearchParam param);
|
||||
int insert(AttachmentVO vo);
|
||||
int delete(@Param("attachmentId") Long attachmentId);
|
||||
/** ref_type + ref_id 전체 삭제 — 레코드 삭제 시 연동 */
|
||||
int deleteByRef(@Param("refType") String refType, @Param("refId") Long refId);
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.CollectionCommissionLedgerResp;
|
||||
import com.ga.core.vo.commission.CollectionCommissionLedgerSearchParam;
|
||||
import com.ga.core.vo.commission.CollectionCommissionLedgerVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* collection_commission_ledger Mapper.
|
||||
*/
|
||||
@Mapper
|
||||
public interface CollectionCommissionLedgerMapper {
|
||||
|
||||
CollectionCommissionLedgerResp selectById(@Param("ledgerId") Long ledgerId);
|
||||
|
||||
List<CollectionCommissionLedgerResp> selectList(CollectionCommissionLedgerSearchParam param);
|
||||
|
||||
/** 설계사 + 정산월 합계 — commission_master 집계 배치 용도 */
|
||||
BigDecimal sumByAgentAndMonth(@Param("agentId") Long agentId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
|
||||
int insert(CollectionCommissionLedgerVO vo);
|
||||
|
||||
int updateStatus(@Param("ledgerId") Long ledgerId, @Param("status") String status);
|
||||
|
||||
int delete(@Param("ledgerId") Long ledgerId);
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.CollectionCommissionRuleResp;
|
||||
import com.ga.core.vo.commission.CollectionCommissionRuleSearchParam;
|
||||
import com.ga.core.vo.commission.CollectionCommissionRuleVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* collection_commission_rule Mapper.
|
||||
*/
|
||||
@Mapper
|
||||
public interface CollectionCommissionRuleMapper {
|
||||
|
||||
CollectionCommissionRuleResp selectById(@Param("ruleId") Long ruleId);
|
||||
|
||||
List<CollectionCommissionRuleResp> selectList(CollectionCommissionRuleSearchParam param);
|
||||
|
||||
/**
|
||||
* 상품 + 납입주기 + 기준일 기준 유효 룰 1건 조회.
|
||||
* 수금수수료 계산 배치에서 호출.
|
||||
*/
|
||||
CollectionCommissionRuleVO selectActiveRule(@Param("productId") Long productId,
|
||||
@Param("paymentCycle") String paymentCycle,
|
||||
@Param("baseDate") LocalDate baseDate);
|
||||
|
||||
int insert(CollectionCommissionRuleVO vo);
|
||||
|
||||
int update(CollectionCommissionRuleVO vo);
|
||||
|
||||
int delete(@Param("ruleId") Long ruleId);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.CommissionMasterResp;
|
||||
import com.ga.core.vo.commission.CommissionMasterSearchParam;
|
||||
import com.ga.core.vo.commission.CommissionMasterVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* commission_master Mapper — 전 수수료 종류 통합 허브 테이블.
|
||||
*/
|
||||
@Mapper
|
||||
public interface CommissionMasterMapper {
|
||||
|
||||
CommissionMasterResp selectById(@Param("masterId") Long masterId);
|
||||
|
||||
List<CommissionMasterResp> selectList(CommissionMasterSearchParam param);
|
||||
|
||||
/**
|
||||
* 특정 설계사의 특정 정산월 전체 수수료 목록 조회.
|
||||
* 배치 완료 후 명세서 생성 시 호출.
|
||||
*/
|
||||
List<CommissionMasterResp> selectByAgentAndMonth(@Param("agentId") Long agentId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
|
||||
/**
|
||||
* 정산월 전체 수수료 집계 — 수수료 종류별 합계.
|
||||
* 배치 집계 또는 대시보드 요약 용도.
|
||||
*/
|
||||
List<CommissionMasterResp> selectAggregatedByMonth(@Param("settleMonth") String settleMonth);
|
||||
|
||||
int insert(CommissionMasterVO vo);
|
||||
|
||||
/**
|
||||
* 원본 원장 기준 UPSERT — 배치에서 원장 처리 후 commission_master 반영 시 호출.
|
||||
* (source_table + source_id + commission_type + agent_id UNIQUE 제약 기반)
|
||||
*/
|
||||
int upsertFromLedger(CommissionMasterVO vo);
|
||||
|
||||
int updateStatus(@Param("masterId") Long masterId, @Param("status") String status);
|
||||
|
||||
int delete(@Param("masterId") Long masterId);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.OverrideLedgerResp;
|
||||
import com.ga.core.vo.commission.OverrideLedgerSearchParam;
|
||||
import com.ga.core.vo.commission.OverrideLedgerVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* override_ledger Mapper — 오버라이드 상세 원장 (V44).
|
||||
*/
|
||||
@Mapper
|
||||
public interface OverrideLedgerMapper {
|
||||
OverrideLedgerResp selectById(@Param("ledgerId") Long ledgerId);
|
||||
List<OverrideLedgerResp> selectList(OverrideLedgerSearchParam param);
|
||||
int insert(OverrideLedgerVO vo);
|
||||
int updateStatus(@Param("ledgerId") Long ledgerId, @Param("status") String status);
|
||||
int delete(@Param("ledgerId") Long ledgerId);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.OverrideSummaryResp;
|
||||
import com.ga.core.vo.commission.OverrideSummarySearchParam;
|
||||
import com.ga.core.vo.commission.OverrideSummaryVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* override_summary Mapper — agent+settle_month 단위 오버라이드 합계 (V44).
|
||||
* UPSERT(agent_id, settle_month) 메서드 핵심.
|
||||
*/
|
||||
@Mapper
|
||||
public interface OverrideSummaryMapper {
|
||||
OverrideSummaryResp selectById(@Param("summaryId") Long summaryId);
|
||||
OverrideSummaryResp selectByAgentAndMonth(@Param("toAgentId") Long toAgentId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
List<OverrideSummaryResp> selectList(OverrideSummarySearchParam param);
|
||||
|
||||
/**
|
||||
* UPSERT — UNIQUE(to_agent_id, settle_month).
|
||||
* 배치 완료 후 집계 결과 반영 시 호출.
|
||||
*/
|
||||
int upsert(OverrideSummaryVO vo);
|
||||
|
||||
int updateStatus(@Param("summaryId") Long summaryId, @Param("status") String status);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.PersistencyBonusResp;
|
||||
import com.ga.core.vo.commission.PersistencyBonusSearchParam;
|
||||
import com.ga.core.vo.commission.PersistencyBonusVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* persistency_bonus Mapper.
|
||||
* UNIQUE(agent_id, base_month, retention_month) 이므로 upsert 메서드 제공.
|
||||
*/
|
||||
@Mapper
|
||||
public interface PersistencyBonusMapper {
|
||||
|
||||
PersistencyBonusResp selectById(@Param("bonusId") Long bonusId);
|
||||
|
||||
List<PersistencyBonusResp> selectList(PersistencyBonusSearchParam param);
|
||||
|
||||
/**
|
||||
* UPSERT — 동일 (agent_id, base_month, retention_month) 존재 시 금액/상태 갱신.
|
||||
* 배치 유지율 평가 후 호출.
|
||||
*/
|
||||
int upsert(PersistencyBonusVO vo);
|
||||
|
||||
int insert(PersistencyBonusVO vo);
|
||||
|
||||
int updateStatus(@Param("bonusId") Long bonusId, @Param("status") String status);
|
||||
|
||||
int delete(@Param("bonusId") Long bonusId);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.PersistencyBonusRuleResp;
|
||||
import com.ga.core.vo.commission.PersistencyBonusRuleSearchParam;
|
||||
import com.ga.core.vo.commission.PersistencyBonusRuleVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PersistencyBonusRuleMapper {
|
||||
PersistencyBonusRuleResp selectById(@Param("ruleId") Long ruleId);
|
||||
List<PersistencyBonusRuleResp> selectList(PersistencyBonusRuleSearchParam param);
|
||||
PersistencyBonusRuleVO selectActiveRule(@Param("gradeId") Long gradeId,
|
||||
@Param("retentionMonth") int retentionMonth,
|
||||
@Param("baseDate") LocalDate baseDate);
|
||||
int insert(PersistencyBonusRuleVO vo);
|
||||
int update(PersistencyBonusRuleVO vo);
|
||||
int delete(@Param("ruleId") Long ruleId);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.ReinstatementCommissionLedgerResp;
|
||||
import com.ga.core.vo.commission.ReinstatementCommissionLedgerSearchParam;
|
||||
import com.ga.core.vo.commission.ReinstatementCommissionLedgerVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ReinstatementCommissionLedgerMapper {
|
||||
ReinstatementCommissionLedgerResp selectById(@Param("ledgerId") Long ledgerId);
|
||||
List<ReinstatementCommissionLedgerResp> selectList(ReinstatementCommissionLedgerSearchParam param);
|
||||
BigDecimal sumByAgentAndMonth(@Param("agentId") Long agentId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
int insert(ReinstatementCommissionLedgerVO vo);
|
||||
int updateStatus(@Param("ledgerId") Long ledgerId, @Param("status") String status);
|
||||
int delete(@Param("ledgerId") Long ledgerId);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.ReinstatementCommissionRuleResp;
|
||||
import com.ga.core.vo.commission.ReinstatementCommissionRuleSearchParam;
|
||||
import com.ga.core.vo.commission.ReinstatementCommissionRuleVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ReinstatementCommissionRuleMapper {
|
||||
ReinstatementCommissionRuleResp selectById(@Param("ruleId") Long ruleId);
|
||||
List<ReinstatementCommissionRuleResp> selectList(ReinstatementCommissionRuleSearchParam param);
|
||||
ReinstatementCommissionRuleVO selectActiveRule(@Param("productId") Long productId,
|
||||
@Param("baseDate") LocalDate baseDate);
|
||||
int insert(ReinstatementCommissionRuleVO vo);
|
||||
int update(ReinstatementCommissionRuleVO vo);
|
||||
int delete(@Param("ruleId") Long ruleId);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.RenewalCommissionLedgerResp;
|
||||
import com.ga.core.vo.commission.RenewalCommissionLedgerSearchParam;
|
||||
import com.ga.core.vo.commission.RenewalCommissionLedgerVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface RenewalCommissionLedgerMapper {
|
||||
RenewalCommissionLedgerResp selectById(@Param("ledgerId") Long ledgerId);
|
||||
List<RenewalCommissionLedgerResp> selectList(RenewalCommissionLedgerSearchParam param);
|
||||
BigDecimal sumByAgentAndMonth(@Param("agentId") Long agentId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
int insert(RenewalCommissionLedgerVO vo);
|
||||
int updateStatus(@Param("ledgerId") Long ledgerId, @Param("status") String status);
|
||||
int delete(@Param("ledgerId") Long ledgerId);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.commission;
|
||||
|
||||
import com.ga.core.vo.commission.RenewalCommissionRuleResp;
|
||||
import com.ga.core.vo.commission.RenewalCommissionRuleSearchParam;
|
||||
import com.ga.core.vo.commission.RenewalCommissionRuleVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface RenewalCommissionRuleMapper {
|
||||
RenewalCommissionRuleResp selectById(@Param("ruleId") Long ruleId);
|
||||
List<RenewalCommissionRuleResp> selectList(RenewalCommissionRuleSearchParam param);
|
||||
RenewalCommissionRuleVO selectActiveRule(@Param("productId") Long productId,
|
||||
@Param("baseDate") LocalDate baseDate);
|
||||
int insert(RenewalCommissionRuleVO vo);
|
||||
int update(RenewalCommissionRuleVO vo);
|
||||
int delete(@Param("ruleId") Long ruleId);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ga.core.mapper.complaint;
|
||||
|
||||
import com.ga.core.vo.complaint.ComplaintResp;
|
||||
import com.ga.core.vo.complaint.ComplaintSearchParam;
|
||||
import com.ga.core.vo.complaint.ComplaintVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ComplaintMapper {
|
||||
ComplaintResp selectById(@Param("complaintId") Long complaintId);
|
||||
List<ComplaintResp> selectList(ComplaintSearchParam param);
|
||||
/** 환수 트리거 미처리 민원 (chargebackTriggered=true, status != CLOSED) */
|
||||
List<ComplaintVO> selectPendingChargeback();
|
||||
int insert(ComplaintVO vo);
|
||||
int update(ComplaintVO vo);
|
||||
int updateStatus(@Param("complaintId") Long complaintId, @Param("status") String status,
|
||||
@Param("resolution") String resolution);
|
||||
int delete(@Param("complaintId") Long complaintId);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ga.core.mapper.contract;
|
||||
|
||||
import com.ga.core.vo.contract.AgentContractResp;
|
||||
import com.ga.core.vo.contract.AgentContractSearchParam;
|
||||
import com.ga.core.vo.contract.AgentContractVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AgentContractMapper {
|
||||
AgentContractResp selectById(@Param("contractId") Long contractId);
|
||||
List<AgentContractResp> selectList(AgentContractSearchParam param);
|
||||
int insert(AgentContractVO vo);
|
||||
int update(AgentContractVO vo);
|
||||
int updateStatus(@Param("contractId") Long contractId, @Param("status") String status,
|
||||
@Param("terminatedReason") String terminatedReason);
|
||||
int delete(@Param("contractId") Long contractId);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ga.core.mapper.endorse;
|
||||
|
||||
import com.ga.core.vo.endorse.ContractEndorsementResp;
|
||||
import com.ga.core.vo.endorse.ContractEndorsementSearchParam;
|
||||
import com.ga.core.vo.endorse.ContractEndorsementVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ContractEndorsementMapper {
|
||||
ContractEndorsementResp selectById(@Param("endorsementId") Long endorsementId);
|
||||
List<ContractEndorsementResp> selectList(ContractEndorsementSearchParam param);
|
||||
/** 재계산 미처리 건 목록 — 배치 수수료 재계산 대상 조회 */
|
||||
List<ContractEndorsementVO> selectPendingRecalc();
|
||||
int insert(ContractEndorsementVO vo);
|
||||
int markProcessed(@Param("endorsementId") Long endorsementId);
|
||||
int delete(@Param("endorsementId") Long endorsementId);
|
||||
}
|
||||
@@ -31,4 +31,7 @@ public interface InstallmentPlanMapper {
|
||||
int update(InstallmentPlanVO vo);
|
||||
|
||||
int updateStatus(@Param("planId") Long planId, @Param("status") String status);
|
||||
|
||||
/** 계약 삭제 시 연관 분급 계획 일괄 삭제 */
|
||||
int deleteByContract(@Param("contractId") Long contractId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ga.core.mapper.kpi;
|
||||
|
||||
import com.ga.core.vo.kpi.KpiCumulativeResp;
|
||||
import com.ga.core.vo.kpi.KpiMonthlySummaryResp;
|
||||
import com.ga.core.vo.kpi.KpiOrgSummaryResp;
|
||||
import com.ga.core.vo.kpi.KpiRetentionResp;
|
||||
import com.ga.core.vo.kpi.KpiSearchParam;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* KPI 대시보드 Mapper — V37 Materialized View 4종 단일 인터페이스.
|
||||
* 모든 MV는 읽기 전용 (INSERT/UPDATE 없음).
|
||||
* REFRESH는 ga-batch가 야간 배치로 REFRESH MATERIALIZED VIEW CONCURRENTLY 호출.
|
||||
*/
|
||||
@Mapper
|
||||
public interface KpiMapper {
|
||||
|
||||
/**
|
||||
* 월별 정산 요약 (mv_monthly_summary).
|
||||
* 정산년월 범위 필터. yyyymmFrom/yyyymmTo 미지정 시 전체.
|
||||
*/
|
||||
List<KpiMonthlySummaryResp> selectMonthlySummary(KpiSearchParam param);
|
||||
|
||||
/**
|
||||
* 조직별 월별 요약 (mv_org_summary).
|
||||
* orgId 필터 가능, 정산년월 범위 필터 가능.
|
||||
*/
|
||||
List<KpiOrgSummaryResp> selectOrgSummary(KpiSearchParam param);
|
||||
|
||||
/**
|
||||
* 계약 유지율 (mv_retention).
|
||||
* carrierId 필터 가능, contractMonth 범위 필터 가능.
|
||||
*/
|
||||
List<KpiRetentionResp> selectRetention(KpiSearchParam param);
|
||||
|
||||
/**
|
||||
* 설계사/조직 누계 (mv_cumulative).
|
||||
* levelType(AGENT/ORG), orgId, agentId 필터 가능.
|
||||
*/
|
||||
List<KpiCumulativeResp> selectCumulative(KpiSearchParam param);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ga.core.mapper.license;
|
||||
|
||||
import com.ga.core.vo.license.AgentLicenseResp;
|
||||
import com.ga.core.vo.license.AgentLicenseSearchParam;
|
||||
import com.ga.core.vo.license.AgentLicenseVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* agent_license Mapper.
|
||||
*/
|
||||
@Mapper
|
||||
public interface AgentLicenseMapper {
|
||||
|
||||
AgentLicenseResp selectById(@Param("licenseId") Long licenseId);
|
||||
|
||||
List<AgentLicenseResp> selectList(AgentLicenseSearchParam param);
|
||||
|
||||
/**
|
||||
* 만료 임박 자격증 목록 조회 — 오늘부터 N일 이내 만료되는 ACTIVE 자격증.
|
||||
* 만료 알림 스케줄러에서 호출.
|
||||
*/
|
||||
List<AgentLicenseResp> selectExpiringWithin(@Param("days") int days);
|
||||
|
||||
int insert(AgentLicenseVO vo);
|
||||
|
||||
int update(AgentLicenseVO vo);
|
||||
|
||||
int updateStatus(@Param("licenseId") Long licenseId, @Param("status") String status);
|
||||
|
||||
int delete(@Param("licenseId") Long licenseId);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.mapper.notice;
|
||||
|
||||
import com.ga.core.vo.notice.NoticeResp;
|
||||
import com.ga.core.vo.notice.NoticeSearchParam;
|
||||
import com.ga.core.vo.notice.NoticeVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface NoticeMapper {
|
||||
NoticeResp selectById(@Param("noticeId") Long noticeId);
|
||||
List<NoticeResp> selectList(NoticeSearchParam param);
|
||||
/** 오늘 기준 유효한 공지 목록 (start_date <= today <= end_date OR end_date IS NULL) */
|
||||
List<NoticeResp> selectActive();
|
||||
int insert(NoticeVO vo);
|
||||
int update(NoticeVO vo);
|
||||
int updateActive(@Param("noticeId") Long noticeId, @Param("isActive") boolean isActive);
|
||||
int delete(@Param("noticeId") Long noticeId);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ga.core.mapper.notice;
|
||||
|
||||
import com.ga.core.vo.notice.UserNotificationResp;
|
||||
import com.ga.core.vo.notice.UserNotificationSearchParam;
|
||||
import com.ga.core.vo.notice.UserNotificationVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* user_notification Mapper.
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserNotificationMapper {
|
||||
|
||||
UserNotificationResp selectById(@Param("notificationId") Long notificationId);
|
||||
|
||||
List<UserNotificationResp> selectList(UserNotificationSearchParam param);
|
||||
|
||||
/**
|
||||
* 읽지 않은 알림 수 조회 — 상단 알림 벨 카운트 용도.
|
||||
*/
|
||||
int selectUnreadCount(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 단건 읽음 처리.
|
||||
* user_id 검증 포함 (타인 알림 접근 방지).
|
||||
*/
|
||||
int markRead(@Param("notificationId") Long notificationId, @Param("userId") Long userId);
|
||||
|
||||
/** 사용자 전체 읽음 처리 */
|
||||
int markAllRead(@Param("userId") Long userId);
|
||||
|
||||
int insert(UserNotificationVO vo);
|
||||
|
||||
int delete(@Param("notificationId") Long notificationId);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.CarrierReconciliationOutResp;
|
||||
import com.ga.core.vo.settle.CarrierReconciliationOutSearchParam;
|
||||
import com.ga.core.vo.settle.CarrierReconciliationOutVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 보험사 회신 인터페이스 (아웃바운드) Mapper
|
||||
* carrier_reconciliation_out 테이블 CRUD + 상태 관리.
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarrierReconciliationOutMapper {
|
||||
|
||||
/** 전송 이력 목록 조회 (페이징) */
|
||||
List<CarrierReconciliationOutResp> selectList(CarrierReconciliationOutSearchParam param);
|
||||
|
||||
/** 전송 이력 단건 조회 (응답 조인 포함) */
|
||||
CarrierReconciliationOutResp selectById(@Param("reconOutId") Long reconOutId);
|
||||
|
||||
/** 전송 이력 단건 조회 (VO, 배치 처리용) */
|
||||
CarrierReconciliationOutVO selectVoById(@Param("reconOutId") Long reconOutId);
|
||||
|
||||
/** 보험사 + 정산월 기준 조회 (UNIQUE KEY) */
|
||||
CarrierReconciliationOutVO selectByCarrierMonth(@Param("carrierId") Long carrierId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
|
||||
/** 전송 이력 등록 */
|
||||
int insert(CarrierReconciliationOutVO vo);
|
||||
|
||||
/** 상태 변경 (SENT/ACK/FAIL) */
|
||||
int updateStatus(@Param("reconOutId") Long reconOutId,
|
||||
@Param("status") String status);
|
||||
|
||||
/** 전송 완료 처리 (sentAt 기록) */
|
||||
int markSent(@Param("reconOutId") Long reconOutId);
|
||||
|
||||
/** 수신 확인 처리 (ackAt + ackMessage 기록) */
|
||||
int markAck(@Param("reconOutId") Long reconOutId,
|
||||
@Param("ackMessage") String ackMessage);
|
||||
|
||||
/** 실패 처리 (failReason + retryCount 증가) */
|
||||
int markFail(@Param("reconOutId") Long reconOutId,
|
||||
@Param("failReason") String failReason);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.CommissionDisputeResp;
|
||||
import com.ga.core.vo.settle.CommissionDisputeSearchParam;
|
||||
import com.ga.core.vo.settle.CommissionDisputeVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 수수료 이의신청 Mapper
|
||||
* commission_dispute 테이블 CRUD + 상태 변경.
|
||||
*/
|
||||
@Mapper
|
||||
public interface CommissionDisputeMapper {
|
||||
|
||||
/** 이의신청 목록 조회 (페이징) */
|
||||
List<CommissionDisputeResp> selectList(CommissionDisputeSearchParam param);
|
||||
|
||||
/** 이의신청 단건 조회 (응답 조인 포함) */
|
||||
CommissionDisputeResp selectById(@Param("disputeId") Long disputeId);
|
||||
|
||||
/** 이의신청 단건 조회 (VO, 도메인 로직용) */
|
||||
CommissionDisputeVO selectVoById(@Param("disputeId") Long disputeId);
|
||||
|
||||
/** 이의신청 등록 */
|
||||
int insert(CommissionDisputeVO vo);
|
||||
|
||||
/** 검토 시작 (IN_REVIEW 상태 전환) */
|
||||
int startReview(@Param("disputeId") Long disputeId,
|
||||
@Param("reviewerId") Long reviewerId);
|
||||
|
||||
/** 이의신청 처리 결과 등록 (APPROVED/REJECTED) */
|
||||
int resolve(@Param("disputeId") Long disputeId,
|
||||
@Param("status") String status,
|
||||
@Param("resolution") String resolution,
|
||||
@Param("adjustmentAmount") BigDecimal adjustmentAmount,
|
||||
@Param("correctionId") Long correctionId,
|
||||
@Param("resolvedBy") Long resolvedBy);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.IncentivePaymentResp;
|
||||
import com.ga.core.vo.settle.IncentivePaymentSearchParam;
|
||||
import com.ga.core.vo.settle.IncentivePaymentVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 시책 지급 이력 Mapper
|
||||
* incentive_payment 테이블 CRUD + 상태 관리.
|
||||
*/
|
||||
@Mapper
|
||||
public interface IncentivePaymentMapper {
|
||||
|
||||
/** 시책 지급 목록 조회 (페이징) */
|
||||
List<IncentivePaymentResp> selectList(IncentivePaymentSearchParam param);
|
||||
|
||||
/** 시책 지급 단건 조회 (응답 조인 포함) */
|
||||
IncentivePaymentResp selectById(@Param("incentivePayId") Long incentivePayId);
|
||||
|
||||
/** 시책 지급 단건 조회 (VO, 상태 관리용) */
|
||||
IncentivePaymentVO selectVoById(@Param("incentivePayId") Long incentivePayId);
|
||||
|
||||
/** 설계사의 특정 정산월 시책 지급 합계 (배치 집계용) */
|
||||
BigDecimal sumByAgentMonth(@Param("agentId") Long agentId,
|
||||
@Param("settleMonth") String settleMonth);
|
||||
|
||||
/** 시책 지급 등록 (ON CONFLICT: program_id + agent_id + settle_month) */
|
||||
int insert(IncentivePaymentVO vo);
|
||||
|
||||
/** 상태 변경 (CONFIRMED/PAID/CANCELLED) */
|
||||
int updateStatus(@Param("incentivePayId") Long incentivePayId,
|
||||
@Param("status") String status,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
/** 정산 반영 (settle_id 연결) */
|
||||
int linkSettle(@Param("incentivePayId") Long incentivePayId,
|
||||
@Param("settleId") Long settleId);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.IncentiveProgramResp;
|
||||
import com.ga.core.vo.settle.IncentiveProgramSearchParam;
|
||||
import com.ga.core.vo.settle.IncentiveProgramVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 시책 프로그램 마스터 Mapper
|
||||
* incentive_program 테이블 CRUD.
|
||||
*/
|
||||
@Mapper
|
||||
public interface IncentiveProgramMapper {
|
||||
|
||||
/** 시책 프로그램 목록 조회 (페이징) */
|
||||
List<IncentiveProgramResp> selectList(IncentiveProgramSearchParam param);
|
||||
|
||||
/** 시책 단건 조회 (응답 조인 포함) */
|
||||
IncentiveProgramResp selectById(@Param("programId") Long programId);
|
||||
|
||||
/** 시책 단건 조회 (VO, 배치 계산용) */
|
||||
IncentiveProgramVO selectVoById(@Param("programId") Long programId);
|
||||
|
||||
/**
|
||||
* 특정 정산월에 활성화된 시책 목록 조회.
|
||||
* start_month <= settleMonth <= end_month AND is_active = TRUE.
|
||||
*/
|
||||
List<IncentiveProgramVO> selectActiveByMonth(@Param("settleMonth") String settleMonth);
|
||||
|
||||
/** 시책 등록 */
|
||||
int insert(IncentiveProgramVO vo);
|
||||
|
||||
/** 시책 수정 */
|
||||
int update(IncentiveProgramVO vo);
|
||||
|
||||
/** 시책 활성/비활성 전환 */
|
||||
int updateActive(@Param("programId") Long programId,
|
||||
@Param("isActive") Boolean isActive,
|
||||
@Param("updatedBy") Long updatedBy);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.PeriodCloseResp;
|
||||
import com.ga.core.vo.settle.PeriodCloseSearchParam;
|
||||
import com.ga.core.vo.settle.PeriodCloseVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 정산 마감 마스터 Mapper
|
||||
* period_close 테이블 CRUD + 마감 상태 조회.
|
||||
*/
|
||||
@Mapper
|
||||
public interface PeriodCloseMapper {
|
||||
|
||||
/** 마감 이력 목록 조회 (페이징) */
|
||||
List<PeriodCloseResp> selectList(PeriodCloseSearchParam param);
|
||||
|
||||
/** 마감 단건 조회 (close_id) */
|
||||
PeriodCloseResp selectById(@Param("closeId") Long closeId);
|
||||
|
||||
/** 마감 단건 조회 (close_month) */
|
||||
PeriodCloseVO selectByMonth(@Param("closeMonth") String closeMonth);
|
||||
|
||||
/**
|
||||
* 해당 월이 현재 마감 상태인지 확인.
|
||||
* reopen_at IS NULL 인 레코드가 있으면 마감 중.
|
||||
* @return 마감 중이면 true
|
||||
*/
|
||||
boolean isClosedMonth(@Param("closeMonth") String closeMonth);
|
||||
|
||||
/** 마감 등록 */
|
||||
int insert(PeriodCloseVO vo);
|
||||
|
||||
/** 재오픈 처리 (reopen_at, reopen_by, reopen_reason 업데이트) */
|
||||
int reopen(@Param("closeId") Long closeId,
|
||||
@Param("reopenBy") Long reopenBy,
|
||||
@Param("reopenReason") String reopenReason);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.SettleCorrectionResp;
|
||||
import com.ga.core.vo.settle.SettleCorrectionSearchParam;
|
||||
import com.ga.core.vo.settle.SettleCorrectionVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 정산 정정 이력 Mapper
|
||||
* settle_correction 테이블 CRUD + 상태 변경.
|
||||
*/
|
||||
@Mapper
|
||||
public interface SettleCorrectionMapper {
|
||||
|
||||
/** 정정 목록 조회 (페이징) */
|
||||
List<SettleCorrectionResp> selectList(SettleCorrectionSearchParam param);
|
||||
|
||||
/** 정정 단건 조회 (응답 조인 포함) */
|
||||
SettleCorrectionResp selectById(@Param("correctionId") Long correctionId);
|
||||
|
||||
/** 정정 단건 조회 (VO, 도메인 로직용) */
|
||||
SettleCorrectionVO selectVoById(@Param("correctionId") Long correctionId);
|
||||
|
||||
/** 원본 정산 기준 정정 목록 */
|
||||
List<SettleCorrectionResp> selectByOriginalSettleId(@Param("originalSettleId") Long originalSettleId);
|
||||
|
||||
/** 정정 등록 */
|
||||
int insert(SettleCorrectionVO vo);
|
||||
|
||||
/** 상태 변경 (APPROVED/APPLIED/CANCELLED) */
|
||||
int updateStatus(@Param("correctionId") Long correctionId,
|
||||
@Param("status") String status,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
/** 정정 취소 */
|
||||
int cancel(@Param("correctionId") Long correctionId,
|
||||
@Param("cancelReason") String cancelReason,
|
||||
@Param("cancelledBy") Long cancelledBy);
|
||||
}
|
||||
@@ -25,7 +25,8 @@ public interface SettleMasterMapper {
|
||||
@Param("status") String status,
|
||||
@Param("userId") Long userId);
|
||||
int updateHold(@Param("settleId") Long settleId,
|
||||
@Param("reason") String reason);
|
||||
@Param("reason") String reason,
|
||||
@Param("reasonCode") String reasonCode);
|
||||
|
||||
/** 월 요약 (전체) */
|
||||
Map<String, Object> selectMonthSummary(@Param("settleMonth") String settleMonth);
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.TaxInvoiceResp;
|
||||
import com.ga.core.vo.settle.TaxInvoiceSearchParam;
|
||||
import com.ga.core.vo.settle.TaxInvoiceVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 세금계산서 발행 이력 Mapper
|
||||
* tax_invoice 테이블 CRUD + 취소 처리.
|
||||
*/
|
||||
@Mapper
|
||||
public interface TaxInvoiceMapper {
|
||||
|
||||
/** 세금계산서 목록 조회 (페이징) */
|
||||
List<TaxInvoiceResp> selectList(TaxInvoiceSearchParam param);
|
||||
|
||||
/** 세금계산서 단건 조회 (응답 조인 포함) */
|
||||
TaxInvoiceResp selectById(@Param("invoiceId") Long invoiceId);
|
||||
|
||||
/** 세금계산서 단건 조회 (발행 번호) */
|
||||
TaxInvoiceVO selectByInvoiceNo(@Param("invoiceNo") String invoiceNo);
|
||||
|
||||
/**
|
||||
* 정산월별 매출세금계산서 합계금액 조회.
|
||||
* 부가세 정산 집계 시 사용.
|
||||
*/
|
||||
BigDecimal sumSupplyAmountByMonth(@Param("settleMonth") String settleMonth,
|
||||
@Param("invoiceType") String invoiceType);
|
||||
|
||||
/** 세금계산서 발행 등록 */
|
||||
int insert(TaxInvoiceVO vo);
|
||||
|
||||
/** 세금계산서 취소 처리 */
|
||||
int cancel(@Param("invoiceId") Long invoiceId,
|
||||
@Param("cancelDate") LocalDate cancelDate,
|
||||
@Param("cancelReason") String cancelReason);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ga.core.mapper.settle;
|
||||
|
||||
import com.ga.core.vo.settle.TerminationSettlementResp;
|
||||
import com.ga.core.vo.settle.TerminationSettlementSearchParam;
|
||||
import com.ga.core.vo.settle.TerminationSettlementVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 해촉 정산 Mapper
|
||||
* termination_settlement 테이블 CRUD + 상태 변경.
|
||||
*/
|
||||
@Mapper
|
||||
public interface TerminationSettlementMapper {
|
||||
|
||||
/** 해촉 정산 목록 조회 (페이징) */
|
||||
List<TerminationSettlementResp> selectList(TerminationSettlementSearchParam param);
|
||||
|
||||
/** 해촉 정산 단건 조회 (응답 조인 포함) */
|
||||
TerminationSettlementResp selectById(@Param("termSettleId") Long termSettleId);
|
||||
|
||||
/** 해촉 정산 단건 조회 (VO, 도메인 로직용) */
|
||||
TerminationSettlementVO selectVoById(@Param("termSettleId") Long termSettleId);
|
||||
|
||||
/** 설계사별 해촉 정산 조회 */
|
||||
TerminationSettlementVO selectByAgent(@Param("agentId") Long agentId);
|
||||
|
||||
/** 해촉 정산 등록 */
|
||||
int insert(TerminationSettlementVO vo);
|
||||
|
||||
/** 해촉 정산 수정 (금액 산출 후 업데이트) */
|
||||
int update(TerminationSettlementVO vo);
|
||||
|
||||
/** 상태 변경 (CONFIRMED/PAID/CANCELLED) */
|
||||
int updateStatus(@Param("termSettleId") Long termSettleId,
|
||||
@Param("status") String status,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
/** 지급 처리 완료 (payment_id 연결) */
|
||||
int linkPayment(@Param("termSettleId") Long termSettleId,
|
||||
@Param("paymentId") Long paymentId);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ga.core.mapper.training;
|
||||
|
||||
import com.ga.core.vo.training.AgentTrainingResp;
|
||||
import com.ga.core.vo.training.AgentTrainingSearchParam;
|
||||
import com.ga.core.vo.training.AgentTrainingVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* agent_training Mapper.
|
||||
*/
|
||||
@Mapper
|
||||
public interface AgentTrainingMapper {
|
||||
|
||||
AgentTrainingResp selectById(@Param("trainingId") Long trainingId);
|
||||
|
||||
List<AgentTrainingResp> selectList(AgentTrainingSearchParam param);
|
||||
|
||||
/**
|
||||
* 설계사 + 연도 기준 연간 이수 시간 합계.
|
||||
* 의무 12시간 충족 여부 검사 시 호출.
|
||||
*/
|
||||
BigDecimal selectAnnualHoursByAgent(@Param("agentId") Long agentId,
|
||||
@Param("year") int year);
|
||||
|
||||
int insert(AgentTrainingVO vo);
|
||||
|
||||
int update(AgentTrainingVO vo);
|
||||
|
||||
int delete(@Param("trainingId") Long trainingId);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ga.core.mapper.training;
|
||||
|
||||
import com.ga.core.vo.training.TrainingRequirementResp;
|
||||
import com.ga.core.vo.training.TrainingRequirementSearchParam;
|
||||
import com.ga.core.vo.training.TrainingRequirementVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TrainingRequirementMapper {
|
||||
TrainingRequirementResp selectByYear(@Param("targetYear") int targetYear);
|
||||
List<TrainingRequirementResp> selectList(TrainingRequirementSearchParam param);
|
||||
int insert(TrainingRequirementVO vo);
|
||||
int update(TrainingRequirementVO vo);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ga.core.mapper.withdraw;
|
||||
|
||||
import com.ga.core.vo.withdraw.WithdrawRequestResp;
|
||||
import com.ga.core.vo.withdraw.WithdrawRequestSearchParam;
|
||||
import com.ga.core.vo.withdraw.WithdrawRequestVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface WithdrawRequestMapper {
|
||||
WithdrawRequestResp selectById(@Param("requestId") Long requestId);
|
||||
/** account_no 복호화 포함 — 펌뱅킹 송신 배치 전용 */
|
||||
WithdrawRequestVO selectVOById(@Param("requestId") Long requestId);
|
||||
List<WithdrawRequestResp> selectList(WithdrawRequestSearchParam param);
|
||||
int insert(WithdrawRequestVO vo);
|
||||
int updateStatus(@Param("requestId") Long requestId, @Param("status") String status,
|
||||
@Param("failReason") String failReason);
|
||||
int markSent(@Param("requestId") Long requestId);
|
||||
int markCompleted(@Param("requestId") Long requestId);
|
||||
int cancel(@Param("requestId") Long requestId);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 결재 액션 (V50 approval_history.action)
|
||||
*/
|
||||
public enum ApprovalAction {
|
||||
APPROVE("승인"),
|
||||
REJECT("반려"),
|
||||
RETURN("반송");
|
||||
|
||||
private final String label;
|
||||
|
||||
ApprovalAction(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ApprovalHistoryResp {
|
||||
private Long historyId;
|
||||
private Long requestId;
|
||||
private Integer stepNo;
|
||||
private Long approverId;
|
||||
private String approverName;
|
||||
private String action;
|
||||
private String actionName;
|
||||
private String comment;
|
||||
private LocalDateTime processedAt;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApprovalHistorySaveReq {
|
||||
@NotNull
|
||||
private Long requestId;
|
||||
@NotNull
|
||||
private Integer stepNo;
|
||||
@NotNull
|
||||
private Long approverId;
|
||||
@NotBlank
|
||||
private String action;
|
||||
private String comment;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApprovalHistorySearchParam extends SearchParam {
|
||||
private Long requestId;
|
||||
private Long approverId;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* approval_history — 결재 처리 이력 (V50)
|
||||
*/
|
||||
@Data
|
||||
public class ApprovalHistoryVO {
|
||||
private Long historyId;
|
||||
private Long requestId;
|
||||
private Integer stepNo;
|
||||
private Long approverId;
|
||||
/** ApprovalAction: APPROVE/REJECT/RETURN */
|
||||
private String action;
|
||||
private String comment;
|
||||
private LocalDateTime processedAt;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ApprovalLineResp {
|
||||
private Long lineId;
|
||||
private String lineCode;
|
||||
private String lineName;
|
||||
private Integer maxStep;
|
||||
private String targetType;
|
||||
private Boolean isActive;
|
||||
/** 결재선 단계 목록 (1:N) */
|
||||
private List<ApprovalLineStepVO> steps;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApprovalLineSaveReq {
|
||||
@NotBlank
|
||||
private String lineCode;
|
||||
@NotBlank
|
||||
private String lineName;
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(5)
|
||||
private Integer maxStep;
|
||||
@NotBlank
|
||||
private String targetType;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApprovalLineSearchParam extends SearchParam {
|
||||
private String targetType;
|
||||
private Boolean isActive;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApprovalLineStepResp {
|
||||
private Long stepId;
|
||||
private Long lineId;
|
||||
private String lineCode;
|
||||
private Integer stepNo;
|
||||
private String roleCode;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApprovalLineStepSaveReq {
|
||||
@NotNull
|
||||
private Long lineId;
|
||||
@NotNull
|
||||
@Min(1)
|
||||
private Integer stepNo;
|
||||
@NotBlank
|
||||
private String roleCode;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApprovalLineStepSearchParam extends SearchParam {
|
||||
private Long lineId;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* approval_line_step — 결재선 단계별 역할 정의 (V50)
|
||||
*/
|
||||
@Data
|
||||
public class ApprovalLineStepVO {
|
||||
private Long stepId;
|
||||
private Long lineId;
|
||||
private Integer stepNo;
|
||||
private String roleCode;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* approval_line — 결재선 마스터 (V50)
|
||||
*/
|
||||
@Data
|
||||
public class ApprovalLineVO {
|
||||
private Long lineId;
|
||||
private String lineCode;
|
||||
private String lineName;
|
||||
private Integer maxStep;
|
||||
/** SETTLE/DISPUTE/INCENTIVE/WITHDRAW/COMPLAINT */
|
||||
private String targetType;
|
||||
private Boolean isActive;
|
||||
private LocalDateTime createdAt;
|
||||
private Long createdBy;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ApprovalRequestResp {
|
||||
private Long requestId;
|
||||
private String targetType;
|
||||
private Long targetId;
|
||||
private Long lineId;
|
||||
private String lineCode;
|
||||
private String lineName;
|
||||
private Long requestedBy;
|
||||
private LocalDateTime requestedAt;
|
||||
private Integer currentStep;
|
||||
private Integer maxStep;
|
||||
private String status;
|
||||
private String statusName;
|
||||
private LocalDateTime completedAt;
|
||||
/** 결재 이력 목록 (1:N) */
|
||||
private List<ApprovalHistoryVO> histories;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApprovalRequestSaveReq {
|
||||
@NotBlank
|
||||
private String targetType;
|
||||
@NotNull
|
||||
private Long targetId;
|
||||
@NotNull
|
||||
private Long lineId;
|
||||
@NotNull
|
||||
private Long requestedBy;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApprovalRequestSearchParam extends SearchParam {
|
||||
private String targetType;
|
||||
private Long requestedBy;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* approval_request — 결재 요청 (V50)
|
||||
*/
|
||||
@Data
|
||||
public class ApprovalRequestVO {
|
||||
private Long requestId;
|
||||
/** SETTLE/DISPUTE/INCENTIVE/WITHDRAW/COMPLAINT */
|
||||
private String targetType;
|
||||
/** 결재 대상 레코드 PK */
|
||||
private Long targetId;
|
||||
private Long lineId;
|
||||
private Long requestedBy;
|
||||
private LocalDateTime requestedAt;
|
||||
private Integer currentStep;
|
||||
/** ApprovalStatus: PENDING/APPROVED/REJECTED/CANCEL */
|
||||
private String status;
|
||||
private LocalDateTime completedAt;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ga.core.vo.approval;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 결재 요청 상태 (V50 approval_request.status)
|
||||
*/
|
||||
public enum ApprovalStatus {
|
||||
PENDING("진행중"),
|
||||
APPROVED("최종승인"),
|
||||
REJECTED("반려"),
|
||||
CANCEL("취소");
|
||||
|
||||
private final String label;
|
||||
|
||||
ApprovalStatus(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ga.core.vo.attachment;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 첨부파일 참조 도메인 유형 (V52 attachment.ref_type)
|
||||
*/
|
||||
public enum AttachmentRefType {
|
||||
AGENT_CONTRACT("위촉계약"),
|
||||
COMPLAINT("민원"),
|
||||
APPROVAL_REQUEST("결재요청"),
|
||||
WITHDRAW_REQUEST("출금신청"),
|
||||
NOTICE("공지사항"),
|
||||
DISPUTE("이의신청"),
|
||||
INCENTIVE("시책"),
|
||||
AGENT_LICENSE("자격증"),
|
||||
AGENT_TRAINING("보수교육");
|
||||
|
||||
private final String label;
|
||||
|
||||
AttachmentRefType(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ga.core.vo.attachment;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class AttachmentResp {
|
||||
private Long attachmentId;
|
||||
private String refType;
|
||||
private Long refId;
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
private Long fileSize;
|
||||
private String mimeType;
|
||||
private Long uploadedBy;
|
||||
private String uploaderName;
|
||||
private LocalDateTime uploadedAt;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ga.core.vo.attachment;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AttachmentSaveReq {
|
||||
@NotBlank
|
||||
private String refType;
|
||||
@NotNull
|
||||
private Long refId;
|
||||
@NotBlank
|
||||
private String fileName;
|
||||
@NotBlank
|
||||
private String filePath;
|
||||
@NotNull
|
||||
@Positive
|
||||
private Long fileSize;
|
||||
private String mimeType;
|
||||
@NotNull
|
||||
private Long uploadedBy;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ga.core.vo.attachment;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AttachmentSearchParam extends SearchParam {
|
||||
private String refType;
|
||||
private Long refId;
|
||||
private Long uploadedBy;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ga.core.vo.attachment;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* attachment — 공통 첨부파일 (V52)
|
||||
* ref_type + ref_id 조합으로 모든 도메인에 첨부 연결.
|
||||
* 파일 실체는 스토리지(로컬/S3). file_path에 경로 저장.
|
||||
*/
|
||||
@Data
|
||||
public class AttachmentVO {
|
||||
private Long attachmentId;
|
||||
/** AttachmentRefType */
|
||||
private String refType;
|
||||
/** 첨부 대상 레코드 PK */
|
||||
private Long refId;
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
/** 파일 크기 (bytes) */
|
||||
private Long fileSize;
|
||||
private String mimeType;
|
||||
private Long uploadedBy;
|
||||
private LocalDateTime uploadedAt;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 유지보수수당 지급 방식 (V43 persistency_bonus_rule.bonus_type)
|
||||
*/
|
||||
public enum BonusType {
|
||||
RATE("모집수수료 대비 비율"),
|
||||
FIXED("건당 고정금액");
|
||||
|
||||
private final String label;
|
||||
|
||||
BonusType(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* collection_commission_ledger 조회 응답 — 조인 필드(agentName, contractNo 등) 포함.
|
||||
*/
|
||||
@Data
|
||||
public class CollectionCommissionLedgerResp {
|
||||
private Long ledgerId;
|
||||
private Long contractId;
|
||||
private String policyNo;
|
||||
private Long agentId;
|
||||
private String agentName;
|
||||
private String orgName;
|
||||
private String settleMonth;
|
||||
private BigDecimal premiumAmount;
|
||||
private BigDecimal commissionRate;
|
||||
private BigDecimal commissionAmount;
|
||||
private String paymentCycle;
|
||||
private String paymentCycleName;
|
||||
private LocalDate paidAt;
|
||||
private String status;
|
||||
private String statusName;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class CollectionCommissionLedgerSaveReq {
|
||||
@NotNull
|
||||
private Long contractId;
|
||||
|
||||
@NotNull
|
||||
private Long agentId;
|
||||
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
|
||||
@NotNull
|
||||
@Positive
|
||||
private BigDecimal premiumAmount;
|
||||
|
||||
@NotNull
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
@NotBlank
|
||||
private String paymentCycle;
|
||||
|
||||
@NotNull
|
||||
private LocalDate paidAt;
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CollectionCommissionLedgerSearchParam extends SearchParam {
|
||||
private Long agentId;
|
||||
private Long contractId;
|
||||
private String settleMonth;
|
||||
private String paymentCycle;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* collection_commission_ledger — 수금수수료 원장 (V41)
|
||||
*/
|
||||
@Data
|
||||
public class CollectionCommissionLedgerVO {
|
||||
private Long ledgerId;
|
||||
private Long contractId;
|
||||
private Long agentId;
|
||||
private String settleMonth;
|
||||
private BigDecimal premiumAmount;
|
||||
private BigDecimal commissionRate;
|
||||
private BigDecimal commissionAmount;
|
||||
/** PaymentCycle */
|
||||
private String paymentCycle;
|
||||
private LocalDate paidAt;
|
||||
/** CALCULATED / CONFIRMED / PAID / CANCELLED */
|
||||
private String status;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* collection_commission_rule 조회 응답 — 상품명 조인 포함.
|
||||
*/
|
||||
@Data
|
||||
public class CollectionCommissionRuleResp {
|
||||
private Long ruleId;
|
||||
private Long productId;
|
||||
private String productName;
|
||||
private String paymentCycle;
|
||||
private String paymentCycleName;
|
||||
private BigDecimal commissionRate;
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* collection_commission_rule 등록/수정 요청.
|
||||
*/
|
||||
@Data
|
||||
public class CollectionCommissionRuleSaveReq {
|
||||
@NotNull
|
||||
private Long productId;
|
||||
|
||||
@NotBlank
|
||||
private String paymentCycle;
|
||||
|
||||
@NotNull
|
||||
@DecimalMin("0")
|
||||
@DecimalMax("1")
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
@NotNull
|
||||
private LocalDate effectiveFrom;
|
||||
|
||||
private LocalDate effectiveTo;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CollectionCommissionRuleSearchParam extends SearchParam {
|
||||
private Long productId;
|
||||
private String paymentCycle;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* collection_commission_rule — 납입주기별 수금수수료율 마스터 (V41)
|
||||
*/
|
||||
@Data
|
||||
public class CollectionCommissionRuleVO {
|
||||
private Long ruleId;
|
||||
private Long productId;
|
||||
/** PaymentCycle: MONTHLY/QUARTERLY/SEMI/ANNUAL */
|
||||
private String paymentCycle;
|
||||
/** 수금수수료율 (소수, 예: 0.005 = 0.5%) */
|
||||
private BigDecimal commissionRate;
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
private LocalDateTime createdAt;
|
||||
private Long createdBy;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* commission_master 조회 응답 — 조인 필드(agentName, orgName 등) 포함.
|
||||
*/
|
||||
@Data
|
||||
public class CommissionMasterResp {
|
||||
private Long masterId;
|
||||
private Long agentId;
|
||||
private String agentName;
|
||||
private String orgName;
|
||||
private String commissionType;
|
||||
private String commissionTypeName;
|
||||
private String settleMonth;
|
||||
private String sourceTable;
|
||||
private Long sourceId;
|
||||
private BigDecimal grossAmount;
|
||||
private BigDecimal taxAmount;
|
||||
private BigDecimal netAmount;
|
||||
private String status;
|
||||
private String statusName;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* commission_master 등록/수정 요청 DTO.
|
||||
* ID, 상태, 일시 필드는 제외. 배치 upsert 시에도 이 필드 셋을 사용.
|
||||
*/
|
||||
@Data
|
||||
public class CommissionMasterSaveReq {
|
||||
@NotNull
|
||||
private Long agentId;
|
||||
|
||||
@NotBlank
|
||||
private String commissionType;
|
||||
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
|
||||
@NotBlank
|
||||
private String sourceTable;
|
||||
|
||||
@NotNull
|
||||
private Long sourceId;
|
||||
|
||||
@NotNull
|
||||
@PositiveOrZero
|
||||
private BigDecimal grossAmount;
|
||||
|
||||
@NotNull
|
||||
@PositiveOrZero
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
@NotNull
|
||||
@PositiveOrZero
|
||||
private BigDecimal netAmount;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* commission_master 검색 조건.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommissionMasterSearchParam extends SearchParam {
|
||||
private Long agentId;
|
||||
private String commissionType;
|
||||
private String settleMonth;
|
||||
private String sourceTable;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* commission_master — 전 수수료 종류 통합 마스터 (V40)
|
||||
* 모든 수수료 원장(recruit_ledger / collection_commission_ledger 등)에서
|
||||
* 산출된 결과를 단일 허브로 집계. INSERT/UPDATE 전용.
|
||||
*/
|
||||
@Data
|
||||
public class CommissionMasterVO {
|
||||
private Long masterId;
|
||||
private Long agentId;
|
||||
/** COMMISSION_TYPE 코드 (CommissionType enum) */
|
||||
private String commissionType;
|
||||
/** 정산 귀속월 YYYYMM */
|
||||
private String settleMonth;
|
||||
/** 원본 원장 테이블명 (예: recruit_ledger) */
|
||||
private String sourceTable;
|
||||
/** 원본 원장 PK */
|
||||
private Long sourceId;
|
||||
private BigDecimal grossAmount;
|
||||
private BigDecimal taxAmount;
|
||||
private BigDecimal netAmount;
|
||||
/** CALCULATED / CONFIRMED / PAID / CANCELLED */
|
||||
private String status;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 수수료 종류 코드 (COMMISSION_TYPE 그룹, V40)
|
||||
* commission_master.commission_type, override_ledger.source_commission_type 등에서 사용.
|
||||
*/
|
||||
public enum CommissionType {
|
||||
RECRUIT("모집수수료"),
|
||||
MAINTAIN("유지수수료"),
|
||||
COLLECT("수금수수료"),
|
||||
OVERRIDE("오버라이드"),
|
||||
RENEWAL("갱신수수료"),
|
||||
REINSTATE("부활수수료"),
|
||||
PERSIST("유지보수수당"),
|
||||
INCENTIVE("시책수수료"),
|
||||
ONBOARD("위촉수수료");
|
||||
|
||||
private final String label;
|
||||
|
||||
CommissionType(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OverrideLedgerResp {
|
||||
private Long ledgerId;
|
||||
private Long fromAgentId;
|
||||
private String fromAgentName;
|
||||
private Long toAgentId;
|
||||
private String toAgentName;
|
||||
private String orgName;
|
||||
private String settleMonth;
|
||||
private String sourceCommissionType;
|
||||
private String sourceCommissionTypeName;
|
||||
private String sourceLedgerTable;
|
||||
private Long sourceLedgerId;
|
||||
private BigDecimal sourceAmount;
|
||||
private BigDecimal overrideRate;
|
||||
private BigDecimal overrideAmount;
|
||||
private String status;
|
||||
private String statusName;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OverrideLedgerSaveReq {
|
||||
@NotNull
|
||||
private Long fromAgentId;
|
||||
@NotNull
|
||||
private Long toAgentId;
|
||||
private Long orgId;
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
@NotBlank
|
||||
private String sourceCommissionType;
|
||||
private String sourceLedgerTable;
|
||||
private Long sourceLedgerId;
|
||||
@NotNull
|
||||
@Positive
|
||||
private BigDecimal sourceAmount;
|
||||
@NotNull
|
||||
private BigDecimal overrideRate;
|
||||
@NotNull
|
||||
private BigDecimal overrideAmount;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OverrideLedgerSearchParam extends SearchParam {
|
||||
private Long toAgentId;
|
||||
private Long fromAgentId;
|
||||
private Long orgId;
|
||||
private String settleMonth;
|
||||
private String sourceCommissionType;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* override_ledger — 오버라이드 수수료 상세 원장 (V44)
|
||||
* calcOverride 결과를 수수료 종류 단위로 추적.
|
||||
*/
|
||||
@Data
|
||||
public class OverrideLedgerVO {
|
||||
private Long ledgerId;
|
||||
/** 원천 설계사 (오버라이드 기준 수수료 발생 하위 설계사) */
|
||||
private Long fromAgentId;
|
||||
/** 오버라이드 수령 설계사 (상위 직급) */
|
||||
private Long toAgentId;
|
||||
private Long orgId;
|
||||
private String settleMonth;
|
||||
/** 원천 수수료 종류 (COMMISSION_TYPE 코드) */
|
||||
private String sourceCommissionType;
|
||||
private String sourceLedgerTable;
|
||||
private Long sourceLedgerId;
|
||||
private BigDecimal sourceAmount;
|
||||
private BigDecimal overrideRate;
|
||||
private BigDecimal overrideAmount;
|
||||
/** CALCULATED / CONFIRMED / PAID / CANCELLED */
|
||||
private String status;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class OverrideSummaryResp {
|
||||
private Long summaryId;
|
||||
private Long toAgentId;
|
||||
private String toAgentName;
|
||||
private String orgName;
|
||||
private String settleMonth;
|
||||
private BigDecimal totalSourceAmount;
|
||||
private BigDecimal totalOverrideAmount;
|
||||
private Integer ledgerCount;
|
||||
private String status;
|
||||
private String statusName;
|
||||
private LocalDateTime calcDate;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OverrideSummarySaveReq {
|
||||
@NotNull
|
||||
private Long toAgentId;
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
@NotNull
|
||||
private BigDecimal totalSourceAmount;
|
||||
@NotNull
|
||||
private BigDecimal totalOverrideAmount;
|
||||
@NotNull
|
||||
private Integer ledgerCount;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OverrideSummarySearchParam extends SearchParam {
|
||||
private Long toAgentId;
|
||||
private String settleMonth;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* override_summary — agent+settle_month 단위 오버라이드 합계 (V44)
|
||||
* UNIQUE(to_agent_id, settle_month) — 배치 완료 후 UPSERT.
|
||||
*/
|
||||
@Data
|
||||
public class OverrideSummaryVO {
|
||||
private Long summaryId;
|
||||
private Long toAgentId;
|
||||
private String settleMonth;
|
||||
private BigDecimal totalSourceAmount;
|
||||
private BigDecimal totalOverrideAmount;
|
||||
private Integer ledgerCount;
|
||||
/** CALCULATED / CONFIRMED / PAID */
|
||||
private String status;
|
||||
private LocalDateTime calcDate;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 납입주기 코드 (V41 collection_commission_rule.payment_cycle)
|
||||
*/
|
||||
public enum PaymentCycle {
|
||||
MONTHLY("월납"),
|
||||
QUARTERLY("분기납"),
|
||||
SEMI("반기납"),
|
||||
ANNUAL("연납");
|
||||
|
||||
private final String label;
|
||||
|
||||
PaymentCycle(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class PersistencyBonusResp {
|
||||
private Long bonusId;
|
||||
private Long agentId;
|
||||
private String agentName;
|
||||
private String orgName;
|
||||
private Long ruleId;
|
||||
private String baseMonth;
|
||||
private Integer retentionMonth;
|
||||
private String settleMonth;
|
||||
private BigDecimal retentionRate;
|
||||
private BigDecimal bonusAmount;
|
||||
private String status;
|
||||
private String statusName;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class PersistencyBonusRuleResp {
|
||||
private Long ruleId;
|
||||
private Long gradeId;
|
||||
private String gradeName;
|
||||
private Integer retentionMonth;
|
||||
private BigDecimal retentionRateThreshold;
|
||||
private String bonusType;
|
||||
private String bonusTypeName;
|
||||
private BigDecimal bonusValue;
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class PersistencyBonusRuleSaveReq {
|
||||
private Long gradeId;
|
||||
|
||||
@NotNull
|
||||
private Integer retentionMonth;
|
||||
|
||||
@NotNull
|
||||
@DecimalMin(value = "0", inclusive = false)
|
||||
@DecimalMax("1")
|
||||
private BigDecimal retentionRateThreshold;
|
||||
|
||||
@NotBlank
|
||||
private String bonusType;
|
||||
|
||||
@NotNull
|
||||
private BigDecimal bonusValue;
|
||||
|
||||
@NotNull
|
||||
private LocalDate effectiveFrom;
|
||||
|
||||
private LocalDate effectiveTo;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PersistencyBonusRuleSearchParam extends SearchParam {
|
||||
private Long gradeId;
|
||||
private Integer retentionMonth;
|
||||
private String bonusType;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* persistency_bonus_rule — 유지보수수당 룰 마스터 (V43)
|
||||
*/
|
||||
@Data
|
||||
public class PersistencyBonusRuleVO {
|
||||
private Long ruleId;
|
||||
/** 적용 직급 FK (NULL=전 직급 공통) */
|
||||
private Long gradeId;
|
||||
/** 유지 기준 개월수 (13/25/37/49) */
|
||||
private Integer retentionMonth;
|
||||
/** 유지율 최소 기준 (0초과~1이하, 예: 0.95) */
|
||||
private BigDecimal retentionRateThreshold;
|
||||
/** RATE / FIXED */
|
||||
private String bonusType;
|
||||
/** RATE: 비율값 / FIXED: 지급 금액 */
|
||||
private BigDecimal bonusValue;
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
private LocalDateTime createdAt;
|
||||
private Long createdBy;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class PersistencyBonusSaveReq {
|
||||
@NotNull
|
||||
private Long agentId;
|
||||
private Long ruleId;
|
||||
@NotBlank
|
||||
private String baseMonth;
|
||||
@NotNull
|
||||
private Integer retentionMonth;
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
@NotNull
|
||||
@DecimalMin("0")
|
||||
@DecimalMax("1")
|
||||
private BigDecimal retentionRate;
|
||||
@NotNull
|
||||
private BigDecimal bonusAmount;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PersistencyBonusSearchParam extends SearchParam {
|
||||
private Long agentId;
|
||||
private String settleMonth;
|
||||
private Integer retentionMonth;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* persistency_bonus — 유지보수수당 지급 이력 (V43)
|
||||
* UNIQUE(agent_id, base_month, retention_month) — 동일 기준월·개월수 중복 방지.
|
||||
*/
|
||||
@Data
|
||||
public class PersistencyBonusVO {
|
||||
private Long bonusId;
|
||||
private Long agentId;
|
||||
private Long ruleId;
|
||||
/** 계약 체결 기준 정산월 (YYYYMM) */
|
||||
private String baseMonth;
|
||||
/** 평가 기준 개월수 (13/25/37/49) */
|
||||
private Integer retentionMonth;
|
||||
/** 실제 지급 귀속 정산월 (YYYYMM) */
|
||||
private String settleMonth;
|
||||
/** 평가 시점 실제 유지율 */
|
||||
private BigDecimal retentionRate;
|
||||
private BigDecimal bonusAmount;
|
||||
/** CALCULATED / CONFIRMED / PAID / CANCELLED */
|
||||
private String status;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class ReinstatementCommissionLedgerResp {
|
||||
private Long ledgerId;
|
||||
private Long contractId;
|
||||
private String policyNo;
|
||||
private Long agentId;
|
||||
private String agentName;
|
||||
private String orgName;
|
||||
private String settleMonth;
|
||||
private LocalDate reinstatementDate;
|
||||
private BigDecimal reinstatementPremium;
|
||||
private BigDecimal commissionAmount;
|
||||
private BigDecimal chargebackReversal;
|
||||
private BigDecimal netCommission;
|
||||
private String payType;
|
||||
private String status;
|
||||
private String statusName;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class ReinstatementCommissionLedgerSaveReq {
|
||||
@NotNull
|
||||
private Long contractId;
|
||||
@NotNull
|
||||
private Long agentId;
|
||||
private Long ruleId;
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
@NotNull
|
||||
private LocalDate reinstatementDate;
|
||||
@NotNull
|
||||
@PositiveOrZero
|
||||
private BigDecimal reinstatementPremium;
|
||||
@NotNull
|
||||
private BigDecimal commissionAmount;
|
||||
@NotNull
|
||||
@PositiveOrZero
|
||||
private BigDecimal chargebackReversal;
|
||||
@NotBlank
|
||||
private String payType;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ReinstatementCommissionLedgerSearchParam extends SearchParam {
|
||||
private Long agentId;
|
||||
private Long contractId;
|
||||
private String settleMonth;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* reinstatement_commission_ledger — 부활수수료 원장 (V42)
|
||||
*/
|
||||
@Data
|
||||
public class ReinstatementCommissionLedgerVO {
|
||||
private Long ledgerId;
|
||||
private Long contractId;
|
||||
private Long agentId;
|
||||
private Long ruleId;
|
||||
private String settleMonth;
|
||||
private LocalDate reinstatementDate;
|
||||
private BigDecimal reinstatementPremium;
|
||||
private BigDecimal commissionAmount;
|
||||
/** 부활로 인한 환수액 환원금 */
|
||||
private BigDecimal chargebackReversal;
|
||||
/** 최종 수수료 = commissionAmount + chargebackReversal */
|
||||
private BigDecimal netCommission;
|
||||
private String payType;
|
||||
private String status;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class ReinstatementCommissionRuleResp {
|
||||
private Long ruleId;
|
||||
private Long productId;
|
||||
private String productName;
|
||||
private String payType;
|
||||
private BigDecimal rateValue;
|
||||
private BigDecimal fixedAmount;
|
||||
private BigDecimal chargebackReversalRate;
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class ReinstatementCommissionRuleSaveReq {
|
||||
@NotNull
|
||||
private Long productId;
|
||||
@NotBlank
|
||||
private String payType;
|
||||
private BigDecimal rateValue;
|
||||
private BigDecimal fixedAmount;
|
||||
@NotNull
|
||||
@DecimalMin("0")
|
||||
@DecimalMax("1")
|
||||
private BigDecimal chargebackReversalRate;
|
||||
@NotNull
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import com.ga.common.model.SearchParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ReinstatementCommissionRuleSearchParam extends SearchParam {
|
||||
private Long productId;
|
||||
private String payType;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* reinstatement_commission_rule — 부활수수료율 마스터 (V42)
|
||||
*/
|
||||
@Data
|
||||
public class ReinstatementCommissionRuleVO {
|
||||
private Long ruleId;
|
||||
private Long productId;
|
||||
private String payType;
|
||||
private BigDecimal rateValue;
|
||||
private BigDecimal fixedAmount;
|
||||
/** 부활 시 기존 환수액 중 환원 비율 (0~1) */
|
||||
private BigDecimal chargebackReversalRate;
|
||||
private LocalDate effectiveFrom;
|
||||
private LocalDate effectiveTo;
|
||||
private LocalDateTime createdAt;
|
||||
private Long createdBy;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class RenewalCommissionLedgerResp {
|
||||
private Long ledgerId;
|
||||
private Long contractId;
|
||||
private String policyNo;
|
||||
private Long agentId;
|
||||
private String agentName;
|
||||
private String orgName;
|
||||
private String settleMonth;
|
||||
private LocalDate renewalDate;
|
||||
private BigDecimal renewalPremium;
|
||||
private BigDecimal commissionAmount;
|
||||
private String payType;
|
||||
private String status;
|
||||
private String statusName;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ga.core.vo.commission;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class RenewalCommissionLedgerSaveReq {
|
||||
@NotNull
|
||||
private Long contractId;
|
||||
@NotNull
|
||||
private Long agentId;
|
||||
private Long ruleId;
|
||||
@NotBlank
|
||||
private String settleMonth;
|
||||
@NotNull
|
||||
private LocalDate renewalDate;
|
||||
@NotNull
|
||||
@Positive
|
||||
private BigDecimal renewalPremium;
|
||||
@NotNull
|
||||
private BigDecimal commissionAmount;
|
||||
@NotBlank
|
||||
private String payType;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user