Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 46d47812f8 |
@@ -0,0 +1,336 @@
|
|||||||
|
# GA 수수료 정산 솔루션 — 신입 개발자 가이드
|
||||||
|
|
||||||
|
> 처음 합류한 개발자가 30분 안에 로컬 환경을 띄우고, 새 화면 1개를 추가할 수 있도록 안내합니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 환경 설정
|
||||||
|
|
||||||
|
### 필수 설치
|
||||||
|
| 도구 | 버전 | 비고 |
|
||||||
|
|------|------|------|
|
||||||
|
| **JDK** | 17+ | `java -version` |
|
||||||
|
| **Node.js** | 18+ | `node -v` |
|
||||||
|
| **PostgreSQL** | 14+ | 로컬 또는 운영 DB 접속 |
|
||||||
|
| **Redis** | 7+ | 공통코드 캐시 (선택) |
|
||||||
|
| **IntelliJ IDEA** | Community 이상 | Lombok 플러그인 활성화 필수 |
|
||||||
|
|
||||||
|
### IDE 설정 (IntelliJ)
|
||||||
|
1. `File > Open` → `ga-commission-system` 선택 → Gradle 자동 임포트
|
||||||
|
2. `Settings > Build > Compiler > Annotation Processors` → **Enable**
|
||||||
|
3. `Settings > Plugins` → **Lombok** 설치/활성화
|
||||||
|
4. JDK 17 지정 (`Project Structure > SDK`)
|
||||||
|
|
||||||
|
### 빠른 기동
|
||||||
|
```bash
|
||||||
|
# 1) 인프라 (PostgreSQL + Redis)
|
||||||
|
docker compose up -d postgres redis
|
||||||
|
|
||||||
|
# 2) 백엔드 (ga-api 8080, ga-batch 8081 별도 콘솔)
|
||||||
|
./gradlew :ga-api:bootRun
|
||||||
|
./gradlew :ga-batch:bootRun
|
||||||
|
|
||||||
|
# 3) 프론트엔드 (Vite dev server, 3000)
|
||||||
|
cd ga-frontend && npm install && npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
로그인: `admin / admin1234!`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 프로젝트 구조
|
||||||
|
|
||||||
|
```
|
||||||
|
ga-commission-system/
|
||||||
|
├── ga-common/ 공통 프레임워크 — 인증/AOP/엑셀/공통코드/메뉴/유틸
|
||||||
|
├── ga-core/ 도메인 코어 — VO + Mapper Interface + Mapper XML + MapStruct
|
||||||
|
├── ga-api/ REST 컨트롤러 + 서비스 (포트 8080)
|
||||||
|
├── ga-batch/ Spring Batch 정산 잡 (포트 8081)
|
||||||
|
└── ga-frontend/ React + Vite + Ant Design + AG Grid (포트 3000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### ga-common 핵심 클래스
|
||||||
|
- **`ApiResponse<T>`** — 모든 API 표준 응답
|
||||||
|
- **`PageResponse<T>`** — 페이징 응답 (PageHelper 자동 변환)
|
||||||
|
- **`SearchParam`** — `pageNum/pageSize/searchKeyword/startDate/endDate/sortField/sortOrder`
|
||||||
|
- **`@RequirePermission(menu, perm)`** — AOP 권한 체크
|
||||||
|
- **`@DataChangeLog(menu, table)`** — 변경 이력 자동 기록
|
||||||
|
- **`CommonCodeService`** — Redis 캐시 기반 코드 변환 (`getCodeName`, `validateCode`)
|
||||||
|
- **`ExcelService`** — `exportLargeExcel` (100만건), `importLargeExcel` (70만건)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 새 화면 만들기 — Step-by-Step (5분 컷)
|
||||||
|
|
||||||
|
예시: **상품 그룹 관리** 화면 추가.
|
||||||
|
|
||||||
|
### Step 1 — 메뉴 등록 (DB)
|
||||||
|
```sql
|
||||||
|
INSERT INTO menu (parent_menu_id, menu_code, menu_name, menu_type, menu_path,
|
||||||
|
component_path, menu_level, sort_order, is_visible, is_active)
|
||||||
|
VALUES ((SELECT menu_id FROM menu WHERE menu_code='SYSTEM'),
|
||||||
|
'PRODUCT_GROUP', '상품그룹', 'PAGE', '/system/product-groups',
|
||||||
|
'system/ProductGroupList', 2, 99, 'Y', 'Y');
|
||||||
|
|
||||||
|
INSERT INTO menu_permission (menu_id, perm_code, perm_name, sort_order)
|
||||||
|
SELECT menu_id, 'READ', '조회', 1 FROM menu WHERE menu_code = 'PRODUCT_GROUP'
|
||||||
|
UNION ALL SELECT menu_id, 'CREATE', '등록', 2 FROM menu WHERE menu_code = 'PRODUCT_GROUP'
|
||||||
|
UNION ALL SELECT menu_id, 'UPDATE', '수정', 3 FROM menu WHERE menu_code = 'PRODUCT_GROUP'
|
||||||
|
UNION ALL SELECT menu_id, 'DELETE', '삭제', 4 FROM menu WHERE menu_code = 'PRODUCT_GROUP';
|
||||||
|
|
||||||
|
-- 관리자 역할에 권한 부여
|
||||||
|
INSERT INTO role_menu_permission (role_id, menu_id, perm_code, is_granted)
|
||||||
|
SELECT r.role_id, m.menu_id, p.perm_code, 'Y'
|
||||||
|
FROM role r CROSS JOIN menu m JOIN menu_permission p ON p.menu_id = m.menu_id
|
||||||
|
WHERE r.role_code = 'SUPER_ADMIN' AND m.menu_code = 'PRODUCT_GROUP';
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2 — VO 작성 (`ga-core`)
|
||||||
|
- `ProductGroupVO.java` — 테이블 1:1
|
||||||
|
- `ProductGroupResp.java` — 화면 응답 (조인 필드 포함)
|
||||||
|
- `ProductGroupSaveReq.java` — 입력 (`@NotBlank`, `@Size`)
|
||||||
|
- `ProductGroupSearchParam.java` — `extends SearchParam`
|
||||||
|
|
||||||
|
### Step 3 — Mapper Interface + XML
|
||||||
|
```java
|
||||||
|
@Mapper
|
||||||
|
public interface ProductGroupMapper {
|
||||||
|
List<ProductGroupResp> selectList(ProductGroupSearchParam p);
|
||||||
|
ProductGroupVO selectById(@Param("id") Long id);
|
||||||
|
int insert(ProductGroupVO vo);
|
||||||
|
int update(ProductGroupVO vo);
|
||||||
|
int deleteById(@Param("id") Long id);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`ga-core/src/main/resources/mapper/product/ProductGroupMapper.xml`:
|
||||||
|
```xml
|
||||||
|
<select id="selectList" resultType="com.ga.core.vo.product.ProductGroupResp">
|
||||||
|
SELECT pg.* FROM product_group pg
|
||||||
|
<where>
|
||||||
|
<if test="searchKeyword != null and searchKeyword != ''">
|
||||||
|
AND pg.group_name LIKE CONCAT('%', #{searchKeyword}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY pg.sort_order
|
||||||
|
</select>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4 — Service
|
||||||
|
```java
|
||||||
|
@Service @RequiredArgsConstructor
|
||||||
|
public class ProductGroupService {
|
||||||
|
private final ProductGroupMapper mapper;
|
||||||
|
public PageResponse<ProductGroupResp> list(ProductGroupSearchParam p) {
|
||||||
|
p.startPage();
|
||||||
|
return PageResponse.of(mapper.selectList(p));
|
||||||
|
}
|
||||||
|
@Transactional
|
||||||
|
public Long create(ProductGroupSaveReq req) { /* ... */ }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 5 — Controller (`ga-api`)
|
||||||
|
```java
|
||||||
|
@RestController @RequestMapping("/api/product-groups")
|
||||||
|
@Tag(name = "상품그룹") @RequiredArgsConstructor
|
||||||
|
public class ProductGroupController {
|
||||||
|
private final ProductGroupService service;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@RequirePermission(menu = "PRODUCT_GROUP", perm = "READ")
|
||||||
|
public ApiResponse<PageResponse<ProductGroupResp>> list(ProductGroupSearchParam p) {
|
||||||
|
return ApiResponse.ok(service.list(p));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@RequirePermission(menu = "PRODUCT_GROUP", perm = "CREATE")
|
||||||
|
@DataChangeLog(menu = "PRODUCT_GROUP", table = "product_group")
|
||||||
|
public ApiResponse<Long> create(@Valid @RequestBody ProductGroupSaveReq req) {
|
||||||
|
return ApiResponse.ok(service.create(req));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 6 — React 페이지 (`ga-frontend`)
|
||||||
|
`src/api/productGroup.ts`:
|
||||||
|
```ts
|
||||||
|
export const productGroupApi = {
|
||||||
|
list: (p: any) => request.get('/api/product-groups', { params: p }),
|
||||||
|
create: (data: any) => request.post('/api/product-groups', data),
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
`src/pages/system/ProductGroupList.tsx`:
|
||||||
|
```tsx
|
||||||
|
export default function ProductGroupList() {
|
||||||
|
const [param, setParam] = useState({ pageNum: 1, pageSize: 20 });
|
||||||
|
const { data } = useQuery({ queryKey: ['pg', param], queryFn: () => productGroupApi.list(param) });
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<SearchForm conditions={[{ type: 'text', name: 'searchKeyword', label: '그룹명' }]}
|
||||||
|
onSearch={(v) => setParam({ ...param, ...v, pageNum: 1 })} />
|
||||||
|
<PermissionButton menu="PRODUCT_GROUP" perm="CREATE" type="primary">신규</PermissionButton>
|
||||||
|
<DataTable data={data} page={param} onPageChange={(p) => setParam({ ...param, ...p })}
|
||||||
|
columns={[{ title: '그룹명', dataIndex: 'groupName' }]} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
라우터 등록 — `App.tsx`:
|
||||||
|
```tsx
|
||||||
|
<Route path="system/product-groups" element={<ProductGroupList />} />
|
||||||
|
```
|
||||||
|
|
||||||
|
`router/dynamicRoutes.tsx` 의 `componentMap` 에 키도 추가:
|
||||||
|
```ts
|
||||||
|
'system/ProductGroupList': lazy(() => import('@/pages/system/ProductGroupList')),
|
||||||
|
```
|
||||||
|
|
||||||
|
끝! 메뉴 권한이 있는 사용자에게만 좌측 메뉴가 보이고, `READ/CREATE` 버튼이 권한별로 렌더됩니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 자주 쓰는 패턴
|
||||||
|
|
||||||
|
### 공통코드 드롭다운
|
||||||
|
```tsx
|
||||||
|
<CodeSelect groupCode="AGENT_STATUS" value={status} onChange={setStatus} includeAll />
|
||||||
|
```
|
||||||
|
|
||||||
|
### 상태 뱃지
|
||||||
|
```tsx
|
||||||
|
<CodeBadge groupCode="CONTRACT_STATUS" code={row.status} />
|
||||||
|
```
|
||||||
|
|
||||||
|
### 권한 버튼
|
||||||
|
```tsx
|
||||||
|
<PermissionButton menu="ORG_AGENT" perm="UPDATE" onClick={save}>저장</PermissionButton>
|
||||||
|
```
|
||||||
|
권한 없으면 자동으로 disabled 처리. AOP `@RequirePermission` 와 동일한 메뉴×권한 매트릭스 사용.
|
||||||
|
|
||||||
|
### 엑셀 다운로드 버튼
|
||||||
|
```tsx
|
||||||
|
<ExcelExportButton url="/api/agents/excel" filename="설계사목록" params={searchParam} />
|
||||||
|
```
|
||||||
|
|
||||||
|
### 엑셀 업로드 (템플릿 매핑 기반)
|
||||||
|
```tsx
|
||||||
|
<ExcelImportButton templateCode="SAMSUNG_RECRUIT" onComplete={refetch} />
|
||||||
|
```
|
||||||
|
|
||||||
|
### AG Grid 서버사이드 페이징
|
||||||
|
```tsx
|
||||||
|
<DataGrid
|
||||||
|
rowModelType="serverSide"
|
||||||
|
serverSideStoreType="partial"
|
||||||
|
cacheBlockSize={100}
|
||||||
|
fetchUrl="/api/ledger/recruit"
|
||||||
|
columnDefs={[/*...*/]}
|
||||||
|
/>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. 코드 컨벤션
|
||||||
|
|
||||||
|
### 네이밍
|
||||||
|
| 종류 | 패턴 | 예시 |
|
||||||
|
|------|------|------|
|
||||||
|
| 테이블 | snake_case | `agent_org_history` |
|
||||||
|
| Java 클래스 | PascalCase | `AgentOrgHistoryVO` |
|
||||||
|
| 필드 | camelCase | `agentName` |
|
||||||
|
| URL | kebab-case 복수형 | `/api/exception-codes` |
|
||||||
|
| 메뉴 코드 | UPPER_SNAKE | `RULE_COMMISSION` |
|
||||||
|
| 공통코드 그룹 | UPPER_SNAKE | `AGENT_STATUS` |
|
||||||
|
|
||||||
|
### VO 5종 패턴 (한 도메인 = 3~5 클래스)
|
||||||
|
- `XxxVO` — 테이블 1:1 (INSERT/UPDATE)
|
||||||
|
- `XxxResp` — 응답 (조인 결과 + `*Name` 필드)
|
||||||
|
- `XxxSaveReq` — 입력 (`@Valid`)
|
||||||
|
- `XxxSearchParam` — `extends SearchParam`
|
||||||
|
- `XxxExcelVO` — 엑셀 전용 (`@ExcelColumn`)
|
||||||
|
|
||||||
|
### Mapper XML
|
||||||
|
- `SELECT *` 금지 — 컬럼 명시
|
||||||
|
- 목록은 `XxxResp`, INSERT/UPDATE 는 `XxxVO` 매핑
|
||||||
|
- 동적 WHERE 는 `<where>` + `<if>`
|
||||||
|
- 1:N 은 `<resultMap><collection>`
|
||||||
|
- 자기참조 트리는 `WITH RECURSIVE`
|
||||||
|
|
||||||
|
### 트랜잭션
|
||||||
|
- 읽기 전용 메서드는 어노테이션 없음 (서비스 클래스 기본은 비트랜잭션)
|
||||||
|
- 쓰기 메서드는 `@Transactional`
|
||||||
|
- 외부 API 호출과 DB 쓰기를 같이 묶지 말 것 (외부 실패 시 DB 롤백 영향)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. 트러블슈팅 FAQ
|
||||||
|
|
||||||
|
### Q. 권한 에러 "FORBIDDEN"
|
||||||
|
- `@RequirePermission(menu="X", perm="Y")` 의 `menu` 가 `menu` 테이블에 등록됐는지 확인
|
||||||
|
- 사용자 역할에 `role_menu_permission` 행이 있는지: `is_granted='Y'`
|
||||||
|
- 캐시 무효화: `POST /api/system/permission/refresh` 또는 재로그인
|
||||||
|
|
||||||
|
### Q. 공통코드 변경 후 화면에 반영 안 됨
|
||||||
|
- Redis 캐시 TTL — `CommonCodeService.refreshCache()` 호출
|
||||||
|
- 또는 관리자 화면 → "캐시 새로고침"
|
||||||
|
|
||||||
|
### Q. MyBatis 매핑 에러 `Could not find result map ...`
|
||||||
|
- `resultType` 클래스 풀패키지명 확인
|
||||||
|
- `mapUnderscoreToCamelCase=true` 가 `mybatis-config.xml` 에 적용됐는지 확인
|
||||||
|
- 컬럼명과 필드명 매핑이 안 맞으면 `<resultMap>` 명시
|
||||||
|
|
||||||
|
### Q. `EncryptTypeHandler` 가 적용 안 됨
|
||||||
|
- VO 매퍼에 `typeHandler="com.ga.common.mybatis.EncryptTypeHandler"` 명시
|
||||||
|
- 또는 컬럼명 단위로 `#{accountNo,typeHandler=...}` 명시
|
||||||
|
|
||||||
|
### Q. 엑셀 70만건 업로드 중 OOM
|
||||||
|
- `xlsx-streamer` (SAX) 가 사용됐는지 확인 (`StreamingReader.builder()`)
|
||||||
|
- `batchSize` 1000~5000 사이에서 조정
|
||||||
|
- LOOKUP 변환은 `LookupCache.preload()` 로 시작 전 일괄 적재
|
||||||
|
|
||||||
|
### Q. AG Grid 합계행이 안 보임
|
||||||
|
- `pinnedBottomRowData` 에 합계 행 객체 전달
|
||||||
|
- 또는 `enableRangeSelection` + `aggFunc="sum"` 컬럼 정의
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. 자주 묻는 운영 작업
|
||||||
|
|
||||||
|
### 비밀번호 강제 초기화
|
||||||
|
```sql
|
||||||
|
UPDATE users SET password = '$2b$10$...', fail_count = 0 WHERE login_id = 'kyu';
|
||||||
|
```
|
||||||
|
|
||||||
|
### 메뉴 권한 재계산 (역할별)
|
||||||
|
```sql
|
||||||
|
DELETE FROM role_menu_permission WHERE role_id = 2;
|
||||||
|
INSERT INTO role_menu_permission (role_id, menu_id, perm_code, is_granted)
|
||||||
|
SELECT 2, m.menu_id, p.perm_code, 'Y'
|
||||||
|
FROM menu m JOIN menu_permission p ON p.menu_id = m.menu_id
|
||||||
|
WHERE m.menu_code IN ('ORG_AGENT', 'CONTRACT', 'LEDGER_RECRUIT');
|
||||||
|
```
|
||||||
|
|
||||||
|
### 정산 배치 수동 트리거
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:8080/api/batch/settlement/run \
|
||||||
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"settleMonth":"202405"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 캐시 비우기
|
||||||
|
```bash
|
||||||
|
docker exec -it ga-redis redis-cli FLUSHALL
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. 참고 링크
|
||||||
|
|
||||||
|
- 운영 DB — `192.168.0.60:55432/trading_ai/ga`
|
||||||
|
- API 문서 — `http://localhost:8080/swagger-ui.html`
|
||||||
|
- Git — `https://gl.kyleyang.co.kr/kyu/ga-commission-system`
|
||||||
|
- 기획 원본 — `GA_솔루션_Agent_Teams_최종통합본.md`
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.enums;
|
|
||||||
|
|
||||||
/** 설계사 상태 (V1.agent.status, 코드그룹 AGENT_STATUS) */
|
|
||||||
public enum AgentStatus {
|
|
||||||
ACTIVE, // 재직
|
|
||||||
LEAVE, // 휴직
|
|
||||||
SUSPEND; // 정지
|
|
||||||
|
|
||||||
public static AgentStatus parse(String s) {
|
|
||||||
if (s == null) return null;
|
|
||||||
try { return AgentStatus.valueOf(s); } catch (Exception e) { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ga.core.enums;
|
|
||||||
|
|
||||||
/** 배치 잡 상태 (V7.batch_job_log.status) */
|
|
||||||
public enum BatchJobStatus {
|
|
||||||
STARTED,
|
|
||||||
RUNNING,
|
|
||||||
COMPLETED,
|
|
||||||
FAILED,
|
|
||||||
STOPPED;
|
|
||||||
|
|
||||||
public static BatchJobStatus parse(String s) {
|
|
||||||
if (s == null) return null;
|
|
||||||
try { return BatchJobStatus.valueOf(s); } catch (Exception e) { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.ga.core.enums;
|
|
||||||
|
|
||||||
/** 계약 상태 (V2.contract.status, 코드그룹 CONTRACT_STATUS) */
|
|
||||||
public enum ContractStatus {
|
|
||||||
NEW, // 신규
|
|
||||||
ACTIVE, // 정상
|
|
||||||
LAPSED, // 실효
|
|
||||||
REVIVED, // 부활
|
|
||||||
CANCELLED, // 해지
|
|
||||||
EXPIRED; // 만기
|
|
||||||
|
|
||||||
public static ContractStatus parse(String s) {
|
|
||||||
if (s == null) return null;
|
|
||||||
try { return ContractStatus.valueOf(s); } catch (Exception e) { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.enums;
|
|
||||||
|
|
||||||
/** 수신 데이터 파싱 상태 (V4.raw_commission_data.parse_status) */
|
|
||||||
public enum ParseStatus {
|
|
||||||
PENDING, // 대기
|
|
||||||
OK, // 성공
|
|
||||||
ERROR; // 실패
|
|
||||||
|
|
||||||
public static ParseStatus parse(String s) {
|
|
||||||
if (s == null) return null;
|
|
||||||
try { return ParseStatus.valueOf(s); } catch (Exception e) { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.ga.core.enums;
|
|
||||||
|
|
||||||
/** 지급 상태 (V6.payment.pay_status, 코드그룹 PAY_STATUS) */
|
|
||||||
public enum PaymentStatus {
|
|
||||||
PENDING, // 대기
|
|
||||||
SENT, // 송신
|
|
||||||
DONE, // 완료
|
|
||||||
FAIL; // 실패
|
|
||||||
|
|
||||||
public static PaymentStatus parse(String s) {
|
|
||||||
if (s == null) return null;
|
|
||||||
try { return PaymentStatus.valueOf(s); } catch (Exception e) { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.ga.core.enums;
|
|
||||||
|
|
||||||
/** 정산 상태 (V6.settle_master.status, 코드그룹 SETTLE_STATUS) */
|
|
||||||
public enum SettleStatus {
|
|
||||||
DRAFT, // 산출중
|
|
||||||
CALCULATED, // 계산완료
|
|
||||||
REVIEW, // 검토
|
|
||||||
CONFIRMED, // 확정
|
|
||||||
HOLD, // 보류
|
|
||||||
PAID; // 지급완료
|
|
||||||
|
|
||||||
public static SettleStatus parse(String s) {
|
|
||||||
if (s == null) return null;
|
|
||||||
try { return SettleStatus.valueOf(s); } catch (Exception e) { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.ga.core.mapper.org;
|
package com.ga.core.mapper.org;
|
||||||
|
|
||||||
import com.ga.core.vo.org.GradeResp;
|
|
||||||
import com.ga.core.vo.org.GradeSearchParam;
|
|
||||||
import com.ga.core.vo.org.GradeVO;
|
import com.ga.core.vo.org.GradeVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -16,9 +14,4 @@ public interface GradeMapper {
|
|||||||
int insert(GradeVO vo);
|
int insert(GradeVO vo);
|
||||||
int update(GradeVO vo);
|
int update(GradeVO vo);
|
||||||
int deleteById(@Param("gradeId") Long gradeId);
|
int deleteById(@Param("gradeId") Long gradeId);
|
||||||
|
|
||||||
/** 신규: 화면용 Resp + SearchParam */
|
|
||||||
List<GradeResp> selectRespList(GradeSearchParam param);
|
|
||||||
GradeResp selectRespById(@Param("gradeId") Long gradeId);
|
|
||||||
int countAgents(@Param("gradeId") Long gradeId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.ga.core.mapper.org;
|
package com.ga.core.mapper.org;
|
||||||
|
|
||||||
import com.ga.core.vo.org.OrganizationResp;
|
import com.ga.core.vo.org.OrganizationResp;
|
||||||
import com.ga.core.vo.org.OrganizationSearchParam;
|
|
||||||
import com.ga.core.vo.org.OrganizationVO;
|
import com.ga.core.vo.org.OrganizationVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -14,8 +13,6 @@ public interface OrganizationMapper {
|
|||||||
List<OrganizationResp> selectList(@Param("keyword") String keyword,
|
List<OrganizationResp> selectList(@Param("keyword") String keyword,
|
||||||
@Param("orgType") String orgType,
|
@Param("orgType") String orgType,
|
||||||
@Param("isActive") String isActive);
|
@Param("isActive") String isActive);
|
||||||
/** 신규: SearchParam 기반 페이징 검색 */
|
|
||||||
List<OrganizationResp> selectByParam(OrganizationSearchParam param);
|
|
||||||
OrganizationVO selectById(@Param("orgId") Long orgId);
|
OrganizationVO selectById(@Param("orgId") Long orgId);
|
||||||
/** 자기 자신 + 모든 하위 조직 ID (CTE 재귀) */
|
/** 자기 자신 + 모든 하위 조직 ID (CTE 재귀) */
|
||||||
List<Long> selectDescendantIds(@Param("orgId") Long orgId);
|
List<Long> selectDescendantIds(@Param("orgId") Long orgId);
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.ga.core.mapper.product;
|
package com.ga.core.mapper.product;
|
||||||
|
|
||||||
import com.ga.core.vo.product.InsuranceCompanyResp;
|
|
||||||
import com.ga.core.vo.product.InsuranceCompanySearchParam;
|
|
||||||
import com.ga.core.vo.product.InsuranceCompanyVO;
|
import com.ga.core.vo.product.InsuranceCompanyVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -17,9 +15,4 @@ public interface InsuranceCompanyMapper {
|
|||||||
int insert(InsuranceCompanyVO vo);
|
int insert(InsuranceCompanyVO vo);
|
||||||
int update(InsuranceCompanyVO vo);
|
int update(InsuranceCompanyVO vo);
|
||||||
int deleteById(@Param("companyId") Long companyId);
|
int deleteById(@Param("companyId") Long companyId);
|
||||||
|
|
||||||
/** 신규 */
|
|
||||||
List<InsuranceCompanyResp> selectRespList(InsuranceCompanySearchParam param);
|
|
||||||
InsuranceCompanyResp selectRespById(@Param("companyId") Long companyId);
|
|
||||||
int existsByCode(@Param("companyCode") String companyCode);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,4 @@ public interface ProductMapper {
|
|||||||
int insert(ProductVO vo);
|
int insert(ProductVO vo);
|
||||||
int update(ProductVO vo);
|
int update(ProductVO vo);
|
||||||
int deleteById(@Param("productId") Long productId);
|
int deleteById(@Param("productId") Long productId);
|
||||||
|
|
||||||
/** 신규: SearchParam 기반 페이징 검색 */
|
|
||||||
List<ProductResp> selectByParam(com.ga.core.vo.product.ProductSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,17 +51,4 @@ public interface ReceiveMapper {
|
|||||||
@Param("status") String status,
|
@Param("status") String status,
|
||||||
@Param("note") String note,
|
@Param("note") String note,
|
||||||
@Param("userId") Long userId);
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
// ===================== 신규: Resp + SearchParam =====================
|
|
||||||
List<CompanyProfileResp> selectProfileResp(CompanyProfileSearchParam param);
|
|
||||||
CompanyProfileResp selectProfileRespByCode(@Param("companyCode") String companyCode);
|
|
||||||
|
|
||||||
List<CompanyFieldMappingResp> selectFieldMappingResp(@Param("companyCode") String companyCode,
|
|
||||||
@Param("targetTable") String targetTable);
|
|
||||||
|
|
||||||
List<CodeMappingResp> selectCodeMappingResp(CodeMappingSearchParam param);
|
|
||||||
|
|
||||||
List<RawCommissionDataResp> selectRawResp(RawCommissionDataSearchParam param);
|
|
||||||
|
|
||||||
List<ParseErrorLogResp> selectErrorResp(ParseErrorLogSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,11 +57,4 @@ public interface RuleMapper {
|
|||||||
ExceptionTypeCodeVO selectExceptionCode(@Param("exceptionCode") String exceptionCode);
|
ExceptionTypeCodeVO selectExceptionCode(@Param("exceptionCode") String exceptionCode);
|
||||||
int insertExceptionCode(ExceptionTypeCodeVO vo);
|
int insertExceptionCode(ExceptionTypeCodeVO vo);
|
||||||
int updateExceptionCode(ExceptionTypeCodeVO vo);
|
int updateExceptionCode(ExceptionTypeCodeVO vo);
|
||||||
|
|
||||||
// ===================== 신규: Resp + SearchParam =====================
|
|
||||||
List<CommissionRateResp> selectCommissionRateResp(CommissionRateSearchParam param);
|
|
||||||
List<PayoutRuleResp> selectPayoutRuleResp(PayoutRuleSearchParam param);
|
|
||||||
List<OverrideRuleResp> selectOverrideRuleResp(OverrideRuleSearchParam param);
|
|
||||||
List<ChargebackRuleResp> selectChargebackRuleResp(ChargebackRuleSearchParam param);
|
|
||||||
List<ExceptionTypeCodeResp> selectExceptionTypeCodeResp(ExceptionTypeCodeSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,4 @@ public interface BatchJobLogMapper {
|
|||||||
List<BatchJobLogVO> selectList(@Param("jobName") String jobName,
|
List<BatchJobLogVO> selectList(@Param("jobName") String jobName,
|
||||||
@Param("settleMonth") String settleMonth);
|
@Param("settleMonth") String settleMonth);
|
||||||
int isRunning(@Param("jobName") String jobName);
|
int isRunning(@Param("jobName") String jobName);
|
||||||
|
|
||||||
/** 신규 */
|
|
||||||
List<com.ga.core.vo.settle.BatchJobLogResp> selectRespList(com.ga.core.vo.settle.BatchJobLogSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,4 @@ public interface ChargebackMapper {
|
|||||||
|
|
||||||
List<Map<String, Object>> aggregateByAgent(@Param("settleMonth") String settleMonth);
|
List<Map<String, Object>> aggregateByAgent(@Param("settleMonth") String settleMonth);
|
||||||
BigDecimal sumByMonth(@Param("settleMonth") String settleMonth);
|
BigDecimal sumByMonth(@Param("settleMonth") String settleMonth);
|
||||||
|
|
||||||
/** 신규 */
|
|
||||||
List<com.ga.core.vo.settle.ChargebackResp> selectRespList(com.ga.core.vo.settle.ChargebackSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,4 @@ public interface OverrideSettleMapper {
|
|||||||
/** 정산월 + 상위설계사별 override 합계 */
|
/** 정산월 + 상위설계사별 override 합계 */
|
||||||
List<Map<String, Object>> aggregateByUpper(@Param("settleMonth") String settleMonth);
|
List<Map<String, Object>> aggregateByUpper(@Param("settleMonth") String settleMonth);
|
||||||
BigDecimal sumByMonth(@Param("settleMonth") String settleMonth);
|
BigDecimal sumByMonth(@Param("settleMonth") String settleMonth);
|
||||||
|
|
||||||
/** 신규 */
|
|
||||||
List<com.ga.core.vo.settle.OverrideSettleResp> selectRespList(com.ga.core.vo.settle.OverrideSettleSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,4 @@ public interface PaymentMapper {
|
|||||||
@Param("failReason") String failReason);
|
@Param("failReason") String failReason);
|
||||||
int updateTransferFile(@Param("paymentIds") List<Long> paymentIds,
|
int updateTransferFile(@Param("paymentIds") List<Long> paymentIds,
|
||||||
@Param("transferFileId") Long transferFileId);
|
@Param("transferFileId") Long transferFileId);
|
||||||
|
|
||||||
/** 신규: PaymentSearchParam 기반 */
|
|
||||||
List<PaymentResp> selectByParam(com.ga.core.vo.settle.PaymentSearchParam param);
|
|
||||||
PaymentResp selectRespById(@Param("paymentId") Long paymentId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,4 @@ public interface ReconciliationMapper {
|
|||||||
int resolve(@Param("reconId") Long reconId,
|
int resolve(@Param("reconId") Long reconId,
|
||||||
@Param("note") String note,
|
@Param("note") String note,
|
||||||
@Param("userId") Long userId);
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
/** 신규 */
|
|
||||||
List<com.ga.core.vo.settle.ReconciliationResp> selectRespList(com.ga.core.vo.settle.ReconciliationSearchParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,4 @@ public interface RoleMapper {
|
|||||||
@Param("menuId") Long menuId,
|
@Param("menuId") Long menuId,
|
||||||
@Param("permCode") String permCode,
|
@Param("permCode") String permCode,
|
||||||
@Param("isGranted") String isGranted);
|
@Param("isGranted") String isGranted);
|
||||||
|
|
||||||
/** 신규 */
|
|
||||||
List<com.ga.core.vo.user.RoleResp> selectRespList(com.ga.core.vo.user.RoleSearchParam param);
|
|
||||||
com.ga.core.vo.user.RoleResp selectRespById(@Param("roleId") Long roleId);
|
|
||||||
int existsByCode(@Param("roleCode") String roleCode);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.mapstruct;
|
|
||||||
|
|
||||||
import com.ga.core.vo.ledger.ExceptionLedgerSaveReq;
|
|
||||||
import com.ga.core.vo.ledger.ExceptionLedgerVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.ReportingPolicy;
|
|
||||||
|
|
||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
||||||
public interface LedgerMapStruct {
|
|
||||||
ExceptionLedgerVO toVO(ExceptionLedgerSaveReq req);
|
|
||||||
void copyToVO(ExceptionLedgerSaveReq req, @MappingTarget ExceptionLedgerVO vo);
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package com.ga.core.mapstruct;
|
|
||||||
|
|
||||||
import com.ga.core.vo.org.AgentSaveReq;
|
|
||||||
import com.ga.core.vo.org.AgentVO;
|
|
||||||
import com.ga.core.vo.org.GradeSaveReq;
|
|
||||||
import com.ga.core.vo.org.GradeVO;
|
|
||||||
import com.ga.core.vo.org.OrganizationSaveReq;
|
|
||||||
import com.ga.core.vo.org.OrganizationVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.ReportingPolicy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* org 도메인 SaveReq ↔ VO 변환.
|
|
||||||
* <p>
|
|
||||||
* INSERT 시: toVO() 로 새 VO 생성
|
|
||||||
* UPDATE 시: copyToVO(req, vo) 로 기존 VO에 머지 (PK/감사필드 보존)
|
|
||||||
*/
|
|
||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
||||||
public interface OrgMapStruct {
|
|
||||||
|
|
||||||
AgentVO toVO(AgentSaveReq req);
|
|
||||||
void copyToVO(AgentSaveReq req, @MappingTarget AgentVO vo);
|
|
||||||
|
|
||||||
GradeVO toVO(GradeSaveReq req);
|
|
||||||
void copyToVO(GradeSaveReq req, @MappingTarget GradeVO vo);
|
|
||||||
|
|
||||||
OrganizationVO toVO(OrganizationSaveReq req);
|
|
||||||
void copyToVO(OrganizationSaveReq req, @MappingTarget OrganizationVO vo);
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.ga.core.mapstruct;
|
|
||||||
|
|
||||||
import com.ga.core.vo.product.ContractSaveReq;
|
|
||||||
import com.ga.core.vo.product.ContractVO;
|
|
||||||
import com.ga.core.vo.product.InsuranceCompanySaveReq;
|
|
||||||
import com.ga.core.vo.product.InsuranceCompanyVO;
|
|
||||||
import com.ga.core.vo.product.ProductSaveReq;
|
|
||||||
import com.ga.core.vo.product.ProductVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.ReportingPolicy;
|
|
||||||
|
|
||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
||||||
public interface ProductMapStruct {
|
|
||||||
|
|
||||||
ContractVO toVO(ContractSaveReq req);
|
|
||||||
void copyToVO(ContractSaveReq req, @MappingTarget ContractVO vo);
|
|
||||||
|
|
||||||
InsuranceCompanyVO toVO(InsuranceCompanySaveReq req);
|
|
||||||
void copyToVO(InsuranceCompanySaveReq req, @MappingTarget InsuranceCompanyVO vo);
|
|
||||||
|
|
||||||
ProductVO toVO(ProductSaveReq req);
|
|
||||||
void copyToVO(ProductSaveReq req, @MappingTarget ProductVO vo);
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.ga.core.mapstruct;
|
|
||||||
|
|
||||||
import com.ga.core.vo.rule.*;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.ReportingPolicy;
|
|
||||||
|
|
||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
||||||
public interface RuleMapStruct {
|
|
||||||
|
|
||||||
CommissionRateVO toVO(CommissionRateSaveReq req);
|
|
||||||
void copyToVO(CommissionRateSaveReq req, @MappingTarget CommissionRateVO vo);
|
|
||||||
|
|
||||||
PayoutRuleVO toVO(PayoutRuleSaveReq req);
|
|
||||||
void copyToVO(PayoutRuleSaveReq req, @MappingTarget PayoutRuleVO vo);
|
|
||||||
|
|
||||||
OverrideRuleVO toVO(OverrideRuleSaveReq req);
|
|
||||||
void copyToVO(OverrideRuleSaveReq req, @MappingTarget OverrideRuleVO vo);
|
|
||||||
|
|
||||||
ChargebackRuleVO toVO(ChargebackRuleSaveReq req);
|
|
||||||
void copyToVO(ChargebackRuleSaveReq req, @MappingTarget ChargebackRuleVO vo);
|
|
||||||
|
|
||||||
ExceptionTypeCodeVO toVO(ExceptionTypeCodeSaveReq req);
|
|
||||||
void copyToVO(ExceptionTypeCodeSaveReq req, @MappingTarget ExceptionTypeCodeVO vo);
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.mapstruct;
|
|
||||||
|
|
||||||
import com.ga.core.vo.settle.PaymentSaveReq;
|
|
||||||
import com.ga.core.vo.settle.PaymentVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.ReportingPolicy;
|
|
||||||
|
|
||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
||||||
public interface SettleMapStruct {
|
|
||||||
PaymentVO toVO(PaymentSaveReq req);
|
|
||||||
void copyToVO(PaymentSaveReq req, @MappingTarget PaymentVO vo);
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.ga.core.mapstruct;
|
|
||||||
|
|
||||||
import com.ga.core.vo.user.RoleSaveReq;
|
|
||||||
import com.ga.core.vo.user.RoleVO;
|
|
||||||
import com.ga.core.vo.user.UserSaveReq;
|
|
||||||
import com.ga.core.vo.user.UserVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mapping;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.ReportingPolicy;
|
|
||||||
|
|
||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
||||||
public interface UserMapStruct {
|
|
||||||
|
|
||||||
/** UserSaveReq → UserVO. password는 Service에서 BCrypt 인코딩 후 별도 set. */
|
|
||||||
@Mapping(target = "password", ignore = true)
|
|
||||||
UserVO toVO(UserSaveReq req);
|
|
||||||
|
|
||||||
@Mapping(target = "password", ignore = true)
|
|
||||||
void copyToVO(UserSaveReq req, @MappingTarget UserVO vo);
|
|
||||||
|
|
||||||
RoleVO toVO(RoleSaveReq req);
|
|
||||||
void copyToVO(RoleSaveReq req, @MappingTarget RoleVO vo);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.ga.core.vo.ledger;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ExceptionLedgerSearchParam extends SearchParam {
|
|
||||||
private Long agentId;
|
|
||||||
private Long orgId;
|
|
||||||
private String settleMonth;
|
|
||||||
private String exceptionCode;
|
|
||||||
private String approveStatus; // PENDING / APPROVED / REJECTED
|
|
||||||
private String direction; // PLUS / MINUS
|
|
||||||
private Boolean recurringOnly;
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package com.ga.core.vo.org;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class AgentOrgHistoryResp {
|
|
||||||
private Long historyId;
|
|
||||||
private Long agentId;
|
|
||||||
private String agentName;
|
|
||||||
private Long fromOrgId;
|
|
||||||
private String fromOrgName;
|
|
||||||
private Long toOrgId;
|
|
||||||
private String toOrgName;
|
|
||||||
private Long fromGradeId;
|
|
||||||
private String fromGradeName;
|
|
||||||
private Long toGradeId;
|
|
||||||
private String toGradeName;
|
|
||||||
private String changeType;
|
|
||||||
private String changeTypeName;
|
|
||||||
private LocalDate changeDate;
|
|
||||||
private String changeReason;
|
|
||||||
private LocalDateTime createdAt;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ga.core.vo.org;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class GradeResp {
|
|
||||||
private Long gradeId;
|
|
||||||
private String gradeName;
|
|
||||||
private Integer gradeLevel;
|
|
||||||
private String gradeGroup;
|
|
||||||
private String description;
|
|
||||||
private String isActive;
|
|
||||||
private Integer sortOrder;
|
|
||||||
private Integer agentCount; // 직급 보유 설계사 수
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.ga.core.vo.org;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class GradeSaveReq {
|
|
||||||
@NotBlank(message = "직급명은 필수입니다")
|
|
||||||
@Size(max = 30)
|
|
||||||
private String gradeName;
|
|
||||||
|
|
||||||
@NotNull(message = "직급 레벨은 필수입니다")
|
|
||||||
private Integer gradeLevel;
|
|
||||||
|
|
||||||
private String gradeGroup;
|
|
||||||
private String description;
|
|
||||||
private String isActive;
|
|
||||||
private Integer sortOrder;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package com.ga.core.vo.org;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class GradeSearchParam extends SearchParam {
|
|
||||||
private String gradeGroup;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.ga.core.vo.org;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class OrganizationSaveReq {
|
|
||||||
private Long parentOrgId;
|
|
||||||
|
|
||||||
@NotBlank(message = "조직명은 필수입니다")
|
|
||||||
@Size(max = 100)
|
|
||||||
private String orgName;
|
|
||||||
|
|
||||||
@NotBlank(message = "조직 유형은 필수입니다")
|
|
||||||
private String orgType; // HQ / BR / TM
|
|
||||||
|
|
||||||
private String region;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ga.core.vo.org;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class OrganizationSearchParam extends SearchParam {
|
|
||||||
private Long parentOrgId;
|
|
||||||
private String orgType;
|
|
||||||
private String region;
|
|
||||||
private String isActive;
|
|
||||||
private Boolean includeSubOrgs;
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
package com.ga.core.vo.product;
|
|
||||||
|
|
||||||
import com.ga.common.annotation.ExcelColumn;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 계약 엑셀 다운로드/업로드용. 어노테이션 기반 자동 매핑.
|
|
||||||
* 마스킹/코드그룹 변환은 ExcelService가 처리.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class ContractExcelVO {
|
|
||||||
|
|
||||||
@ExcelColumn(header = "증권번호", order = 1, width = 22, required = true)
|
|
||||||
private String policyNo;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "설계사명", order = 2, width = 14)
|
|
||||||
private String agentName;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "보험사", order = 3, width = 14)
|
|
||||||
private String companyName;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "상품명", order = 4, width = 24)
|
|
||||||
private String productName;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "보종", order = 5, width = 12, codeGroup = "INSURANCE_TYPE")
|
|
||||||
private String insuranceType;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "계약자", order = 6, width = 14)
|
|
||||||
private String contractorName;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "피보험자", order = 7, width = 14)
|
|
||||||
private String insuredName;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "보험료", order = 8, width = 14)
|
|
||||||
private BigDecimal premium;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "납주기", order = 9, width = 8, codeGroup = "PAY_CYCLE")
|
|
||||||
private String payCycle;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "상태", order = 10, width = 10, codeGroup = "CONTRACT_STATUS")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "체결일", order = 11, width = 12, format = "yyyy-MM-dd")
|
|
||||||
private LocalDate contractDate;
|
|
||||||
|
|
||||||
@ExcelColumn(header = "효력일", order = 12, width = 12, format = "yyyy-MM-dd")
|
|
||||||
private LocalDate effectiveDate;
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.ga.core.vo.product;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class InsuranceCompanyResp {
|
|
||||||
private Long companyId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String companyType;
|
|
||||||
private String companyTypeName;
|
|
||||||
private String bizNo;
|
|
||||||
private String contactName;
|
|
||||||
private String contactPhone;
|
|
||||||
private String contactEmail;
|
|
||||||
private String isActive;
|
|
||||||
private Integer productCount; // 상품 수
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.ga.core.vo.product;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class InsuranceCompanySaveReq {
|
|
||||||
@NotBlank(message = "보험사 코드는 필수입니다")
|
|
||||||
@Size(max = 20)
|
|
||||||
private String companyCode;
|
|
||||||
|
|
||||||
@NotBlank(message = "보험사명은 필수입니다")
|
|
||||||
@Size(max = 100)
|
|
||||||
private String companyName;
|
|
||||||
|
|
||||||
private String companyType;
|
|
||||||
private String bizNo;
|
|
||||||
private String contactName;
|
|
||||||
private String contactPhone;
|
|
||||||
private String contactEmail;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package com.ga.core.vo.product;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class InsuranceCompanySearchParam extends SearchParam {
|
|
||||||
private String companyType;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.ga.core.vo.product;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ProductSaveReq {
|
|
||||||
@NotNull(message = "보험사를 선택해주세요")
|
|
||||||
private Long companyId;
|
|
||||||
|
|
||||||
@NotBlank(message = "상품 코드는 필수입니다")
|
|
||||||
@Size(max = 30)
|
|
||||||
private String productCode;
|
|
||||||
|
|
||||||
@NotBlank(message = "상품명은 필수입니다")
|
|
||||||
@Size(max = 100)
|
|
||||||
private String productName;
|
|
||||||
|
|
||||||
@NotBlank(message = "보험 종목은 필수입니다")
|
|
||||||
private String insuranceType;
|
|
||||||
|
|
||||||
private String productGroup;
|
|
||||||
private String payPeriodType;
|
|
||||||
private String isActive;
|
|
||||||
private LocalDate launchDate;
|
|
||||||
private LocalDate endDate;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.ga.core.vo.product;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ProductSearchParam extends SearchParam {
|
|
||||||
private Long companyId;
|
|
||||||
private String insuranceType;
|
|
||||||
private String productGroup;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CodeMappingResp {
|
|
||||||
private Long codeId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String codeType;
|
|
||||||
private String codeTypeName;
|
|
||||||
private String sourceCode;
|
|
||||||
private String sourceName;
|
|
||||||
private String targetCode;
|
|
||||||
private String targetName;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CodeMappingSaveReq {
|
|
||||||
@NotBlank private String companyCode;
|
|
||||||
@NotBlank private String codeType;
|
|
||||||
@NotBlank private String sourceCode;
|
|
||||||
private String sourceName;
|
|
||||||
@NotBlank private String targetCode;
|
|
||||||
private String targetName;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class CodeMappingSearchParam extends SearchParam {
|
|
||||||
private String companyCode;
|
|
||||||
private String codeType;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CompanyFieldMappingResp {
|
|
||||||
private Long mappingId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String sourceField;
|
|
||||||
private Integer sourceColIndex;
|
|
||||||
private String targetTable;
|
|
||||||
private String targetField;
|
|
||||||
private String dataType;
|
|
||||||
private String transformRule;
|
|
||||||
private String defaultValue;
|
|
||||||
private String isRequired;
|
|
||||||
private Integer sortOrder;
|
|
||||||
private Integer version;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CompanyFieldMappingSaveReq {
|
|
||||||
@NotBlank
|
|
||||||
private String companyCode;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String sourceField;
|
|
||||||
|
|
||||||
private Integer sourceColIndex;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String targetTable;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String targetField;
|
|
||||||
|
|
||||||
private String dataType;
|
|
||||||
private String transformRule;
|
|
||||||
private String defaultValue;
|
|
||||||
private String isRequired;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private Integer sortOrder;
|
|
||||||
private Integer version;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CompanyProfileResp {
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String dataFormat;
|
|
||||||
private String dataFormatName;
|
|
||||||
private String receiveMethod;
|
|
||||||
private String receiveMethodName;
|
|
||||||
private String fileEncoding;
|
|
||||||
private String delimiter;
|
|
||||||
private Integer headerRow;
|
|
||||||
private Integer dataStartRow;
|
|
||||||
private String sheetName;
|
|
||||||
private String dateFormat;
|
|
||||||
private String amountFormat;
|
|
||||||
private String apiUrl;
|
|
||||||
private String ftpHost;
|
|
||||||
private String ftpPath;
|
|
||||||
private String receiveSchedule;
|
|
||||||
private String isActive;
|
|
||||||
private Integer fieldMappingCount;
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CompanyProfileSaveReq {
|
|
||||||
@NotBlank
|
|
||||||
private String companyCode;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String dataFormat; // EXCEL / CSV / EDI / API
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String receiveMethod; // MANUAL / FTP / API / SFTP
|
|
||||||
|
|
||||||
private String fileEncoding;
|
|
||||||
private String delimiter;
|
|
||||||
private Integer headerRow;
|
|
||||||
private Integer dataStartRow;
|
|
||||||
private String sheetName;
|
|
||||||
private String dateFormat;
|
|
||||||
private String amountFormat;
|
|
||||||
private String apiUrl;
|
|
||||||
private String ftpHost;
|
|
||||||
private String ftpPath;
|
|
||||||
private String receiveSchedule;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class CompanyProfileSearchParam extends SearchParam {
|
|
||||||
private String dataFormat;
|
|
||||||
private String receiveMethod;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ParseErrorLogResp {
|
|
||||||
private Long errorId;
|
|
||||||
private Long rawId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String errorType;
|
|
||||||
private String errorTypeName;
|
|
||||||
private String errorField;
|
|
||||||
private String errorValue;
|
|
||||||
private String errorMessage;
|
|
||||||
private String resolveStatus;
|
|
||||||
private String resolveStatusName;
|
|
||||||
private Long resolvedBy;
|
|
||||||
private String resolvedByName;
|
|
||||||
private String resolveNote;
|
|
||||||
private LocalDateTime resolvedAt;
|
|
||||||
private LocalDateTime createdAt;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ParseErrorLogSearchParam extends SearchParam {
|
|
||||||
private String companyCode;
|
|
||||||
private String errorType;
|
|
||||||
private String resolveStatus;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class RawCommissionDataResp {
|
|
||||||
private Long rawId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String batchId;
|
|
||||||
private String settleMonth;
|
|
||||||
private String dataType;
|
|
||||||
private String parseStatus;
|
|
||||||
private String parseStatusName;
|
|
||||||
private Long mappedLedgerId;
|
|
||||||
private String mappedTable;
|
|
||||||
private String fileName;
|
|
||||||
private Integer rowNumber;
|
|
||||||
private LocalDateTime receivedAt;
|
|
||||||
private LocalDateTime parsedAt;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.ga.core.vo.receive;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class RawCommissionDataSearchParam extends SearchParam {
|
|
||||||
private String companyCode;
|
|
||||||
private String settleMonth;
|
|
||||||
private String parseStatus;
|
|
||||||
private String batchId;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ChargebackRuleResp {
|
|
||||||
private Long cbRuleId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String insuranceType;
|
|
||||||
private String insuranceTypeName;
|
|
||||||
private Integer lapseMonthFrom;
|
|
||||||
private Integer lapseMonthTo;
|
|
||||||
private BigDecimal cbRate;
|
|
||||||
private String includeOverride;
|
|
||||||
private String installmentAllowed;
|
|
||||||
private Integer maxInstallments;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
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 ChargebackRuleSaveReq {
|
|
||||||
@NotBlank private String companyCode;
|
|
||||||
@NotBlank private String insuranceType;
|
|
||||||
|
|
||||||
@NotNull private Integer lapseMonthFrom;
|
|
||||||
@NotNull private Integer lapseMonthTo;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@PositiveOrZero
|
|
||||||
private BigDecimal cbRate;
|
|
||||||
|
|
||||||
private String includeOverride;
|
|
||||||
private String installmentAllowed;
|
|
||||||
private Integer maxInstallments;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ChargebackRuleSearchParam extends SearchParam {
|
|
||||||
private String companyCode;
|
|
||||||
private String insuranceType;
|
|
||||||
private LocalDate effectiveDate;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CommissionRateResp {
|
|
||||||
private Long rateId;
|
|
||||||
private Long productId;
|
|
||||||
private String productCode;
|
|
||||||
private String productName;
|
|
||||||
private String companyName;
|
|
||||||
private Integer commissionYear;
|
|
||||||
private BigDecimal ratePct;
|
|
||||||
private String payMethodCond;
|
|
||||||
private BigDecimal minPremium;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
private Integer version;
|
|
||||||
private LocalDateTime createdAt;
|
|
||||||
private String createdByName;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.PositiveOrZero;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class CommissionRateSaveReq {
|
|
||||||
@NotNull private Long productId;
|
|
||||||
|
|
||||||
@NotNull(message = "수수료 연차는 필수입니다")
|
|
||||||
private Integer commissionYear;
|
|
||||||
|
|
||||||
@NotNull(message = "수수료율은 필수입니다")
|
|
||||||
@PositiveOrZero
|
|
||||||
private BigDecimal ratePct;
|
|
||||||
|
|
||||||
private String payMethodCond;
|
|
||||||
private BigDecimal minPremium;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class CommissionRateSearchParam extends SearchParam {
|
|
||||||
private Long productId;
|
|
||||||
private Long companyId;
|
|
||||||
private Integer commissionYear;
|
|
||||||
private LocalDate effectiveDate; // 해당일에 유효한 규정만
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExceptionTypeCodeResp {
|
|
||||||
private String exceptionCode;
|
|
||||||
private String exceptionName;
|
|
||||||
private String category;
|
|
||||||
private String categoryName;
|
|
||||||
private String direction;
|
|
||||||
private String directionName;
|
|
||||||
private String autoCalcYn;
|
|
||||||
private String approvalRequired;
|
|
||||||
private String taxIncluded;
|
|
||||||
private String description;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExceptionTypeCodeSaveReq {
|
|
||||||
@NotBlank
|
|
||||||
@Size(max = 30)
|
|
||||||
private String exceptionCode;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
@Size(max = 100)
|
|
||||||
private String exceptionName;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String category;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
private String direction; // PLUS / MINUS
|
|
||||||
|
|
||||||
private String autoCalcYn;
|
|
||||||
private String approvalRequired;
|
|
||||||
private String taxIncluded;
|
|
||||||
private String description;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ExceptionTypeCodeSearchParam extends SearchParam {
|
|
||||||
private String category;
|
|
||||||
private String direction;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class OverrideRuleResp {
|
|
||||||
private Long overrideId;
|
|
||||||
private Long fromGrade;
|
|
||||||
private String fromGradeName;
|
|
||||||
private Long toGrade;
|
|
||||||
private String toGradeName;
|
|
||||||
private BigDecimal overridePct;
|
|
||||||
private String calcType;
|
|
||||||
private String calcTypeName;
|
|
||||||
private String insuranceTypeCond;
|
|
||||||
private BigDecimal capAmount;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.PositiveOrZero;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class OverrideRuleSaveReq {
|
|
||||||
@NotNull private Long fromGrade;
|
|
||||||
@NotNull private Long toGrade;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@PositiveOrZero
|
|
||||||
private BigDecimal overridePct;
|
|
||||||
|
|
||||||
private String calcType;
|
|
||||||
private String insuranceTypeCond;
|
|
||||||
private BigDecimal capAmount;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class OverrideRuleSearchParam extends SearchParam {
|
|
||||||
private Long fromGrade;
|
|
||||||
private Long toGrade;
|
|
||||||
private LocalDate effectiveDate;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PayoutRuleResp {
|
|
||||||
private Long ruleId;
|
|
||||||
private Long gradeId;
|
|
||||||
private String gradeName;
|
|
||||||
private String insuranceType;
|
|
||||||
private String insuranceTypeName;
|
|
||||||
private Integer commissionYear;
|
|
||||||
private BigDecimal payoutPct;
|
|
||||||
private String payMethodCond;
|
|
||||||
private String performanceGrade;
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
private Integer version;
|
|
||||||
private LocalDateTime createdAt;
|
|
||||||
private String createdByName;
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
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 PayoutRuleSaveReq {
|
|
||||||
@NotNull private Long gradeId;
|
|
||||||
|
|
||||||
@NotBlank(message = "보종은 필수입니다")
|
|
||||||
private String insuranceType;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private Integer commissionYear;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@PositiveOrZero
|
|
||||||
private BigDecimal payoutPct;
|
|
||||||
|
|
||||||
private String payMethodCond;
|
|
||||||
private String performanceGrade;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private LocalDate effectiveFrom;
|
|
||||||
private LocalDate effectiveTo;
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.ga.core.vo.rule;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class PayoutRuleSearchParam extends SearchParam {
|
|
||||||
private Long gradeId;
|
|
||||||
private String insuranceType;
|
|
||||||
private Integer commissionYear;
|
|
||||||
private LocalDate effectiveDate;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BatchJobLogResp {
|
|
||||||
private Long jobId;
|
|
||||||
private String jobName;
|
|
||||||
private String jobNameDisplay;
|
|
||||||
private String jobParams;
|
|
||||||
private String settleMonth;
|
|
||||||
private String status;
|
|
||||||
private String statusName;
|
|
||||||
private String currentStep;
|
|
||||||
private Integer progressPct;
|
|
||||||
private Integer totalCount;
|
|
||||||
private Integer processedCount;
|
|
||||||
private Integer errorCount;
|
|
||||||
private String errorMessage;
|
|
||||||
private LocalDateTime startedAt;
|
|
||||||
private LocalDateTime finishedAt;
|
|
||||||
private Integer durationSec;
|
|
||||||
private Long triggeredBy;
|
|
||||||
private String triggeredByName;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class BatchJobLogSearchParam extends SearchParam {
|
|
||||||
private String jobName;
|
|
||||||
private String settleMonth;
|
|
||||||
private String batchJobStatus;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ChargebackResp {
|
|
||||||
private Long cbId;
|
|
||||||
private Long contractId;
|
|
||||||
private Long agentId;
|
|
||||||
private String agentName;
|
|
||||||
private String policyNo;
|
|
||||||
private String productName;
|
|
||||||
private Integer lapseMonth;
|
|
||||||
private BigDecimal cbRate;
|
|
||||||
private BigDecimal cbAmount;
|
|
||||||
private BigDecimal paidAmount;
|
|
||||||
private BigDecimal remainAmount;
|
|
||||||
private String settleMonth;
|
|
||||||
private Integer installmentNo;
|
|
||||||
private Integer maxInstallments;
|
|
||||||
private String status;
|
|
||||||
private String statusName;
|
|
||||||
private LocalDateTime createdAt;
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ChargebackSearchParam extends SearchParam {
|
|
||||||
private Long agentId;
|
|
||||||
private Long contractId;
|
|
||||||
private String policyNo;
|
|
||||||
private String settleMonth;
|
|
||||||
private String chargebackStatus;
|
|
||||||
private Boolean remainOnly; // 잔액 있는 것만
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class OverrideSettleResp {
|
|
||||||
private Long osId;
|
|
||||||
private Long settleId;
|
|
||||||
private Long upperAgentId;
|
|
||||||
private String upperAgentName;
|
|
||||||
private String upperOrgName;
|
|
||||||
private String upperGradeName;
|
|
||||||
private Long lowerAgentId;
|
|
||||||
private String lowerAgentName;
|
|
||||||
private String settleMonth;
|
|
||||||
private BigDecimal baseAmount;
|
|
||||||
private BigDecimal overridePct;
|
|
||||||
private BigDecimal overrideAmount;
|
|
||||||
private LocalDateTime calcDate;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class OverrideSettleSearchParam extends SearchParam {
|
|
||||||
private Long upperAgentId;
|
|
||||||
private Long lowerAgentId;
|
|
||||||
private Long settleId;
|
|
||||||
private String settleMonth;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Positive;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PaymentSaveReq {
|
|
||||||
@NotNull
|
|
||||||
private Long settleId;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private Long agentId;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Positive
|
|
||||||
private BigDecimal payAmount;
|
|
||||||
|
|
||||||
private String bankCode;
|
|
||||||
private String accountNo; // 입력 시 평문 → EncryptTypeHandler 가 저장 시 암호화
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private LocalDate payDate;
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class PaymentSearchParam extends SearchParam {
|
|
||||||
private Long agentId;
|
|
||||||
private Long settleId;
|
|
||||||
private String payStatus;
|
|
||||||
private LocalDate payDateFrom;
|
|
||||||
private LocalDate payDateTo;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ReconciliationResp {
|
|
||||||
private Long reconId;
|
|
||||||
private String companyCode;
|
|
||||||
private String companyName;
|
|
||||||
private String settleMonth;
|
|
||||||
private BigDecimal companyTotal;
|
|
||||||
private BigDecimal systemTotal;
|
|
||||||
private BigDecimal diffAmount;
|
|
||||||
private Integer diffCount;
|
|
||||||
private String status;
|
|
||||||
private String statusName;
|
|
||||||
private String resolveNote;
|
|
||||||
private Long resolvedBy;
|
|
||||||
private String resolvedByName;
|
|
||||||
private LocalDateTime resolvedAt;
|
|
||||||
private LocalDateTime createdAt;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.ga.core.vo.settle;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ReconciliationSearchParam extends SearchParam {
|
|
||||||
private String companyCode;
|
|
||||||
private String settleMonth;
|
|
||||||
private String reconcileStatus;
|
|
||||||
private Boolean diffOnly; // 차이 있는 것만
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.ga.core.vo.user;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class RoleResp {
|
|
||||||
private Long roleId;
|
|
||||||
private String roleCode;
|
|
||||||
private String roleName;
|
|
||||||
private String roleDesc;
|
|
||||||
private Integer roleLevel;
|
|
||||||
private String isSystem;
|
|
||||||
private String isActive;
|
|
||||||
private Integer userCount; // 해당 역할 보유 사용자 수
|
|
||||||
private Integer permissionCount; // 부여된 메뉴-권한 수
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.ga.core.vo.user;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class RoleSaveReq {
|
|
||||||
@NotBlank
|
|
||||||
@Size(max = 30)
|
|
||||||
private String roleCode;
|
|
||||||
|
|
||||||
@NotBlank
|
|
||||||
@Size(max = 50)
|
|
||||||
private String roleName;
|
|
||||||
|
|
||||||
private String roleDesc;
|
|
||||||
private Integer roleLevel;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package com.ga.core.vo.user;
|
|
||||||
|
|
||||||
import com.ga.common.model.SearchParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class RoleSearchParam extends SearchParam {
|
|
||||||
private String isSystem;
|
|
||||||
private String isActive;
|
|
||||||
}
|
|
||||||
@@ -35,33 +35,4 @@
|
|||||||
|
|
||||||
<delete id="deleteById">DELETE FROM grade WHERE grade_id = #{gradeId}</delete>
|
<delete id="deleteById">DELETE FROM grade WHERE grade_id = #{gradeId}</delete>
|
||||||
|
|
||||||
<!-- 신규: GradeResp + SearchParam -->
|
|
||||||
<resultMap id="GradeRespMap" type="com.ga.core.vo.org.GradeResp"/>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="GradeRespMap">
|
|
||||||
SELECT g.grade_id, g.grade_name, g.grade_level, g.grade_group, g.description,
|
|
||||||
g.is_active, g.sort_order,
|
|
||||||
(SELECT COUNT(*) FROM agent a WHERE a.grade_id = g.grade_id AND a.status = 'ACTIVE') AS agent_count
|
|
||||||
FROM grade g
|
|
||||||
<where>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND g.grade_name LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="gradeGroup != null and gradeGroup != ''">AND g.grade_group = #{gradeGroup}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND g.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY g.grade_level, g.sort_order
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRespById" resultMap="GradeRespMap">
|
|
||||||
SELECT g.grade_id, g.grade_name, g.grade_level, g.grade_group, g.description,
|
|
||||||
g.is_active, g.sort_order,
|
|
||||||
(SELECT COUNT(*) FROM agent a WHERE a.grade_id = g.grade_id AND a.status = 'ACTIVE') AS agent_count
|
|
||||||
FROM grade g WHERE g.grade_id = #{gradeId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="countAgents" resultType="int">
|
|
||||||
SELECT COUNT(*) FROM agent WHERE grade_id = #{gradeId} AND status = 'ACTIVE'
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -34,41 +34,6 @@
|
|||||||
ORDER BY o.org_level, o.sort_order, o.org_id
|
ORDER BY o.org_level, o.sort_order, o.org_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 신규: SearchParam 기반 페이징 검색 -->
|
|
||||||
<select id="selectByParam" resultMap="OrgRespMap">
|
|
||||||
SELECT o.org_id, o.parent_org_id, p.org_name AS parent_org_name,
|
|
||||||
o.org_name, o.org_type, o.org_level, o.region,
|
|
||||||
o.effective_from, o.effective_to, o.is_active
|
|
||||||
FROM organization o
|
|
||||||
LEFT JOIN organization p ON p.org_id = o.parent_org_id
|
|
||||||
<where>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND o.org_name LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="parentOrgId != null">
|
|
||||||
<choose>
|
|
||||||
<when test="includeSubOrgs == true">
|
|
||||||
AND o.org_id IN (
|
|
||||||
WITH RECURSIVE d AS (
|
|
||||||
SELECT org_id FROM organization WHERE org_id = #{parentOrgId}
|
|
||||||
UNION ALL
|
|
||||||
SELECT c.org_id FROM organization c JOIN d ON c.parent_org_id = d.org_id
|
|
||||||
)
|
|
||||||
SELECT org_id FROM d
|
|
||||||
)
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
AND o.parent_org_id = #{parentOrgId}
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</if>
|
|
||||||
<if test="orgType != null and orgType != ''">AND o.org_type = #{orgType}</if>
|
|
||||||
<if test="region != null and region != ''">AND o.region = #{region}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND o.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY o.org_level, o.org_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectById" resultMap="OrgVOMap">
|
<select id="selectById" resultMap="OrgVOMap">
|
||||||
SELECT * FROM organization WHERE org_id = #{orgId}
|
SELECT * FROM organization WHERE org_id = #{orgId}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -48,36 +48,4 @@
|
|||||||
|
|
||||||
<delete id="deleteById">DELETE FROM insurance_company WHERE company_id = #{companyId}</delete>
|
<delete id="deleteById">DELETE FROM insurance_company WHERE company_id = #{companyId}</delete>
|
||||||
|
|
||||||
<!-- 신규 -->
|
|
||||||
<resultMap id="CompanyRespMap" type="com.ga.core.vo.product.InsuranceCompanyResp"/>
|
|
||||||
|
|
||||||
<sql id="respCols">
|
|
||||||
c.company_id, c.company_code, c.company_name, c.company_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='COMPANY_TYPE' AND cc.code=c.company_type) AS company_type_name,
|
|
||||||
c.biz_no, c.contact_name, c.contact_phone, c.contact_email, c.is_active,
|
|
||||||
(SELECT COUNT(*) FROM product p WHERE p.company_id = c.company_id) AS product_count
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="CompanyRespMap">
|
|
||||||
SELECT <include refid="respCols"/>
|
|
||||||
FROM insurance_company c
|
|
||||||
<where>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND (c.company_name LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
OR c.company_code LIKE CONCAT('%', #{searchKeyword}, '%'))
|
|
||||||
</if>
|
|
||||||
<if test="companyType != null and companyType != ''">AND c.company_type = #{companyType}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND c.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY c.company_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRespById" resultMap="CompanyRespMap">
|
|
||||||
SELECT <include refid="respCols"/> FROM insurance_company c WHERE c.company_id = #{companyId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="existsByCode" resultType="int">
|
|
||||||
SELECT COUNT(*) FROM insurance_company WHERE company_code = #{companyCode}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -65,26 +65,4 @@
|
|||||||
|
|
||||||
<delete id="deleteById">DELETE FROM product WHERE product_id = #{productId}</delete>
|
<delete id="deleteById">DELETE FROM product WHERE product_id = #{productId}</delete>
|
||||||
|
|
||||||
<!-- 신규: SearchParam 기반 -->
|
|
||||||
<select id="selectByParam" resultMap="ProductRespMap">
|
|
||||||
SELECT p.product_id, p.company_id, c.company_code, c.company_name,
|
|
||||||
p.product_code, p.product_name, p.insurance_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc
|
|
||||||
WHERE cc.group_code='INSURANCE_TYPE' AND cc.code=p.insurance_type) AS insurance_type_name,
|
|
||||||
p.product_group, p.pay_period_type, p.is_active, p.launch_date, p.end_date
|
|
||||||
FROM product p
|
|
||||||
JOIN insurance_company c ON c.company_id = p.company_id
|
|
||||||
<where>
|
|
||||||
<if test="companyId != null">AND p.company_id = #{companyId}</if>
|
|
||||||
<if test="insuranceType != null and insuranceType != ''">AND p.insurance_type = #{insuranceType}</if>
|
|
||||||
<if test="productGroup != null and productGroup != ''">AND p.product_group = #{productGroup}</if>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND (p.product_name LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
OR p.product_code = #{searchKeyword})
|
|
||||||
</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND p.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY p.product_id DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -168,112 +168,4 @@
|
|||||||
WHERE error_id = #{errorId}
|
WHERE error_id = #{errorId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- ===================== 신규: Resp + SearchParam ===================== -->
|
|
||||||
<resultMap id="ProfileRespMap" type="com.ga.core.vo.receive.CompanyProfileResp"/>
|
|
||||||
<resultMap id="FieldRespMap" type="com.ga.core.vo.receive.CompanyFieldMappingResp"/>
|
|
||||||
<resultMap id="CodeRespMap" type="com.ga.core.vo.receive.CodeMappingResp"/>
|
|
||||||
<resultMap id="RawRespMap" type="com.ga.core.vo.receive.RawCommissionDataResp"/>
|
|
||||||
<resultMap id="ErrorRespMap" type="com.ga.core.vo.receive.ParseErrorLogResp"/>
|
|
||||||
|
|
||||||
<select id="selectProfileResp" resultMap="ProfileRespMap">
|
|
||||||
SELECT cp.company_code, c.company_name,
|
|
||||||
cp.data_format,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='DATA_FORMAT' AND cc.code=cp.data_format) AS data_format_name,
|
|
||||||
cp.receive_method,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='RECEIVE_METHOD' AND cc.code=cp.receive_method) AS receive_method_name,
|
|
||||||
cp.file_encoding, cp.delimiter, cp.header_row, cp.data_start_row, cp.sheet_name,
|
|
||||||
cp.date_format, cp.amount_format, cp.api_url, cp.ftp_host, cp.ftp_path,
|
|
||||||
cp.receive_schedule, cp.is_active,
|
|
||||||
(SELECT COUNT(*) FROM company_field_mapping fm WHERE fm.company_code = cp.company_code) AS field_mapping_count
|
|
||||||
FROM company_profile cp
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = cp.company_code
|
|
||||||
<where>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND (cp.company_code LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
OR c.company_name LIKE CONCAT('%', #{searchKeyword}, '%'))
|
|
||||||
</if>
|
|
||||||
<if test="dataFormat != null and dataFormat != ''">AND cp.data_format = #{dataFormat}</if>
|
|
||||||
<if test="receiveMethod != null and receiveMethod != ''">AND cp.receive_method = #{receiveMethod}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND cp.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY cp.company_code
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectProfileRespByCode" resultMap="ProfileRespMap">
|
|
||||||
SELECT cp.company_code, c.company_name, cp.data_format, cp.receive_method,
|
|
||||||
cp.file_encoding, cp.delimiter, cp.header_row, cp.data_start_row, cp.sheet_name,
|
|
||||||
cp.date_format, cp.amount_format, cp.api_url, cp.ftp_host, cp.ftp_path,
|
|
||||||
cp.receive_schedule, cp.is_active
|
|
||||||
FROM company_profile cp
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = cp.company_code
|
|
||||||
WHERE cp.company_code = #{companyCode}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectFieldMappingResp" resultMap="FieldRespMap">
|
|
||||||
SELECT fm.mapping_id, fm.company_code, c.company_name,
|
|
||||||
fm.source_field, fm.source_col_index,
|
|
||||||
fm.target_table, fm.target_field, fm.data_type,
|
|
||||||
fm.transform_rule, fm.default_value, fm.is_required, fm.sort_order,
|
|
||||||
fm.version, fm.effective_from
|
|
||||||
FROM company_field_mapping fm
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = fm.company_code
|
|
||||||
WHERE fm.company_code = #{companyCode}
|
|
||||||
<if test="targetTable != null and targetTable != ''">
|
|
||||||
AND fm.target_table = #{targetTable}
|
|
||||||
</if>
|
|
||||||
ORDER BY fm.sort_order
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectCodeMappingResp" resultMap="CodeRespMap">
|
|
||||||
SELECT cm.code_id, cm.company_code, c.company_name,
|
|
||||||
cm.code_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='CODE_TYPE' AND cc.code=cm.code_type) AS code_type_name,
|
|
||||||
cm.source_code, cm.source_name, cm.target_code, cm.target_name, cm.is_active
|
|
||||||
FROM code_mapping cm
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = cm.company_code
|
|
||||||
<where>
|
|
||||||
<if test="companyCode != null and companyCode != ''">AND cm.company_code = #{companyCode}</if>
|
|
||||||
<if test="codeType != null and codeType != ''">AND cm.code_type = #{codeType}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND cm.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY cm.company_code, cm.code_type, cm.source_code
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRawResp" resultMap="RawRespMap">
|
|
||||||
SELECT r.raw_id, r.company_code, c.company_name, r.batch_id, r.settle_month,
|
|
||||||
r.data_type, r.parse_status,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='PARSE_STATUS' AND cc.code=r.parse_status) AS parse_status_name,
|
|
||||||
r.mapped_ledger_id, r.mapped_table, r.file_name, r.row_number,
|
|
||||||
r.received_at, r.parsed_at
|
|
||||||
FROM raw_commission_data r
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = r.company_code
|
|
||||||
<where>
|
|
||||||
<if test="companyCode != null and companyCode != ''">AND r.company_code = #{companyCode}</if>
|
|
||||||
<if test="settleMonth != null and settleMonth != ''">AND r.settle_month = #{settleMonth}</if>
|
|
||||||
<if test="parseStatus != null and parseStatus != ''">AND r.parse_status = #{parseStatus}</if>
|
|
||||||
<if test="batchId != null and batchId != ''">AND r.batch_id = #{batchId}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY r.received_at DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectErrorResp" resultMap="ErrorRespMap">
|
|
||||||
SELECT e.error_id, e.raw_id, e.company_code, c.company_name,
|
|
||||||
e.error_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='ERROR_TYPE' AND cc.code=e.error_type) AS error_type_name,
|
|
||||||
e.error_field, e.error_value, e.error_message,
|
|
||||||
e.resolve_status,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='RESOLVE_STATUS' AND cc.code=e.resolve_status) AS resolve_status_name,
|
|
||||||
e.resolved_by, u.user_name AS resolved_by_name,
|
|
||||||
e.resolve_note, e.resolved_at, e.created_at
|
|
||||||
FROM parse_error_log e
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = e.company_code
|
|
||||||
LEFT JOIN users u ON u.user_id = e.resolved_by
|
|
||||||
<where>
|
|
||||||
<if test="companyCode != null and companyCode != ''">AND e.company_code = #{companyCode}</if>
|
|
||||||
<if test="errorType != null and errorType != ''">AND e.error_type = #{errorType}</if>
|
|
||||||
<if test="resolveStatus != null and resolveStatus != ''">AND e.resolve_status = #{resolveStatus}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY e.created_at DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -193,116 +193,4 @@
|
|||||||
WHERE exception_code = #{exceptionCode}
|
WHERE exception_code = #{exceptionCode}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- ===================== 신규: Resp + SearchParam ===================== -->
|
|
||||||
<resultMap id="CommRateRespMap" type="com.ga.core.vo.rule.CommissionRateResp"/>
|
|
||||||
<resultMap id="PayoutRespMap" type="com.ga.core.vo.rule.PayoutRuleResp"/>
|
|
||||||
<resultMap id="OverrideRespMap" type="com.ga.core.vo.rule.OverrideRuleResp"/>
|
|
||||||
<resultMap id="ChargebackRespMap" type="com.ga.core.vo.rule.ChargebackRuleResp"/>
|
|
||||||
<resultMap id="ExceptionRespMap" type="com.ga.core.vo.rule.ExceptionTypeCodeResp"/>
|
|
||||||
|
|
||||||
<select id="selectCommissionRateResp" resultMap="CommRateRespMap">
|
|
||||||
SELECT cr.rate_id, cr.product_id, p.product_code, p.product_name, c.company_name,
|
|
||||||
cr.commission_year, cr.rate_pct, cr.pay_method_cond, cr.min_premium,
|
|
||||||
cr.effective_from, cr.effective_to, cr.version, cr.created_at,
|
|
||||||
u.user_name AS created_by_name
|
|
||||||
FROM commission_rate cr
|
|
||||||
JOIN product p ON p.product_id = cr.product_id
|
|
||||||
JOIN insurance_company c ON c.company_id = p.company_id
|
|
||||||
LEFT JOIN users u ON u.user_id = cr.created_by
|
|
||||||
<where>
|
|
||||||
<if test="productId != null">AND cr.product_id = #{productId}</if>
|
|
||||||
<if test="companyId != null">AND p.company_id = #{companyId}</if>
|
|
||||||
<if test="commissionYear != null">AND cr.commission_year = #{commissionYear}</if>
|
|
||||||
<if test="effectiveDate != null">
|
|
||||||
AND cr.effective_from <= #{effectiveDate}
|
|
||||||
AND (cr.effective_to IS NULL OR cr.effective_to >= #{effectiveDate})
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY cr.product_id, cr.commission_year, cr.effective_from DESC, cr.version DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectPayoutRuleResp" resultMap="PayoutRespMap">
|
|
||||||
SELECT pr.rule_id, pr.grade_id, g.grade_name,
|
|
||||||
pr.insurance_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='INSURANCE_TYPE' AND cc.code=pr.insurance_type) AS insurance_type_name,
|
|
||||||
pr.commission_year, pr.payout_pct, pr.pay_method_cond, pr.performance_grade,
|
|
||||||
pr.effective_from, pr.effective_to, pr.version, pr.created_at,
|
|
||||||
u.user_name AS created_by_name
|
|
||||||
FROM payout_rule pr
|
|
||||||
JOIN grade g ON g.grade_id = pr.grade_id
|
|
||||||
LEFT JOIN users u ON u.user_id = pr.created_by
|
|
||||||
<where>
|
|
||||||
<if test="gradeId != null">AND pr.grade_id = #{gradeId}</if>
|
|
||||||
<if test="insuranceType != null and insuranceType != ''">AND pr.insurance_type = #{insuranceType}</if>
|
|
||||||
<if test="commissionYear != null">AND pr.commission_year = #{commissionYear}</if>
|
|
||||||
<if test="effectiveDate != null">
|
|
||||||
AND pr.effective_from <= #{effectiveDate}
|
|
||||||
AND (pr.effective_to IS NULL OR pr.effective_to >= #{effectiveDate})
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY pr.grade_id, pr.insurance_type, pr.effective_from DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectOverrideRuleResp" resultMap="OverrideRespMap">
|
|
||||||
SELECT o.override_id,
|
|
||||||
o.from_grade, gf.grade_name AS from_grade_name,
|
|
||||||
o.to_grade, gt.grade_name AS to_grade_name,
|
|
||||||
o.override_pct, o.calc_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='OVERRIDE_CALC_TYPE' AND cc.code=o.calc_type) AS calc_type_name,
|
|
||||||
o.insurance_type_cond, o.cap_amount,
|
|
||||||
o.effective_from, o.effective_to
|
|
||||||
FROM override_rule o
|
|
||||||
JOIN grade gf ON gf.grade_id = o.from_grade
|
|
||||||
JOIN grade gt ON gt.grade_id = o.to_grade
|
|
||||||
<where>
|
|
||||||
<if test="fromGrade != null">AND o.from_grade = #{fromGrade}</if>
|
|
||||||
<if test="toGrade != null">AND o.to_grade = #{toGrade}</if>
|
|
||||||
<if test="effectiveDate != null">
|
|
||||||
AND o.effective_from <= #{effectiveDate}
|
|
||||||
AND (o.effective_to IS NULL OR o.effective_to >= #{effectiveDate})
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY o.from_grade, o.to_grade, o.effective_from DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectChargebackRuleResp" resultMap="ChargebackRespMap">
|
|
||||||
SELECT cb.cb_rule_id, cb.company_code, c.company_name,
|
|
||||||
cb.insurance_type,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='INSURANCE_TYPE' AND cc.code=cb.insurance_type) AS insurance_type_name,
|
|
||||||
cb.lapse_month_from, cb.lapse_month_to, cb.cb_rate,
|
|
||||||
cb.include_override, cb.installment_allowed, cb.max_installments,
|
|
||||||
cb.effective_from, cb.effective_to
|
|
||||||
FROM chargeback_rule cb
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = cb.company_code
|
|
||||||
<where>
|
|
||||||
<if test="companyCode != null and companyCode != ''">AND cb.company_code = #{companyCode}</if>
|
|
||||||
<if test="insuranceType != null and insuranceType != ''">AND cb.insurance_type = #{insuranceType}</if>
|
|
||||||
<if test="effectiveDate != null">
|
|
||||||
AND cb.effective_from <= #{effectiveDate}
|
|
||||||
AND (cb.effective_to IS NULL OR cb.effective_to >= #{effectiveDate})
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY cb.company_code NULLS FIRST, cb.insurance_type, cb.lapse_month_from
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectExceptionTypeCodeResp" resultMap="ExceptionRespMap">
|
|
||||||
SELECT ec.exception_code, ec.exception_name, ec.category,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='EXCEPTION_CATEGORY' AND cc.code=ec.category) AS category_name,
|
|
||||||
ec.direction,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='EXCEPTION_DIRECTION' AND cc.code=ec.direction) AS direction_name,
|
|
||||||
ec.auto_calc_yn, ec.approval_required, ec.tax_included,
|
|
||||||
ec.description, ec.is_active
|
|
||||||
FROM exception_type_code ec
|
|
||||||
<where>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND (ec.exception_code LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
OR ec.exception_name LIKE CONCAT('%', #{searchKeyword}, '%'))
|
|
||||||
</if>
|
|
||||||
<if test="category != null and category != ''">AND ec.category = #{category}</if>
|
|
||||||
<if test="direction != null and direction != ''">AND ec.direction = #{direction}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND ec.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY ec.direction, ec.exception_code
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -52,27 +52,4 @@
|
|||||||
WHERE job_name = #{jobName} AND status IN ('STARTED','RUNNING')
|
WHERE job_name = #{jobName} AND status IN ('STARTED','RUNNING')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 신규 -->
|
|
||||||
<resultMap id="LogRespMap" type="com.ga.core.vo.settle.BatchJobLogResp"/>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="LogRespMap">
|
|
||||||
SELECT bj.job_id, bj.job_name,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='BATCH_JOB' AND cc.code=bj.job_name) AS job_name_display,
|
|
||||||
bj.job_params, bj.settle_month,
|
|
||||||
bj.status,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='BATCH_JOB_STATUS' AND cc.code=bj.status) AS status_name,
|
|
||||||
bj.current_step, bj.progress_pct, bj.total_count, bj.processed_count,
|
|
||||||
bj.error_count, bj.error_message,
|
|
||||||
bj.started_at, bj.finished_at, bj.duration_sec,
|
|
||||||
bj.triggered_by, u.user_name AS triggered_by_name
|
|
||||||
FROM batch_job_log bj
|
|
||||||
LEFT JOIN users u ON u.user_id = bj.triggered_by
|
|
||||||
<where>
|
|
||||||
<if test="jobName != null and jobName != ''">AND bj.job_name = #{jobName}</if>
|
|
||||||
<if test="settleMonth != null and settleMonth != ''">AND bj.settle_month = #{settleMonth}</if>
|
|
||||||
<if test="batchJobStatus != null and batchJobStatus != ''">AND bj.status = #{batchJobStatus}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY bj.started_at DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -48,31 +48,4 @@
|
|||||||
SELECT COALESCE(SUM(cb_amount), 0) FROM chargeback WHERE settle_month = #{settleMonth}
|
SELECT COALESCE(SUM(cb_amount), 0) FROM chargeback WHERE settle_month = #{settleMonth}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 신규 -->
|
|
||||||
<resultMap id="CBRespMap" type="com.ga.core.vo.settle.ChargebackResp"/>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="CBRespMap">
|
|
||||||
SELECT cb.cb_id, cb.contract_id, cb.agent_id, a.agent_name,
|
|
||||||
cb.policy_no, p.product_name,
|
|
||||||
cb.lapse_month, cb.cb_rate, cb.cb_amount,
|
|
||||||
cb.paid_amount, cb.remain_amount, cb.settle_month,
|
|
||||||
cb.installment_no, cb.max_installments,
|
|
||||||
cb.status,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='CHARGEBACK_STATUS' AND cc.code=cb.status) AS status_name,
|
|
||||||
cb.created_at
|
|
||||||
FROM chargeback cb
|
|
||||||
LEFT JOIN agent a ON a.agent_id = cb.agent_id
|
|
||||||
LEFT JOIN contract ct ON ct.contract_id = cb.contract_id
|
|
||||||
LEFT JOIN product p ON p.product_id = ct.product_id
|
|
||||||
<where>
|
|
||||||
<if test="agentId != null">AND cb.agent_id = #{agentId}</if>
|
|
||||||
<if test="contractId != null">AND cb.contract_id = #{contractId}</if>
|
|
||||||
<if test="policyNo != null and policyNo != ''">AND cb.policy_no = #{policyNo}</if>
|
|
||||||
<if test="settleMonth != null and settleMonth != ''">AND cb.settle_month = #{settleMonth}</if>
|
|
||||||
<if test="chargebackStatus != null and chargebackStatus != ''">AND cb.status = #{chargebackStatus}</if>
|
|
||||||
<if test="remainOnly == true">AND cb.remain_amount > 0</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY cb.created_at DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -42,27 +42,4 @@
|
|||||||
SELECT COALESCE(SUM(override_amount), 0) FROM override_settle WHERE settle_month = #{settleMonth}
|
SELECT COALESCE(SUM(override_amount), 0) FROM override_settle WHERE settle_month = #{settleMonth}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 신규 -->
|
|
||||||
<resultMap id="RespMap" type="com.ga.core.vo.settle.OverrideSettleResp"/>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="RespMap">
|
|
||||||
SELECT os.os_id, os.settle_id,
|
|
||||||
os.upper_agent_id, ua.agent_name AS upper_agent_name,
|
|
||||||
uo.org_name AS upper_org_name, ug.grade_name AS upper_grade_name,
|
|
||||||
os.lower_agent_id, la.agent_name AS lower_agent_name,
|
|
||||||
os.settle_month, os.base_amount, os.override_pct, os.override_amount, os.calc_date
|
|
||||||
FROM override_settle os
|
|
||||||
JOIN agent ua ON ua.agent_id = os.upper_agent_id
|
|
||||||
LEFT JOIN organization uo ON uo.org_id = ua.org_id
|
|
||||||
LEFT JOIN grade ug ON ug.grade_id = ua.grade_id
|
|
||||||
JOIN agent la ON la.agent_id = os.lower_agent_id
|
|
||||||
<where>
|
|
||||||
<if test="upperAgentId != null">AND os.upper_agent_id = #{upperAgentId}</if>
|
|
||||||
<if test="lowerAgentId != null">AND os.lower_agent_id = #{lowerAgentId}</if>
|
|
||||||
<if test="settleId != null">AND os.settle_id = #{settleId}</if>
|
|
||||||
<if test="settleMonth != null and settleMonth != ''">AND os.settle_month = #{settleMonth}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY os.settle_month DESC, os.upper_agent_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -75,36 +75,4 @@
|
|||||||
<foreach collection="paymentIds" item="id" open="(" separator="," close=")">#{id}</foreach>
|
<foreach collection="paymentIds" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 신규: PaymentSearchParam 기반 -->
|
|
||||||
<select id="selectByParam" resultMap="RespMap">
|
|
||||||
SELECT p.payment_id, p.settle_id, p.agent_id, a.agent_name,
|
|
||||||
p.bank_code,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='BANK_CODE' AND cc.code=p.bank_code) AS bank_name,
|
|
||||||
p.pay_amount, p.pay_date,
|
|
||||||
p.pay_status,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='PAYMENT_STATUS' AND cc.code=p.pay_status) AS pay_status_name,
|
|
||||||
p.fail_reason, s.settle_month
|
|
||||||
FROM payment p
|
|
||||||
JOIN settle_master s ON s.settle_id = p.settle_id
|
|
||||||
JOIN agent a ON a.agent_id = p.agent_id
|
|
||||||
<where>
|
|
||||||
<if test="agentId != null">AND p.agent_id = #{agentId}</if>
|
|
||||||
<if test="settleId != null">AND p.settle_id = #{settleId}</if>
|
|
||||||
<if test="payStatus != null and payStatus != ''">AND p.pay_status = #{payStatus}</if>
|
|
||||||
<if test="payDateFrom != null">AND p.pay_date >= #{payDateFrom}</if>
|
|
||||||
<if test="payDateTo != null">AND p.pay_date <= #{payDateTo}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY p.payment_id DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRespById" resultMap="RespMap">
|
|
||||||
SELECT p.payment_id, p.settle_id, p.agent_id, a.agent_name,
|
|
||||||
p.bank_code, p.pay_amount, p.pay_date, p.pay_status,
|
|
||||||
p.fail_reason, s.settle_month
|
|
||||||
FROM payment p
|
|
||||||
JOIN settle_master s ON s.settle_id = p.settle_id
|
|
||||||
JOIN agent a ON a.agent_id = p.agent_id
|
|
||||||
WHERE p.payment_id = #{paymentId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -23,26 +23,4 @@
|
|||||||
WHERE recon_id = #{reconId}
|
WHERE recon_id = #{reconId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 신규 -->
|
|
||||||
<resultMap id="ReconRespMap" type="com.ga.core.vo.settle.ReconciliationResp"/>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="ReconRespMap">
|
|
||||||
SELECT r.recon_id, r.company_code, c.company_name, r.settle_month,
|
|
||||||
r.company_total, r.system_total, r.diff_amount, r.diff_count,
|
|
||||||
r.status,
|
|
||||||
(SELECT cc.code_name FROM common_code cc WHERE cc.group_code='RECON_STATUS' AND cc.code=r.status) AS status_name,
|
|
||||||
r.resolve_note, r.resolved_by, u.user_name AS resolved_by_name,
|
|
||||||
r.resolved_at, r.created_at
|
|
||||||
FROM reconciliation r
|
|
||||||
LEFT JOIN insurance_company c ON c.company_code = r.company_code
|
|
||||||
LEFT JOIN users u ON u.user_id = r.resolved_by
|
|
||||||
<where>
|
|
||||||
<if test="companyCode != null and companyCode != ''">AND r.company_code = #{companyCode}</if>
|
|
||||||
<if test="settleMonth != null and settleMonth != ''">AND r.settle_month = #{settleMonth}</if>
|
|
||||||
<if test="reconcileStatus != null and reconcileStatus != ''">AND r.status = #{reconcileStatus}</if>
|
|
||||||
<if test="diffOnly == true">AND r.diff_amount <> 0</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY r.settle_month DESC, r.company_code
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -48,35 +48,4 @@
|
|||||||
VALUES (#{roleId}, #{menuId}, #{permCode}, COALESCE(#{isGranted},'Y'))
|
VALUES (#{roleId}, #{menuId}, #{permCode}, COALESCE(#{isGranted},'Y'))
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<!-- 신규 -->
|
|
||||||
<resultMap id="RoleRespMap" type="com.ga.core.vo.user.RoleResp"/>
|
|
||||||
|
|
||||||
<sql id="roleRespCols">
|
|
||||||
r.role_id, r.role_code, r.role_name, r.role_desc, r.role_level, r.is_system, r.is_active,
|
|
||||||
(SELECT COUNT(*) FROM user_role ur WHERE ur.role_id = r.role_id) AS user_count,
|
|
||||||
(SELECT COUNT(*) FROM role_menu_permission rmp WHERE rmp.role_id = r.role_id AND rmp.is_granted = 'Y') AS permission_count
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectRespList" resultMap="RoleRespMap">
|
|
||||||
SELECT <include refid="roleRespCols"/>
|
|
||||||
FROM role r
|
|
||||||
<where>
|
|
||||||
<if test="searchKeyword != null and searchKeyword != ''">
|
|
||||||
AND (r.role_code LIKE CONCAT('%', #{searchKeyword}, '%')
|
|
||||||
OR r.role_name LIKE CONCAT('%', #{searchKeyword}, '%'))
|
|
||||||
</if>
|
|
||||||
<if test="isSystem != null and isSystem != ''">AND r.is_system = #{isSystem}</if>
|
|
||||||
<if test="isActive != null and isActive != ''">AND r.is_active = #{isActive}</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY r.role_level DESC, r.role_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRespById" resultMap="RoleRespMap">
|
|
||||||
SELECT <include refid="roleRespCols"/> FROM role r WHERE r.role_id = #{roleId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="existsByCode" resultType="int">
|
|
||||||
SELECT COUNT(*) FROM role WHERE role_code = #{roleCode}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user