Przeglądaj źródła

매출반영 실패건 재전송 로직 수정

gagamel 4 lat temu
rodzic
commit
747ecd86bd

+ 4 - 8
src/main/java/com/style24/admin/biz/web/TsaSettleController.java

@@ -515,23 +515,19 @@ public class TsaSettleController extends TsaBaseController {
 	public GagaResponse uploadHansaeFailedSales(@RequestBody Erp erp) {
 		log.info("{}", erp);
 
-		// 매출반영 실패건 ERP 정보로 Update
+		// 매출반영 실패건 ERP 옵션 정보로 Update
 		int updCnt = settleService.updateFailedSalesUploadListToErpInfo(erp);
 		if (updCnt == 0) {
-			throw new IllegalStateException("매출반영 실패건 중 ERP 옵션 정보로 Update한 건이 없습니다.");
+			throw new IllegalStateException("매출반영 실패건 중 ERP 옵션 정보가 변경된 건이 없습니다.");
 		}
 
-		// 매출반영 실패한 브랜드 목록
+		// 매출반영 실패한 브랜드 목록 (브랜드 단위로 처리를 위해)
 		Collection<String> brandList = settleService.getFailedSalesUploadBrandList(erp);
 
-		if (brandList == null || brandList.isEmpty()) {
-			throw new IllegalStateException("매출반영 실패한 브랜드 목록이 없습니다.");
-		}
-
 		for (String brandCd : brandList) {
 			erp.setBrandCd(brandCd);
 
-			// 매출반영 실패한 목록
+			// 매출반영 실패한 목록 (브랜드 단위로 조회)
 			Collection<GagaMap> uploadList = settleService.getFailedSalesUploadList(erp);
 
 			if (uploadList == null || uploadList.isEmpty()) {