From 5d69dd309795358d6bbdef2fe2ac805f4e6df6d4 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期五, 20 三月 2026 09:31:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpTaskServiceImpl.java |  215 +++++++++++++++++++++++++++++++++--------------------
 1 files changed, 135 insertions(+), 80 deletions(-)

diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpTaskServiceImpl.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpTaskServiceImpl.java
index cc00ef0..792c7a9 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpTaskServiceImpl.java
+++ b/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);
                             }

--
Gitblit v1.7.1