|
@@ -15,8 +15,6 @@ import com.fjhx.customer.service.customer.CustomerService;
|
|
|
import com.fjhx.item.entity.product.po.ProductInfo;
|
|
|
import com.fjhx.item.service.product.ProductInfoService;
|
|
|
import com.fjhx.mes.entity.applicable.po.ApplicableProducts;
|
|
|
-import com.fjhx.mes.entity.bom.po.BomDetail;
|
|
|
-import com.fjhx.mes.entity.bom.po.BomInfo;
|
|
|
import com.fjhx.mes.entity.production.dto.ProductionTaskDto;
|
|
|
import com.fjhx.mes.entity.production.dto.ProductionTaskSelectDto;
|
|
|
import com.fjhx.mes.entity.production.po.*;
|
|
@@ -222,7 +220,10 @@ public class ProductionTaskServiceImpl extends ServiceImpl<ProductionTaskMapper,
|
|
|
|
|
|
|
|
|
List<Long> productIds = bomDetailList.stream().map(WorkOrderBom::getProductId).collect(Collectors.toList());
|
|
|
- Map<Long, List<Stock>> productMap = stockService.mapKGroup(Stock::getProductId, q -> q.in(Stock::getProductId, productIds));
|
|
|
+ Map<Long, List<Stock>> productMap = new HashMap<>();
|
|
|
+ if (ObjectUtil.isNotEmpty(productIds)) {
|
|
|
+ productMap = stockService.mapKGroup(Stock::getProductId, q -> q.in(Stock::getProductId, productIds));
|
|
|
+ }
|
|
|
List<Long> errProductIdList = new ArrayList();
|
|
|
for (WorkOrderBom bomDetail : bomDetailList) {
|
|
|
Long productId = bomDetail.getProductId();
|