This commit is contained in:
zds
2022-10-14 10:12:34 +08:00
parent d5546f57db
commit 5467ee661c
3 changed files with 3 additions and 8 deletions

View File

@@ -738,7 +738,7 @@ public class AcceptFormulaServiceImpl implements AcceptFormulaService {
if(bom_ivt_qty < 0){
throw new BadRequestException("碳化钨配粉结果为负数,当前配粉无解!");
}
double C = X22_jian + bom_ivt_qty*Z_sum_per.get();
double C = X22_jian + Z_sum.get();
if(C < 0){
throw new BadRequestException("补碳结果为负数,当前配粉无解!");
}else if(C >= 0){
@@ -852,10 +852,6 @@ public class AcceptFormulaServiceImpl implements AcceptFormulaService {
}
bomdlt_Cr3C2.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2.getString("material_id"),bomdlt_Cr3C2);
//统计除钨以外其他总重
AtomicReference<Double> total_sum = new AtomicReference<>(0.0);
total_sum.set(total_sum.get() + bomdlt_Cr3C2.getDouble("bom_ivt_qty"));
//计算不需要移库的添加剂
yzj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
@@ -896,10 +892,9 @@ public class AcceptFormulaServiceImpl implements AcceptFormulaService {
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
total_sum.set(total_sum.get() + need_qty-finished_qty);
}
});
double W = new_qty - total_sum.get();
double W = X22_jian + Z_sum.get();
if(W>0){
JSONObject W_weight = new JSONObject();
W_weight.put("formula_qty",W);