This commit is contained in:
zds
2022-07-08 18:45:07 +08:00
parent aa16d2c2d2
commit b055c340d4

View File

@@ -696,6 +696,11 @@ public class AutoformulaServiceImpl implements AutoformulaService {
if(C<0){ if(C<0){
flag = false; flag = false;
}else if(C>=0){ }else if(C>=0){
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-C;
if(bom_ivt_qty<0){
flag = false;
}else{
JSONObject C_weight = new JSONObject(); JSONObject C_weight = new JSONObject();
C_weight.put("formula_qty",C); C_weight.put("formula_qty",C);
//钨分类id //钨分类id
@@ -711,11 +716,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
C_weight.put("is_active","1"); C_weight.put("is_active","1");
C_weight.put("quality_scode","01"); C_weight.put("quality_scode","01");
cw_list.add(C_weight); 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); bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p); bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){ if(bom_ivt_qty<=0){
@@ -969,6 +970,11 @@ public class AutoformulaServiceImpl implements AutoformulaService {
if(W<0){ if(W<0){
flag = false; flag = false;
}else if(W>=0){ }else if(W>=0){
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-W;
if(bom_ivt_qty<0){
flag = false;
}else{
JSONObject W_weight = new JSONObject(); JSONObject W_weight = new JSONObject();
W_weight.put("formula_qty",W); W_weight.put("formula_qty",W);
//钨分类id //钨分类id
@@ -983,11 +989,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
W_weight.put("is_active","1"); W_weight.put("is_active","1");
W_weight.put("quality_scode","01"); W_weight.put("quality_scode","01");
cw_list.add(W_weight); 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); bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p); bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){ if(bom_ivt_qty<=0){
@@ -1584,6 +1586,12 @@ public class AutoformulaServiceImpl implements AutoformulaService {
if(C<0){ if(C<0){
flag = false; flag = false;
}else if(C>=0){ }else if(C>=0){
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-C;
if(bom_ivt_qty<0){
flag = false;
}else{
JSONObject C_weight = new JSONObject(); JSONObject C_weight = new JSONObject();
C_weight.put("formula_qty",C); C_weight.put("formula_qty",C);
//钨分类id //钨分类id
@@ -1599,11 +1607,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
C_weight.put("is_active","1"); C_weight.put("is_active","1");
C_weight.put("quality_scode","01"); C_weight.put("quality_scode","01");
cw_list.add(C_weight); 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); bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p); bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){ if(bom_ivt_qty<=0){
@@ -1852,6 +1856,11 @@ public class AutoformulaServiceImpl implements AutoformulaService {
if(W<0){ if(W<0){
flag = false; flag = false;
}else if(W>=0){ }else if(W>=0){
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-W;
if(bom_ivt_qty<0){
flag = false;
}else{
JSONObject W_weight = new JSONObject(); JSONObject W_weight = new JSONObject();
W_weight.put("formula_qty",W); W_weight.put("formula_qty",W);
//钨分类id //钨分类id
@@ -1866,11 +1875,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
W_weight.put("is_active","1"); W_weight.put("is_active","1");
W_weight.put("quality_scode","01"); W_weight.put("quality_scode","01");
cw_list.add(W_weight); 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); bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p); bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){ if(bom_ivt_qty<=0){