From 88a1ab54409ebf39c0bfa269aa7d513a7ac9219e Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期一, 14 四月 2025 14:17:04 +0800
Subject: [PATCH] 111
---
MESApplication/Controllers/QcIssueResult/QcIssueResultController.cs | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/MESApplication/Controllers/QcIssueResult/QcIssueResultController.cs b/MESApplication/Controllers/QcIssueResult/QcIssueResultController.cs
index 089a715..53c0dd1 100644
--- a/MESApplication/Controllers/QcIssueResult/QcIssueResultController.cs
+++ b/MESApplication/Controllers/QcIssueResult/QcIssueResultController.cs
@@ -11,7 +11,10 @@
using Newtonsoft.Json.Linq;
using System.Diagnostics;
using System.Dynamic;
+using System.Net;
+using System.Text;
using System.Text.Json.Nodes;
+using System.Web;
namespace MESApplication.Controllers.QcIssueResult;
@@ -35,6 +38,8 @@
try
{
+ // 鏂板URL瑙g爜澶勭悊閫昏緫
+ DecodeUrlEncodedProperties(getQcIssueResultDetail);
// 璋冪敤 QcIssueResultManager 涓殑 GetProcessNo 鏂规硶鏉ュ惎鍔ㄩ拤閽夊伐浣滄祦瀹炰緥
string result = m.GetProcessNo(getQcIssueResultDetail);
@@ -61,6 +66,27 @@
}
}
+ // 鏂板瑙g爜鏂规硶
+ private void DecodeUrlEncodedProperties(object obj)
+ {
+ if (obj == null) return;
+
+ var properties = obj.GetType().GetProperties();
+ foreach (var prop in properties)
+ {
+ // 鍙鐞嗗瓧绗︿覆绫诲瀷鐨勫睘鎬�
+ if (prop.PropertyType == typeof(string) && prop.CanWrite)
+ {
+ var value = prop.GetValue(obj) as string;
+ if (!string.IsNullOrEmpty(value))
+ {
+ // 浣跨敤UTF8缂栫爜杩涜瑙g爜
+ var decodedValue = HttpUtility.UrlDecode(value, Encoding.UTF8);
+ prop.SetValue(obj, decodedValue);
+ }
+ }
+ }
+ }
[HttpPost("Save")]
public ResponseResult Save(ErpQcIssueResult erpQcIssueResult)
--
Gitblit v1.9.3