rev: 物料参数设置-软废碳平衡同步

This commit is contained in:
2023-07-17 17:22:31 +08:00
parent 73eb90d929
commit 84e4ce7af3

View File

@@ -503,18 +503,20 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
}
// 将此碳化钨的软废类型转化为数组
JSONArray wasArr = new WastecchangeServiceImpl().contentShift(jsonWas);
// JSONArray wasArr = new WastecchangeServiceImpl().contentShift(jsonWas);
JSONObject wasArr = jsonWas.getJSONObject("alldata");
String rf_type_code = jsonMater.getString("material_code").substring(jsonMater.getString("material_code").lastIndexOf("-")+1,jsonMater.getString("material_code").length());
double value = 0;
for (int j = 0; j < wasArr.size(); j++) {
value = wasArr.getDoubleValue(rf_type_code);
/* for (int j = 0; j < wasArr.size(); j++) {
JSONObject jsonWasDtl = wasArr.getJSONObject(j);
if (StrUtil.equals(rf_type_code, jsonWasDtl.getString("name"))) {
value = jsonWasDtl.getDoubleValue("value");
break;
}
}
}*/
// 软废碳平衡=pg粉碳平衡+此软废修正值
JSONObject jsonPgfExt = extTab.query("material_id = '" + jsonPgfMater.getString("material_id") + "'").uniqueResult(0);