From b055c340d48c6e8307faeac7533003320a8ccdd7 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Fri, 8 Jul 2022 18:45:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AutoformulaServiceImpl.java | 121 +++++++++--------- 1 file changed, 63 insertions(+), 58 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java index 30f5cb81..4287e9ec 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pf/service/impl/AutoformulaServiceImpl.java @@ -696,26 +696,27 @@ public class AutoformulaServiceImpl implements AutoformulaService { if(C<0){ flag = false; }else if(C>=0){ - JSONObject C_weight = new JSONObject(); - C_weight.put("formula_qty",C); - //钨分类id - C_weight.put("material_id","1503644362788179968"); - C_weight.put("material_name","碳粉"); - C_weight.put("material_code","09030104"); - C_weight.put("material_type","02"); - C_weight.put("is_need_move","0"); - C_weight.put("is_need_manage","1"); - C_weight.put("is_tan","100"); - C_weight.put("is_rf_xl","1"); - C_weight.put("ivt_level","01"); - C_weight.put("is_active","1"); - C_weight.put("quality_scode","01"); - cw_list.add(C_weight); //更新碳化钨配粉重量 double bom_ivt_qty = X22p-C; if(bom_ivt_qty<0){ flag = false; }else{ + JSONObject C_weight = new JSONObject(); + C_weight.put("formula_qty",C); + //钨分类id + C_weight.put("material_id","1503644362788179968"); + C_weight.put("material_name","碳粉"); + C_weight.put("material_code","09030104"); + C_weight.put("material_type","02"); + C_weight.put("is_need_move","0"); + C_weight.put("is_need_manage","1"); + C_weight.put("is_tan","100"); + C_weight.put("is_rf_xl","1"); + C_weight.put("ivt_level","01"); + C_weight.put("is_active","1"); + C_weight.put("quality_scode","01"); + cw_list.add(C_weight); + 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){ @@ -969,25 +970,26 @@ public class AutoformulaServiceImpl implements AutoformulaService { if(W<0){ flag = false; }else if(W>=0){ - JSONObject W_weight = new JSONObject(); - W_weight.put("formula_qty",W); - //钨分类id - W_weight.put("material_id","1503644362234531840"); - W_weight.put("material_name","钨粉"); - W_weight.put("material_code","09030103"); - W_weight.put("material_type","02"); - W_weight.put("is_need_move","0"); - W_weight.put("is_need_manage","1"); - W_weight.put("is_rf_xl","0"); - W_weight.put("ivt_level","01"); - W_weight.put("is_active","1"); - W_weight.put("quality_scode","01"); - cw_list.add(W_weight); //更新碳化钨配粉重量 double bom_ivt_qty = X22p-W; if(bom_ivt_qty<0){ flag = false; }else{ + JSONObject W_weight = new JSONObject(); + W_weight.put("formula_qty",W); + //钨分类id + W_weight.put("material_id","1503644362234531840"); + W_weight.put("material_name","钨粉"); + W_weight.put("material_code","09030103"); + W_weight.put("material_type","02"); + W_weight.put("is_need_move","0"); + W_weight.put("is_need_manage","1"); + W_weight.put("is_rf_xl","0"); + W_weight.put("ivt_level","01"); + W_weight.put("is_active","1"); + W_weight.put("quality_scode","01"); + cw_list.add(W_weight); + 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){ @@ -1584,26 +1586,28 @@ public class AutoformulaServiceImpl implements AutoformulaService { if(C<0){ flag = false; }else if(C>=0){ - JSONObject C_weight = new JSONObject(); - C_weight.put("formula_qty",C); - //钨分类id - C_weight.put("material_id","1503644362788179968"); - C_weight.put("material_name","碳粉"); - C_weight.put("material_code","09030104"); - C_weight.put("material_type","02"); - C_weight.put("is_need_move","0"); - C_weight.put("is_need_manage","1"); - C_weight.put("is_tan","100"); - C_weight.put("is_rf_xl","1"); - C_weight.put("ivt_level","01"); - C_weight.put("is_active","1"); - C_weight.put("quality_scode","01"); - cw_list.add(C_weight); //更新碳化钨配粉重量 double bom_ivt_qty = X22p-C; if(bom_ivt_qty<0){ flag = false; }else{ + + JSONObject C_weight = new JSONObject(); + C_weight.put("formula_qty",C); + //钨分类id + C_weight.put("material_id","1503644362788179968"); + C_weight.put("material_name","碳粉"); + C_weight.put("material_code","09030104"); + C_weight.put("material_type","02"); + C_weight.put("is_need_move","0"); + C_weight.put("is_need_manage","1"); + C_weight.put("is_tan","100"); + C_weight.put("is_rf_xl","1"); + C_weight.put("ivt_level","01"); + C_weight.put("is_active","1"); + C_weight.put("quality_scode","01"); + cw_list.add(C_weight); + 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){ @@ -1852,25 +1856,26 @@ public class AutoformulaServiceImpl implements AutoformulaService { if(W<0){ flag = false; }else if(W>=0){ - JSONObject W_weight = new JSONObject(); - W_weight.put("formula_qty",W); - //钨分类id - W_weight.put("material_id","1503644362234531840"); - W_weight.put("material_name","钨粉"); - W_weight.put("material_code","09030103"); - W_weight.put("material_type","02"); - W_weight.put("is_need_move","0"); - W_weight.put("is_need_manage","1"); - W_weight.put("is_rf_xl","0"); - W_weight.put("ivt_level","01"); - W_weight.put("is_active","1"); - W_weight.put("quality_scode","01"); - cw_list.add(W_weight); //更新碳化钨配粉重量 double bom_ivt_qty = X22p-W; if(bom_ivt_qty<0){ flag = false; }else{ + JSONObject W_weight = new JSONObject(); + W_weight.put("formula_qty",W); + //钨分类id + W_weight.put("material_id","1503644362234531840"); + W_weight.put("material_name","钨粉"); + W_weight.put("material_code","09030103"); + W_weight.put("material_type","02"); + W_weight.put("is_need_move","0"); + W_weight.put("is_need_manage","1"); + W_weight.put("is_rf_xl","0"); + W_weight.put("ivt_level","01"); + W_weight.put("is_active","1"); + W_weight.put("quality_scode","01"); + cw_list.add(W_weight); + 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){