优化
This commit is contained in:
@@ -67,8 +67,6 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
String material_id = json.getString("material_id");
|
String material_id = json.getString("material_id");
|
||||||
//成品物料编码
|
//成品物料编码
|
||||||
String material_code = json.getString("material_code");
|
String material_code = json.getString("material_code");
|
||||||
//成品纯粉系数
|
|
||||||
double material_net_rate = json.getDouble("net_rate");
|
|
||||||
//需配软废集合
|
//需配软废集合
|
||||||
JSONArray rf_list = new JSONArray();
|
JSONArray rf_list = new JSONArray();
|
||||||
//需配新料集合
|
//需配新料集合
|
||||||
@@ -496,8 +494,6 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
String material_id = json.getString("material_id");
|
String material_id = json.getString("material_id");
|
||||||
//成品物料编码
|
//成品物料编码
|
||||||
String material_code = json.getString("material_code");
|
String material_code = json.getString("material_code");
|
||||||
//成品纯粉系数
|
|
||||||
double material_net_rate = json.getDouble("net_rate");
|
|
||||||
//需配软废集合
|
//需配软废集合
|
||||||
JSONArray rf_list = new JSONArray();
|
JSONArray rf_list = new JSONArray();
|
||||||
//需配新料集合
|
//需配新料集合
|
||||||
@@ -1423,8 +1419,6 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
String material_id = json.getString("material_id");
|
String material_id = json.getString("material_id");
|
||||||
//成品物料编码
|
//成品物料编码
|
||||||
String material_code = json.getString("material_code");
|
String material_code = json.getString("material_code");
|
||||||
//成品纯粉系数
|
|
||||||
double material_net_rate = json.getDouble("net_rate");
|
|
||||||
//需配软废集合
|
//需配软废集合
|
||||||
JSONArray rf_list = new JSONArray();
|
JSONArray rf_list = new JSONArray();
|
||||||
//需配新料集合
|
//需配新料集合
|
||||||
@@ -1515,15 +1509,15 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
for(int i=0;i<ivts_new.size();i++){
|
for(int i=0;i<ivts_new.size();i++){
|
||||||
JSONObject ivt_new = ivts_new.getJSONObject(i);
|
JSONObject ivt_new = ivts_new.getJSONObject(i);
|
||||||
double ivt_qty = ivt_new.getDouble("sum_ivt_qty");
|
double ivt_qty = ivt_new.getDouble("sum_ivt_qty");
|
||||||
|
double net_rate = ivt_new.getDouble("net_rate");
|
||||||
ivt_qty = NumberUtil.roundDown(ivt_qty,3).doubleValue();
|
ivt_qty = NumberUtil.roundDown(ivt_qty,3).doubleValue();
|
||||||
double formula_qty = 0;
|
double formula_qty = 0;
|
||||||
double rf_up = rf_left_weight.doubleValue()/(material_net_rate/100.0);
|
double rf_up = rf_left_weight.doubleValue()/(net_rate/100.0);
|
||||||
if(ivt_qty<rf_up){
|
if(ivt_qty<rf_up){
|
||||||
formula_qty = ivt_qty;
|
formula_qty = ivt_qty;
|
||||||
}else{
|
}else{
|
||||||
formula_qty = rf_up;
|
formula_qty = rf_up;
|
||||||
}
|
}
|
||||||
double net_rate = ivt_new.getDouble("net_rate");
|
|
||||||
double now_ivt_qty = formula_qty * net_rate / 100.0;
|
double now_ivt_qty = formula_qty * net_rate / 100.0;
|
||||||
|
|
||||||
//已分配软废总量
|
//已分配软废总量
|
||||||
@@ -2506,8 +2500,6 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
String material_id = json.getString("material_id");
|
String material_id = json.getString("material_id");
|
||||||
//成品物料编码
|
//成品物料编码
|
||||||
String material_code = json.getString("material_code");
|
String material_code = json.getString("material_code");
|
||||||
//成品纯粉系数
|
|
||||||
double material_net_rate = json.getDouble("net_rate");
|
|
||||||
//需配软废集合
|
//需配软废集合
|
||||||
JSONArray rf_list = new JSONArray();
|
JSONArray rf_list = new JSONArray();
|
||||||
//需配新料集合
|
//需配新料集合
|
||||||
@@ -2807,8 +2799,6 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
String material_id = json.getString("material_id");
|
String material_id = json.getString("material_id");
|
||||||
//成品物料编码
|
//成品物料编码
|
||||||
String material_code = json.getString("material_code");
|
String material_code = json.getString("material_code");
|
||||||
//成品纯粉系数
|
|
||||||
double material_net_rate = json.getDouble("net_rate");
|
|
||||||
//需配软废集合
|
//需配软废集合
|
||||||
JSONArray rf_list = new JSONArray();
|
JSONArray rf_list = new JSONArray();
|
||||||
//需配新料集合
|
//需配新料集合
|
||||||
|
|||||||
Reference in New Issue
Block a user