From 08f95b2f159b56fa3bd4f4b348855989de8aa456 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期四, 18 十二月 2025 21:48:18 +0800
Subject: [PATCH] feat: vehicle
---
ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java
index cf5f262..bdc72da 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java
@@ -4,6 +4,7 @@
import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.core.domain.entity.ServiceOrderAppVo;
import com.ruoyi.common.core.domain.entity.ServiceOrderAppResultVo;
+import com.ruoyi.common.core.domain.entity.ServiceOrderDelResultVo;
import com.ruoyi.common.core.domain.entity.ServiceOrderDelVo;
import com.ruoyi.common.utils.http.HttpUtils;
import org.slf4j.Logger;
@@ -48,7 +49,7 @@
return null;
}
- log.info("鎺ュ彛鍦板潃锛�"+addServiceOrederAPI);
+// log.info("鎺ュ彛鍦板潃锛�"+addServiceOrederAPI);
//璁$畻鏃堕棿鎴冲拰绛惧悕
long unixTime = System.currentTimeMillis() / 1000; // 鑾峰彇褰撳墠鏃堕棿鎴筹紙绉掞級 Long.valueOf("1746444543") ;//
@@ -62,7 +63,17 @@
try {
Object value = field.get(model);
if (value != null) {
- params.put(field.getName(),URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString()));
+
+ // 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐�
+ String fieldName = field.getName();
+
+ String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
+ if(fieldName.contains("method"))
+ {
+ capitalizedFieldName = fieldName;
+ }
+
+ params.put(capitalizedFieldName,URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString()));
}
} catch (IllegalAccessException e) {
// log.error("鑾峰彇瀵硅薄灞炴�у�兼椂鍑洪敊", e);
@@ -88,7 +99,13 @@
}
// 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐�
String fieldName = field.getName();
+
String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
+
+ if(fieldName.contains("method"))
+ {
+ capitalizedFieldName = fieldName;
+ }
formData.append(capitalizedFieldName)
.append("=")
@@ -126,7 +143,7 @@
* @param model 鏈嶅姟璁㈠崟鍒犻櫎璇锋眰鍊煎璞�
* @return 鏈嶅姟璁㈠崟鍒犻櫎鎺ュ彛璋冪敤缁撴灉
*/
- public static ServiceOrderAppResultVo CancelServiceOrder(ServiceOrderDelVo model,String appSecret) {
+ public static ServiceOrderDelResultVo CancelServiceOrder(ServiceOrderDelVo model,String appSecret) {
if (addServiceOrederAPI.isEmpty()) {
// log.info("AddServiceOrederAPI 鏈缃紝璇峰厛璁剧疆鎺ュ彛鍦板潃銆�");
return null;
@@ -144,10 +161,19 @@
try {
Object value = field.get(model);
if (value != null) {
- params.put(field.getName(), value.toString());
+ // 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐�
+ String fieldName = field.getName();
+ String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
+ if(fieldName.contains("method"))
+ {
+ capitalizedFieldName = fieldName;
+ }
+ params.put(capitalizedFieldName,URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString()));
}
} catch (IllegalAccessException e) {
// log.error("鑾峰彇瀵硅薄灞炴�у�兼椂鍑洪敊", e);
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
}
}
@@ -166,9 +192,14 @@
}
// 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐�
String fieldName = field.getName();
- formData.append(fieldName)
- .append("=")
- .append(URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString()));
+ String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
+ if(fieldName.contains("method"))
+ {
+ capitalizedFieldName = fieldName;
+ }
+ formData.append(capitalizedFieldName)
+ .append("=")
+ .append(URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString()));
}
} catch (Exception e) {
// log.error("鎷兼帴琛ㄥ崟鏁版嵁鏃跺嚭閿�", e);
@@ -180,7 +211,7 @@
if (responseData != null && !responseData.isEmpty()) {
// log.info("鎺ュ彛鍝嶅簲: " + responseData);
try {
- return JSON.parseObject(responseData, ServiceOrderAppResultVo.class);
+ return JSON.parseObject(responseData, ServiceOrderDelResultVo.class);
} catch (Exception e) {
// log.info("瑙f瀽鎺ュ彛鍝嶅簲鏁版嵁澶辫触: " + e.getMessage());
}
--
Gitblit v1.9.1