采购收货传送SAP的行而非我们自己的行

This commit is contained in:
彭枝刚 2024-11-28 15:56:29 +08:00
parent 18948f6af2
commit c4903b3a5f

View File

@ -52,7 +52,7 @@ public class RegisterDocumentServiceImpl implements RegisterDocumentService {
private ZmmMesChargCreate1Service zmmMesChargCreate1Service;
@Override
@GlobalTransactional
@Transactional
public InvokeResponse createDocumentAndCallErp(List<DocumentDetailed> zwDocumentDetailList) {
InvokeResponse invokeResponse = new InvokeResponse();
InvokeRequest invokeRequest = new InvokeRequest();
@ -144,7 +144,7 @@ public class RegisterDocumentServiceImpl implements RegisterDocumentService {
JSONArray itemList = new JSONArray();
for (DocumentDetailed detail : newDocumentList) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("ZEILE", detail.getExternalSeq()); // 物料凭证中的项目
jsonObject.put("ZEILE", detail.getSeq()); // 物料凭证中的项目
jsonObject.put("MATNR", detail.getMatnr()); // 物料编号
jsonObject.put("MATKL", ""); // 物料组
jsonObject.put("WERKS", site); // 工厂
@ -155,7 +155,7 @@ public class RegisterDocumentServiceImpl implements RegisterDocumentService {
jsonObject.put("INSMK", "1001".equals(detail.getIqcStatus()) ? "" : "X"); // 库存类型
jsonObject.put("AUFNR", ""); // 订单号
jsonObject.put("EBELN", detail.getExternalNo()); // 采购订单号
jsonObject.put("EBELP", detail.getExternalSeq()); // 采购凭证的项目编号
jsonObject.put("EBELP", (detail.getExternalSeq()/10)*10); // 采购凭证的项目编号
jsonObject.put("MENGE", detail.getApplicationsQuantity()); // 数量
jsonObject.put("MEINS", detail.getUnitOfMeasure()); // 基本计量单位
jsonObject.put("ERFMG", detail.getApplicationsQuantity()); // 以录入项单位表示的数量