|
|
|
@ -1118,6 +1118,15 @@ public class ApplyMatnrOp2 extends AbstractAIFOperation {
|
|
|
|
|
general_maps.put(rev, specs);
|
|
|
|
|
}
|
|
|
|
|
}else if(stuf.equalsIgnoreCase("2ZD")){
|
|
|
|
|
//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) {
|
|
|
|
@ -1139,7 +1148,37 @@ public class ApplyMatnrOp2 extends AbstractAIFOperation {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} 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;
|
|
|
|
|