From 727b108c5aced617e7d548269f16c82e16f72fe1 Mon Sep 17 00:00:00 2001 From: zhangzhiqiang Date: Tue, 3 Jan 2023 12:27:25 +0800 Subject: [PATCH] =?UTF-8?q?MDF:=E6=94=B9=E9=85=8D=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E8=BD=AF=E5=BA=9Fcan=5Fqty=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pf/service/impl/AutoformulaServiceImpl.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java index d1d99c13..251b0364 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java @@ -3305,19 +3305,18 @@ public class AutoformulaServiceImpl implements AutoformulaService { JSONObject jo = now_ivts.getJSONObject(j); double can_qty = net_qty*add_rate/100.0; JSONObject jo2 = new JSONObject(); - String ivt_material_id = jo.getString("material_id"); - double net_rate = net_rate_map.get(ivt_material_id); - - double net_can_qty = can_qty/(net_rate/100.0); - jo2.put("can_qty",net_can_qty); - jo2.put("can_left_qty",net_can_qty); + jo2.put("can_qty",can_qty); + jo2.put("can_left_qty",can_qty); rf_plan_map.put(set_material_id,jo2); +// String ivt_material_id = jo.getString("material_id"); +// double net_rate = net_rate_map.get(ivt_material_id); +// double net_can_qty = can_qty/(net_rate/100.0); double sum_ivt_qty = jo.getDouble("sum_ivt_qty"); - if(net_can_qty >= sum_ivt_qty){ + if(can_qty >= sum_ivt_qty){ jo.put("can_qty",sum_ivt_qty); }else{ - jo.put("can_qty",net_can_qty); + jo.put("can_qty",can_qty); } ivts.add(jo); } @@ -4369,7 +4368,7 @@ public class AutoformulaServiceImpl implements AutoformulaService { //当前软废已配 double now_formula_qty = bomdlts2_now.getDouble("now_formula_qty"); //已配小于需配 - if(now_formula_qty