From ae8065f611d5ade1bd49a1b25d1c61f9bd9e80c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPTOP-S9HJSOEB=5C=E6=98=8A=E5=A4=A9?= Date: Thu, 27 Nov 2025 14:52:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=8A=A2=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=89=8D=E9=9D=A2=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/camera/service/scan/ScanGunScanServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yudao-module-logistics/yudao-module-logistics-biz/src/main/java/cn/iocoder/yudao/module/camera/service/scan/ScanGunScanServiceImpl.java b/yudao-module-logistics/yudao-module-logistics-biz/src/main/java/cn/iocoder/yudao/module/camera/service/scan/ScanGunScanServiceImpl.java index 4c7d246..21e89d5 100644 --- a/yudao-module-logistics/yudao-module-logistics-biz/src/main/java/cn/iocoder/yudao/module/camera/service/scan/ScanGunScanServiceImpl.java +++ b/yudao-module-logistics/yudao-module-logistics-biz/src/main/java/cn/iocoder/yudao/module/camera/service/scan/ScanGunScanServiceImpl.java @@ -19,6 +19,9 @@ import java.nio.charset.StandardCharsets; @Slf4j @Service("scanGunScanService") public class ScanGunScanServiceImpl implements ScanService{ + public static void main(String[] args) { + System.out.println("000856250".replaceAll("^0+", "")); + } @Resource private SensorGunService sensorService; @@ -40,6 +43,7 @@ public class ScanGunScanServiceImpl implements ScanService{ log.info("count:{},ip:{},code:{}",i,ip,code); if(code!= null){ code = code.replace("\\n",""); + code = code.replaceAll("^0+", ""); } i++; }