parent
a248f12399
commit
54c0b79ac2
|
@ -3,6 +3,7 @@ package com.ruoyi.sip.service.impl;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -108,9 +109,9 @@ public class DeliveryListServiceImpl implements IDeliveryListService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult importData(List<DeliveryList> deliveryList, Long deliveryId) {
|
public AjaxResult importData(List<DeliveryList> deliveryList, Long deliveryId) {
|
||||||
List<String> productCodeList = deliveryList.stream().map(DeliveryList::getProductCode).collect(Collectors.toList());
|
List<String> productCodeList = deliveryList.stream().map(DeliveryList::getProductCode).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
if (productCodeList.isEmpty()) {
|
if (productCodeList.isEmpty()) {
|
||||||
return AjaxResult.error("产品编码为空");
|
return AjaxResult.error("文件为空或产品编码为空");
|
||||||
}
|
}
|
||||||
List<OrderList> orderLists = infoMapper.listOrderListByDeliveryId(deliveryId);
|
List<OrderList> orderLists = infoMapper.listOrderListByDeliveryId(deliveryId);
|
||||||
if (orderLists.isEmpty()) {
|
if (orderLists.isEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue