xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpTaskController.java
@@ -51,6 +51,7 @@ import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** * <p> @@ -265,14 +266,16 @@ String taskImage = xpTask.getTaskImage(); if (StringUtils.isNotBlank(taskImage)) { JSONArray jsonArray = JSONArray.parseArray(taskImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpTaskManagementController.java
@@ -208,7 +208,12 @@ if (org.apache.commons.lang3.StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); //1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); vehicle.setVehiclePictures(jsonObject.toJSONString()); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleCleanController.java
@@ -20,6 +20,7 @@ import com.xiaopeng.maintenance.service.XpTaskService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.shardingsphere.transaction.annotation.ShardingSphereTransactionType; import org.apache.shardingsphere.transaction.core.TransactionType; @@ -31,6 +32,7 @@ import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; /** @@ -41,6 +43,7 @@ * @author xiaochen * @since 2026-02-06 */ @Slf4j @Api(tags = "车辆清洁") @RestController @RequestMapping("") @@ -89,7 +92,12 @@ if (vehiclePictures != null && !vehiclePictures.isEmpty()) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); xpVehicleCleanVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -99,14 +107,16 @@ String taskImage = xpVehicleCleanVO.getTaskImage(); if (StringUtils.isNotBlank(taskImage)) { JSONArray jsonArray = JSONArray.parseArray(taskImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -160,14 +170,16 @@ String taskImage = record.getTaskImage(); if (StringUtils.isNotBlank(taskImage)) { JSONArray jsonArray = JSONArray.parseArray(taskImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleDetectionController.java
@@ -15,6 +15,7 @@ import com.xiaopeng.maintenance.service.XpTaskService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.shardingsphere.transaction.annotation.ShardingSphereTransactionType; import org.apache.shardingsphere.transaction.core.TransactionType; @@ -27,6 +28,7 @@ import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; import java.util.Objects; /** * <p> @@ -36,6 +38,7 @@ * @author xiaochen * @since 2026-02-06 */ @Slf4j @Api(tags = "车辆检测") @RestController @RequestMapping("") @@ -102,8 +105,13 @@ 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); // 2 String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); xpVehicleDetectionVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -112,14 +120,14 @@ String sensorCleaningPicture = xpVehicleDetectionVO.getSensorCleaningPicture(); if (StringUtils.isNotBlank(sensorCleaningPicture)) { JSONArray jsonArray = JSONArray.parseArray(sensorCleaningPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -130,14 +138,14 @@ String interactiveScreenPicture = xpVehicleDetectionVO.getInteractiveScreenPicture(); if (StringUtils.isNotBlank(interactiveScreenPicture)) { JSONArray jsonArray = JSONArray.parseArray(interactiveScreenPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -148,14 +156,14 @@ String helpButtonPicture = xpVehicleDetectionVO.getHelpButtonPicture(); if (StringUtils.isNotBlank(helpButtonPicture)) { JSONArray jsonArray = JSONArray.parseArray(helpButtonPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -166,14 +174,14 @@ String paymentFunctionPicture = xpVehicleDetectionVO.getPaymentFunctionPicture(); if (StringUtils.isNotBlank(paymentFunctionPicture)) { JSONArray jsonArray = JSONArray.parseArray(paymentFunctionPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -184,14 +192,14 @@ String systemCheckPicture = xpVehicleDetectionVO.getSystemCheckPicture(); if (StringUtils.isNotBlank(systemCheckPicture)) { JSONArray jsonArray = JSONArray.parseArray(systemCheckPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -216,7 +224,12 @@ if (vehiclePictures != null && !vehiclePictures.isEmpty()) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); xpVehicleDetectionVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -225,14 +238,14 @@ String sensorCleaningPicture = xpVehicleDetectionVO.getSensorCleaningPicture(); if (StringUtils.isNotBlank(sensorCleaningPicture)) { JSONArray jsonArray = JSONArray.parseArray(sensorCleaningPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -243,14 +256,17 @@ String interactiveScreenPicture = xpVehicleDetectionVO.getInteractiveScreenPicture(); if (StringUtils.isNotBlank(interactiveScreenPicture)) { JSONArray jsonArray = JSONArray.parseArray(interactiveScreenPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -261,14 +277,17 @@ String helpButtonPicture = xpVehicleDetectionVO.getHelpButtonPicture(); if (StringUtils.isNotBlank(helpButtonPicture)) { JSONArray jsonArray = JSONArray.parseArray(helpButtonPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -279,14 +298,17 @@ String paymentFunctionPicture = xpVehicleDetectionVO.getPaymentFunctionPicture(); if (StringUtils.isNotBlank(paymentFunctionPicture)) { JSONArray jsonArray = JSONArray.parseArray(paymentFunctionPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -297,14 +319,17 @@ String systemCheckPicture = xpVehicleDetectionVO.getSystemCheckPicture(); if (StringUtils.isNotBlank(systemCheckPicture)) { JSONArray jsonArray = JSONArray.parseArray(systemCheckPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } // 1 String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleOperationsController.java
@@ -151,7 +151,12 @@ if (StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); record.setVehiclePictures(jsonObject.toJSONString()); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehiclePreparationController.java
@@ -15,6 +15,7 @@ import com.xiaopeng.maintenance.service.XpTaskService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.shardingsphere.transaction.annotation.ShardingSphereTransactionType; import org.apache.shardingsphere.transaction.core.TransactionType; @@ -33,6 +34,7 @@ * @author xiaochen * @since 2026-02-06 */ @Slf4j @Api(tags = "车辆整备") @RestController @RequestMapping("") @@ -76,7 +78,12 @@ if (StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); xpVehiclePreparationVO.setVehiclePictures(jsonObject.toJSONString()); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleRepairController.java
@@ -20,6 +20,7 @@ import com.xiaopeng.maintenance.vo.RepairStatusVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; @@ -39,6 +40,7 @@ * @author xiaochen * @since 2026-02-06 */ @Slf4j @Api(tags = "车辆维修") @RestController public class XpVehicleRepairController { @@ -98,7 +100,12 @@ if (StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); xpVehicleRepairVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -106,14 +113,17 @@ String startRepairPicture = xpVehicleRepairVO.getStartRepairPicture(); if (StringUtils.isNotBlank(startRepairPicture)) { JSONArray jsonArray = JSONArray.parseArray(startRepairPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } // 1 String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -139,7 +149,12 @@ if (StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); //1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); record.setVehiclePictures(jsonObject.toJSONString()); } @@ -147,14 +162,16 @@ String startRepairPicture = record.getStartRepairPicture(); if (StringUtils.isNotBlank(startRepairPicture)) { JSONArray jsonArray = JSONArray.parseArray(startRepairPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpWorkOrderController.java
@@ -85,14 +85,14 @@ String problemImage = detail.getProblemImage(); if (StringUtils.isNotBlank(problemImage)) { JSONArray jsonArray = JSONArray.parseArray(problemImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpChargingRecordServiceImpl.java
@@ -119,7 +119,12 @@ if (StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); xpChargingRecordVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -232,14 +237,16 @@ String vehiclePictures = vo.getVehiclePictures(); if (StringUtils.isNotBlank(vehiclePictures)) { JSONArray jsonArray = JSONArray.parseArray(vehiclePictures); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -251,14 +258,16 @@ String startChargingPicture = vo.getStartChargingPicture(); if (StringUtils.isNotBlank(startChargingPicture)) { JSONArray jsonArray = JSONArray.parseArray(startChargingPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -270,14 +279,16 @@ String endChargingPicture = vo.getEndChargingPicture(); if (StringUtils.isNotBlank(endChargingPicture)) { JSONArray jsonArray = JSONArray.parseArray(endChargingPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpTaskServiceImpl.java
@@ -150,7 +150,12 @@ if (StringUtils.isNotBlank(vehiclePictures)) { JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); //1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); workBenchVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -436,10 +441,17 @@ String taskImage = res.getTaskImage(); if (StringUtils.isNotBlank(taskImage)) { JSONArray jsonArray = JSONArray.parseArray(taskImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } res.setTaskImage(JSONArray.toJSONString(jsonArray)); @@ -537,10 +549,15 @@ String taskImage = res.getTaskImage(); if (StringUtils.isNotBlank(taskImage)) { JSONArray jsonArray = JSONArray.parseArray(taskImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } res.setTaskImage(JSONArray.toJSONString(jsonArray)); @@ -589,14 +606,16 @@ String startChargingPicture = res.getStartChargingPicture(); if (StringUtils.isNotBlank(startChargingPicture)) { JSONArray jsonArray = JSONArray.parseArray(startChargingPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -612,14 +631,16 @@ String endChargingPicture = chargingRecord.getEndChargingPicture(); if (StringUtils.isNotBlank(endChargingPicture)) { JSONArray jsonArray = JSONArray.parseArray(endChargingPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { //1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -690,14 +711,16 @@ String startRepairPicture = vehicleRepair.getStartRepairPicture(); if (StringUtils.isNotBlank(startRepairPicture)) { JSONArray jsonArray = JSONArray.parseArray(startRepairPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -834,14 +857,16 @@ String SensorCleaningPicture = vehicleDetection.getSensorCleaningPicture(); if (StringUtils.isNotBlank(SensorCleaningPicture)) { JSONArray jsonArray = JSONArray.parseArray(SensorCleaningPicture); for (Object o : jsonArray) { JSONObject jsonObject =(JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url"); try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -855,14 +880,16 @@ String InteractiveScreenPicture =vehicleDetection.getInteractiveScreenPicture(); if (StringUtils.isNotBlank(InteractiveScreenPicture)) { JSONArray jsonArray = JSONArray.parseArray(InteractiveScreenPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -879,14 +906,16 @@ String HelpButtonPicture =vehicleDetection.getHelpButtonPicture(); if (StringUtils.isNotBlank(HelpButtonPicture)) { JSONArray jsonArray = JSONArray.parseArray(HelpButtonPicture); for (Object o : jsonArray) { JSONObject jsonObject =(JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -900,14 +929,16 @@ String PaymentFunctionPicture =vehicleDetection.getPaymentFunctionPicture(); if (StringUtils.isNotBlank(PaymentFunctionPicture)) { JSONArray jsonArray = JSONArray.parseArray(PaymentFunctionPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -920,14 +951,16 @@ String SystemCheckPicture =vehicleDetection.getSystemCheckPicture(); if (StringUtils.isNotBlank(SystemCheckPicture)) { JSONArray jsonArray = JSONArray.parseArray(SystemCheckPicture); for (Object o : jsonArray) { JSONObject jsonObject =(JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -1027,10 +1060,17 @@ String taskImage = res.getTaskImage(); if (StringUtils.isNotBlank(taskImage)) { JSONArray jsonArray = JSONArray.parseArray(taskImage); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } res.setTaskImage(JSONArray.toJSONString(jsonArray)); @@ -1119,7 +1159,7 @@ .account(operationsUser.getPhoneNumber()) .title("任务状态变更") .body(bodyJson) .pushType(AliPushTypeConstant.NOTICE) .pushType(AliPushTypeConstant.MESSAGE) .build()); } } catch (Exception e) { @@ -1255,7 +1295,7 @@ if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = null; String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); @@ -1579,7 +1619,12 @@ if(vehicle.getVehiclePictures()!=null){ JSONObject jsonObject = JSONObject.parseObject(vehicle.getVehiclePictures()); // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); String downloadUrl = jsonObject.getString("url");; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); taskManagementDetectionDetailVO.setVehiclePictures(jsonObject.toJSONString()); } @@ -1600,14 +1645,16 @@ String SensorCleaningPicture = vehicleDetection.getSensorCleaningPicture(); if (StringUtils.isNotBlank(SensorCleaningPicture)) { JSONArray jsonArray = JSONArray.parseArray(SensorCleaningPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -1622,14 +1669,16 @@ String InteractiveScreenPicture =vehicleDetection.getInteractiveScreenPicture(); if (StringUtils.isNotBlank(InteractiveScreenPicture)) { JSONArray jsonArray = JSONArray.parseArray(InteractiveScreenPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -1642,14 +1691,16 @@ String HelpButtonPicture =vehicleDetection.getHelpButtonPicture(); if (StringUtils.isNotBlank(HelpButtonPicture)) { JSONArray jsonArray = JSONArray.parseArray(HelpButtonPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -1662,14 +1713,16 @@ String PaymentFunctionPicture =vehicleDetection.getPaymentFunctionPicture(); if (StringUtils.isNotBlank(PaymentFunctionPicture)) { JSONArray jsonArray = JSONArray.parseArray(PaymentFunctionPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -1683,14 +1736,16 @@ String SystemCheckPicture =vehicleDetection.getSystemCheckPicture(); if (StringUtils.isNotBlank(SystemCheckPicture)) { JSONArray jsonArray = JSONArray.parseArray(SystemCheckPicture); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpVehicleRepairServiceImpl.java
@@ -175,14 +175,16 @@ String RepairMoneyDetail = vo.getRepairMoneyDetail(); if (StringUtils.isNotBlank(RepairMoneyDetail)) { JSONArray jsonArray = JSONArray.parseArray(RepairMoneyDetail); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -196,14 +198,16 @@ String StartRepairPicture = vo.getStartRepairPicture(); if (StringUtils.isNotBlank(StartRepairPicture)) { JSONArray jsonArray = JSONArray.parseArray(StartRepairPicture); for (Object o : jsonArray) { JSONObject jsonObject =(JSONObject)o; String downloadUrl = null; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = jsonObject.getString("url");; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpBannerServiceImpl.java
@@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingException; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; /** @@ -52,14 +53,16 @@ vo.setJumpType(item.getJumpType()); vo.setJumpUrl(item.getJumpUrl()); JSONArray jsonArray = JSONArray.parseArray(item.getBannerPictures()); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject) o; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = null; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } @@ -78,14 +81,16 @@ for (XpBanner xpBanner : list) { JSONArray jsonArray = JSONArray.parse(xpBanner.getBannerPictures()); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject) o; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = null; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpUserFeedbackServiceImpl.java
@@ -84,14 +84,16 @@ String feedbackPictures = xpUserFeedbackVO.getFeedbackPictures(); if (StringUtils.isNotBlank(feedbackPictures)) { JSONArray jsonArray = JSONArray.parseArray(feedbackPictures); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = null; try { // 1 downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/impl/XpVehicleAnnualRecordServiceImpl.java
@@ -78,10 +78,17 @@ String operationQualification = record.getOperationQualification(); if (StringUtils.isNotBlank(operationQualification)) { JSONArray jsonArray = JSONArray.parseArray(operationQualification); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = null; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } record.setOperationQualification(JSONArray.toJSONString(jsonArray)); @@ -91,10 +98,17 @@ String policyInformation = record.getPolicyInformation(); if (StringUtils.isNotBlank(policyInformation)) { JSONArray jsonArray = JSONArray.parseArray(policyInformation); for (Object o : jsonArray) { JSONObject jsonObject = (JSONObject)o; // 1 String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (Objects.isNull(jsonObject)) { continue; } String downloadUrl = null; try { downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); } catch (UnsupportedEncodingException e) { log.error("获取图片下载地址失败", e); } jsonObject.put("url", downloadUrl); } record.setPolicyInformation(JSONArray.toJSONString(jsonArray));