|
|
|
@ -37,6 +37,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springblade.common.constant.DistributionTypeConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant; |
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.excel.util.ExcelUtil; |
|
|
|
@ -385,12 +386,15 @@ public class DistributionStockArticleController extends BladeController {
|
|
|
|
|
|
|
|
|
|
List<DistributionStockArticleEntity> entityList = distributionStockArticleDTO.getEntityList(); |
|
|
|
|
if (!realStockArticleList.isEmpty()) { |
|
|
|
|
boolean isCheck = realStockArticleList.stream().allMatch(r -> DistributionTypeConstant.shipie.getValue().equals(r.getTypeService())); |
|
|
|
|
if (!isCheck){ |
|
|
|
|
boolean flag = realStockArticleList.stream().anyMatch(a -> !OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(a.getReservationStatus())); |
|
|
|
|
if (flag) { |
|
|
|
|
String orderCode = realStockArticleList.stream().filter(f -> !OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getReservationStatus())).map(DistributionStockArticleEntity::getOrderCode).distinct().collect(Collectors.joining(",")); |
|
|
|
|
return R.fail(orderCode + "存在预约信息"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (DistributionStockArticleEntity stockArticleEntity : entityList) { |
|
|
|
|
Long id = stockArticleEntity.getId(); |
|
|
|
|