|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|