From fcd940f7fbdd40227eb64f89120acc6782160134 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期日, 28 四月 2024 10:14:35 +0800
Subject: [PATCH] 新增夏宝售后接口调用方法

---
 WebAPI/Web.config                                      |    6 +-
 WebAPI/WebAPI.csproj.user                              |    2 
 WebAPI/Properties/PublishProfiles/FolderProfile.pubxml |    2 
 WebAPI/Controllers/夏宝售后接口/ASSController.cs             |  124 +++++++++++++++++++++++++++++++++++++++++
 WebAPI/WebAPI.csproj                                   |    1 
 5 files changed, 130 insertions(+), 5 deletions(-)

diff --git "a/WebAPI/Controllers/\345\244\217\345\256\235\345\224\256\345\220\216\346\216\245\345\217\243/ASSController.cs" "b/WebAPI/Controllers/\345\244\217\345\256\235\345\224\256\345\220\216\346\216\245\345\217\243/ASSController.cs"
new file mode 100644
index 0000000..1cd8ad8
--- /dev/null
+++ "b/WebAPI/Controllers/\345\244\217\345\256\235\345\224\256\345\220\216\346\216\245\345\217\243/ASSController.cs"
@@ -0,0 +1,124 @@
+锘�
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using Newtonsoft.Json.Linq;
+using SQLHelper;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using System.Windows.Forms;
+using WebAPI;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+    public class ASSController : ApiController
+    {
+        public DataSet ds = new DataSet();
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+
+        #region 鍞悗鎺ュ彛涓�璋冪敤
+        /// <summary>
+        /// 鍞悗鎺ュ彛涓�璋冪敤
+        /// </summary>
+        /// <returns></returns>
+        [Route("ASSController/GetASS_SellOutInterFace_Json")]
+        [HttpGet]
+        public object GetASS_SellOutInterFace_Json(string HBarCode)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_ASS_SellOut_InterFace '" + HBarCode + "'", "h_p_ASS_SellOut_InterFace");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍缁撴灉锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    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 = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鍞悗鎺ュ彛涓�淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍞悗鎺ュ彛浜岃皟鐢�
+        /// <summary>
+        /// 鍞悗鎺ュ彛浜岃皟鐢�
+        /// </summary>
+        /// <returns></returns>
+        [Route("ASSController/GetASS_ProductInInterFace_Json")]
+        [HttpGet]
+        public object GetASS_ProductInInterFace_Json(string HBarCode)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_ASS_ProductIn_InterFace '" + HBarCode + "'", "h_p_ASS_ProductIn_InterFace");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍缁撴灉锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    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 = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鍞悗鎺ュ彛浜屼俊鎭け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+    }
+}
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
index 2403f43..9250916 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,7 +10,7 @@
     <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
     <LastUsedPlatform>x86</LastUsedPlatform>
     <PublishProvider>FileSystem</PublishProvider>
-    <PublishUrl>G:\issWeb\缃戠珯鍙戝竷\API</PublishUrl>
+    <PublishUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</PublishUrl>
     <WebPublishMethod>FileSystem</WebPublishMethod>
     <SiteUrlToLaunchAfterPublish />
   </PropertyGroup>
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 013bdd1..49df9b9 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,7 +22,7 @@
 		<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
 		<!--<add key="FileIP" value="http://localhost:8080/" />-->
 		<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
-		<add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/>   <!--棰滃彴寮忔満-->
+		<add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/>   <!--棰滃彴寮忔満-->
 		<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
 		<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
 		<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    鍗氭棩绉戞妧-->
@@ -105,7 +105,7 @@
 			</basicHttpBinding>
 		</bindings>
 		<client>
-			<endpoint address="http://192.168.63.53/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
+			<endpoint address="http://192.168.0.81/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
      bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap"
      name="WebService1Soap" />
 		</client>
@@ -114,7 +114,7 @@
  <applicationSettings>
   <WebAPI.Properties.Settings>
    <setting name="WebAPI_WebS_WebService1" serializeAs="String">
-    <value>http://192.168.63.53/WEBS-WMS/WebService1.asmx</value>
+    <value>http://192.168.0.81/WEBS-WMS/WebService1.asmx</value>
    </setting>
   </WebAPI.Properties.Settings>
  </applicationSettings>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 42a1008..7ee65da 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -557,6 +557,7 @@
     <Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_WorkPayTypeController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_ClassTimePrjGroupController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\Gy_ShiftsController.cs" />
+    <Compile Include="Controllers\澶忓疂鍞悗鎺ュ彛\ASSController.cs" />
     <Compile Include="Controllers\宸ヨ祫绠$悊\HR_EmployeeSkillBillController.cs" />
     <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OutApplyBillController.cs" />
     <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OverApplyBillController.cs" />
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index 853ef45..ca9b9c0 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -9,7 +9,7 @@
     <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
     <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
     <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
-    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+    <NameOfLastUsedPublishProfile>D:\GIT浠撳簱\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
     <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
     <UseIISExpress>true</UseIISExpress>
     <Use64BitIISExpress />

--
Gitblit v1.9.1