|
@@ -45,25 +45,13 @@ import java.util.UUID;
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class ImageServiceImpl implements IImageService {
|
|
public class ImageServiceImpl implements IImageService {
|
|
- @Value("${Path.WinRsImage}")
|
|
|
|
- public String winRsImage;
|
|
|
|
- @Value("${Path.LinuxRxImage}")
|
|
|
|
- public String linuxRxImage;
|
|
|
|
-
|
|
|
|
- @Value("${Path.WinRootPath}")
|
|
|
|
- public String WinRootPath;
|
|
|
|
- @Value("${Path.LinuxRootPath}")
|
|
|
|
- public String LinuxRootPath;
|
|
|
|
|
|
+ @Value("${Path.RsImage}")
|
|
|
|
+ public String rsImage;
|
|
|
|
+ @Value("${Path.RootPath}")
|
|
|
|
+ public String rootPath;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public String getSensingImage(WktsVo wktsVo) throws Exception {
|
|
public String getSensingImage(WktsVo wktsVo) throws Exception {
|
|
- String rsImage = winRsImage;
|
|
|
|
- String rootPath = WinRootPath;
|
|
|
|
- if (System.getProperty("os.name").toLowerCase().contains("linux")) {
|
|
|
|
- rsImage = linuxRxImage;
|
|
|
|
- rootPath = LinuxRootPath;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// 图片保存路径
|
|
// 图片保存路径
|
|
String fileDir = rootPath + "/images/" + UUID.randomUUID().toString() + "/";
|
|
String fileDir = rootPath + "/images/" + UUID.randomUUID().toString() + "/";
|
|
File dir = new File(fileDir);
|
|
File dir = new File(fileDir);
|