装箱集成修改流水码逻辑

pull/11/head
李建辉 1 year ago
parent ebb85a2365
commit b8f1a6ce74

@ -1118,28 +1118,67 @@ public class ApplyMatnrOp2 extends AbstractAIFOperation {
general_maps.put(rev, specs);
}
}else if(stuf.equalsIgnoreCase("2ZD")){
partRevs.add(comps[0]);
boolean needApply = true;
for(TCComponent comp:comps) {
String specs = comp.getProperty("zt2_Specifications"); // ·Ç±ØÌî
if(specs.equals(spec)) {
needApply = false;
break;
//20240426 增加查询的代码
Map<String, String> field = new HashMap<String, String>();
String value = "* " + spec;
System.out.println("查询值:" + value+"item_id==>"+item_id);
field.put("描述", value);
field.put("关联的图号", item_id);
TCComponentContextList contxt = KUtil.query(session, "chint_query_material_test", field);
//"*"+item_id+"*"+zt2_TYJSpec+"*"
if(contxt == null || contxt.getListCount() == 0) {
partRevs.add(comps[0]);
boolean needApply = true;
for(TCComponent comp:comps) {
String specs = comp.getProperty("zt2_Specifications"); // 非必填
if(specs.equals(spec)) {
needApply = false;
break;
}
}
}
if(needApply) {
if (general_maps.containsKey(rev)) {
if (!general_maps.get(rev).contains(spec)) {
general_maps.get(rev).add(spec);
if(needApply) {
if (general_maps.containsKey(rev)) {
if (!general_maps.get(rev).contains(spec)) {
general_maps.get(rev).add(spec);
}
} else {
List<String> specs = new ArrayList<String>();
specs.add(spec);
general_maps.put(rev, specs);
}
} else {
List<String> specs = new ArrayList<String>();
specs.add(spec);
general_maps.put(rev, specs);
}
}
}
} else {
}
// else if(stuf.equalsIgnoreCase("2ZD")){
// partRevs.add(comps[0]);
// boolean needApply = true;
// for(TCComponent comp:comps) {
// String specs = comp.getProperty("zt2_Specifications"); // 非必填
// if(specs.equals(spec)) {
// needApply = false;
// break;
// }
// }
// if(needApply) {
// if (general_maps.containsKey(rev)) {
// if (!general_maps.get(rev).contains(spec)) {
// general_maps.get(rev).add(spec);
// }
// } else {
// List<String> specs = new ArrayList<String>();
// specs.add(spec);
// general_maps.put(rev, specs);
// }
// }
// }
// }
else {
// 有通用件规格
Map<String, String> field = new HashMap<String, String>();
String value = "* " + zt2_TYJSpec;

Loading…
Cancel
Save