feat:开票自动匹配编码

release
gongquanlin 2 years ago
parent d2bb235dc4
commit f260e278ba
  1. 5
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java
  2. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/CommonInterfaceServiceImpl.java

@ -1147,8 +1147,9 @@ public class AllocateInvoiceInterfaceServiceImplV3 implements AllocateInvoiceInt
* 购方信息补全:如果接口传递数据不为空,则使用接口传递数据,如果接口传递数据为空,则使用查询到的数据进行赋值操作. * 购方信息补全:如果接口传递数据不为空,则使用接口传递数据,如果接口传递数据为空,则使用查询到的数据进行赋值操作.
*/ */
if (StringUtils.isNotBlank(commonOrderInfo.getOrderInfo().getGhfId())) { if (StringUtils.isNotBlank(commonOrderInfo.getOrderInfo().getGhfId())) {
BuyerEntity buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(commonOrderInfo.getOrderInfo().getXhfNsrsbh(), String zxbm = commonOrderInfo.getOrderInfo().getGhfId();
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())) { if (buyerEntity != null && StringUtils.isNotBlank(buyerEntity.getTaxpayerCode())) {
BeanTransitionUtils.transitionOrderBuyerInfo(commonOrderInfo, buyerEntity); BeanTransitionUtils.transitionOrderBuyerInfo(commonOrderInfo, buyerEntity);
} }

@ -547,6 +547,9 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService {
} else { } else {
//根据商品编码判断如何进行补全数据 //根据商品编码判断如何进行补全数据
if (StringUtils.isNotBlank(item.getZxbm())) { if (StringUtils.isNotBlank(item.getZxbm())) {
// 根据SAP曹源及MDM赵荣平口述,SAP推送过来的自行编码是经过自动补0的,处理逻辑如下:
// 物料、客商、人员数据都会默认补0,处理逻辑是客商从右往左取6位,其他的(物料、人员)从右往左取8位
item.setZxbm(StringUtils.right(item.getZxbm(), 8));
// 自行编码为mdm的物料编码,通过这个去匹配 // 自行编码为mdm的物料编码,通过这个去匹配
// 4.2.1.11 // 4.2.1.11
// 先从公司物料库匹配 // 先从公司物料库匹配

Loading…
Cancel
Save