Compare commits
No commits in common. "9250093e45d477eb46c7b118dcaec62964528fe8" and "57ee71db8bdcc3842359a29c28a15bd343f18b7c" have entirely different histories.
9250093e45
...
57ee71db8b
@ -6,7 +6,6 @@ import com.interplug.qcast.biz.displayItem.dto.BomSyncResponse;
|
|||||||
import com.interplug.qcast.util.InterfaceQsp;
|
import com.interplug.qcast.util.InterfaceQsp;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.batch.core.Job;
|
import org.springframework.batch.core.Job;
|
||||||
import org.springframework.batch.core.JobExecutionListener;
|
import org.springframework.batch.core.JobExecutionListener;
|
||||||
@ -63,16 +62,9 @@ public class BomConfiguration implements JobExecutionListener {
|
|||||||
this.bomSyncList =
|
this.bomSyncList =
|
||||||
interfaceQsp.callApiData(
|
interfaceQsp.callApiData(
|
||||||
HttpMethod.GET, qspInterfaceUrl, null, new TypeReference<List<BomSyncResponse>>() {});
|
HttpMethod.GET, qspInterfaceUrl, null, new TypeReference<List<BomSyncResponse>>() {});
|
||||||
if (bomSyncList == null) {
|
return (bomSyncList != null)
|
||||||
return new ListItemReader<>(Collections.emptyList());
|
? new ListItemReader<>(bomSyncList)
|
||||||
}
|
: new ListItemReader<>(Collections.emptyList());
|
||||||
// 2026-05-20 청크 경계에서 같은 키 A/D 가 분리되어 A 가 먼저 MERGE 된 뒤
|
|
||||||
// 다음 청크의 D 가 그것을 삭제해버리는 리스크를 차단하기 위해,
|
|
||||||
// 전체 리스트를 statCd='D' 우선으로 정렬한다. (Spring Batch 는 청크를 순차 처리하므로
|
|
||||||
// 모든 D 청크가 끝난 뒤에 A/U 청크가 시작되어 전역적으로 'A 가 이김' 이 보장됨)
|
|
||||||
bomSyncList.sort(
|
|
||||||
Comparator.comparingInt((BomSyncResponse b) -> "D".equals(b.getStatCd()) ? 0 : 1));
|
|
||||||
return new ListItemReader<>(bomSyncList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user