| | |
| | | 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()); |
| | | |
| | | //获取此工程号订单明细信息 |
| | |
| | | //当前订单明细剩余数量 |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | if(flowCardWeight>0){ |
| | | //System.out.println(inWeight+","+flowCardWeight); |
| | | flowCardWeight = inWeight - flowCardWeight; |
| | | shelfQuantity = (int) (flowCardWeight / |
| | | (orderDetail.getHeight() |
| | |
| | | } |
| | | 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("------");*/ |