mdf:新料模式/改配模式成型剂计算;todo:合批模式
This commit is contained in:
@@ -2741,7 +2741,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
JSONObject rf_dis = rf_list.getJSONObject(i);
|
||||
String set_material_id = rf_dis.getString("material_id");
|
||||
//R1p*纯粉系数
|
||||
double net_rate_qty = rf_dis.getDouble("net_rate_qty");
|
||||
double net_rate_qty = rf_dis.getDouble("formula_qty")*net_rate_map.get(set_material_id)/100.0;
|
||||
// double net_rate_qty = rf_dis.getDouble("net_rate_qty");
|
||||
JSONObject ProductMaterialSet = MD_PD_ProductMaterialSet.query("set_type='01' and material_id='"+material_id+"' and set_material_id='"+set_material_id+"'").uniqueResult(0);
|
||||
if(ProductMaterialSet == null){
|
||||
throw new BadRequestException("产品"+material_code+"未配置新料模式可配粉软废信息!");
|
||||
@@ -4323,7 +4324,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
rf_map.forEach((key, rf_dis)->{
|
||||
String set_material_id = rf_dis.getString("material_id");
|
||||
//R1p*纯粉系数
|
||||
double net_rate_qty = rf_dis.getDouble("net_rate_qty");
|
||||
double net_rate_qty = rf_dis.getDouble("formula_qty")*net_rate_map.get(set_material_id)/100.0;
|
||||
// double net_rate_qty = rf_dis.getDouble("net_rate_qty");
|
||||
JSONObject ProductMaterialSet = MD_PD_ProductMaterialSet.query("set_type='02' and material_id='"+material_id+"' and set_material_id='"+set_material_id+"'").uniqueResult(0);
|
||||
if(ProductMaterialSet == null){
|
||||
throw new BadRequestException("产品"+material_code+"未配置改配模式可配粉软废信息!");
|
||||
@@ -4368,7 +4370,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//当前软废已配
|
||||
double now_formula_qty = bomdlts2_now.getDouble("now_formula_qty");
|
||||
//已配小于需配
|
||||
if(now_formula_qty<formula_qty){//已配软废0.8,需要成型":500*0.2
|
||||
if(now_formula_qty<formula_qty){//已配软废0.5992,需要成型":500*0.2
|
||||
bomdlts2_now.put("formula_qty",formula_qty-now_formula_qty);
|
||||
bomdlts2_now.put("material_type","01");
|
||||
bomdlts2_now.put("is_need_move","0");
|
||||
|
||||
Reference in New Issue
Block a user