From 3bb0ead3a44432f217fc3832cbede09026730280 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Wed, 3 Sep 2025 16:14:37 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20oms\=E5=B0=8F=E7=A8=8B=E5=BA=8F-?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=BD=95=E5=85=A5=E6=94=AF=E6=8C=81=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=A8=8E=E5=8F=B7=20=20oms\=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F-=E6=9F=A5=E8=AF=A2=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=94=AF=E6=8C=81=E6=9F=A5=E8=AF=A2=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7?= =?UTF-8?q?=20=20oms\=E5=B0=8F=E7=A8=8B=E5=BA=8F-=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=9C=B0=E5=9D=80=E6=94=AF=E6=8C=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=A8=8E=E5=8F=B7=20=20oms\=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F-=E6=96=B0=E5=A2=9E/=E4=BF=AE=E6=94=B9=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=9C=B0=E5=9D=80=E6=94=AF=E6=8C=81=E6=96=B0=E5=A2=9E?= =?UTF-8?q?/=E4=BF=AE=E6=94=B9=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E3=80=81=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../com/xdadan/erp/emis/service/EmisBaseService.java | 9 ++++++--- .../erp/emis/service/impl/EmisWaybillServiceImpl.java | 8 +++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java index 24629a7b6..585eb4ec5 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java @@ -3595,7 +3595,10 @@ public class EmisBaseService { public void checkAdress(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError { if ("1".equals(emisCustomerAddressNew.getAddressType())) { if ("0086".equals(emisCustomerAddressNew.getCountry())) { - if (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId()) || StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName())) { + // 检查是否来自OMS + boolean fromOms = "1".equals(emisCustomerAddressNew.getParams().get("fromOms")); + if (!fromOms && (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId()) + || StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName()))) { throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称/企业税号不能为空"); } @@ -3643,7 +3646,7 @@ public class EmisBaseService { */ public boolean validateEnterpriseName(String enterpriseName) { if (com.xdadan.erp.common.utils.StringUtils.isEmpty(enterpriseName)) { - return false; + return true; } // 检查是否包含不允许的字符 @@ -3668,7 +3671,7 @@ public class EmisBaseService { */ public boolean validateEnterpriseTaxId(String enterpriseTaxId) { if (com.xdadan.erp.common.utils.StringUtils.isEmpty(enterpriseTaxId)) { - return false; + return true; } // 检查长度 diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java index 47f6c3d63..5b337ad4b 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java @@ -2166,6 +2166,11 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb sendAddress.setUseSiteCode(emisWaybillSave.getSendSiteCode()); sendAddress.setAddressType("1"); sendAddress.setCustomerCode(customerCode); + sendAddress.setEnterpriseName(emisWaybillSave.getEnterpriseName()); + sendAddress.setEnterpriseTaxId(emisWaybillSave.getEnterpriseTaxId()); + if (emisWaybillSave.getSendCustomerAddressId() != null) { + sendAddress.setId(Long.valueOf(emisWaybillSave.getSendCustomerAddressId())); + } // 收件地址 EmisCustomerAddress recieveAddress = new EmisCustomerAddress(); @@ -2223,7 +2228,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } // 保存客户收件、寄件地址 - createCustomerAddress(sendAddress); + sendAddress.getParams().put("fromOms", "1"); + createCustomerAddressNew(sendAddress); createCustomerAddress(recieveAddress); // 获取泡重比