From bf780b6c83012b5beb3d7515b8fb61753c5fb736 Mon Sep 17 00:00:00 2001
From: sjz <1240968267@qq.com>
Date: 星期四, 26 六月 2025 08:48:37 +0800
Subject: [PATCH] 采购承诺交期改string类型

---
 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