廖井涛
2025-02-21 284b5d41c1284dc6da25bb062de10c6d4998f186
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -1061,7 +1061,7 @@
        Float shelfThickness =  Float.parseFloat(object.get("shelfThickness").toString())*1000;
        Float spacerThickness =  Float.parseFloat(object.get("spacerThickness").toString());
        */
        Integer inMaxQuantity = 30;
        Integer inMaxQuantity = 1;
        Float inWeight = 100.0f;
        Float shelfThickness = 2000.0f;
        /*垫片厚度*/
@@ -1100,10 +1100,11 @@
                double flowCardWeight = 0.0;
                for (OrderDetail orderDetail1 : orderDetailList) {
                    if (orderDetail1.getFlowCardId().equals(FlowCardId)) {
                        flowCardWeight = orderDetail1.getHeight()*orderDetail1.getQuantity()* orderDetail1.getWidth()* glassThickness* 2.5 / 1000000;
                        flowCardWeight += orderDetail1.getHeight()*orderDetail1.getQuantity()* orderDetail1.getWidth()* glassThickness* 2.5 / 1000000;
                    }
                }
                if(flowCardWeight>0){
                    //System.out.println(inWeight+","+flowCardWeight);
                    flowCardWeight = inWeight - flowCardWeight;
                    shelfQuantity = (int) (flowCardWeight /
                            (orderDetail.getHeight()
@@ -1112,6 +1113,7 @@
                                    * 2.5 / 1000000));
                    if (shelfQuantity == 0) {
                        shelfQuantity = shelfQuantityByWeight;
                        flowCardNo += 1;
                    }
                }