...
|
...
|
@@ -383,7 +383,7 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
|
// 上架的代码(和之前同)
|
|
|
for(FastDeliveryBatchOnShelfReq.ProductInfo productInfo : req.getProductInfos()){
|
|
|
|
|
|
StorageCheckResp storage = storageMap.get(storageMap.get(getProductCodeSizeNameKey(productInfo.getProductCode(), productInfo.getSizeName())));
|
|
|
StorageCheckResp storage = storageMap.get(getProductCodeSizeNameKey(productInfo.getProductCode(), productInfo.getSizeName()));
|
|
|
if (storage == null){
|
|
|
logger.warn("productCode {} and sizeName {}. storageId not exist.", productInfo.getProductCode(), productInfo.getSizeName());
|
|
|
throw new UfoServiceException(403, "货号和尺寸对应的storageId不存在");
|
...
|
...
|
@@ -430,8 +430,9 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
|
logger.warn("storageCheckRespList null");
|
|
|
throw new UfoServiceException(501, "上架失败!");
|
|
|
}
|
|
|
StorageCheckResp storageResp = storageCheckRespList.stream().filter(x->x.getStatus()!= StorageCheckEnum.PRODUCT_SIZE_MATCH.getType()).findAny().get();
|
|
|
if (storageResp != null){
|
|
|
Optional<StorageCheckResp> storageOptional = storageCheckRespList.stream().filter(x->x.getStatus()!= StorageCheckEnum.PRODUCT_SIZE_MATCH.getType()).findAny();
|
|
|
if (storageOptional.isPresent()){
|
|
|
StorageCheckResp storageResp = storageOptional.get();
|
|
|
logger.warn("productCode {} and sizeName {} invalidate", storageResp.getProductCode(), storageResp.getSizeName());
|
|
|
throw new UfoServiceException(403, "["+getProductCodeSizeNameKey(storageResp.getProductCode(),storageResp.getSizeName())+"]"+storageResp.getStatusStr());
|
|
|
}
|
...
|
...
|
|