From 47ca985e28ec69867e8cce2505529fb9091bf823 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期五, 28 二月 2025 16:03:06 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override --- north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java index 5a65f28..057678f 100644 --- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java +++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java @@ -1071,14 +1071,16 @@ Float shelfThickness = Float.parseFloat(object.get("shelfThickness").toString())*1000; Float spacerThickness = Float.parseFloat(object.get("spacerThickness").toString()); */ - Integer inMaxQuantity = 1; + //Integer inMaxQuantity = 1; Float inWeight = 100.0f; Float shelfThickness = 2000.0f; /*鍨墖鍘氬害*/ Float spacerThickness = 0.0f; Map<String, Object> thickness = flowCardMapper.getGlassThicknessByProdutionId(orderId, productionId); + //鎴愬搧鐜荤拑鎬诲帤搴� Float glassTotalThickness = Float.parseFloat(thickness.get("totalThickness").toString()); + //鎴愬搧鐜荤拑鍘氬害 Float glassThickness = Float.parseFloat(thickness.get("thickness").toString()); //鑾峰彇姝ゅ伐绋嬪彿璁㈠崟鏄庣粏淇℃伅 @@ -1105,7 +1107,7 @@ //褰撳墠璁㈠崟鏄庣粏鍓╀綑鏁伴噺 if (shelfQuantity == 0) { shelfQuantity = shelfQuantityByWeight; - }else if(shelfQuantity>0){ + }else if(shelfQuantity>0){//鏋跺瓙鍓╀綑鏁伴噺澶т簬0鏃讹紝鍒ゆ柇褰撳墠鏋跺瓙鍓╀綑閲嶉噺锛屾槸鍚︽敮鎸佹渶鏂板簭鍙风殑鐨勬垚鍝侀噸閲� String FlowCardId = orderDetailList.get(orderDetailList.size() - 1).getFlowCardId(); double flowCardWeight = 0.0; for (OrderDetail orderDetail1 : orderDetailList) { @@ -1114,7 +1116,6 @@ } } if(flowCardWeight>0){ - //System.out.println(inWeight+","+flowCardWeight); flowCardWeight = inWeight - flowCardWeight; shelfQuantity = (int) (flowCardWeight / (orderDetail.getHeight() @@ -1138,7 +1139,9 @@ } String processId = productionId + String.format("%05d", flowCardNo); //鍙栨渶灏忓�� - maxQuantity = Math.min(shelfQuantity, Math.min(inMaxQuantity, shelfMaxQuantityByThickness)); + // maxQuantity = Math.min(shelfQuantity, Math.min(inMaxQuantity, shelfMaxQuantityByThickness)); + maxQuantity = Math.min(shelfQuantity, shelfMaxQuantityByThickness); + /*System.out.println(shelfQuantity + "," + inMaxQuantity + "," + shelfMaxQuantityByThickness); System.out.println(flowCardNo + "," + maxQuantity); System.out.println("------");*/ -- Gitblit v1.8.0