新料开单优化
This commit is contained in:
@@ -645,6 +645,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
yzj_map.put(tjj_material_id,tjj_map_jo);
|
yzj_map.put(tjj_material_id,tjj_map_jo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
yzj_map.forEach((key,tjj_map_now)->{
|
yzj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -663,7 +665,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类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);
|
||||||
|
}
|
||||||
}else{//大于等于2条库粗你明细时
|
}else{//大于等于2条库粗你明细时
|
||||||
//最后一个为X22p
|
//最后一个为X22p
|
||||||
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
||||||
@@ -751,6 +771,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
yzj_map.forEach((key,tjj_map_now)->{
|
yzj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -769,7 +791,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -843,6 +883,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
yzj_map.forEach((key,tjj_map_now)->{
|
yzj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -861,7 +903,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1537,6 +1597,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map.put(tjj_material_id,tjj_map_jo);
|
tjj_map.put(tjj_material_id,tjj_map_jo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
tjj_map.forEach((key,tjj_map_now)->{
|
tjj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -1554,8 +1616,26 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("is_active","1");
|
tjj_map_now.put("is_active","1");
|
||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类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);
|
||||||
|
}
|
||||||
}else{//大于等于2条库粗你明细时
|
}else{//大于等于2条库粗你明细时
|
||||||
//最后一个为X22p
|
//最后一个为X22p
|
||||||
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
||||||
@@ -1641,6 +1721,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
tjj_map.forEach((key,tjj_map_now)->{
|
tjj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -1659,7 +1741,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1729,6 +1829,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
tjj_map.forEach((key,tjj_map_now)->{
|
tjj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -1747,7 +1849,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user