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++; }