From 3759a25e8608c8dc0ec4308ebef66babc62fce63 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期二, 10 十月 2023 14:12:17 +0800 Subject: [PATCH] 新增领料统计报表调用方法 --- WebAPI/Controllers/MateOutController.cs | 49 ++++++++++++++++++++++++ WebAPI/Web.config | 12 ++--- 2 files changed, 54 insertions(+), 7 deletions(-) diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs index bb18344..c379f25 100644 --- a/WebAPI/Controllers/MateOutController.cs +++ b/WebAPI/Controllers/MateOutController.cs @@ -1834,6 +1834,55 @@ } #endregion + #region 棰嗘枡缁熻鎶ヨ〃 + /// <summary> + /// 棰嗘枡缁熻鎶ヨ〃 + /// </summary> + /// <returns></returns> + [Route("MateOutController/GetKf_MateOutSumReport_QiaoYi_Json")] + [HttpGet] + public object GetKf_MateOutSumReport_QiaoYi_Json(string sWhere) + { + try + { + ds = oCN.RunProcReturn("exec h_p_Kf_MateOutSumReport_QiaoYi " + sWhere, "h_p_Kf_MateOutSumReport_QiaoYi"); + 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 + #endregion diff --git a/WebAPI/Web.config b/WebAPI/Web.config index 0668a79..cba6370 100644 --- a/WebAPI/Web.config +++ b/WebAPI/Web.config @@ -22,8 +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.20/WEBS-WMS/WebService1.asmx"/> - --><!--棰滃彴寮忔満--> + <add key="sUrl" value="http://192.168.63.20/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"/> 鍗氭棩绉戞妧--> @@ -33,10 +32,9 @@ <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS/WebService1.asmx"/> 瀹夌憺鏈嶅姟鍣�--> <!--<add key="sUrl" value="http://122.227.133.186:8090/WEBS/WebService1.asmx"/> --> <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/> 瀹夌憺鏈嶅姟鍣�--> - <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> - <!--娴嬭瘯鏈嶅姟鍣�--> + <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--娴嬭瘯鏈嶅姟鍣�--> <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/> 鏈湴--> - <add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/> + <!--<add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/> --> <!--闄堥洴闈欐湰鍦伴厤缃�--> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="ClientValidationEnabled" value="true" /> @@ -103,7 +101,7 @@ </basicHttpBinding> </bindings> <client> - <endpoint address="http://192.168.56.1:81/web/WebService1.asmx" binding="basicHttpBinding" + <endpoint address="http://192.168.63.20/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" /> </client> @@ -112,7 +110,7 @@ <applicationSettings> <WebAPI.Properties.Settings> <setting name="WebAPI_WebS_WebService1" serializeAs="String"> - <value>http://192.168.56.1:81/web/WebService1.asmx</value> + <value>http://192.168.63.20/WEBS-WMS/WebService1.asmx</value> </setting> </WebAPI.Properties.Settings> </applicationSettings> -- Gitblit v1.9.1