fix: 전체 메뉴 점검 — 회계분개/KPI 매퍼 컬럼 오류 + 결재 mine/pending 엔드포인트

전체 화면 API 점검(85종) 중 발견한 오류 수정:

- ContractAccountingEntryMapper: ac.contract_no 미존재 -> ac.policy_no AS contract_no
  (contract 테이블 컬럼은 policy_no. 데이터 적재 후 표면화된 버그)
- KpiMapper: mv_*.refreshed_at 가 now() 기반 timestamptz 인데 VO는 LocalDateTime
  -> refreshed_at::timestamp 캐스팅 (monthly/org/cumulative/retention 4종)
- ApprovalController/Service: /requests/mine, /requests/pending 엔드포인트 부재로
  /requests/{requestId} 에 매칭돼 400 -> 두 엔드포인트 신규 추가

검증: 전체 엔드포인트 ERROR 0건. 정산 배치 데이터 + KPI MV 새로고침으로
KPI 대시보드 4화면(월별/조직별/누적/유지율) 정상 표시.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
GA Pro
2026-05-22 01:41:26 +09:00
parent c2a92d13cb
commit 3f52596a8b
4 changed files with 35 additions and 7 deletions
@@ -10,7 +10,7 @@
<sql id="joinCols">
cae.entry_id,
cae.contract_id,
ac.contract_no,
ac.policy_no AS contract_no,
cae.payment_id,
a.agent_id,
a.agent_name,
@@ -45,8 +45,8 @@
AND cae.journal_no IS NULL
</if>
<if test="searchKeyword != null and searchKeyword != ''">
AND (ac.contract_no LIKE CONCAT('%', #{searchKeyword}, '%')
OR a.agent_name LIKE CONCAT('%', #{searchKeyword}, '%'))
AND (ac.policy_no LIKE CONCAT('%', #{searchKeyword}, '%')
OR a.agent_name LIKE CONCAT('%', #{searchKeyword}, '%'))
</if>
</where>
ORDER BY cae.entry_date DESC, cae.entry_id DESC
@@ -32,7 +32,7 @@
total_tax,
total_net,
total_incentive,
refreshed_at
refreshed_at::timestamp AS refreshed_at
FROM mv_monthly_summary
<where>
<if test="yyyymmFrom != null and yyyymmFrom != ''">
@@ -62,7 +62,7 @@
total_chargeback,
total_gross,
total_net,
refreshed_at
refreshed_at::timestamp AS refreshed_at
FROM mv_org_summary
<where>
<if test="orgId != null">AND org_id = #{orgId}</if>
@@ -91,7 +91,7 @@
retained_25m,
retention_rate_13m,
retention_rate_25m,
refreshed_at
refreshed_at::timestamp AS refreshed_at
FROM mv_retention
<where>
<if test="carrierId != null">AND carrier_id = #{carrierId}</if>
@@ -125,7 +125,7 @@
cum_chargeback,
cum_override,
cum_incentive,
refreshed_at
refreshed_at::timestamp AS refreshed_at
FROM mv_cumulative
<where>
<!-- levelType으로 AGENT/ORG 레벨 선택 -->