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 1/4] =?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); // 获取泡重比 From b6eb0258afe03ac7625fa926f1f221a12efbf102 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Wed, 3 Sep 2025 17:03:05 +0800 Subject: [PATCH 2/4] =?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 --- .../erp/emis/service/EmisBaseService.java | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 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 585eb4ec5..6cf66c627 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 @@ -3561,29 +3561,56 @@ public class EmisBaseService { public int createCustomerAddressNew(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError { checkAdress(emisCustomerAddressNew); - List emisCustomerAddressList = emisCustomerAddressMapper.checkAndQuery(emisCustomerAddressNew); + List emisCustomerAddressList = emisCustomerAddressMapper + .checkAndQuery(emisCustomerAddressNew); if (CollectionUtil.isEmpty(emisCustomerAddressList)) { // 不重复的情况则 创建地址 return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddressNew); } else { - if ("1".equals(emisCustomerAddressNew.getAddressType()) && "0086".equals(emisCustomerAddressNew.getCountry())) { - List emisCustomerAddressIds = emisCustomerAddressList.stream().filter(i -> (!emisCustomerAddressNew.getEnterpriseTaxId().equals(i.getEnterpriseTaxId()) || !emisCustomerAddressNew.getEnterpriseName().equals(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList()); + if ("1".equals(emisCustomerAddressNew.getAddressType()) + && "0086".equals(emisCustomerAddressNew.getCountry())) { + String newEnterpriseTaxId = emisCustomerAddressNew.getEnterpriseTaxId(); + String newEnterpriseName = emisCustomerAddressNew.getEnterpriseName(); + + List emisCustomerAddressIds = emisCustomerAddressList.stream() + .filter(i -> { + String existingTaxId = i.getEnterpriseTaxId(); + String existingName = i.getEnterpriseName(); + + // 如果新数据为空,则过滤掉企业信息不匹配的记录 + if (StringUtil.isBlank(newEnterpriseTaxId) || StringUtil.isBlank(newEnterpriseName)) { + return false; + } + + // 如果现有数据为空,则包含在更新列表中 + if (StringUtil.isBlank(existingTaxId) || StringUtil.isBlank(existingName)) { + return true; + } + + // 比较企业信息是否不匹配 + return !newEnterpriseTaxId.equals(existingTaxId) || !newEnterpriseName.equals(existingName); + }) + .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()); + emisCustomerAddress.setEnterpriseTaxId(newEnterpriseTaxId); + emisCustomerAddress.setEnterpriseName(newEnterpriseName); emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress); return 1; } + for (Long id : emisCustomerAddressIds) { EmisCustomerAddress emisCustomerAddress = new EmisCustomerAddress(); emisCustomerAddress.setId(id); - emisCustomerAddress.setEnterpriseTaxId(emisCustomerAddressNew.getEnterpriseTaxId()); - emisCustomerAddress.setEnterpriseName(emisCustomerAddressNew.getEnterpriseName()); + emisCustomerAddress.setEnterpriseTaxId(newEnterpriseTaxId); + emisCustomerAddress.setEnterpriseName(newEnterpriseName); emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress); } } From d6ec6a33b121bd65f1c492bc20840b9accc72a61 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 4 Sep 2025 10:07:30 +0800 Subject: [PATCH 3/4] =?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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 6cf66c627..94f34ba18 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 @@ -4149,7 +4149,17 @@ public class EmisBaseService { int totalDays=(emisTransProduct.getMaxAging()+otherAddDay-1)+weekDays+notCaclDays; log.info("计算预估到达时间:[maxAging="+emisTransProduct.getMaxAging()+",weekDays="+weekDays+",notCaclDays="+notCaclDays); // 预估达到时间 - return DateUtils.addDays(startDate, totalDays); + Date estimateDate = DateUtils.addDays(startDate, totalDays); + + // 判断预估到达时间是否为周末,如果是周末则往后加一天 + Calendar cal = Calendar.getInstance(); + cal.setTime(estimateDate); + int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); + if (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) { + estimateDate = DateUtils.addDays(estimateDate, 1); + } + + return estimateDate; } From 37d99b05c7542f456ab538dde471fdd4b1ef3983 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 4 Sep 2025 16:32:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?demand:=20tms-=E8=BF=90=E8=BE=93=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E8=B4=A7=E7=89=A9=E7=BB=84=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E9=9D=9E=E6=80=BB=E9=83=A8=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=97=A0=E6=B3=95=E6=9F=A5=E7=9C=8B=E7=BB=84=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E8=AF=A6=E6=83=85bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../erp/web/emis/EmisTmsSiteBatchDtlController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchDtlController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchDtlController.java index 54a127970..085aa0df3 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchDtlController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchDtlController.java @@ -1,11 +1,11 @@ -/** +/** * @Project: emis * @Title: EmisTmsSiteBatchDtlController.java * @author linfso * @date 2024-03-01 06:38:50 * @Copyright: ShangHai Duta 2022 All rights reserved. - * @version v1.0 + * @version v1.0 * @Description:

一级网点TMS组批次明细 控制器

*/ @@ -41,7 +41,7 @@ import com.xdadan.erp.emis.service.IEmisTmsSiteBatchDtlService; /** * 一级网点TMS组批次明细Controller - * + * * @author linfso * @date 2024-03-01 06:38:50 */ @@ -62,7 +62,7 @@ public class EmisTmsSiteBatchDtlController extends EmisBaseController startPage(); // 设置通用权限查询参数 - setPrivParams(emisTmsSiteBatchDtl); +// setPrivParams(emisTmsSiteBatchDtl); List list = emisTmsSiteBatchDtlService.selectEmisTmsSiteBatchDtlList(emisTmsSiteBatchDtl); return getDataTable(list);