From 2bf6de5d4748d28f7f3a098af25503d6a0c619d1 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 19 十一月 2025 11:16:03 +0800
Subject: [PATCH] 多码合一

---
 WebAPI/Controllers/基础资料/基础资料/Gy_MultipleCode_ReportController.cs |   81 ++++++++++++++++++++++++++++++++++++++++
 WebAPI/WebAPI.csproj                                             |    1 
 2 files changed, 82 insertions(+), 0 deletions(-)

diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MultipleCode_ReportController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MultipleCode_ReportController.cs"
new file mode 100644
index 0000000..006b54a
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MultipleCode_ReportController.cs"
@@ -0,0 +1,81 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.IO;
+using System.Web.Http;
+using WebAPI.DLL;
+using WebAPI.Models;
+using WebAPI.Service;
+using Kingdee.BOS.WebApi.Client;
+using System.Linq;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+
+
+    public class Gy_MultipleCode_ReportController : ApiController
+    {
+        private json objJsonResult = new json();
+        public DataSet ds = new DataSet();
+        public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        [Route("Gy_MultipleCode_ReportController/getList")]
+        [HttpGet]
+        public object getList(string sWhere, string HBeginDate, string HEndDate)
+        {
+            List<object> columnNameList = new List<object>();
+            try
+            {
+                // 楠岃瘉鏃ユ湡
+                if (!DateTime.TryParse(HBeginDate, out DateTime beginDate) || !DateTime.TryParse(HEndDate, out DateTime endDate))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃ユ湡鏍煎紡涓嶆纭�";
+                    return objJsonResult;
+
+                }
+                if(sWhere!=null)
+                ds = oCN.RunProcReturn($"select * from h_v_Gy_MultipleCodes_onOne where 鏃ユ湡<='{HEndDate}' and 鏃ユ湡>='{HBeginDate}'  {sWhere}", "h_v_Gy_MultipleCodes_onOne");
+                else
+                    ds = oCN.RunProcReturn($"select * from h_v_Gy_MultipleCodes_onOne where 鏃ユ湡<='{HEndDate}' and 鏃ユ湡>='{HBeginDate}'", "h_v_Gy_MultipleCodes_onOne");
+                // 娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = ds.Tables[0].Rows.Count;
+                objJsonResult.Message = "Success锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            
+
+        }
+
+
+        
+
+        
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index b3e44f9..4e4f67a 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -644,6 +644,7 @@
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionListBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DisposeWayController.cs" />
     <Compile Include="Controllers\鍗庤繙datamapping\Gy_PNLInfoController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MultipleCode_ReportController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PlanImplementation_ReportController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PNLInfoTypeLevelController.cs" />
     <Compile Include="Controllers\椤圭洰绠$悊\宸ョ▼椤圭洰\PM_ProjectBill_WorkController.cs" />

--
Gitblit v1.9.1