装箱集成修改流水码逻辑

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

@ -1118,28 +1118,67 @@ public class ApplyMatnrOp2 extends AbstractAIFOperation {
general_maps.put(rev, specs); general_maps.put(rev, specs);
} }
}else if(stuf.equalsIgnoreCase("2ZD")){ }else if(stuf.equalsIgnoreCase("2ZD")){
partRevs.add(comps[0]); //20240426 增加查询的代码
boolean needApply = true; Map<String, String> field = new HashMap<String, String>();
for(TCComponent comp:comps) { String value = "* " + spec;
String specs = comp.getProperty("zt2_Specifications"); // ·Ç±ØÌî System.out.println("查询值:" + value+"item_id==>"+item_id);
if(specs.equals(spec)) { field.put("描述", value);
needApply = false; field.put("关联的图号", item_id);
break; 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(needApply) { if (general_maps.containsKey(rev)) {
if (general_maps.containsKey(rev)) { if (!general_maps.get(rev).contains(spec)) {
if (!general_maps.get(rev).contains(spec)) { general_maps.get(rev).add(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>(); Map<String, String> field = new HashMap<String, String>();
String value = "* " + zt2_TYJSpec; String value = "* " + zt2_TYJSpec;

Loading…
Cancel
Save