From 83d5842ce68af7ab306f8f546fa7c11d94ad87bc Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期三, 18 三月 2026 22:40:40 +0800
Subject: [PATCH] update
---
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleDetectionController.java | 60 ++++++++++++++++++++++++++++++++----------------------------
1 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleDetectionController.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleDetectionController.java
index e564ccb..e91a4ba 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleDetectionController.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleDetectionController.java
@@ -103,98 +103,100 @@
String vehiclePictures = xpVehicleDetectionVO.getVehiclePictures();
if (vehiclePictures != null && !vehiclePictures.isEmpty()) {
JSONObject jsonObject = JSONObject.parseObject(vehiclePictures);
+ // 1
String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
- xpVehicleDetectionVO.setVehiclePictures(downloadUrl);
+ jsonObject.put("url", downloadUrl);
+ xpVehicleDetectionVO.setVehiclePictures(jsonObject.toJSONString());
}
String sensorCleaningPicture = xpVehicleDetectionVO.getSensorCleaningPicture();
if (StringUtils.isNotBlank(sensorCleaningPicture)) {
JSONArray jsonArray = JSONArray.parseArray(sensorCleaningPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setSensorCleaningPicture(String.join(",", list));
+ xpVehicleDetectionVO.setSensorCleaningPicture(JSONArray.toJSONString(jsonArray));
}
String interactiveScreenPicture = xpVehicleDetectionVO.getInteractiveScreenPicture();
if (StringUtils.isNotBlank(interactiveScreenPicture)) {
JSONArray jsonArray = JSONArray.parseArray(interactiveScreenPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setInteractiveScreenPicture(String.join(",", list));
+ xpVehicleDetectionVO.setInteractiveScreenPicture(JSONArray.toJSONString(jsonArray));
}
String helpButtonPicture = xpVehicleDetectionVO.getHelpButtonPicture();
if (StringUtils.isNotBlank(helpButtonPicture)) {
JSONArray jsonArray = JSONArray.parseArray(helpButtonPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setHelpButtonPicture(String.join(",", list));
+ xpVehicleDetectionVO.setHelpButtonPicture(JSONArray.toJSONString(jsonArray));
}
String paymentFunctionPicture = xpVehicleDetectionVO.getPaymentFunctionPicture();
if (StringUtils.isNotBlank(paymentFunctionPicture)) {
JSONArray jsonArray = JSONArray.parseArray(paymentFunctionPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setPaymentFunctionPicture(String.join(",", list));
+ xpVehicleDetectionVO.setPaymentFunctionPicture(JSONArray.toJSONString(jsonArray));
}
String systemCheckPicture = xpVehicleDetectionVO.getSystemCheckPicture();
if (StringUtils.isNotBlank(systemCheckPicture)) {
JSONArray jsonArray = JSONArray.parseArray(systemCheckPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setSystemCheckPicture(String.join(",", list));
+ xpVehicleDetectionVO.setSystemCheckPicture(JSONArray.toJSONString(jsonArray));
}
@@ -214,6 +216,7 @@
String vehiclePictures = xpVehicleDetectionVO.getVehiclePictures();
if (vehiclePictures != null && !vehiclePictures.isEmpty()) {
JSONObject jsonObject = JSONObject.parseObject(vehiclePictures);
+ // 2
String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
xpVehicleDetectionVO.setVehiclePictures(downloadUrl);
}
@@ -227,6 +230,7 @@
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ // 2
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
@@ -240,72 +244,72 @@
String interactiveScreenPicture = xpVehicleDetectionVO.getInteractiveScreenPicture();
if (StringUtils.isNotBlank(interactiveScreenPicture)) {
JSONArray jsonArray = JSONArray.parseArray(interactiveScreenPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setInteractiveScreenPicture(String.join(",", list));
+ xpVehicleDetectionVO.setInteractiveScreenPicture(JSONArray.toJSONString(jsonArray));
}
String helpButtonPicture = xpVehicleDetectionVO.getHelpButtonPicture();
if (StringUtils.isNotBlank(helpButtonPicture)) {
JSONArray jsonArray = JSONArray.parseArray(helpButtonPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setHelpButtonPicture(String.join(",", list));
+ xpVehicleDetectionVO.setHelpButtonPicture(JSONArray.toJSONString(jsonArray));
}
String paymentFunctionPicture = xpVehicleDetectionVO.getPaymentFunctionPicture();
if (StringUtils.isNotBlank(paymentFunctionPicture)) {
JSONArray jsonArray = JSONArray.parseArray(paymentFunctionPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setPaymentFunctionPicture(String.join(",", list));
+ xpVehicleDetectionVO.setPaymentFunctionPicture(JSONArray.toJSONString(jsonArray));
}
String systemCheckPicture = xpVehicleDetectionVO.getSystemCheckPicture();
if (StringUtils.isNotBlank(systemCheckPicture)) {
JSONArray jsonArray = JSONArray.parseArray(systemCheckPicture);
- ArrayList<String> list = new ArrayList<>(jsonArray.size());
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.parseObject(o.toString());
String downloadUrl = null;
try {
+ //1
downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
- list.add(downloadUrl);
+ jsonObject.put("url", downloadUrl);
}
- xpVehicleDetectionVO.setSystemCheckPicture(String.join(",", list));
+ xpVehicleDetectionVO.setSystemCheckPicture(JSONArray.toJSONString(jsonArray));
}
}
--
Gitblit v1.7.1