From ffb7d94aa2b78aba1695bbc711d5d995eccf06fa Mon Sep 17 00:00:00 2001 From: "zhenghaiyang@ele-cloud.com" Date: Mon, 29 May 2023 19:31:56 +0800 Subject: [PATCH] =?UTF-8?q?feature=201.=E4=BF=AE=E6=94=B9=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E5=9E=8B=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CommonInterfaceServiceImpl.java | 2 +- .../consumer/utils/BeanTransitionUtils.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) 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 5f4b3ac4..7159e8d4 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 @@ -831,7 +831,7 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { log.debug("对明细行规格型号进行截取,截取前数据为:{}", ggxh); ggxh = StringUtil.subStringByByte(ggxh, ConfigureConstant.INT_40); log.debug("对明细行规格型号进行截取,截取后数据为:{}", ggxh); - item.setXmmc(ggxh); + item.setGgxh(ggxh); } } catch (IOException e) { //编码格式错误 diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java index 6e4e20f7..ec7f8f38 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java @@ -58,6 +58,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; +import java.io.IOException; import java.math.BigDecimal; import java.text.DecimalFormat; import java.util.*; @@ -3547,6 +3548,22 @@ public class BeanTransitionUtils { ddmxxxBO.setSPSL(detail.getZZSL()); ddmxxxBO.setDJ(detail.getZZDJ()); } + if(StringUtils.isNotBlank(ddmxxxBO.getGGXH())){ + String ggxh = ddmxxxBO.getGGXH(); + try { + if (ggxh.getBytes(ConfigureConstant.STRING_CHARSET_GBK).length > ConfigureConstant.INT_40) { + log.debug("对明细行规格型号进行截取,截取前数据为:{}", ggxh); + ggxh = StringUtil.subStringByByte(ggxh, ConfigureConstant.INT_40); + log.debug("对明细行规格型号进行截取,截取后数据为:{}", ggxh); + ddmxxxBO.setGGXH(ggxh); + } + } catch (IOException e) { + //编码格式错误 + log.error("处理商品名称异常:{}", e); + throw new RuntimeException(e); + } + } + ddmxxxBO.setSL(new BigDecimal(detail.getZTAX()).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP).toString()); if(StringUtils.isNotBlank(detail.getZZSE()) && StringUtils.isNotBlank(detail.getZBHSJE())){