Skip to content

标签跳出循环

Java
public List<Integer> existBigLogisticStorageIds(OrderRequestModel ofcOrderRequest, List<Integer> enoughStorageList) {  
    List<Integer> existBigLogisticStorageIds = new ArrayList<>();  
    out: for (Integer storageId : enoughStorageList) {  
        List<Integer> logisticsList = storageDataServiceImpl.getLogisticsByStorage(storageId);  
        for (Integer logisticsId : logisticsList) {  
            LogisticsInfoDO logisticsInfo = logisticsDataServiceImpl.getLogisticsInfoById(logisticsId);  
            if ((BaseConstant.ONE == logisticsInfo.getIsOpenDeliver())  
                    && ofcOrderRequest.getOrderPattern() == logisticsInfo.getLogisticsCategory()  
                    && logisticsInfo.getDeliverType().equals(BaseConstant.TWO)) {  
                //大件物流  
                existBigLogisticStorageIds.add(storageId);  
                continue out;  
            }  
        }  
    }  
    return existBigLogisticStorageIds;  
}

waitingresult.com