chenlu
2025-03-07 3ab330b8aefb3cd781c9b8730b4ab7ac65e7e9d7
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -29,6 +29,7 @@
import java.sql.Date;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static com.example.erp.service.sd.OrderService.getOrderProcessDetails;
@@ -895,11 +896,14 @@
        }
        String[] processCardList = processCard.split("/");
        List<String> result = IntStream.range(0, processCardList[1].length())
                .mapToObj(i -> String.valueOf(processCardList[1].charAt(i)))
                .collect(Collectors.toList());
        List<FlowCard> flowCardList = flowCardMapper.selectList(
                new QueryWrapper<FlowCard>()
                        .eq("process_id", processCardList[0])
                        .eq("technology_number", processCardList[1])
                        .in("technology_number", result)
        );
        for (FlowCard flowCard : flowCardList) {
            flowCard.setOrderGlassDetail(
@@ -1091,8 +1095,8 @@
        Float glassThickness = Float.parseFloat(thickness.get("thickness").toString());
        //获取此工程号订单明细信息
        List<OrderDetail> orderDetails = flowCardMapper.getOrderDetailByProductionId(orderId, productionId,"scope",inLenMax,inLenMin,inShortMax,inShortMin);
        List<OrderDetail> orderDetailsNotScope = flowCardMapper.getOrderDetailByProductionId(orderId, productionId,"notScope",inLenMax,inLenMin,inShortMax,inShortMin);
        List<OrderDetail> orderDetails = flowCardMapper.getOrderDetailByProductionId(orderId, productionId,"scope",inLenMax,inLenMin,inShortMax,inShortMin,glassThickness);
        List<OrderDetail> orderDetailsNotScope = flowCardMapper.getOrderDetailByProductionId(orderId, productionId,"notScope",inLenMax,inLenMin,inShortMax,inShortMin,glassThickness);
        //根据玻璃厚度和垫片厚度当前架子最大可放数量
        Integer shelfMaxQuantityByThickness = (int) (shelfThickness / (glassTotalThickness + spacerThickness));
@@ -1136,7 +1140,6 @@
                        shelfQuantity = Math.min(shelfQuantityByWeight, Math.min(inMaxQuantity, shelfMaxQuantityByThickness));
                        flowCardNo += 1;
                    }
                    System.out.println(orderDetail.getOrderNumber()+":"+shelfQuantity);
                }
            }