优化
This commit is contained in:
@@ -3962,10 +3962,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
double rf3_Cr3C2 = R3p.getDouble("rf_Cr3C2")/100.0;
|
double rf3_Cr3C2 = R3p.getDouble("rf_Cr3C2")/100.0;
|
||||||
//R3碳平衡
|
//R3碳平衡
|
||||||
double is_tan3 = R3p.getDouble("is_tan")/100.0;
|
double is_tan3 = R3p.getDouble("is_tan")/100.0;
|
||||||
//R2的bom碳化钨含量
|
|
||||||
double rf2_Cr3C2 = R2p.getDouble("rf_Cr3C2")/100.0;
|
|
||||||
//R2碳平衡
|
|
||||||
double is_tan2 = R2p.getDouble("is_tan")/100.0;
|
|
||||||
//R2p减=0时为true,R3p减=R3p时为false
|
//R2p减=0时为true,R3p减=R3p时为false
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
//R2p减=0
|
//R2p减=0
|
||||||
@@ -4054,6 +4051,10 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
//R3p减=R3p
|
//R3p减=R3p
|
||||||
if(!flag){
|
if(!flag){
|
||||||
|
//R2的bom碳化钨含量
|
||||||
|
double rf2_Cr3C2 = R2p.getDouble("rf_Cr3C2")/100.0;
|
||||||
|
//R2碳平衡
|
||||||
|
double is_tan2 = R2p.getDouble("is_tan")/100.0;
|
||||||
//R3p减
|
//R3p减
|
||||||
double R3p_jian = R3p.getDouble("formula_qty");
|
double R3p_jian = R3p.getDouble("formula_qty");
|
||||||
//R3p减*R3的bom碳化钨含量*R3碳平衡=CT1-CT2
|
//R3p减*R3的bom碳化钨含量*R3碳平衡=CT1-CT2
|
||||||
@@ -4161,9 +4162,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
String set_material_id = rf_dis.getString("material_id");
|
String set_material_id = rf_dis.getString("material_id");
|
||||||
//R1p*纯粉系数
|
//R1p*纯粉系数
|
||||||
double net_rate_qty = rf_dis.getDouble("net_rate_qty");
|
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);
|
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){
|
if(ProductMaterialSet == null){
|
||||||
throw new BadRequestException("产品"+material_code+"未配置新料模式可配粉软废信息!");
|
throw new BadRequestException("产品"+material_code+"未配置改配模式可配粉软废信息!");
|
||||||
}
|
}
|
||||||
//是否计算成型剂
|
//是否计算成型剂
|
||||||
String is_calculate_forming = ProductMaterialSet.getString("is_calculate_forming");
|
String is_calculate_forming = ProductMaterialSet.getString("is_calculate_forming");
|
||||||
|
|||||||
Reference in New Issue
Block a user