提交
This commit is contained in:
@@ -710,6 +710,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(C_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-C;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -743,6 +746,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//判断已含添加剂与需配添加剂大小
|
||||
yzj_map.forEach((key,tjj_map_now)->{
|
||||
//需配添加剂重量
|
||||
@@ -763,6 +767,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
@@ -793,6 +799,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(C_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -970,6 +979,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(W_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-W;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -1024,6 +1036,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
// X21p减 = [总碳-X22c]-产品碳平衡*(X11p+X12p+X21p+X22p) / X21碳含量
|
||||
@@ -1053,6 +1066,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
|
||||
@@ -1576,6 +1592,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(C_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-C;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -1630,6 +1649,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
//X21p减*=产品碳平衡*(X11p+X12p+X21p+X22p)-(X11p* X11碳含量+X12p* X12碳含量+(X21p)* X21碳含量)-X22p/(1- X21碳含量)
|
||||
@@ -1660,6 +1680,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
|
||||
@@ -1836,6 +1859,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(W_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-W;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -1890,6 +1916,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
// X21p减 = [总碳-X22c]-产品碳平衡*(X11p+X12p+X21p+X22p) / X21碳含量
|
||||
@@ -1919,6 +1946,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
|
||||
|
||||
@@ -80,7 +80,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
|
||||
<!--生产环境:打印控制台和输出到文件-->
|
||||
<springProfile name="prod">
|
||||
<root level="info">
|
||||
<root level="DEBUG">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</root>
|
||||
<logger name="jdbc.audit" level="ERROR" additivity="false">
|
||||
|
||||
Reference in New Issue
Block a user