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 01/10] =?UTF-8?q?demand:=20=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5/=E8=BF=90=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95?=
=?UTF-8?q?=E5=85=A5/=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9/=E7=BD=91?=
=?UTF-8?q?=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=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?=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91=E6=B7=BB=E5=8A=A0=E5=BC=80?=
=?UTF-8?q?=E5=85=B3=EF=BC=8C9=E6=9C=881=E5=8F=B7=E4=BB=A5=E5=89=8D?=
=?UTF-8?q?=E7=9A=84=E6=89=A7=E8=A1=8C=E6=97=A7=E9=80=BB=E8=BE=91=EF=BC=8C?=
=?UTF-8?q?9=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);
From 7258e7631c39af236269d60ce69f5643cd274b58 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Wed, 27 Aug 2025 11:47:29 +0800
Subject: [PATCH 02/10] =?UTF-8?q?demand:=20=E6=9C=88=E7=BB=93=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E6=96=B0=E5=A2=9E=E3=80=81=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9=E3=80=81=E6=89=B9=E9=87=8F?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=94=AF=E6=8C=81=E6=96=B0=E5=A2=9E=E4=BC=81?=
=?UTF-8?q?=E4=B8=9A=E5=90=8D=E7=A7=B0/=E4=BC=81=E4=B8=9A=E7=A8=8E?=
=?UTF-8?q?=E5=8F=B7=E3=80=82=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E6=A0=B9=E6=8D=AE=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?/=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E3=80=82=20=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E8=BF=94=E5=9B=9E=E5=A2=9E=E5=8A=A0=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E5=90=8D=E7=A7=B0/=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7?=
=?UTF-8?q?=E3=80=82=20=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E5=85=B3=E8=81=94=E7=94=9F=E6=88=90=E6=9C=88=E7=BB=93=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E5=AF=B9=E5=BA=94=E7=9A=84=E4=BC=81=E4=B8=9A=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0/=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
---
.../web/emis/EmisCustomerUserController.java | 35 +++++++++++++++++--
.../emis/EmisMonthpayAccountController.java | 8 ++---
.../erp/emis/domain/EmisCustomerUser.java | 5 +++
.../mapper/EmisCustomerUserMapper.xml | 24 +++++++++----
4 files changed, 58 insertions(+), 14 deletions(-)
diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
index 617c29766..2a1c729d2 100644
--- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
+++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
@@ -1,11 +1,11 @@
-/**
+/**
* @Project: emis
* @Title: EmisCustomerUserController.java
* @author linfso
* @date 2024-03-01 03:51:54
* @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.emis.domain.*;
+import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
import com.xdadan.erp.emis.domain.exception.EmisBizError;
import com.xdadan.erp.emis.service.EmisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -42,7 +43,7 @@ import com.xdadan.erp.emis.service.IEmisCustomerUserService;
/**
* 快递客户用户Controller
- *
+ *
* @author linfso
* @date 2024-03-01 03:51:54
*/
@@ -242,6 +243,20 @@ public class EmisCustomerUserController extends EmisBaseController
public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser)
{
try {
+ // 验证企业名称和企业税号
+ try {
+ // 验证企业名称格式
+ if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
+
+ // 验证企业税号格式
+ if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
EmisCustomerUser oldUser=emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
if(oldUser!=null){
return AjaxResult.error("该客户电话号码已被占用,请使用新号码");
@@ -345,6 +360,20 @@ public class EmisCustomerUserController extends EmisBaseController
public AjaxResult editMonthUser(@RequestBody EmisCustomerUser emisCustomerUser)
{
try {
+ // 验证企业名称和企业税号
+ try {
+ // 验证企业名称格式
+ if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
+
+ // 验证企业税号格式
+ if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
EmisCustomerUser oldUser=emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
if(oldUser!=null && !oldUser.getCustomerCode().equals(emisCustomerUser.getCustomerCode())){
return AjaxResult.error("该客户电话号码已被占用,请使用新号码");
diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java
index e92b0c106..349379fdc 100644
--- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java
+++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java
@@ -1,11 +1,11 @@
-/**
+/**
* @Project: emis
* @Title: EmisMonthpayAccountController.java
* @author linfso
* @date 2024-04-24 05:05:22
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 月结账户表 控制器
*/
@@ -42,7 +42,7 @@ import com.xdadan.erp.emis.service.IEmisMonthpayAccountService;
/**
* 月结账户表Controller
- *
+ *
* @author linfso
* @date 2024-04-24 05:05:22
*/
@@ -93,7 +93,7 @@ public class EmisMonthpayAccountController extends EmisBaseController
* @param emisCustomerUser
* @return
*/
- @JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
+ @JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName","enterpriseName","enterpriseTaxId"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@GetMapping("/listSimple")
public TableDataInfo listSimple(EmisCustomerUser emisCustomerUser)
{
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerUser.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerUser.java
index 2b876a79c..90d66281e 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerUser.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCustomerUser.java
@@ -185,5 +185,10 @@ public class EmisCustomerUser extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date lastOrderTime;
+ /* 企业名称 */
+ private String enterpriseName;
+ /* 企业税号 */
+ private String enterpriseTaxId;
+
}
diff --git a/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml b/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
index 48c4ed901..aed3f6cbd 100644
--- a/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
@@ -61,6 +61,8 @@
+
+
@@ -90,7 +92,7 @@
- select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_customer_user
+ select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_customer_user
@@ -144,6 +146,8 @@
and real_name like concat('%', #{realName}, '%')
and id_no like concat('%', #{idNo}, '%')
+ and enterprise_name like concat('%', #{enterpriseName}, '%')
+ and enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')
and data_from like concat('%', #{dataFrom}, '%')
and bl_open_oms=#{blOpenOms}
and bl_sms=#{blSms}
@@ -184,7 +188,7 @@
@@ -247,6 +251,8 @@
order_num,
sales_support,
sales_executive,
+ enterprise_name,
+ enterprise_tax_id,
remark,
del_flag,
create_by,
@@ -312,6 +318,8 @@
#{orderNum},
#{salesSupport},
#{salesExecutive},
+ #{enterpriseName},
+ #{enterpriseTaxId},
#{remark},
#{delFlag},
#{createBy},
@@ -381,6 +389,8 @@
order_num = #{orderNum},
sales_support = #{salesSupport},
sales_executive = #{salesExecutive},
+ enterprise_name = #{enterpriseName},
+ enterprise_tax_id = #{enterpriseTaxId},
remark = #{remark},
del_flag = #{delFlag},
create_by = #{createBy},
@@ -428,25 +438,25 @@
@@ -460,4 +470,4 @@
-
\ No newline at end of file
+
From 6a70d5498a2f7491b0e6095afb6c2398d2a17587 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Wed, 27 Aug 2025 13:45:33 +0800
Subject: [PATCH 03/10] =?UTF-8?q?demand:=20=E6=9C=88=E7=BB=93=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E6=96=B0=E5=A2=9E=E3=80=81=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9=E3=80=81=E6=89=B9=E9=87=8F?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=94=AF=E6=8C=81=E6=96=B0=E5=A2=9E=E4=BC=81?=
=?UTF-8?q?=E4=B8=9A=E5=90=8D=E7=A7=B0/=E4=BC=81=E4=B8=9A=E7=A8=8E?=
=?UTF-8?q?=E5=8F=B7=E3=80=82=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E6=A0=B9=E6=8D=AE=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?/=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E3=80=82=20=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E8=BF=94=E5=9B=9E=E5=A2=9E=E5=8A=A0=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E5=90=8D=E7=A7=B0/=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7?=
=?UTF-8?q?=E3=80=82=20=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E5=85=B3=E8=81=94=E7=94=9F=E6=88=90=E6=9C=88=E7=BB=93=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E5=AF=B9=E5=BA=94=E7=9A=84=E4=BC=81=E4=B8=9A=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0/=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
---
.../web/emis/EmisCustomerUserController.java | 34 +++++++++----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
index 2a1c729d2..08b4ada3c 100644
--- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
+++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
@@ -245,15 +245,7 @@ public class EmisCustomerUserController extends EmisBaseController
try {
// 验证企业名称和企业税号
try {
- // 验证企业名称格式
- if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
- }
-
- // 验证企业税号格式
- if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
- }
+ checkEnterprise(emisCustomerUser);
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
@@ -286,6 +278,21 @@ public class EmisCustomerUserController extends EmisBaseController
}
+ private void checkEnterprise(EmisCustomerUser emisCustomerUser) throws EmisBizError {
+ if (!"0086".equals(emisCustomerUser.getCountry())) {
+ return;
+ }
+ // 验证企业名称格式
+ if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
+
+ // 验证企业税号格式
+ if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
+ }
+
private void nameToCode(EmisCustomerUser emisCustomerUser) {
// 国家
if (!StringUtils.isEmpty(emisCustomerUser.getCountry())) {
@@ -363,14 +370,7 @@ public class EmisCustomerUserController extends EmisBaseController
// 验证企业名称和企业税号
try {
// 验证企业名称格式
- if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
- }
-
- // 验证企业税号格式
- if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
- }
+ checkEnterprise(emisCustomerUser);
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
From 5a89d660f8304fd1aa9da1b677f23c596a46ca1d Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 11:09:54 +0800
Subject: [PATCH 04/10] =?UTF-8?q?demand:=20=E5=AE=A2=E6=88=B7=E7=AE=A1?=
=?UTF-8?q?=E7=90=86-=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7-=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=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?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../web/emis/EmisCustomerUserController.java | 34 +++++++--
.../emis/mapper/EmisCustomerUserMapper.java | 32 ++++----
.../service/IEmisCustomerUserService.java | 26 ++++---
.../impl/EmisCustomerUserServiceImpl.java | 30 +++++---
.../mapper/EmisCustomerUserMapper.xml | 73 +++++++++++++++++++
5 files changed, 159 insertions(+), 36 deletions(-)
diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
index 08b4ada3c..1c5d13efc 100644
--- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
+++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
@@ -19,6 +19,7 @@ import com.xdadan.erp.emis.domain.*;
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
import com.xdadan.erp.emis.domain.exception.EmisBizError;
import com.xdadan.erp.emis.service.EmisBaseService;
+import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -240,21 +241,36 @@ public class EmisCustomerUserController extends EmisBaseController
@PreAuthorize("@ss.hasPermi('emis:emisCustomerUser:add')")
@Log(title = "新增月结用户", businessType = BusinessType.INSERT)
@PostMapping("/addMonthUser")
- public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser)
- {
+ public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser) {
try {
+ if ("2".equals(emisCustomerUser.getBlImport())) {
+ // 批量导入企业名称和企业税号
+ try {
+ checkEnterpriseDetail(emisCustomerUser);
+ if (StringUtil.isBlank(emisCustomerUser.getMonthlyPayCode())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "月结卡号不能为空");
+ }
+ EmisCustomerUser editUser = new EmisCustomerUser();
+ editUser.setMonthlyPayCode(emisCustomerUser.getMonthlyPayCode());
+ editUser.setEnterpriseName(emisCustomerUser.getEnterpriseName());
+ editUser.setEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId());
+ return toAjax(emisCustomerUserService.updateEnterpriseInfoByMonthlyPayCode(editUser));
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
// 验证企业名称和企业税号
try {
checkEnterprise(emisCustomerUser);
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
- EmisCustomerUser oldUser=emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
- if(oldUser!=null){
+ EmisCustomerUser oldUser = emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
+ if (oldUser != null) {
return AjaxResult.error("该客户电话号码已被占用,请使用新号码");
}
- if(!StringUtils.isEmpty(emisCustomerUser.getMonthlyPayCode() )) {
+ if (!StringUtils.isEmpty(emisCustomerUser.getMonthlyPayCode())) {
oldUser = emisBaseService.getCustomerUserByMonthlyPayCode(emisCustomerUser.getMonthlyPayCode());
if (oldUser != null) {
return AjaxResult.error("月结卡号已存在");
@@ -282,6 +298,14 @@ public class EmisCustomerUserController extends EmisBaseController
if (!"0086".equals(emisCustomerUser.getCountry())) {
return;
}
+ checkEnterpriseDetail(emisCustomerUser);
+ }
+
+ private void checkEnterpriseDetail(EmisCustomerUser emisCustomerUser) throws EmisBizError {
+ if (StringUtil.isBlank(emisCustomerUser.getEnterpriseTaxId())
+ || StringUtil.isBlank(emisCustomerUser.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称/企业税号不能为空");
+ }
// 验证企业名称格式
if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerUserMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerUserMapper.java
index f001691e0..7706e40b2 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerUserMapper.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisCustomerUserMapper.java
@@ -1,10 +1,10 @@
-/**
+/**
* @Project: emis
* @Title: EmisCustomerUserMapper.java
* @author linfso
* @date 2024-03-01 03:51:54
* @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!!!
*/
@@ -24,32 +24,32 @@ public interface EmisCustomerUserMapper extends BaseMapper
/**
* 主键查询
* @param id
- * @return
+ * @return
*/
public EmisCustomerUser selectEmisCustomerUserById(Long id);
/**
* 查询列表
- *
- * @param emisCustomerUser
+ *
+ * @param emisCustomerUser
* @return 集合
*/
public List selectEmisCustomerUserList(EmisCustomerUser emisCustomerUser);
/**
- * 新增
- *
+ * 新增
+ *
* @param emisCustomerUser
- * @return
+ * @return
*/
public int insertEmisCustomerUser(EmisCustomerUser emisCustomerUser);
/**
* 修改
- *
- * @param emisCustomerUser
- * @return
+ *
+ * @param emisCustomerUser
+ * @return
*/
public int updateEmisCustomerUser(EmisCustomerUser emisCustomerUser);
@@ -64,7 +64,7 @@ public interface EmisCustomerUserMapper extends BaseMapper
/**
* 删除
- *
+ *
* @param id 主键
* @return 结果
*/
@@ -72,7 +72,7 @@ public interface EmisCustomerUserMapper extends BaseMapper
/**
* 批量删除
- *
+ *
* @param ids 需要删除的数据主键集合
* @return 结果
*/
@@ -99,5 +99,11 @@ public interface EmisCustomerUserMapper extends BaseMapper
public int insertSysOmsUserRole(Long omsUserId);
+ /** 根据月结卡号修改企业名称和企业税号
+ *
+ * @param emisCustomerUser
+ * @return
+ */
+ public int updateEnterpriseInfoByMonthlyPayCode(EmisCustomerUser emisCustomerUser);
}
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerUserService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerUserService.java
index c48efe44d..7f6311e17 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerUserService.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisCustomerUserService.java
@@ -1,10 +1,10 @@
- /**
+ /**
* @Project: emis
* @Title: EmisCustomerUserService.java
* @author linfso
* @date 2024-03-01 03:51:54
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 快递客户用户 服务类接口
*/
package com.xdadan.erp.emis.service;
@@ -18,18 +18,18 @@ import com.xdadan.erp.emis.domain.EmisCustomerUser;
* @author linfso
* @date 2024-03-01 03:51:54
*/
-public interface IEmisCustomerUserService
+public interface IEmisCustomerUserService
{
/**
* 主键查询
* @param id
- * @return
+ * @return
*/
public EmisCustomerUser selectEmisCustomerUserById(Long id);
/**
* 查询快递客户用户列表
- *
+ *
* @param emisCustomerUser 快递客户用户
* @return 快递客户用户集合
*/
@@ -37,7 +37,7 @@ public interface IEmisCustomerUserService
/**
* 新增快递客户用户
- *
+ *
* @param emisCustomerUser 快递客户用户
* @return 结果
*/
@@ -57,7 +57,7 @@ public interface IEmisCustomerUserService
/**
* 修改快递客户用户
- *
+ *
* @param emisCustomerUser 快递客户用户
* @return 结果
*/
@@ -65,7 +65,7 @@ public interface IEmisCustomerUserService
/**
* 批量删除快递客户用户
- *
+ *
* @param ids 需要删除的快递客户用户主键集合
* @return 结果
*/
@@ -73,9 +73,17 @@ public interface IEmisCustomerUserService
/**
* 删除快递客户用户信息
- *
+ *
* @param id 快递客户用户主键
* @return 结果
*/
public int deleteEmisCustomerUserById(Long id);
+
+ /**
+ * 根据月结卡号修改企业名称和企业税号
+ *
+ * @param emisCustomerUser 客户用户对象(包含月结卡号、企业名称、企业税号)
+ * @return 结果
+ */
+ public int updateEnterpriseInfoByMonthlyPayCode(EmisCustomerUser emisCustomerUser);
}
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerUserServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerUserServiceImpl.java
index 8132d9a03..651ea7b40 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerUserServiceImpl.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCustomerUserServiceImpl.java
@@ -1,10 +1,10 @@
- /**
+ /**
* @Project: emis
* @Title: EmisCustomerUserServiceImpl.java
* @author linfso
* @date 2024-03-01 03:51:54
* @Copyright: ShangHai Duta 2022 All rights reserved.
- * @version v1.0
+ * @version v1.0
* @Description: 快递客户用户 实体类
*/
@@ -22,7 +22,7 @@ import com.xdadan.erp.emis.service.IEmisCustomerUserService;
/**
* 快递客户用户Service业务层处理
- *
+ *
* @author linfso
* @date 2024-03-01 03:51:54
*/
@@ -34,7 +34,7 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
/**
* 查询快递客户用户
- *
+ *
* @param id 快递客户用户主键
* @return 快递客户用户
*/
@@ -46,7 +46,7 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
/**
* 查询快递客户用户列表
- *
+ *
* @param emisCustomerUser 快递客户用户
* @return 快递客户用户
*/
@@ -58,7 +58,7 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
/**
* 新增快递客户用户
- *
+ *
* @param emisCustomerUser 快递客户用户
* @return 结果
*/
@@ -94,7 +94,7 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
/**
* 修改快递客户用户
- *
+ *
* @param emisCustomerUser 快递客户用户
* @return 结果
*/
@@ -112,7 +112,7 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
/**
* 批量删除快递客户用户
- *
+ *
* @param ids 需要删除的快递客户用户主键
* @return 结果
*/
@@ -124,7 +124,7 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
/**
* 删除快递客户用户信息
- *
+ *
* @param id 快递客户用户主键
* @return 结果
*/
@@ -134,4 +134,16 @@ public class EmisCustomerUserServiceImpl extends EmisBaseService implements IEmi
return emisCustomerUserMapper.deleteEmisCustomerUserById(id);
}
+ /**
+ * 根据月结卡号修改企业名称和企业税号
+ *
+ * @param emisCustomerUser 客户用户对象(包含月结卡号、企业名称、企业税号)
+ * @return 结果
+ */
+ @Override
+ public int updateEnterpriseInfoByMonthlyPayCode(EmisCustomerUser emisCustomerUser) {
+
+ return emisCustomerUserMapper.updateEnterpriseInfoByMonthlyPayCode(emisCustomerUser);
+ }
+
}
diff --git a/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml b/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
index aed3f6cbd..a940ed2d0 100644
--- a/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
@@ -469,5 +469,78 @@
+
+
+ update emis_customer_user
+
+ customer_code = #{customerCode},
+ customer_name = #{customerName},
+ customer_name_en = #{customerNameEn},
+ simple_name = #{simpleName},
+ contact = #{contact},
+ phone = #{phone},
+ mobile = #{mobile},
+ customer_type = #{customerType},
+ settled_type = #{settledType},
+ user_type = #{userType},
+ company = #{company},
+ lic_no = #{licNo},
+ dept_id = #{deptId},
+ avatar = #{avatar},
+ sex = #{sex},
+ invitation_info = #{invitationInfo},
+ login_ip = #{loginIp},
+ login_date = #{loginDate},
+ nick_name = #{nickName},
+ union_id = #{unionId},
+ openid = #{openid},
+ monthly_pay_code = #{monthlyPayCode},
+ user_name = #{userName},
+ password = #{password},
+ owner_site = #{ownerSite},
+ biz_site = #{bizSite},
+ biz_site_name = #{bizSiteName},
+ country = #{country},
+ province = #{province},
+ city = #{city},
+ county = #{county},
+ town = #{town},
+ address = #{address},
+ email = #{email},
+ post_code = #{postCode},
+ real_name = #{realName},
+ id_no = #{idNo},
+ id_type = #{idType},
+ id_pic1 = #{idPic1},
+ id_pic2 = #{idPic2},
+ id_verify_status = #{idVerifyStatus},
+ payee = #{payee},
+ salesmen = #{salesmen},
+ data_from = #{dataFrom},
+ bl_open_oms = #{blOpenOms},
+ bl_sms = #{blSms},
+ op_emp_code = #{opEmpCode},
+ first_signing_day = #{firstSigningDay},
+ credit_period_type = #{creditPeriodType},
+ credit_period = #{creditPeriod},
+ settle_day = #{settleDay},
+ status = #{status},
+ order_num = #{orderNum},
+ sales_support = #{salesSupport},
+ sales_executive = #{salesExecutive},
+ enterprise_name = #{enterpriseName},
+ enterprise_tax_id = #{enterpriseTaxId},
+ remark = #{remark},
+ del_flag = #{delFlag},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+ create_site = #{createSite},
+ update_site = #{updateSite},
+
+ WHERE monthly_pay_code = #{monthlyPayCode}
+ AND del_flag = '0'
+
From 2c035c479be0462539f9bf7549e7be8faacdfedc Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 11:45:55 +0800
Subject: [PATCH 05/10] =?UTF-8?q?demand:=20=E5=AE=A2=E6=88=B7=E7=AE=A1?=
=?UTF-8?q?=E7=90=86-=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7-=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=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?=E6=8E=A5=E5=8F=A3?=
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 | 8 ++++----
.../erp/emis/service/impl/EmisWaybillServiceImpl.java | 4 ++++
2 files changed, 8 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 4cfc23d59..23cd633fb 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
@@ -3600,12 +3600,12 @@ public class EmisBaseService {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
}
} else {
- emisCustomerAddressNew.setEnterpriseName(null);
- emisCustomerAddressNew.setEnterpriseTaxId(null);
+ emisCustomerAddressNew.setEnterpriseName(" ");
+ emisCustomerAddressNew.setEnterpriseTaxId(" ");
}
} else {
- emisCustomerAddressNew.setEnterpriseName(null);
- emisCustomerAddressNew.setEnterpriseTaxId(null);
+ emisCustomerAddressNew.setEnterpriseName(" ");
+ emisCustomerAddressNew.setEnterpriseTaxId(" ");
}
}
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 958603850..38d94c6e8 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
@@ -2496,6 +2496,10 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
if(isNew) {
emisWaybillSave.setOrderDate(emisWaybillSave.getSendDate());
}
+ if (!"0086".equals(emisWaybillSave.getSendCounty())) {
+ emisWaybillSave.setEnterpriseName(" ");
+ emisWaybillSave.setEnterpriseTaxId(" ");
+ }
// 发件地址
EmisCustomerAddress sendAddress = new EmisCustomerAddress();
From 30f947750e18092fa0734a82a7b869d57fde2af3 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 11:51:20 +0800
Subject: [PATCH 06/10] =?UTF-8?q?demand:=20=E5=AE=A2=E6=88=B7=E7=AE=A1?=
=?UTF-8?q?=E7=90=86-=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7-=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=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?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 38d94c6e8..b6dce1161 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
@@ -2496,7 +2496,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
if(isNew) {
emisWaybillSave.setOrderDate(emisWaybillSave.getSendDate());
}
- if (!"0086".equals(emisWaybillSave.getSendCounty())) {
+ if (!"0086".equals(emisWaybillSave.getSendCountry())) {
emisWaybillSave.setEnterpriseName(" ");
emisWaybillSave.setEnterpriseTaxId(" ");
}
From 10123ad06ab080362f30b8c6ef13f9c69898e243 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 13:21:36 +0800
Subject: [PATCH 07/10] =?UTF-8?q?demand:=20=E8=BF=90=E5=8D=95=E5=BD=95?=
=?UTF-8?q?=E5=85=A5=E5=AF=84=E4=BB=B6=E5=9B=BD=E5=AE=B6=E9=9D=9E=E4=B8=AD?=
=?UTF-8?q?=E5=9B=BD=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=BC=81=E4=B8=9A=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E3=80=81=E7=A8=8E=E5=8F=B7=E3=80=82=E8=BF=90=E5=8D=95?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E6=8C=81=E4=BC=81=E4=B8=9A=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E3=80=81=E7=A8=8E=E5=8F=B7=E4=BF=AE=E6=94=B9=E4=B8=BA?=
=?UTF-8?q?=E7=A9=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../erp/emis/service/impl/EmisWaybillServiceImpl.java | 6 ++++++
1 file changed, 6 insertions(+)
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 b6dce1161..54a64f0ee 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
@@ -2500,6 +2500,12 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
emisWaybillSave.setEnterpriseName(" ");
emisWaybillSave.setEnterpriseTaxId(" ");
}
+ if(StringUtil.isBlank(emisWaybillSave.getEnterpriseName())){
+ emisWaybillSave.setEnterpriseName(" ");
+ }
+ if(StringUtil.isBlank(emisWaybillSave.getEnterpriseTaxId())){
+ emisWaybillSave.setEnterpriseTaxId(" ");
+ }
// 发件地址
EmisCustomerAddress sendAddress = new EmisCustomerAddress();
From f5991f70761175eac643bbe818c608e22af8ddea Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 14:16:08 +0800
Subject: [PATCH 08/10] =?UTF-8?q?demand:=20=E6=96=B0=E5=A2=9E=E6=89=B9?=
=?UTF-8?q?=E9=87=8F=E5=AF=BC=E5=85=A5=E4=BC=81=E4=B8=9A=E7=A8=8E=E5=8F=B7?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../web/emis/EmisCustomerUserController.java | 39 +++++++++++--------
.../mapper/EmisCustomerUserMapper.xml | 1 -
2 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
index 1c5d13efc..987fdba03 100644
--- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
+++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCustomerUserController.java
@@ -243,22 +243,6 @@ public class EmisCustomerUserController extends EmisBaseController
@PostMapping("/addMonthUser")
public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser) {
try {
- if ("2".equals(emisCustomerUser.getBlImport())) {
- // 批量导入企业名称和企业税号
- try {
- checkEnterpriseDetail(emisCustomerUser);
- if (StringUtil.isBlank(emisCustomerUser.getMonthlyPayCode())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "月结卡号不能为空");
- }
- EmisCustomerUser editUser = new EmisCustomerUser();
- editUser.setMonthlyPayCode(emisCustomerUser.getMonthlyPayCode());
- editUser.setEnterpriseName(emisCustomerUser.getEnterpriseName());
- editUser.setEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId());
- return toAjax(emisCustomerUserService.updateEnterpriseInfoByMonthlyPayCode(editUser));
- } catch (Exception e) {
- return AjaxResult.error(e.getMessage());
- }
- }
// 验证企业名称和企业税号
try {
checkEnterprise(emisCustomerUser);
@@ -294,6 +278,29 @@ public class EmisCustomerUserController extends EmisBaseController
}
+ /**
+ * 批量导入企业税号
+ */
+ @PreAuthorize("@ss.hasPermi('emis:emisCustomerUser:batchImportEnterprise')")
+ @Log(title = "新增月结用户", businessType = BusinessType.INSERT)
+ @PostMapping("/batchImportEnterprise")
+ public AjaxResult batchImportEnterprise(@RequestBody EmisCustomerUser emisCustomerUser) {
+ // 批量导入企业名称和企业税号
+ try {
+ checkEnterpriseDetail(emisCustomerUser);
+ if (StringUtil.isBlank(emisCustomerUser.getMonthlyPayCode())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "月结卡号不能为空");
+ }
+ EmisCustomerUser editUser = new EmisCustomerUser();
+ editUser.setMonthlyPayCode(emisCustomerUser.getMonthlyPayCode());
+ editUser.setEnterpriseName(emisCustomerUser.getEnterpriseName());
+ editUser.setEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId());
+ return toAjax(emisCustomerUserService.updateEnterpriseInfoByMonthlyPayCode(editUser));
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
private void checkEnterprise(EmisCustomerUser emisCustomerUser) throws EmisBizError {
if (!"0086".equals(emisCustomerUser.getCountry())) {
return;
diff --git a/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml b/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
index a940ed2d0..9bab1489f 100644
--- a/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
@@ -494,7 +494,6 @@
nick_name = #{nickName},
union_id = #{unionId},
openid = #{openid},
- monthly_pay_code = #{monthlyPayCode},
user_name = #{userName},
password = #{password},
owner_site = #{ownerSite},
From 9196fe5996461200e9fc79139968e155223f2bf9 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 16:10:22 +0800
Subject: [PATCH 09/10] =?UTF-8?q?demand:=20=E6=96=B0=E5=A2=9E=E5=AF=84?=
=?UTF-8?q?=E4=BB=B6=E4=BA=BA=E5=9C=B0=E5=9D=80=E4=B8=8D=E6=A0=A1=E9=AA=8C?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E6=98=AF=E5=90=A6=E4=B8=BA?=
=?UTF-8?q?=E7=A9=BA=20=E4=BF=AE=E6=94=B9=E5=AF=84=E4=BB=B6=E4=BA=BA?=
=?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=B7=BB=E5=8A=A0=E4=BC=81=E4=B8=9A=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E6=A0=BC=E5=BC=8F=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../emis/EmisCustomerAddressController.java | 6 ++--
.../service/IEmisCustomerAddressService.java | 2 +-
.../impl/EmisCustomerAddressServiceImpl.java | 31 ++++++++++++++++---
3 files changed, 30 insertions(+), 9 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 2185207cd..896490b5a 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
@@ -141,8 +141,7 @@ public class EmisCustomerAddressController extends EmisBaseController
@Log(title = "更新客户收寄件地址", businessType = BusinessType.UPDATE)
@PostMapping("/editAddress")
- public AjaxResult editAddress(@RequestBody EmisCustomerAddress emisCustomerAddress)
- {
+ public AjaxResult editAddress(@RequestBody EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
}
@@ -153,8 +152,7 @@ public class EmisCustomerAddressController extends EmisBaseController
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:edit')")
@Log(title = "客户收寄件地址", businessType = BusinessType.UPDATE)
@PutMapping
- public AjaxResult edit(@RequestBody EmisCustomerAddress emisCustomerAddress)
- {
+ public AjaxResult edit(@RequestBody EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
}
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 98de963d6..955ed9c12 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
@@ -50,7 +50,7 @@ public interface IEmisCustomerAddressService
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
- public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
+ public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError;
/**
* 批量删除客户收寄件地址
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 97fe2cb69..d695eaeb3 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
@@ -12,6 +12,8 @@ package com.xdadan.erp.emis.service.impl;
import java.util.List;
+import cn.hutool.core.collection.CollectionUtil;
+import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
import com.xdadan.erp.emis.domain.exception.EmisBizError;
import com.xdadan.erp.emis.service.EmisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -69,8 +71,21 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
- // 创建用户
- return createCustomerAddressNew(emisCustomerAddress);
+ // 验证企业名称格式
+ if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
+
+ // 验证企业税号格式
+ if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
+ List emisCustomerAddressList = emisCustomerAddressMapper.checkAndQuery(emisCustomerAddress);
+ if (CollectionUtil.isEmpty(emisCustomerAddressList)) {
+ // 不重复的情况则 创建地址
+ return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddress);
+ }
+ return 1;
}
/**
@@ -80,12 +95,20 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
* @return 结果
*/
@Override
- public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress)
- {
+ public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
// emisCustomerAddress.preUpdate();
// emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
// emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
+ // 验证企业名称格式
+ if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
+
+ // 验证企业税号格式
+ if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
return emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
}
From 6f73edd3b122dfa8812cb50f846571a1918db569 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Thu, 28 Aug 2025 16:15:16 +0800
Subject: [PATCH 10/10] =?UTF-8?q?demand:=20=E6=96=B0=E5=A2=9E=E5=AF=84?=
=?UTF-8?q?=E4=BB=B6=E4=BA=BA=E5=9C=B0=E5=9D=80=E4=B8=8D=E6=A0=A1=E9=AA=8C?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E6=98=AF=E5=90=A6=E4=B8=BA?=
=?UTF-8?q?=E7=A9=BA=20=E4=BF=AE=E6=94=B9=E5=AF=84=E4=BB=B6=E4=BA=BA?=
=?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=B7=BB=E5=8A=A0=E4=BC=81=E4=B8=9A=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E6=A0=BC=E5=BC=8F=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
committer: heyu
---
.../impl/EmisCustomerAddressServiceImpl.java | 30 ++++++++++---------
1 file changed, 16 insertions(+), 14 deletions(-)
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 d695eaeb3..e58fdbee4 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
@@ -16,6 +16,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
import com.xdadan.erp.emis.domain.exception.EmisBizError;
import com.xdadan.erp.emis.service.EmisBaseService;
+import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
@@ -71,15 +72,7 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
- // 验证企业名称格式
- if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
- }
-
- // 验证企业税号格式
- if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
- }
+ checkEnterprise(emisCustomerAddress);
List emisCustomerAddressList = emisCustomerAddressMapper.checkAndQuery(emisCustomerAddress);
if (CollectionUtil.isEmpty(emisCustomerAddressList)) {
// 不重复的情况则 创建地址
@@ -100,16 +93,25 @@ public class EmisCustomerAddressServiceImpl extends EmisBaseService implements I
// emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
// emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
+ checkEnterprise(emisCustomerAddress);
+
+ return emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
+ }
+
+ private void checkEnterprise(EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
// 验证企业名称格式
- if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ if (StringUtil.isNotBlank(emisCustomerAddress.getEnterpriseName())) {
+ if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
+ }
}
// 验证企业税号格式
- if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
- throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ if (StringUtil.isNotBlank(emisCustomerAddress.getEnterpriseTaxId())) {
+ if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
+ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
+ }
}
- return emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
}
/**