From 9429fbf68779e4bf13680238ecef86dcc898012e Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 13 Nov 2025 16:29:57 +0800
Subject: [PATCH] =?UTF-8?q?demand:=20=20=20=20tms-=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E6=8A=A5=E8=A1=A8-=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7?=
=?UTF-8?q?=E5=87=BA=E8=B4=A7=E7=BB=9F=E8=AE=A1-=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E9=94=80=E5=94=AE=E5=87=BA=E8=B4=A7=E8=AF=A6=E6=83=85bug?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=20tms-=E8=BF=90=E5=8D=95=E7=AE=A1?=
=?UTF-8?q?=E7=90=86-=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5/=E8=BF=90?=
=?UTF-8?q?=E5=8D=95=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5-=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=EF=BC=8C=E4=B8=BB?=
=?UTF-8?q?=E5=8D=95=E5=8F=B7=E4=B8=8E=E8=99=9A=E6=8B=9F=E5=8D=95=E6=A0=87?=
=?UTF-8?q?=E8=AF=86=E8=A6=81=E4=B9=88=E5=90=8C=E6=97=B6=E5=AD=98=E5=9C=A8?=
=?UTF-8?q?=EF=BC=8C=E8=A6=81=E4=B9=88=E5=90=8C=E6=97=B6=E4=B8=BA=E7=A9=BA?=
=?UTF-8?q?=20committer:=20heyu?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/EmisWaybillServiceImpl.java | 19 ++++++++++++++++---
.../resources/mapper/EmisWaybillMapper.xml | 7 ++++---
2 files changed, 20 insertions(+), 6 deletions(-)
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 daf0165c4..62b933ce8 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
@@ -3174,17 +3174,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
if (StringUtils.isEmpty(billCode)) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号不能为空");
}
-
+
// 检查是否只包含数字、字母、横杠
if (!billCode.matches("^[0-9a-zA-Z\\-]+$")) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号只能包含数字、字母和横杠");
}
-
+
// 检查横杠是否在两端
if (billCode.startsWith("-") || billCode.endsWith("-")) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号横杠不能在两端");
}
-
+
// 检查是否有连续的横杠
if (billCode.contains("--")) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号不能有连续的横杠");
@@ -3203,6 +3203,19 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 校验运单号格式
validateBillCodeFormat(emisWaybillSave.getBillCode());
+ String blVirtual = emisWaybillSave.getBlVirtual();
+ String masterBillCode = emisWaybillSave.getMasterBillCode();
+ boolean masterBillCodeEmpty = StringUtils.isBlank(masterBillCode);
+ if (masterBillCodeEmpty) {
+ if ("1".equals(blVirtual)) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "主单号与虚拟单标识要么同时存在,要么同时为空");
+ }
+ } else {
+ if (!"1".equals(blVirtual)) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "主单号与虚拟单标识要么同时存在,要么同时为空");
+ }
+ }
+
// 获取运单号,判断是不是子单已存在
boolean isExists = checkWaybillIsExists(emisWaybillSave.getBillCode());
if(isExists){
diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
index b8d0d566a..23e22b9b8 100644
--- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
@@ -391,6 +391,7 @@
left join emis_site a2 on a.destination_center_code=a2.site_code and a2.del_flag='0'
left join emis_site start on a.start_site_code=start.site_code and start.del_flag='0'
left join emis_customer_user a3 on a.customer_code=a3.customer_code and a3.del_flag='0'
+ left join emis_customer_user a4 on a.cust_no=a4.monthly_pay_code and a4.del_flag='0'
left join emis_site seaway1 on a.departure_port=seaway1.site_code and seaway1.del_flag='0'
left join emis_site seaway2 on a.destination_port=seaway2.site_code and seaway2.del_flag='0'
@@ -4250,15 +4251,15 @@
- AND a3.sales_executive LIKE CONCAT('%', #{salesExecutive}, '%')
+ AND a4.sales_executive LIKE CONCAT('%', #{salesExecutive}, '%')
- AND a3.sales_support LIKE CONCAT('%', #{salesSupport}, '%')
+ AND a4.sales_support LIKE CONCAT('%', #{salesSupport}, '%')
- AND a3.salesmen LIKE CONCAT('%', #{salesmen}, '%')
+ AND a4.salesmen LIKE CONCAT('%', #{salesmen}, '%')