ff6d399dd3
수수료 공식 갭분석(5 병렬감사) 후 확정 버그 3건 수정 + 개념적으로 빠진 모듈 8종 풀스택 구현. [확정 버그 3건] - 1200% 누적한도(checkContractTotal)를 배치 CalcRecruitStep에 연결(기존 1차년 한도만 적용 → 두 한도 중 더 제한적인 값으로 clip+이연). +CalcRecruitStepTest - BatchInstallmentPlanGenerator planMonth 반영(하드코딩 1 제거, API판과 동일). +단위테스트 - PersistencyBonus 임계유지율 게이트 + FIXED 정액 룰 도출. +PersistencyBonusServiceTest [신규 모듈 8종] - MOD-1 도입수수료(recruiter/development) / MOD-2 선지급·차익정산 / MOD-3 환수 분할상환 - MOD-4 익월부활 재지급 / MOD-5 정산대사 입수 / MOD-6 환수 시효 / MOD-7 환수 감면 - MOD-8 채널별 수수료차등(sales_channel) 각 DB(테이블+메뉴+권한+공통코드)→VO/Mapper/Enum→Service/Controller→화면 풀스택. 배치 정산연계: AggregateStep에 도입/익월부활 가산(11종), 선지급 FIFO 상계(멱등 reverse), MOD-8 채널 우선 요율조회(NULL 폴백 하위호환). [검증] - 전체 ./gradlew build(전 모듈+전 테스트) GREEN - Flyway V116~V123 운영DB 적용(schema v115→v123) - 라이브 스모크 8 GET=200, MOD-1 RATE공식 50000 실측, 액션 POST 5xx 0건 - 적대적 코드리뷰 APPROVED(MOD-8 계산기 미연결 버그 발견·수정) 스펙: docs/DOMAIN_GAP_MOD1-8.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
60 lines
1.5 KiB
TypeScript
60 lines
1.5 KiB
TypeScript
import api, { PageResponse, unwrap } from './request';
|
|
|
|
export interface ContractResp {
|
|
contractId: number;
|
|
agentId: number;
|
|
agentName: string;
|
|
orgName?: string;
|
|
productCode?: string;
|
|
productName?: string;
|
|
companyCode?: string;
|
|
companyName?: string;
|
|
insuranceType?: string;
|
|
policyNo: string;
|
|
contractorName?: string;
|
|
insuredName?: string;
|
|
premium?: number;
|
|
payCycle?: string;
|
|
payCycleName?: string;
|
|
status: string;
|
|
statusName?: string;
|
|
contractDate: string;
|
|
salesChannel?: string;
|
|
salesChannelName?: string;
|
|
}
|
|
|
|
export interface ContractSearchParam {
|
|
pageNum?: number;
|
|
pageSize?: number;
|
|
searchKeyword?: string;
|
|
agentId?: number;
|
|
companyId?: number;
|
|
insuranceType?: string;
|
|
status?: string;
|
|
startDate?: string;
|
|
endDate?: string;
|
|
}
|
|
|
|
export interface ContractSaveReq {
|
|
agentId: number;
|
|
productId: number;
|
|
policyNo: string;
|
|
contractorName?: string;
|
|
insuredName?: string;
|
|
premium?: number;
|
|
payCycle?: string;
|
|
payPeriod?: number;
|
|
coveragePeriod?: number;
|
|
contractDate?: string;
|
|
effectiveDate?: string;
|
|
salesChannel?: string;
|
|
}
|
|
|
|
export const contractApi = {
|
|
list: (p: ContractSearchParam) =>
|
|
unwrap<PageResponse<ContractResp>>(api.get('/api/contracts', { params: p })),
|
|
detail: (id: number) => unwrap<ContractResp>(api.get(`/api/contracts/${id}`)),
|
|
create: (req: ContractSaveReq) => unwrap<number>(api.post('/api/contracts', req)),
|
|
update: (id: number, req: ContractSaveReq) => unwrap<void>(api.put(`/api/contracts/${id}`, req)),
|
|
};
|