From 5415a861612624ae64732c91ab7323e99ec9a43c Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 15:22:06 +0800
Subject: [PATCH 1/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../erp/emis/domain/EmisCustomerAddress.java | 5 +
.../xdadan/erp/emis/domain/EmisWaybill.java | 4 +
.../com/xdadan/erp/emis/domain/vo/Sender.java | 4 +
.../erp/emis/domain/vo/WaybillOrder.java | 2 +
.../mapper/EmisCustomerAddressMapper.java | 34 ++++---
.../erp/emis/service/EmisBaseService.java | 95 +++++++++++++++++++
.../service/impl/EmisWaybillServiceImpl.java | 4 +-
.../mapper/EmisCustomerAddressMapper.xml | 53 ++++++++++-
8 files changed, 183 insertions(+), 18 deletions(-)
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerAddress.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerAddress.java
index 08fca3ce8..b6c3eeb35 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerAddress.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerAddress.java
@@ -83,4 +83,9 @@ public class EmisCustomerAddress extends BaseEntity
/* 使用站点名称 */
private String useSiteName;
+ /* 企业名称 */
+ private String enterpriseName;
+ /* 企业税号 */
+ private String enterpriseTaxId;
+
}
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java
index 8742ac8c2..86ad03f09 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java
@@ -156,6 +156,10 @@ public class EmisWaybill extends BaseEntity
private String sendPostcode;
/* 发件人省市区名称,逗号分隔 */
private String sendPcd;
+ /* 企业名称 */
+ private String enterpriseName;
+ /* 企业税号 */
+ private String enterpriseTaxId;
/* 支付方式 : 现金或月结 */
@TableField
@DataAuditField(fieldComment = "支付方式",dictType="emis_payment_type")
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/Sender.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/Sender.java
index fd9999534..16e26be9a 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/Sender.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/Sender.java
@@ -41,4 +41,8 @@ public class Sender implements Serializable {
private String email;
/* 公司 */
private String company;
+ /* 企业名称 */
+ private String enterpriseName;
+ /* 企业税号 */
+ private String enterpriseTaxId;
}
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java
index f36fe3f16..4f716dd96 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java
@@ -785,6 +785,8 @@ public class WaybillOrder implements Serializable {
dbWaybill.setSendAddress(sender.getAddress());
dbWaybill.setSendPostcode(sender.getPostCode());
dbWaybill.setSendCompany(sender.getCompany());
+ dbWaybill.setEnterpriseName(sender.getEnterpriseName());
+ dbWaybill.setEnterpriseTaxId(sender.getEnterpriseTaxId());
}
dbWaybill.setPaymentType(this.getPaymentType());
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerAddressMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerAddressMapper.java
index 4fba65f87..a85a83bb7 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerAddressMapper.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerAddressMapper.java
@@ -1,10 +1,10 @@
-/**
+/**
* @Project: emis
* @Title: EmisCustomerAddressMapper.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description:
客户收寄件地址 Mapper 接口
* Warning : This file is generate by ai tools,don't edit!!!
*/
@@ -30,31 +30,31 @@ public interface EmisCustomerAddressMapper extends BaseMapper selectEmisCustomerAddressList(EmisCustomerAddress emisCustomerAddress);
/**
- * 新增
- *
+ * 新增
+ *
* @param emisCustomerAddress
- * @return
+ * @return
*/
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
/**
* 修改
- *
- * @param emisCustomerAddress
- * @return
+ *
+ * @param emisCustomerAddress
+ * @return
*/
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
@@ -62,7 +62,7 @@ public interface EmisCustomerAddressMapper extends BaseMapper checkAndQuery(EmisCustomerAddress emisCustomerAddress);
+
/**
* 查询重复的地址,并且给客户打上标签
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 e82d5241a..6ede46819 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
@@ -3552,6 +3552,58 @@ public class EmisBaseService {
}
+ /**
+ * 根据添加的地址增加客户
+ *
+ * @param emisCustomerAddressNew
+ * @return
+ */
+ public int createCustomerAddressNew(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError {
+
+ if ("2".equals(emisCustomerAddressNew.getAddressType())) {
+ if ("0086".equals(emisCustomerAddressNew.getCounty())) {
+ if (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId()) || StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称/企业税号不能为空");
+ }
+ // 验证企业名称格式
+ if (!validateEnterpriseName(emisCustomerAddressNew.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
+
+ // 验证企业税号格式
+ if (!validateEnterpriseTaxId(emisCustomerAddressNew.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
+ } else {
+ emisCustomerAddressNew.setEnterpriseName(null);
+ emisCustomerAddressNew.setEnterpriseTaxId(null);
+ }
+ } else {
+ emisCustomerAddressNew.setEnterpriseName(null);
+ emisCustomerAddressNew.setEnterpriseTaxId(null);
+ }
+ List emisCustomerAddressList = emisCustomerAddressMapper.checkAndQuery(emisCustomerAddressNew);
+ if (CollectionUtil.isEmpty(emisCustomerAddressList)) {
+ // 不重复的情况则 创建地址
+ return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddressNew);
+ } else {
+ if ("2".equals(emisCustomerAddressNew.getAddressType()) && "0086".equals(emisCustomerAddressNew.getCounty())) {
+ List emisCustomerAddressIds = emisCustomerAddressList.stream().filter(i -> (StringUtil.isBlank(i.getEnterpriseTaxId()) || StringUtil.isBlank(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList());
+ if (CollectionUtil.isEmpty(emisCustomerAddressIds)) {
+ return 1;
+ }
+ for (Long id : emisCustomerAddressIds) {
+ EmisCustomerAddress emisCustomerAddress = new EmisCustomerAddress();
+ emisCustomerAddress.setId(id);
+ emisCustomerAddress.setEnterpriseTaxId(emisCustomerAddressNew.getEnterpriseTaxId());
+ emisCustomerAddress.setEnterpriseName(emisCustomerAddressNew.getEnterpriseName());
+ emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
+ }
+ }
+ }
+
+ return 1;
+ }
/**
* 根据添加的地址增加客户
@@ -3572,6 +3624,49 @@ public class EmisBaseService {
return 1;
}
+ /**
+ * 验证企业名称格式
+ * 不允许包含空格、回车、@、#、$、%、&、数字等特殊符号
+ */
+ public boolean validateEnterpriseName(String enterpriseName) {
+ if (com.xdadan.erp.common.utils.StringUtils.isEmpty(enterpriseName)) {
+ return false;
+ }
+
+ // 检查是否包含不允许的字符
+ String invalidChars = " @#$%&0123456789";
+ for (char c : invalidChars.toCharArray()) {
+ if (enterpriseName.contains(String.valueOf(c))) {
+ return false;
+ }
+ }
+
+ // 检查是否包含回车符
+ if (enterpriseName.contains("\n") || enterpriseName.contains("\r")) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * 验证企业税号格式
+ * 8-18位数组成,由数字和大写字母组成,不允许有汉字、空格等特殊符号
+ */
+ public boolean validateEnterpriseTaxId(String enterpriseTaxId) {
+ if (com.xdadan.erp.common.utils.StringUtils.isEmpty(enterpriseTaxId)) {
+ return false;
+ }
+
+ // 检查长度
+ if (enterpriseTaxId.length() < 8 || enterpriseTaxId.length() > 18) {
+ return false;
+ }
+
+ // 检查是否只包含数字和大写字母
+ return enterpriseTaxId.matches("^[0-9A-Z]+$");
+ }
+
/**
* 获取线路
* @param code
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 7f9ddcd8e..3b6234eb1 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
@@ -2510,6 +2510,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
sendAddress.setUseSiteCode(emisWaybillSave.getSendSiteCode());
sendAddress.setAddressType("1");
+ sendAddress.setEnterpriseName(emisWaybillSave.getEnterpriseName());
+ sendAddress.setEnterpriseTaxId(emisWaybillSave.getEnterpriseTaxId());
// 收件地址
EmisCustomerAddress recieveAddress = new EmisCustomerAddress();
@@ -2626,7 +2628,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
}
// 保存客户收件、寄件地址,开单不要关联客户地址数据
- createCustomerAddress(sendAddress);
+ createCustomerAddressNew(sendAddress);
createCustomerAddress(recieveAddress);
emisWaybillSave.setCustomerCode(customerCode);
diff --git a/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml b/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml
index 749f7dbf2..4439efaa1 100644
--- a/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml
@@ -27,6 +27,8 @@
+
+
@@ -38,7 +40,7 @@
- select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, bl_site_default_flag, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
+ select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, bl_site_default_flag, use_site, use_site_code, enterprise_name, enterprise_tax_id, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
@@ -63,6 +65,8 @@
and post_code like concat('%', #{postCode}, '%')
and email like concat('%', #{email}, '%')
and company like concat('%', #{company}, '%')
+ and enterprise_name like concat('%', #{enterpriseName}, '%')
+ and enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and bl_default_flag = #{blDefaultFlag}
and order_num like concat('%', #{orderNum}, '%')
and bl_site_default_flag like concat('%', #{blSiteDefaultFlag}, '%')
@@ -79,7 +83,7 @@
and FIND_IN_SET(use_site_code, #{useSiteCode})
- and ( name like concat('%',#{searchValue}, '%') or phone like concat('%',#{searchValue}, '%') or company like concat('%',#{searchValue}, '%') )
+ and ( name like concat('%',#{searchValue}, '%') or phone like concat('%',#{searchValue}, '%') or company like concat('%',#{searchValue}, '%') or enterprise_name like concat('%',#{searchValue}, '%') or enterprise_tax_id like concat('%',#{searchValue}, '%') )
@@ -87,7 +91,7 @@
@@ -116,6 +120,8 @@
bl_site_default_flag,
use_site,
use_site_code,
+ enterprise_name,
+ enterprise_tax_id,
del_flag,
create_by,
create_time,
@@ -147,6 +153,8 @@
#{blSiteDefaultFlag},
#{useSite},
#{useSiteCode},
+ #{enterpriseName},
+ #{enterpriseTaxId},
#{delFlag},
#{createBy},
#{createTime},
@@ -179,6 +187,8 @@
bl_default_flag = #{blDefaultFlag},
order_num = #{orderNum},
bl_site_default_flag = #{blSiteDefaultFlag},
+ enterprise_name = #{enterpriseName},
+ enterprise_tax_id = #{enterpriseTaxId},
use_site = #{useSite},
use_site_code = #{useSiteCode},
del_flag = #{delFlag},
@@ -237,6 +247,12 @@
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}
and customer_code is null
@@ -266,5 +282,34 @@
limit 1
+
+
+
+
From 0bb97dd848f7e0eab95248a1ea44bab6af49b4bd Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 15:35:12 +0800
Subject: [PATCH 2/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../main/resources/mapper/EmisWaybillMapper.xml | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
index 6393aa1ff..8f1aff425 100644
--- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
@@ -44,6 +44,8 @@
+
+
@@ -299,7 +301,7 @@
a.receive_company, a.receive_mobile, a.receive_tel, a.receive_country, a.receive_province, a.receive_city,
a.receive_county, a.receive_town, a.receive_address, a.receive_postcode, a.receive_pcd, a.send_name, a.send_company,a.start_site_code,
a.send_mobile, a.send_tel, a.send_country, a.send_province, a.send_city, a.send_county, a.send_town, a.send_address,
- a.send_postcode, a.send_pcd, a.payment_type, a.calc_fee_type, a.cust_no, a.cust_name, a.trans_line_type, a.product_type,
+ a.send_postcode, a.send_pcd, a.enterprise_name, a.enterprise_tax_id, a.payment_type, a.calc_fee_type, a.cust_no, a.cust_name, a.trans_line_type, a.product_type,
a.time_type, a.meter_type, a.carry_type, a.customs_clear, a.customs_eclaration, a.estimate_date, a.pack_type, a.dispatch_method,
a.pickup_method, a.pick_start_date, a.pick_finish_date, a.pick_fail_reason, a.into_warehouse_code,
a.into_warehouse_name, a.into_warehouse_address, a.into_warehouse_contact, a.into_warehouse_phone,
@@ -400,7 +402,7 @@
a.receive_company, a.receive_mobile, a.receive_tel, a.receive_country, a.receive_province, a.receive_city,
a.receive_county, a.receive_town, a.receive_address, a.receive_postcode, a.receive_pcd, a.send_name, a.send_company,
a.send_mobile, a.send_tel, a.send_country, a.send_province, a.send_city, a.send_county, a.send_town, a.send_address,
- a.send_postcode, a.send_pcd, a.payment_type, a.calc_fee_type, a.cust_no, a.cust_name, a.trans_line_type, a.product_type,
+ a.send_postcode, a.send_pcd, a.enterprise_name, a.enterprise_tax_id, a.payment_type, a.calc_fee_type, a.cust_no, a.cust_name, a.trans_line_type, a.product_type,
a.time_type, a.meter_type, a.carry_type, a.customs_clear, a.customs_eclaration, a.estimate_date, a.pack_type, a.dispatch_method,
a.pickup_method, a.pick_start_date, a.pick_finish_date, a.pick_fail_reason, a.into_warehouse_code,
a.into_warehouse_name, a.into_warehouse_address, a.into_warehouse_contact, a.into_warehouse_phone,
@@ -2811,6 +2813,8 @@
send_address,
send_postcode,
send_pcd,
+ enterprise_name,
+ enterprise_tax_id,
payment_type,
calc_fee_type,
cust_no,
@@ -2997,6 +3001,8 @@
#{sendAddress},
#{sendPostcode},
#{sendPcd},
+ #{enterpriseName},
+ #{enterpriseTaxId},
#{paymentType},
#{calcFeeType},
#{custNo},
@@ -3185,6 +3191,8 @@
send_address = #{sendAddress},
send_postcode = #{sendPostcode},
send_pcd = #{sendPcd},
+ enterprise_name = #{enterpriseName},
+ enterprise_tax_id = #{enterpriseTaxId},
payment_type = #{paymentType},
calc_fee_type = #{calcFeeType},
cust_no = #{custNo},
@@ -3374,6 +3382,8 @@
send_address = #{sendAddress},
send_postcode = #{sendPostcode},
send_pcd = #{sendPcd},
+ enterprise_name = #{enterpriseName},
+ enterprise_tax_id = #{enterpriseTaxId},
payment_type = #{paymentType},
calc_fee_type = #{calcFeeType},
cust_no = #{custNo},
From 6300291c93961ca63518b48921a017eeddaad787 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 15:43:44 +0800
Subject: [PATCH 3/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../java/com/xdadan/erp/emis/service/EmisBaseService.java | 4 ++--
1 file changed, 2 insertions(+), 2 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 6ede46819..be59dc5ff 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
@@ -3560,7 +3560,7 @@ public class EmisBaseService {
*/
public int createCustomerAddressNew(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError {
- if ("2".equals(emisCustomerAddressNew.getAddressType())) {
+ if ("1".equals(emisCustomerAddressNew.getAddressType())) {
if ("0086".equals(emisCustomerAddressNew.getCounty())) {
if (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId()) || StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称/企业税号不能为空");
@@ -3587,7 +3587,7 @@ public class EmisBaseService {
// 不重复的情况则 创建地址
return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddressNew);
} else {
- if ("2".equals(emisCustomerAddressNew.getAddressType()) && "0086".equals(emisCustomerAddressNew.getCounty())) {
+ if ("1".equals(emisCustomerAddressNew.getAddressType()) && "0086".equals(emisCustomerAddressNew.getCounty())) {
List emisCustomerAddressIds = emisCustomerAddressList.stream().filter(i -> (StringUtil.isBlank(i.getEnterpriseTaxId()) || StringUtil.isBlank(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList());
if (CollectionUtil.isEmpty(emisCustomerAddressIds)) {
return 1;
From 749a502276a9308ffe391f3668fb1162c8695934 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 15:48:56 +0800
Subject: [PATCH 4/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../java/com/xdadan/erp/emis/service/EmisBaseService.java | 4 ++--
1 file changed, 2 insertions(+), 2 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 be59dc5ff..6c9a18c53 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,7 +3561,7 @@ public class EmisBaseService {
public int createCustomerAddressNew(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError {
if ("1".equals(emisCustomerAddressNew.getAddressType())) {
- if ("0086".equals(emisCustomerAddressNew.getCounty())) {
+ if ("0086".equals(emisCustomerAddressNew.getCountry())) {
if (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId()) || StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称/企业税号不能为空");
}
@@ -3587,7 +3587,7 @@ public class EmisBaseService {
// 不重复的情况则 创建地址
return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddressNew);
} else {
- if ("1".equals(emisCustomerAddressNew.getAddressType()) && "0086".equals(emisCustomerAddressNew.getCounty())) {
+ 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());
if (CollectionUtil.isEmpty(emisCustomerAddressIds)) {
return 1;
From a6472173b8b411a19edbcaae5013c3b033650f86 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 16:04:54 +0800
Subject: [PATCH 5/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../emis/EmisCustomerAddressController.java | 17 +++++++------
.../service/IEmisCustomerAddressService.java | 21 ++++++++--------
.../impl/EmisCustomerAddressServiceImpl.java | 24 +++++++++----------
3 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerAddressController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerAddressController.java
index a17a78170..2185207cd 100644
--- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerAddressController.java
+++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerAddressController.java
@@ -1,11 +1,11 @@
-/**
+/**
* @Project: emis
* @Title: EmisCustomerAddressController.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 客户收寄件地址 控制器
*/
@@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletResponse;
import com.xdadan.erp.common.annotation.filter.jackson.JacksonFilter;
import com.xdadan.erp.common.core.domain.entity.SysUser;
+import com.xdadan.erp.emis.domain.exception.EmisBizError;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -33,7 +34,7 @@ import com.xdadan.erp.emis.service.IEmisCustomerAddressService;
/**
* 客户收寄件地址Controller
- *
+ *
* @author linfso
* @date 2024-03-01 04:47:51
*/
@@ -60,7 +61,7 @@ public class EmisCustomerAddressController extends EmisBaseController
}
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:list')")
- @JacksonFilter(include= {"id","name","phone","country","province","city","county","countryName","provinceName","cityName","countyName","town","townName","address","postCode","email","company","blDefaultFlag","orderNum","createTime","remark"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
+ @JacksonFilter(include= {"id","name","phone","country","province","city","county","countryName","provinceName","cityName","countyName","town","townName","address","postCode","email","company","blDefaultFlag","orderNum","createTime","remark","enterpriseName","enterpriseTaxId"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@GetMapping("/listSimple")
public TableDataInfo listSimple(EmisCustomerAddress emisCustomerAddress)
{
@@ -75,7 +76,7 @@ public class EmisCustomerAddressController extends EmisBaseController
}
- @JacksonFilter(include= {"id","name","phone","country","province","city","county","address","postCode","email","company","countryName","provinceName","cityName","countyName","town","townName","blDefaultFlag","orderNum","createTime","remark"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
+ @JacksonFilter(include= {"id","name","phone","country","province","city","county","address","postCode","email","company","countryName","provinceName","cityName","countyName","town","townName","blDefaultFlag","orderNum","createTime","remark","enterpriseName","enterpriseTaxId"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@RequestMapping("/getAddressById")
public AjaxResult getAddressById(@RequestParam("id") Long id)
{
@@ -124,16 +125,14 @@ public class EmisCustomerAddressController extends EmisBaseController
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:add')")
@Log(title = "客户收寄件地址", businessType = BusinessType.INSERT)
@PostMapping
- public AjaxResult add(@RequestBody EmisCustomerAddress emisCustomerAddress)
- {
+ public AjaxResult add(@RequestBody EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
return toAjax(emisCustomerAddressService.insertEmisCustomerAddress(emisCustomerAddress));
}
@Log(title = "客户收寄件地址", businessType = BusinessType.INSERT)
@PostMapping("/addAddress")
- public AjaxResult addAddress(@RequestBody EmisCustomerAddress emisCustomerAddress)
- {
+ public AjaxResult addAddress(@RequestBody EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
String ownerSiteCode = getLoginUser().getUser().getOwnerSiteCode();
emisCustomerAddress.setUseSiteCode(ownerSiteCode);
emisCustomerAddress.setUseSite(ownerSiteCode);
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerAddressService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerAddressService.java
index 036576cc0..98de963d6 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerAddressService.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerAddressService.java
@@ -1,16 +1,17 @@
- /**
+ /**
* @Project: emis
* @Title: EmisCustomerAddressService.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 客户收寄件地址 服务类接口
*/
package com.xdadan.erp.emis.service;
import java.util.List;
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
+import com.xdadan.erp.emis.domain.exception.EmisBizError;
/**
* @ClassName EmisCustomerAddressService
@@ -18,18 +19,18 @@ import com.xdadan.erp.emis.domain.EmisCustomerAddress;
* @author linfso
* @date 2024-03-01 04:47:51
*/
-public interface IEmisCustomerAddressService
+public interface IEmisCustomerAddressService
{
/**
* 主键查询
* @param id
- * @return
+ * @return
*/
public EmisCustomerAddress selectEmisCustomerAddressById(Long id);
/**
* 查询客户收寄件地址列表
- *
+ *
* @param emisCustomerAddress 客户收寄件地址
* @return 客户收寄件地址集合
*/
@@ -37,15 +38,15 @@ public interface IEmisCustomerAddressService
/**
* 新增客户收寄件地址
- *
+ *
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
- public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
+ public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError;
/**
* 修改客户收寄件地址
- *
+ *
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
@@ -53,7 +54,7 @@ public interface IEmisCustomerAddressService
/**
* 批量删除客户收寄件地址
- *
+ *
* @param ids 需要删除的客户收寄件地址主键集合
* @return 结果
*/
@@ -61,7 +62,7 @@ public interface IEmisCustomerAddressService
/**
* 删除客户收寄件地址信息
- *
+ *
* @param id 客户收寄件地址主键
* @return 结果
*/
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerAddressServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerAddressServiceImpl.java
index dde2a0e4c..97fe2cb69 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerAddressServiceImpl.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerAddressServiceImpl.java
@@ -1,10 +1,10 @@
- /**
+ /**
* @Project: emis
* @Title: EmisCustomerAddressServiceImpl.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 客户收寄件地址 实体类
*/
@@ -12,6 +12,7 @@ package com.xdadan.erp.emis.service.impl;
import java.util.List;
+import com.xdadan.erp.emis.domain.exception.EmisBizError;
import com.xdadan.erp.emis.service.EmisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,7 +22,7 @@ import com.xdadan.erp.emis.service.IEmisCustomerAddressService;
/**
* 客户收寄件地址Service业务层处理
- *
+ *
* @author linfso
* @date 2024-03-01 04:47:51
*/
@@ -33,7 +34,7 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
/**
* 查询客户收寄件地址
- *
+ *
* @param id 客户收寄件地址主键
* @return 客户收寄件地址
*/
@@ -45,7 +46,7 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
/**
* 查询客户收寄件地址列表
- *
+ *
* @param emisCustomerAddress 客户收寄件地址
* @return 客户收寄件地址
*/
@@ -57,25 +58,24 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
/**
* 新增客户收寄件地址
- *
+ *
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
@Override
- public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress)
- {
+ public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
// 新增地址
emisCustomerAddress.preInsert();
emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
// 创建用户
- return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddress);
+ return createCustomerAddressNew(emisCustomerAddress);
}
/**
* 修改客户收寄件地址
- *
+ *
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
@@ -91,7 +91,7 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
/**
* 批量删除客户收寄件地址
- *
+ *
* @param ids 需要删除的客户收寄件地址主键
* @return 结果
*/
@@ -103,7 +103,7 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
/**
* 删除客户收寄件地址信息
- *
+ *
* @param id 客户收寄件地址主键
* @return 结果
*/
From 0dda77f2d5f24479c6e5f5526f31c3f775bedd7d Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 17:03:29 +0800
Subject: [PATCH 6/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../src/main/resources/mapper/EmisWaybillMapper.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
index 8f1aff425..ece22fff3 100644
--- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
@@ -666,6 +666,8 @@
and send_town=#{sendTown}
and send_address like concat('%', #{sendAddress}, '%')
and send_postcode like concat('%', #{sendPostcode}, '%')
+ and a.enterprise_name like concat('%', #{enterpriseName}, '%')
+ and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and payment_type=#{paymentType}
and calc_fee_type=#{calcFeeType}
and cust_no like concat('%', #{custNo}, '%')
@@ -915,6 +917,8 @@
and a.send_town=#{sendTown}
and a.send_address like concat('%', #{sendAddress}, '%')
and a.send_postcode like concat('%', #{sendPostcode}, '%')
+ and a.enterprise_name like concat('%', #{enterpriseName}, '%')
+ and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and a.payment_type=#{paymentType}
and a.calc_fee_type=#{calcFeeType}
and a.cust_no like concat('%', #{custNo}, '%')
@@ -1212,6 +1216,8 @@
and bl_virtual=#{blVirtual}
and send_address like concat('%', #{sendAddress}, '%')
and send_postcode like concat('%', #{sendPostcode}, '%')
+ and a.enterprise_name like concat('%', #{enterpriseName}, '%')
+ and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and FIND_IN_SET(payment_type,#{paymentType})
and calc_fee_type=#{calcFeeType}
and cust_no like concat('%', #{custNo}, '%')
@@ -1611,6 +1617,8 @@
and send_town=#{sendTown}
and send_address like concat('%', #{sendAddress}, '%')
and send_postcode like concat('%', #{sendPostcode}, '%')
+ and a.enterprise_name like concat('%', #{enterpriseName}, '%')
+ and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and FIND_IN_SET(payment_type,#{paymentType})
and calc_fee_type=#{calcFeeType}
and cust_no like concat('%', #{custNo}, '%')
@@ -2080,6 +2088,8 @@
and send_town=#{sendTown}
and send_address like concat('%', #{sendAddress}, '%')
and send_postcode like concat('%', #{sendPostcode}, '%')
+ and a.enterprise_name like concat('%', #{enterpriseName}, '%')
+ and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and FIND_IN_SET(payment_type,#{paymentType})
and calc_fee_type=#{calcFeeType}
and cust_no like concat('%', #{custNo}, '%')
@@ -2511,6 +2521,8 @@
and a.product_type=#{productType}
and a.send_company like concat('%', #{sendCompany}, '%')
+ and a.enterprise_name like concat('%', #{enterpriseName}, '%')
+ and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and a.take_piece_employee_code=#{takePieceEmployeeCode}
and a.operate_employee_code=#{operateEmployeeCode}
and register_man_code= #{registerManCode}
From bbdf6f3e3e855db0a3a53312903fb4b97841eb2b Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 25 Aug 2025 17:18:51 +0800
Subject: [PATCH 7/9] =?UTF-8?q?demand:=20tms/app=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E5=BD=95=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E3=80=81=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=E3=80=81=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5=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=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=20=20tms/app=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E3=80=81=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=E3=80=81?=
=?UTF-8?q?=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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=E5=90=8E=E8=87=AA=E5=8A=A8=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0/=E6=96=B0=E5=A2=9E=E5=88=B0?=
=?UTF-8?q?=E5=AF=84=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20tms-?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86-=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E4=BA=BA=E5=9C=B0=E5=9D=80-=E5=A2=9E=E5=8A=A0=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=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=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=A2=9E=E5=8A=A0=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=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E3=80=81=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E7=A8=8E=E5=8F=B7=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java
index 4f716dd96..ebe39bc81 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java
@@ -502,6 +502,8 @@ public class WaybillOrder implements Serializable {
sender.setAddress(dbWaybill.getSendAddress());
sender.setPostCode(dbWaybill.getSendPostcode());
sender.setCompany(dbWaybill.getSendCompany());
+ sender.setEnterpriseName(dbWaybill.getEnterpriseName());
+ sender.setEnterpriseTaxId(dbWaybill.getEnterpriseTaxId());
voItem.setSender(sender);
// voItem.setId(dbWaybill.getId());
From 55eee453eabfbf563b9d72a90f9060df47c530c8 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Tue, 26 Aug 2025 10:03:16 +0800
Subject: [PATCH 8/9] =?UTF-8?q?demand:=20=E5=B7=B2=E5=88=86=E6=89=B9?=
=?UTF-8?q?=E7=BB=84=E6=89=B9=E6=AC=A1=E8=BF=90=E5=8D=95=E6=97=A0=E6=B3=95?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E5=8D=95=E9=80=BB=E8=BE=91=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../java/com/xdadan/erp/emis/service/EmisBaseService.java | 4 ++--
1 file changed, 2 insertions(+), 2 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 6c9a18c53..3bce11c6f 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
@@ -5624,8 +5624,8 @@ public class EmisBaseService {
}
if (emisWaybillSave.getParcelQty().equals(emisWaybillOld.getParcelQty())
- && emisWaybillSave.getBillWeight().equals(emisWaybillOld.getBillWeight())
- && emisWaybillSave.getTotalVolume().equals(emisWaybillOld.getTotalVolume())) {
+ && emisWaybillSave.getBillWeight().stripTrailingZeros().equals(emisWaybillOld.getBillWeight().stripTrailingZeros())
+ && emisWaybillSave.getTotalVolume().stripTrailingZeros().equals(emisWaybillOld.getTotalVolume().stripTrailingZeros())) {
return;
}
From f5dba8617bad20e0031ac4e4efa3b939be8b2c43 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Tue, 26 Aug 2025 11:29:13 +0800
Subject: [PATCH 9/9] =?UTF-8?q?demand:=20=E7=BD=91=E7=82=B9=E8=B4=B9?=
=?UTF-8?q?=E7=94=A8=E7=94=B3=E8=AF=B7=E7=94=B3=E8=AF=B7=E6=97=B6=E6=A0=A1?=
=?UTF-8?q?=E9=AA=8C=E5=AF=84=E4=BB=B6=E4=BA=BA=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../erp/emis/service/EmisBaseService.java | 46 ++++++++++---------
.../EmisWaybillAjustApplyServiceImpl.java | 42 ++++++++++++-----
2 files changed, 56 insertions(+), 32 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 3bce11c6f..4cfc23d59 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
@@ -3560,6 +3560,31 @@ public class EmisBaseService {
*/
public int createCustomerAddressNew(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError {
+ checkAdress(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 -> (StringUtil.isBlank(i.getEnterpriseTaxId()) || StringUtil.isBlank(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList());
+ if (CollectionUtil.isEmpty(emisCustomerAddressIds)) {
+ return 1;
+ }
+ for (Long id : emisCustomerAddressIds) {
+ EmisCustomerAddress emisCustomerAddress = new EmisCustomerAddress();
+ emisCustomerAddress.setId(id);
+ emisCustomerAddress.setEnterpriseTaxId(emisCustomerAddressNew.getEnterpriseTaxId());
+ emisCustomerAddress.setEnterpriseName(emisCustomerAddressNew.getEnterpriseName());
+ emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
+ }
+ }
+ }
+
+ return 1;
+ }
+
+ 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())) {
@@ -3582,27 +3607,6 @@ public class EmisBaseService {
emisCustomerAddressNew.setEnterpriseName(null);
emisCustomerAddressNew.setEnterpriseTaxId(null);
}
- 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 -> (StringUtil.isBlank(i.getEnterpriseTaxId()) || StringUtil.isBlank(i.getEnterpriseName()))).map(EmisCustomerAddress::getId).collect(Collectors.toList());
- if (CollectionUtil.isEmpty(emisCustomerAddressIds)) {
- return 1;
- }
- for (Long id : emisCustomerAddressIds) {
- EmisCustomerAddress emisCustomerAddress = new EmisCustomerAddress();
- emisCustomerAddress.setId(id);
- emisCustomerAddress.setEnterpriseTaxId(emisCustomerAddressNew.getEnterpriseTaxId());
- emisCustomerAddress.setEnterpriseName(emisCustomerAddressNew.getEnterpriseName());
- emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
- }
- }
- }
-
- return 1;
}
/**
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 5898979f4..fe4ba9d75 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
@@ -1,10 +1,10 @@
- /**
+ /**
* @Project: emis
* @Title: EmisWaybillAjustApplyServiceImpl.java
* @author linfso
* @date 2024-06-25 23:39:28
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 运单调整申请 实体类
*/
@@ -37,7 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
/**
* 运单调整申请Service业务层处理
- *
+ *
* @author linfso
* @date 2024-06-25 23:39:28
*/
@@ -72,7 +72,7 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 查询运单调整申请
- *
+ *
* @param id 运单调整申请主键
* @return 运单调整申请
*/
@@ -85,7 +85,7 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 查询运单调整申请列表
- *
+ *
* @param emisWaybillAjustApply 运单调整申请
* @return 运单调整申请
*/
@@ -97,8 +97,8 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 检查是否重复
- *
- * @param emisWaybillAjustApply
+ *
+ * @param emisWaybillAjustApply
* @return 数量
*/
@Override
@@ -109,13 +109,14 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 新增运单调整申请
- *
+ *
* @param emisWaybillAjustApply 运单调整申请
* @return 结果
*/
@Override
public int insertEmisWaybillAjustApply(EmisWaybillAjustApply emisWaybillAjustApply) throws EmisBizError {
+ EmisWaybill emisWaybillSave = getEmisWaybillNewFromJson(emisWaybillAjustApply);
// 判断单号是否存在
EmisWaybill emisWaybillOld=getWaybillByBillCode(emisWaybillAjustApply.getBillCode());
if(emisWaybillOld==null){
@@ -148,6 +149,25 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
checkVirtualParam(getEmisWaybillNewFromJson(emisWaybillAjustApply),emisWaybillOld);
}
+ // 发件地址
+ EmisCustomerAddress sendAddress = new EmisCustomerAddress();
+ sendAddress.setCountry(emisWaybillSave.getSendCountry());
+ sendAddress.setName(emisWaybillSave.getSendName());
+ sendAddress.setPhone(emisWaybillSave.getSendMobile());
+ sendAddress.setProvince(emisWaybillSave.getSendProvince());
+ sendAddress.setCity(emisWaybillSave.getSendCity());
+ sendAddress.setCounty(emisWaybillSave.getSendCounty());
+ sendAddress.setTown(emisWaybillSave.getSendTown());
+// recieveAddress.setEmail(emisWaybillSave);
+ sendAddress.setAddress(emisWaybillSave.getSendAddress());
+ sendAddress.setCompany(emisWaybillSave.getSendCompany());
+
+ sendAddress.setUseSiteCode(emisWaybillSave.getSendSiteCode());
+ sendAddress.setAddressType("1");
+ sendAddress.setEnterpriseName(emisWaybillSave.getEnterpriseName());
+ sendAddress.setEnterpriseTaxId(emisWaybillSave.getEnterpriseTaxId());
+ checkAdress(sendAddress);
+
// 插入数据
emisWaybillAjustApply.setApplyDate(new Date());
emisWaybillAjustApply.setApplySiteCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
@@ -180,7 +200,7 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 修改运单调整申请
- *
+ *
* @param emisWaybillAjustApply 运单调整申请
* @return 结果
*/
@@ -192,7 +212,7 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 批量删除运单调整申请
- *
+ *
* @param ids 需要删除的运单调整申请主键
* @return 结果
*/
@@ -204,7 +224,7 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
/**
* 删除运单调整申请信息
- *
+ *
* @param id 运单调整申请主键
* @return 结果
*/