From c1147646b9ef1d713a202d7ab8cf3ea8d677f142 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 27 九月 2025 21:56:54 +0800
Subject: [PATCH] fix:优化评价

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/evaluation/VehicleEvaluationQrcodeController.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/evaluation/VehicleEvaluationQrcodeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/evaluation/VehicleEvaluationQrcodeController.java
index 3aa5fa2..f36e2ca 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/evaluation/VehicleEvaluationQrcodeController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/evaluation/VehicleEvaluationQrcodeController.java
@@ -111,11 +111,16 @@
             if (StringUtils.isEmpty(vehicleNo)) {
                 return error("杞︾墝鍙蜂笉鑳戒负绌�");
             }
+            
+            VehicleEvaluationQrcode qrcode;
             if (StringUtils.isEmpty(qrcodeUrl)) {
-                return error("浜岀淮鐮乁RL涓嶈兘涓虹┖");
+                // 濡傛灉URL涓虹┖锛屼娇鐢ㄩ粯璁RL
+                qrcode = vehicleEvaluationQrcodeService.generateVehicleEvaluationQrcode(vehicleNo);
+            } else {
+                // 濡傛灉URL涓嶄负绌猴紝浣跨敤鎸囧畾鐨刄RL
+                qrcode = vehicleEvaluationQrcodeService.generateVehicleEvaluationQrcode(vehicleNo, qrcodeUrl);
             }
             
-            VehicleEvaluationQrcode qrcode = vehicleEvaluationQrcodeService.generateVehicleEvaluationQrcode(vehicleNo, qrcodeUrl);
             if (qrcode != null) {
                 return success(qrcode);
             } else {
@@ -133,9 +138,17 @@
     @PreAuthorize("@ss.hasPermi('evaluation:qrcode:batch')")
     @Log(title = "杞﹁締璇勪环浜岀淮鐮�", businessType = BusinessType.INSERT)
     @PostMapping("/batch")
-    public AjaxResult batchGenerateQrcode() {
+    public AjaxResult batchGenerateQrcode(@RequestBody JSONObject params) {
         try {
-            int count = vehicleEvaluationQrcodeService.batchGenerateVehicleEvaluationQrcode();
+            String qrcodeUrl = params.getString("qrcodeUrl");
+            @SuppressWarnings("unchecked")
+            List<String> vehicleNos = (List<String>) params.get("vehicleNos");
+            
+            if (vehicleNos == null || vehicleNos.isEmpty()) {
+                return error("杞︾墝鍙峰垪琛ㄤ笉鑳戒负绌�");
+            }
+            
+            int count = vehicleEvaluationQrcodeService.batchGenerateVehicleEvaluationQrcode(vehicleNos, qrcodeUrl);
             return success("鎴愬姛鐢熸垚 " + count + " 涓簩缁寸爜");
         } catch (Exception e) {
             logger.error("鎵归噺鐢熸垚浜岀淮鐮佸け璐�", e);

--
Gitblit v1.9.1