ezhizao_zx 11 mesiacov pred
rodič
commit
27fdda69b0

+ 1 - 1
src/main/java/cn/ezhizao/project/business/controller/BizOutsourcedOrderController.java

@@ -874,7 +874,7 @@ public class BizOutsourcedOrderController extends BaseController {
         // 已开始生产的所有批次
         List<BizLot> workedLots = bizLotService.query().exists("(select 1 from biz_daywork t where t.deleted = 0 and t.lot_id = biz_lot.id)").list();
         List<BizOutsourcedOrderDetail> details = bizOutsourcedOrderDetailService.query().eq("master_id", detail.getMasterId()).in("lot_id", allLots.isEmpty() ? Collections.singletonList(0L) : allLots.stream().map(BizLot::getId).collect(Collectors.toList())).list();
-        List<BizFurnaceNoInfo> furnaceNoInfos = furnaceNoInfoService.query().in("daywork_id", details.stream().map(BizOutsourcedOrderDetail::getDayworkId).collect(Collectors.toList())).list();
+        List<BizFurnaceNoInfo> furnaceNoInfos = furnaceNoInfoService.query().in("daywork_id", details.isEmpty() ? Collections.singletonList(0L) : details.stream().map(BizOutsourcedOrderDetail::getDayworkId).collect(Collectors.toList())).list();
         details.forEach(e -> e.setFurnaceNoInfo(furnaceNoInfos.stream().filter(t -> t.getDayworkId().equals(e.getDayworkId())).findFirst().orElse(null)));
         List<BizLot> currentLots = bizLotService.query().eq("id", details.isEmpty() ? Collections.singletonList(0L) : details.stream().map(BizOutsourcedOrderDetail::getLotId).collect(Collectors.toList())).list();
         List<BizOutsourcedOrderDetail> result = new ArrayList<>();