yxj
2023-10-10 3759a25e8608c8dc0ec4308ebef66babc62fce63
新增领料统计报表调用方法
2个文件已修改
61 ■■■■ 已修改文件
WebAPI/Controllers/MateOutController.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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));  //获取到DataColumn列对象的列名
                    }
                    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
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>