|
@ -82,18 +82,22 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper,GoodsSku> im |
|
|
InventoryCusPriceQuery query = new InventoryCusPriceQuery(); |
|
|
InventoryCusPriceQuery query = new InventoryCusPriceQuery(); |
|
|
query.setCusCode(supplierCode); |
|
|
query.setCusCode(supplierCode); |
|
|
query.setInvCodes(codes); |
|
|
query.setInvCodes(codes); |
|
|
R<String> res = seeYonRequestBaseService.postBase(ERP_CUS_INV_PRICE,query,"查询客户特殊价"); |
|
|
try { |
|
|
if(res.getStatus().equals(200)){ |
|
|
R<String> res = seeYonRequestBaseService.postBase(ERP_CUS_INV_PRICE,query,"查询客户特殊价"); |
|
|
List<InventoryCusPrice> inventoryCusPrices = JsonUtil.jsonToList(res.getData(), InventoryCusPrice.class); |
|
|
if(res.getStatus().equals(200)){ |
|
|
assert inventoryCusPrices != null; |
|
|
List<InventoryCusPrice> inventoryCusPrices = JsonUtil.jsonToList(res.getData(), InventoryCusPrice.class); |
|
|
for (InventoryCusPrice cusPrice : inventoryCusPrices) { |
|
|
assert inventoryCusPrices != null; |
|
|
for (GoodsSku sku : skus) { |
|
|
for (InventoryCusPrice cusPrice : inventoryCusPrices) { |
|
|
if(sku.getSkuCode().equals(cusPrice.getInvCode())){ |
|
|
for (GoodsSku sku : skus) { |
|
|
sku.setSalesPrice(cusPrice.getPrice()); |
|
|
if(sku.getSkuCode().equals(cusPrice.getInvCode())){ |
|
|
break; |
|
|
sku.setSalesPrice(cusPrice.getPrice()); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("客户特殊价异常:{}",e.getMessage()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -105,18 +109,22 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper,GoodsSku> im |
|
|
InventoryCusPriceQuery query = new InventoryCusPriceQuery(); |
|
|
InventoryCusPriceQuery query = new InventoryCusPriceQuery(); |
|
|
query.setCusCode(supplierCode); |
|
|
query.setCusCode(supplierCode); |
|
|
query.setInvCodes(codes); |
|
|
query.setInvCodes(codes); |
|
|
R<String> res = seeYonRequestBaseService.postBase(ERP_CUS_INV_PRICE,query,"查询客户特殊价"); |
|
|
try { |
|
|
if(res.getStatus().equals(200)){ |
|
|
R<String> res = seeYonRequestBaseService.postBase(ERP_CUS_INV_PRICE,query,"查询客户特殊价"); |
|
|
List<InventoryCusPrice> inventoryCusPrices = JsonUtil.jsonToList(res.getData(), InventoryCusPrice.class); |
|
|
if(res.getStatus().equals(200)){ |
|
|
assert inventoryCusPrices != null; |
|
|
List<InventoryCusPrice> inventoryCusPrices = JsonUtil.jsonToList(res.getData(), InventoryCusPrice.class); |
|
|
for (InventoryCusPrice cusPrice : inventoryCusPrices) { |
|
|
assert inventoryCusPrices != null; |
|
|
for (GoodsSku sku : skus) { |
|
|
for (InventoryCusPrice cusPrice : inventoryCusPrices) { |
|
|
if(sku.getSkuCode().equals(cusPrice.getInvCode())){ |
|
|
for (GoodsSku sku : skus) { |
|
|
sku.setSalesPrice(cusPrice.getPrice()); |
|
|
if(sku.getSkuCode().equals(cusPrice.getInvCode())){ |
|
|
break; |
|
|
sku.setSalesPrice(cusPrice.getPrice()); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("客户特殊价异常:{}",e.getMessage()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|