异步BOM调整

master
陈翼晖 1 year ago
parent a6c4b2b3a4
commit 2393d8401c

@ -1681,8 +1681,9 @@ public class BomUtilWh {
if (i == expandPSDatas.length - 1) {
maxSeq = line2.getProperty("bl_sequence_no");
}
if (rev2.getProperty("zt2_SapState").equals("ÒÑ´«"))
continue;
//异步接口不检查
// if (rev2.getProperty("zt2_SapState").equals("已传"))
// continue;
if (!KUtil.isEmpty(properties2[2])) {
material_revs.put(properties2[2], rev2);
}

@ -199,11 +199,8 @@ public class BomSendSapController {
String object_name = project.getStringProperty("object_name");
String userId = session.getUser().getUserId();
String code = BomUtilWh.getCode().toString();
StringBuilder productNosBuild = new StringBuilder("");
StringBuilder productUidsBuild = new StringBuilder("");
for (PartBean cppItem : selectedParts) {
String property = cppItem.part.getProperty(BomUtilWh.ZT2_MATERIALNO);
productNosBuild.append(property).append(";");
productUidsBuild.append(cppItem.part.getUid()).append(";");
}
String substring = productUidsBuild.toString().substring(0, productUidsBuild.length() - 1);
@ -228,7 +225,8 @@ public class BomSendSapController {
// project.getProperty("zt2_WBSNo");
// 产成品BOM组织时除了产成品不同其他相同 BOM结构是一样的
// 记录产成品的物料编码
StringBuilder productNosBuild = new StringBuilder("");
Element interLogElem = null;
for (PartBean bean : selectedParts) {
Document document = DocumentHelper.parseText(getXML());
@ -269,10 +267,9 @@ public class BomSendSapController {
} else {
// new BomSendSapOp(session,document.asXML(),txtPath,gy_meops).executeOperation();
// 记录XML信息到CHINT_BOM_TO_SAP_DETIALS
if (flag) {
flag = false;
BomUtilWh.logXmlMsg(INTERGRATIONLIST, code, productNosBuild.toString(), batchNum, wbs, session);
}
interLogElem = INTERGRATIONLIST;
String property = bean.part.getProperty(BomUtilWh.ZT2_MATERIALNO);
productNosBuild.append(property).append(";");
sendMessageAll.append(SendToSap(txtPath, document.asXML()));
win.close();
}
@ -282,6 +279,11 @@ public class BomSendSapController {
TXTUtil.addTxttoTarget(rev2, dataset);
KUtil.setByPass(false);
}
System.out.println("productNosBuild MSG====>" + productNosBuild);
if (interLogElem != null) {
flag = false;
BomUtilWh.logXmlMsg(interLogElem, code, productNosBuild.toString(), batchNum, wbs, session);
}
if (comp != null) {
comp.setVisible(false);
}

Loading…
Cancel
Save