From d5e42d82103394e7d37ab03a94f9074137894624 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Sat, 30 Aug 2025 15:08:33 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20oms=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E3=80=81oms=E7=BD=91=E9=A1=B5=E7=AB=AF=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=BD=95=E5=85=A5/=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=89=93=E9=80=9Atms=E7=B3=BB=E7=BB=9F=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=BA=93=EF=BC=8C=E5=AE=9E=E7=8E=B0=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F/oms=E4=B8=8B=E5=8D=95=E8=BD=AC=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84=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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../com/xdadan/erp/emis/service/EmisBaseService.java | 10 +++++++++- .../erp/emis/service/impl/EmisWaybillServiceImpl.java | 3 +++ .../resources/mapper/EmisCustomerAddressMapper.xml | 8 ++++---- 3 files changed, 16 insertions(+), 5 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 23cd633fb..58f6e19d6 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 @@ -3567,10 +3567,18 @@ public class EmisBaseService { return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddressNew); } else { if ("1".equals(emisCustomerAddressNew.getAddressType()) && "0086".equals(emisCustomerAddressNew.getCountry())) { - List emisCustomerAddressIds = emisCustomerAddressList.stream().filter(i -> (StringUtil.isBlank(i.getEnterpriseTaxId()) || StringUtil.isBlank(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList()); + List emisCustomerAddressIds = emisCustomerAddressList.stream().filter(i -> (!emisCustomerAddressNew.getEnterpriseTaxId().equals(i.getEnterpriseTaxId()) || !emisCustomerAddressNew.getEnterpriseName().equals(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList()); if (CollectionUtil.isEmpty(emisCustomerAddressIds)) { return 1; } + if (emisCustomerAddressNew.getId() != null) { + EmisCustomerAddress emisCustomerAddress = new EmisCustomerAddress(); + emisCustomerAddress.setId(emisCustomerAddressNew.getId()); + emisCustomerAddress.setEnterpriseTaxId(emisCustomerAddressNew.getEnterpriseTaxId()); + emisCustomerAddress.setEnterpriseName(emisCustomerAddressNew.getEnterpriseName()); + emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress); + return 1; + } for (Long id : emisCustomerAddressIds) { EmisCustomerAddress emisCustomerAddress = new EmisCustomerAddress(); emisCustomerAddress.setId(id); 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 54a64f0ee..c9424c4d0 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 @@ -2524,6 +2524,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb sendAddress.setAddressType("1"); sendAddress.setEnterpriseName(emisWaybillSave.getEnterpriseName()); sendAddress.setEnterpriseTaxId(emisWaybillSave.getEnterpriseTaxId()); + if (emisWaybillSave.getSendCustomerAddressId() != null) { + sendAddress.setId(Long.valueOf(emisWaybillSave.getSendCustomerAddressId())); + } // 收件地址 EmisCustomerAddress recieveAddress = new EmisCustomerAddress(); diff --git a/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml b/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml index 4439efaa1..faa89b795 100644 --- a/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml @@ -302,11 +302,11 @@ and company = #{company} and company is null - and enterprise_name = #{enterpriseName} - and enterprise_name is null + + - and enterprise_tax_id = #{enterpriseTaxId} - and enterprise_tax_id is null + + and address_type = #{addressType}