diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java index 6ac3ce39..d06703d2 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java @@ -83,7 +83,6 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.math.BigDecimal; import java.security.NoSuchAlgorithmException; -import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.*; @@ -1353,8 +1352,8 @@ public class PushInvoiceServiceImpl implements PushInvoiceService { if(ObjectUtil.isNull(f.getZXBM()) || StrUtil.isBlank(f.getZXBM())){ detail.setMATNR(""); }else { - DecimalFormat g1=new DecimalFormat("000000000000000000"); - detail.setMATNR(g1.format(Integer.valueOf(f.getZXBM()))); +// DecimalFormat g1=new DecimalFormat("000000000000000000"); + detail.setMATNR(f.getZXBM()); } detail.setZGGXH(f.getGGXH()); detail.setZSLDW(f.getDW()); 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 e5b20cc7..a1f7957d 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 @@ -1145,7 +1145,7 @@ public class AllocateInvoiceInterfaceServiceImplV3 implements AllocateInvoiceInt */ if (StringUtils.isNotBlank(commonOrderInfo.getOrderInfo().getGhfId())) { String zxbm = commonOrderInfo.getOrderInfo().getGhfId(); - zxbm = StringUtils.right(zxbm, 6); // 见下dealOrderItem中 line:550左右注释 +// zxbm = StringUtils.right(zxbm, 6); // 见下dealOrderItem中 line:550左右注释 commonOrderInfo.getOrderInfo().setGhfId(zxbm); //TODO 这儿最好是使用entid查购方 BuyerEntity buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(commonOrderInfo.getOrderInfo().getXhfNsrsbh(), zxbm); 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 94e650e6..ff224ab2 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 @@ -6,7 +6,6 @@ import cn.hutool.core.collection.ListUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; -import cn.hutool.extra.spring.SpringUtil; import com.alibaba.nacos.common.utils.CollectionUtils; import com.dxhy.order.baseservice.config.BaseServiceConfig; import com.dxhy.order.baseservice.module.base.model.DrawerInfoEntity; @@ -22,7 +21,6 @@ import com.dxhy.order.consumer.constant.RespStatusEnum; import com.dxhy.order.consumer.dao.GroupCommodityCodeMapper; import com.dxhy.order.consumer.model.protocol.ResponseStatus; import com.dxhy.order.consumer.model.protocol.Result; -import com.dxhy.order.consumer.modules.commodity.service.IGroupCommodityCodeService; import com.dxhy.order.consumer.modules.order.service.OrderBatchRequestService; import com.dxhy.order.consumer.modules.order.service.OrderCommonService; import com.dxhy.order.consumer.openapi.protocol.CheckResult; @@ -41,7 +39,6 @@ import com.dxhy.order.model.sk.sld.SearchSld; import com.dxhy.order.utils.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -556,7 +553,7 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { if (StringUtils.isNotBlank(item.getZxbm()) && StringUtils.isBlank(item.getSpbm())) { // 根据SAP曹源及MDM赵荣平口述,SAP推送过来的自行编码是经过自动补0的,处理逻辑如下: // 物料、客商、人员数据都会默认补0,处理逻辑是客商从右往左取6位,其他的(物料、人员)从右往左取8位 - item.setZxbm(StringUtils.right(item.getZxbm(), 8)); +// item.setZxbm(StringUtils.right(item.getZxbm(), 8)); // 自行编码为mdm的物料编码,通过这个去匹配 // 4.2.1.11 // 先从公司物料库匹配 diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java index 0eb2e696..0456bda5 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java @@ -34,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; +import java.text.DecimalFormat; import java.util.*; import java.util.stream.Collectors; @@ -120,6 +121,9 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { MdmGmfxxtbReqBO tempMdmGmfxxtbReqBO = mdmGmfxxtbReqBOS.get(i); BuyerEntity entity = new BuyerEntity(); + DecimalFormat g=new DecimalFormat("0000000000"); + String code = g.format(Integer.valueOf(tempMdmGmfxxtbReqBO.getCODE())); + tempMdmGmfxxtbReqBO.setCODE(code); BuyerEntity queryBuyerEntity = new BuyerEntity(); queryBuyerEntity.setBuyerCode(tempMdmGmfxxtbReqBO.getCODE()); List buyerEntityList = buyerMapper.selectBuyerByBuyerEntity(queryBuyerEntity, null); @@ -306,6 +310,9 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { CommodityCodeEntity commodityCodeEntity = new CommodityCodeEntity(); commodityCodeEntity.setWlflbm(reqBO.getCATEGORYCODE()); // 1.先去所有子公司库中匹配税编,以第一条为准;如果未匹配到,再去根据物料编码匹配 + DecimalFormat g=new DecimalFormat("000000000000000000"); + String code = g.format(Integer.valueOf(reqBO.getCODE())); + reqBO.setCODE(code); List commodityCodeEntities = commodityMapper.queryByCommoditySpbmCompany(reqBO.getCODE()); if(commodityCodeEntities != null && commodityCodeEntities.size() > 0){ matchCommodityCode(commodityCodeEntity);