From dc5dfd15eb5734ade10916dbd9946e67af257279 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Fri, 12 Dec 2025 09:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=94=A8=E6=88=B7=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=A8=8E=E5=8F=B7=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/command/ExportExcel.php | 6 +++--- app/controller/admin/WechatUser.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/command/ExportExcel.php b/app/command/ExportExcel.php index e7bbab7..4c7a63d 100644 --- a/app/command/ExportExcel.php +++ b/app/command/ExportExcel.php @@ -92,14 +92,14 @@ class ExportExcel extends Command $type = array_search($type, $typeArr); if ($taxId) { if ($type === 1) { - $str = '0-9A-HJ-NPQRTUWXY'; - $pattern = '/^[' . $str . ']{2}\d{6}[' . $str . ']{10}$/'; + $pattern = '/^\d{15}$|^\d{17}[\dXx]$/'; if (!preg_match($pattern, $taxId)) { $error_array[] = "第{$key}行:纳税人编号格式不符合"; continue; } } else { - $pattern = '/^\d{15}$|^\d{17}[\dXx]$/'; + $str = '0-9A-HJ-NPQRTUWXY'; + $pattern = '/^[' . $str . ']{2}\d{6}[' . $str . ']{10}$/'; if (!preg_match($pattern, $taxId)) { $error_array[] = "第{$key}行:纳税人编号格式不符合"; continue; diff --git a/app/controller/admin/WechatUser.php b/app/controller/admin/WechatUser.php index 7676606..503b337 100644 --- a/app/controller/admin/WechatUser.php +++ b/app/controller/admin/WechatUser.php @@ -171,14 +171,14 @@ class WechatUser extends Base $type = array_search($type, $typeArr); if ($taxId) { if ($type === 1) { - $str = '0-9A-HJ-NPQRTUWXY'; - $pattern = '/^[' . $str . ']{2}\d{6}[' . $str . ']{10}$/'; + $pattern = '/^\d{15}$|^\d{17}[\dXx]$/'; if (!preg_match($pattern, $taxId)) { $error_array[] = "第{$key}行:纳税人编号格式不符合"; continue; } } else { - $pattern = '/^\d{15}$|^\d{17}[\dXx]$/'; + $str = '0-9A-HJ-NPQRTUWXY'; + $pattern = '/^[' . $str . ']{2}\d{6}[' . $str . ']{10}$/'; if (!preg_match($pattern, $taxId)) { $error_array[] = "第{$key}行:纳税人编号格式不符合"; continue;