From b7c371aa16be4c54776ccfa6988cbc8b1513bd13 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 26 八月 2024 09:28:08 +0800
Subject: [PATCH] 采购订单查询接口

---
 WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml      |   16 +++++
 WebAPI/WebAPI.csproj.user                                    |    7 --
 WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs          |  104 ++++++++++++++++++++++++++++++++++
 WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml.user |    9 +++
 4 files changed, 130 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
index a797923..08f77ae 100644
--- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -2953,6 +2953,110 @@
             }
         }
         #endregion
+
+        #region 閲囪喘璁㈠崟鏌ヨ鍒楄〃
+        [Route("Cg_POOrderBill/QueryList")]
+        [HttpGet]
+        public object QueryList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Cg_POOrderBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql = "select * from h_v_Cg_POOrderBillQuery where 1 = 1 ";
+
+                if (sWhere == "" || sWhere == null)
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Cg_POOrderBillQuery  order by hmainid desc", "h_v_Cg_POOrderBillQuery");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_Cg_POOrderBillQuery");
+                }
+
+
+
+                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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                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;
+            }
+        }
+        #endregion
+
+        #region 閲囪喘璁㈠崟鏌ヨ瀛愬垪琛�
+        [Route("Cg_POOrderBill/QuerySubList")]
+        [HttpGet]
+        public object QuerySubList(string hmainid, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Cg_POOrderBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql = "select * from h_v_Cg_POOrderBillQuerySub where hmainid =  "+ hmainid;
+
+                ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Cg_POOrderBillQuerySub");
+                
+
+                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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                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;
+            }
+        }
+        #endregion
     }
 
 }
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml b/WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml
new file mode 100644
index 0000000..5ff70fc
--- /dev/null
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml
@@ -0,0 +1,16 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121. 
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <DeleteExistingFiles>False</DeleteExistingFiles>
+    <ExcludeApp_Data>False</ExcludeApp_Data>
+    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>Any CPU</LastUsedPlatform>
+    <PublishProvider>FileSystem</PublishProvider>
+    <PublishUrl>G:\issWeb\缃戠珯鍙戝竷\API</PublishUrl>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml.user
new file mode 100644
index 0000000..9e8be7f
--- /dev/null
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile2.pubxml.user
@@ -0,0 +1,9 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121. 
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <History>False|2024-08-26T00:57:22.1073145Z;False|2024-08-26T08:56:38.8704796+08:00;</History>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index b4431a4..ea04c84 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -9,13 +9,8 @@
     <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
     <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
     <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
-<<<<<<< HEAD
-    <NameOfLastUsedPublishProfile>D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile21.pubxml</NameOfLastUsedPublishProfile>
+    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile2.pubxml</NameOfLastUsedPublishProfile>
     <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
-=======
-    <NameOfLastUsedPublishProfile>D:\GIT浠撳簱\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile10.pubxml</NameOfLastUsedPublishProfile>
-    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
->>>>>>> 626324c6aac0ace48aeb6e7dc72b4ce49d9b240a
     <UseIISExpress>true</UseIISExpress>
     <Use64BitIISExpress />
     <IISExpressSSLPort />

--
Gitblit v1.9.1