From 04db785ccf71e1a70a19aca1d9dbcaaca44fba7c Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Wed, 27 Aug 2025 09:19:09 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5/?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5/?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9/=E7=BD=91=E7=82=B9?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=E4=BC=81=E4=B8=9A=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=BB=E8=BE=91=E6=B7=BB=E5=8A=A0=E5=BC=80=E5=85=B3?= =?UTF-8?q?=EF=BC=8C9=E6=9C=881=E5=8F=B7=E4=BB=A5=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=97=A7=E9=80=BB=E8=BE=91=EF=BC=8C9?= =?UTF-8?q?=E6=9C=881=E5=8F=B7=E4=BB=A5=E5=90=8E=E7=9A=84=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../impl/EmisWaybillAjustApplyServiceImpl.java | 12 +++++++++++- .../emis/service/impl/EmisWaybillServiceImpl.java | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java index 69c349503..5ec79d07e 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java @@ -10,6 +10,9 @@ package com.xdadan.erp.emis.service.impl; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Objects; @@ -166,7 +169,14 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements sendAddress.setAddressType("1"); sendAddress.setEnterpriseName(emisWaybillSave.getEnterpriseName()); sendAddress.setEnterpriseTaxId(emisWaybillSave.getEnterpriseTaxId()); -// checkAdress(sendAddress); + + LocalDateTime thresholdDateTime = LocalDateTime.of(2025, 9, 1, 0, 0, 0); + Date thresholdDate = Date.from(thresholdDateTime.atZone(ZoneId.systemDefault()).toInstant()); + + Date sendDate = emisWaybillSave.getSendDate(); + if (sendDate != null && sendDate.after(thresholdDate)) { + checkAdress(sendAddress); + } // 插入数据 emisWaybillAjustApply.setApplyDate(new Date()); 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 3ba2b0990..958603850 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 @@ -64,6 +64,8 @@ package com.xdadan.erp.emis.service.impl; import java.math.RoundingMode; import java.net.URLEncoder; import java.text.DecimalFormat; + import java.time.LocalDateTime; + import java.time.ZoneId; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -2628,8 +2630,16 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } // 保存客户收件、寄件地址,开单不要关联客户地址数据 -// createCustomerAddressNew(sendAddress); - createCustomerAddress(sendAddress); + // 定义阈值日期:2025年9月1日 00:00:00 + LocalDateTime thresholdDateTime = LocalDateTime.of(2025, 9, 1, 0, 0, 0); + Date thresholdDate = Date.from(thresholdDateTime.atZone(ZoneId.systemDefault()).toInstant()); + + Date sendDate = emisWaybillSave.getSendDate(); + if (sendDate != null && sendDate.before(thresholdDate)) { + createCustomerAddress(sendAddress); + } else { + createCustomerAddressNew(sendAddress); + } createCustomerAddress(recieveAddress); emisWaybillSave.setCustomerCode(customerCode);