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