fix: gc_goods_export DLIVY_INNB 오류 수정 - ORDR_DLVY_INNB 사용, dlivyCdNb INSERT 전 생성
This commit is contained in:
@@ -238,7 +238,14 @@ public class AciDlivyTasklet implements Tasklet {
|
||||
}
|
||||
log.debug("[AciDlivyBatch] 주문 상품 옵션 수={} (ORDR_DLVY_INNB={})", itemList.size(), orderVO.getOrdrDlvyInnb());
|
||||
|
||||
// ② gc_goods_export 처리 (selectKey로 dlivyInnb 채번)
|
||||
// ② DLIVY_INNB = ORDR_DLVY_INNB (gc_order_shipping.ORDR_DLVY_INNB → gc_goods_export.DLIVY_INNB)
|
||||
orderVO.setDlivyInnb(orderVO.getOrdrDlvyInnb());
|
||||
|
||||
// ③ dlivyCdNb 생성 (DLIVY_INNB 확정 후, INSERT 전)
|
||||
String dlivyCdNb = "D" + new SimpleDateFormat("yyMMddHH").format(new Date()) + orderVO.getDlivyInnb();
|
||||
orderVO.setDlivyCdNb(dlivyCdNb);
|
||||
|
||||
// ④ gc_goods_export INSERT/UPDATE (dlivyCdNb 직접 포함)
|
||||
int exportCnt = aciDlivyMapper.selectGoodsExportCount(orderVO);
|
||||
if (exportCnt > 0) {
|
||||
aciDlivyMapper.updateGoodsExport(orderVO);
|
||||
@@ -246,15 +253,6 @@ public class AciDlivyTasklet implements Tasklet {
|
||||
aciDlivyMapper.insertGoodsExport(orderVO);
|
||||
}
|
||||
|
||||
// ③ dlivyCdNb 생성 (insertGoodsExport 실행 후, dlivyInnb 채번 완료 후)
|
||||
String dlivyCdNb = "D" + new SimpleDateFormat("yyMMddHH").format(new Date()) + orderVO.getDlivyInnb();
|
||||
orderVO.setDlivyCdNb(dlivyCdNb);
|
||||
|
||||
// ④ INSERT 경로: DLIVY_CD_NB 업데이트 (INSERT 시 #{dlivyCdNb}가 null이었으므로)
|
||||
if (exportCnt == 0) {
|
||||
aciDlivyMapper.updateGoodsExportDlivyCdNb(orderVO);
|
||||
}
|
||||
|
||||
// ⑤ 주문 상품 옵션별 처리 (gc_goods_export_item, gc_order_item_option)
|
||||
for (DataMap itemMap : itemList) {
|
||||
Object qyObj = itemMap.get("qy");
|
||||
|
||||
Reference in New Issue
Block a user