Compare commits

..

No commits in common. '9b3360404e400c39dbd313cafc2646be4d10b8b1' and '3cf128adad6e614c62ed4ad8a26bb5ba2d65013e' have entirely different histories.

@ -22,6 +22,8 @@ import com.zhehekeji.web.service.sick.SickSocket;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

@ -6,12 +6,9 @@ import com.sun.jna.ptr.PointerByReference;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
@ -24,30 +21,6 @@ public class LxPointCloudSaveImage {
public static DcLibrary INSTANCER = (DcLibrary) Native.loadLibrary((System.getProperty("user.dir"))+"\\libs\\lx\\LxCameraApi.dll", DcLibrary.class);
static Map<String ,DcLibrary> instanceMap = new ConcurrentHashMap<>();
public static boolean copyFileIfNotExists(String sourcePath, String destinationPath) {
Path destPath = Paths.get(destinationPath);
// 检查目标文件是否存在
if (Files.exists(destPath)) {
System.out.println("文件已存在: " + destinationPath);
return false;
}
try {
// 创建父目录(如果不存在)
Files.createDirectories(destPath.getParent());
// 复制文件
Files.copy(Paths.get(sourcePath), destPath, StandardCopyOption.REPLACE_EXISTING);
System.out.println("文件复制成功: " + sourcePath + " -> " + destinationPath);
return true;
} catch (IOException e) {
System.err.println("文件复制失败: " + e.getMessage());
return false;
}
}
// 设备句柄映射
static Map<String, DeviceInfo> handleMap = new ConcurrentHashMap<>();

Loading…
Cancel
Save