MDF:改配模式软废can_qty回滚
This commit is contained in:
@@ -3305,19 +3305,18 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
JSONObject jo = now_ivts.getJSONObject(j);
|
JSONObject jo = now_ivts.getJSONObject(j);
|
||||||
double can_qty = net_qty*add_rate/100.0;
|
double can_qty = net_qty*add_rate/100.0;
|
||||||
JSONObject jo2 = new JSONObject();
|
JSONObject jo2 = new JSONObject();
|
||||||
String ivt_material_id = jo.getString("material_id");
|
jo2.put("can_qty",can_qty);
|
||||||
double net_rate = net_rate_map.get(ivt_material_id);
|
jo2.put("can_left_qty",can_qty);
|
||||||
|
|
||||||
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);
|
|
||||||
rf_plan_map.put(set_material_id,jo2);
|
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");
|
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);
|
jo.put("can_qty",sum_ivt_qty);
|
||||||
}else{
|
}else{
|
||||||
jo.put("can_qty",net_can_qty);
|
jo.put("can_qty",can_qty);
|
||||||
}
|
}
|
||||||
ivts.add(jo);
|
ivts.add(jo);
|
||||||
}
|
}
|
||||||
@@ -4369,7 +4368,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
//当前软废已配
|
//当前软废已配
|
||||||
double now_formula_qty = bomdlts2_now.getDouble("now_formula_qty");
|
double now_formula_qty = bomdlts2_now.getDouble("now_formula_qty");
|
||||||
//已配小于需配
|
//已配小于需配
|
||||||
if(now_formula_qty<formula_qty){
|
if(now_formula_qty<formula_qty){//已配软废0.8,需要成型":500*0.2
|
||||||
bomdlts2_now.put("formula_qty",formula_qty-now_formula_qty);
|
bomdlts2_now.put("formula_qty",formula_qty-now_formula_qty);
|
||||||
bomdlts2_now.put("material_type","01");
|
bomdlts2_now.put("material_type","01");
|
||||||
bomdlts2_now.put("is_need_move","0");
|
bomdlts2_now.put("is_need_move","0");
|
||||||
|
|||||||
Reference in New Issue
Block a user