|
|
@@ -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()) {
|