feature 1.修改规格型号

release
zhenghaiyang@ele-cloud.com 2 years ago
parent efe9853432
commit ffb7d94aa2
  1. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/CommonInterfaceServiceImpl.java
  2. 17
      order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.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) {
//编码格式错误

@ -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())){

Loading…
Cancel
Save