diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java index 3dc7f304..068da1f5 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java @@ -1147,8 +1147,9 @@ public class AllocateInvoiceInterfaceServiceImplV3 implements AllocateInvoiceInt * 购方信息补全:如果接口传递数据不为空,则使用接口传递数据,如果接口传递数据为空,则使用查询到的数据进行赋值操作. */ if (StringUtils.isNotBlank(commonOrderInfo.getOrderInfo().getGhfId())) { - BuyerEntity buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(commonOrderInfo.getOrderInfo().getXhfNsrsbh(), - commonOrderInfo.getOrderInfo().getGhfId()); + String zxbm = commonOrderInfo.getOrderInfo().getGhfId(); + zxbm = StringUtils.right(zxbm, 6); // 见下dealOrderItem中 line:550左右注释 + BuyerEntity buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(commonOrderInfo.getOrderInfo().getXhfNsrsbh(), zxbm); if (buyerEntity != null && StringUtils.isNotBlank(buyerEntity.getTaxpayerCode())) { BeanTransitionUtils.transitionOrderBuyerInfo(commonOrderInfo, buyerEntity); } diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/CommonInterfaceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/CommonInterfaceServiceImpl.java index e9572cd0..13d6ea2a 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/CommonInterfaceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/CommonInterfaceServiceImpl.java @@ -547,6 +547,9 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { } else { //根据商品编码判断如何进行补全数据 if (StringUtils.isNotBlank(item.getZxbm())) { + // 根据SAP曹源及MDM赵荣平口述,SAP推送过来的自行编码是经过自动补0的,处理逻辑如下: + // 物料、客商、人员数据都会默认补0,处理逻辑是客商从右往左取6位,其他的(物料、人员)从右往左取8位 + item.setZxbm(StringUtils.right(item.getZxbm(), 8)); // 自行编码为mdm的物料编码,通过这个去匹配 // 4.2.1.11 // 先从公司物料库匹配