diff --git a/int-core/src/main/java/com/foreverwin/iep/integration/service/impl/RegisterDocumentServiceImpl.java b/int-core/src/main/java/com/foreverwin/iep/integration/service/impl/RegisterDocumentServiceImpl.java index fe1a111..c9864d8 100644 --- a/int-core/src/main/java/com/foreverwin/iep/integration/service/impl/RegisterDocumentServiceImpl.java +++ b/int-core/src/main/java/com/foreverwin/iep/integration/service/impl/RegisterDocumentServiceImpl.java @@ -198,8 +198,14 @@ public class RegisterDocumentServiceImpl implements RegisterDocumentService { jsonObject.put("EBELP", detail.getExternalSeq()); // 采购凭证的项目编号 jsonObject.put("MENGE", detail.getApplicationsQuantity()); // 数量 jsonObject.put("MEINS", detail.getUnitOfMeasure()); // 基本计量单位 - jsonObject.put("ERFMG", detail.getApplicationsQuantity()); // 以录入项单位表示的数量 - jsonObject.put("ERFME", detail.getUnitOfMeasure()); // 录入单位 + // 判断如果辅助数量必填写标识为Y,则设置 ERFMG 为辅单位数量,ERFME 为辅助单位;否则设置ERFMG 为主单位数量,ERFME 为主单位 + if (!StringUtils.isEmpty(detail.getAuxiliaryQtyFlag()) && "Y".equalsIgnoreCase(detail.getAuxiliaryQtyFlag())) { + jsonObject.put("ERFMG", detail.getAuxiliaryOty()); // 以录入项单位表示的数量(即辅助数量) + jsonObject.put("ERFME", detail.getAuxiliaryUnit()); // 录入单位(即辅助单位) + } else { + jsonObject.put("ERFMG", detail.getApplicationsQuantity()); // 以录入项单位表示的数量(即本次到货数量即主单位数量) + jsonObject.put("ERFME", detail.getUnitOfMeasure()); // 录入单位(即主单位) + } jsonObject.put("MAT_KDAUF", ""); // 评估销售定单库存的销售定单号 jsonObject.put("MAT_KDPOS", ""); // 评估销售订单库存的销售订单项目 jsonObject.put("UMMAT", "");