Files
ga-commission-system/ga-batch/src/main/java/com/ga/batch/config/BatchConfig.java
T
GA Pro 49f08f001d feat: P5-W3 본론 완료 — 회계결산/이상치예측/연말명세서 (V74~V78)
P5-W2 원천세·부가세 분기신고 미커밋분 + P5-W3 메뉴/권한 보강(V74) + P5-W3 본론(V75~V78)을 일괄 정리.

- V75 accounting_close / account_balance_snapshot (회계 결산)
- V76 retention_anomaly_alert / forecast_kpi_monthly (이상치·예측 KPI)
- V77 year_end_statement (연말 지급명세서)
- V78 P5-W3 본론 메뉴 4 + 권한 + 공통코드 7그룹 + 테스트데이터
- api: AccountingClose/YearEndStatement/ForecastKpi/RetentionAnomaly Service+Controller
- batch: BatchConfig Step 11/12 (원천세·부가세 분기) 연결
- frontend: 4화면(AccountingClose/YearEndStatement/RetentionAnomaly/ForecastKpi) + API 모듈 4 + 라우트
- frontend: usePermission/PermissionButton EXECUTE 권한 누락 보강
- fix: YearEndStatementMapper.xml 미존재 컬럼 a.agent_code 참조 제거

통합검증: Flyway V74~V78 운영DB 적용(v78), 4모듈 compileJava + 프론트 build PASS,
스모크 GET 8/8 + 쓰기 4/4 PASS, verify_v74.py 20/20 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 22:22:34 +09:00

69 lines
3.5 KiB
Java

package com.ga.batch.config;
import com.ga.batch.settlement.SettlementContext;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobScope;
import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.PlatformTransactionManager;
import com.ga.batch.settlement.step.*;
@Configuration
public class BatchConfig {
@Bean
@JobScope
public SettlementContext settlementContext(@Value("#{jobParameters['settleMonth']}") String settleMonth,
@Value("#{jobParameters['jobLogId'] ?: -1L}") Long jobLogId) {
SettlementContext ctx = new SettlementContext();
ctx.setSettleMonth(settleMonth);
ctx.setJobLogId(jobLogId);
return ctx;
}
@Bean
public Job monthlySettlementJob(JobRepository jobRepository,
PlatformTransactionManager tx,
ReceiveDataStep step1,
TransformDataStep step2,
ReconcileStep step3,
CalcRecruitStep step4,
CalcMaintainStep step5,
ChargebackExceptionStep step6,
CalcOverrideStep step7,
AggregateStep step8,
AccountingEntryGenerateStep step9,
YearEndIncomeAggregateStep step10,
WithholdingTaxQuarterlyStep step11,
VatReportQuarterlyStep step12) {
return new JobBuilder("MONTHLY_SETTLEMENT", jobRepository)
.start(taskletStep("receiveData", step1, jobRepository, tx))
.next(taskletStep("transformData", step2, jobRepository, tx))
.next(taskletStep("reconcile", step3, jobRepository, tx))
.next(taskletStep("calcRecruit", step4, jobRepository, tx))
.next(taskletStep("calcMaintain", step5, jobRepository, tx))
.next(taskletStep("chargebackException", step6, jobRepository, tx))
.next(taskletStep("calcOverride", step7, jobRepository, tx))
.next(taskletStep("aggregate", step8, jobRepository, tx))
.next(taskletStep("accountingEntryGenerate", step9, jobRepository, tx))
.next(taskletStep("yearEndIncomeAggregate", step10, jobRepository, tx))
.next(taskletStep("withholdingTaxQuarterly", step11, jobRepository, tx))
.next(taskletStep("vatReportQuarterly", step12, jobRepository, tx))
.build();
}
private Step taskletStep(String name, Tasklet tasklet,
JobRepository jobRepository, PlatformTransactionManager tx) {
return new StepBuilder(name, jobRepository)
.tasklet(tasklet, tx)
.build();
}
}