看板后端(旧版不需要了)
YL
2021-05-13 ef64fca176cd33702a999981c7f91e1b77a1adb3
仓库看板后台提交
4个文件已修改
72 ■■■■■ 已修改文件
MyWebApi/Controllers/LoadDataController.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MyWebApi/DLL/BLL/LoadDataBLL.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MyWebApi/DLL/DAL/LoadDataDAL.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MyWebApi/Web.config 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MyWebApi/Controllers/LoadDataController.cs
@@ -24,6 +24,7 @@
    {
        string LineCode = System.Configuration.ConfigurationManager.AppSettings["LineCode"];//流水线编码
        string LineCodeList = System.Configuration.ConfigurationManager.AppSettings["LineCodeList"];//流水线看板今日全部流水线编码:产线1、产线2、产线3、产线4、产线5、产线6
        string HouseCode = System.Configuration.ConfigurationManager.AppSettings["HouseCode"];//仓库编码
        /// <summary>
        /// 流水线看板图型展示数据
        /// </summary>
@@ -78,5 +79,31 @@
            return response;
        }
        #endregion
        #region[仓库看板看板码表数据]
        [Route(template: "HouseTopData")]
        [HttpGet]
        public HttpResponseMessage HouseTopData()
        {
            DataTable dt = LoadDataBLL.HouseTopData(HouseCode);
            HttpResponseMessage response = Request.CreateResponse();
            response.StatusCode = HttpStatusCode.OK;
            response.Content = new StringContent(JsonConvert.SerializeObject(new { code = 200, data = dt }), System.Text.Encoding.UTF8);
            return response;
        }
        #endregion
        #region[仓库看板看板详情数据]
        [Route(template: "HouseDataTable")]
        [HttpGet]
        public HttpResponseMessage HouseDataTable()
        {
            DataTable dt = LoadDataBLL.HouseDataTable(HouseCode);
            HttpResponseMessage response = Request.CreateResponse();
            response.StatusCode = HttpStatusCode.OK;
            response.Content = new StringContent(JsonConvert.SerializeObject(new { code = 200, data = dt }), System.Text.Encoding.UTF8);
            return response;
        }
        #endregion
    }
}
MyWebApi/DLL/BLL/LoadDataBLL.cs
@@ -24,5 +24,19 @@
            return LoadDataDAL.LineTableData(LineCode,startNum, endNum, out count);
        }
        #endregion
        #region[仓库看板看板码表数据]
        public static DataTable HouseTopData(string houseCode)
        {
            return LoadDataDAL.HouseTopData(houseCode);
        }
        #endregion
        #region[仓库看板看板详情数据]
        public static DataTable HouseDataTable(string houseCode)
        {
            return LoadDataDAL.HouseDataTable(houseCode);
        }
        #endregion
    }
}
MyWebApi/DLL/DAL/LoadDataDAL.cs
@@ -52,5 +52,34 @@
            return new List<LineWork>();
        }
        #endregion
        #region[仓库看板看板码表数据]
        public static DataTable HouseTopData(string houseCode)
        {
            //执行存储过程@lineCodeList
            // 存储过程名称
            string strProcName = "kb_HouseProduct_Radio";
            //创建参数
            SqlParameter[] parameters = { new SqlParameter("@HouseCode", houseCode) };
            //parameters[0].Direction = ParameterDirection.Output;
            DataTable dt = DBHelper.ExecuteProductData(strProcName, parameters);
            return dt;
        }
        #endregion
        #region[仓库看板看板详情数据]
        public static DataTable HouseDataTable(string houseCode)
        {
            //执行存储过程@lineCodeList
            // 存储过程名称
            string strProcName = "kb_HouseProduct_Table";
            //创建参数
            SqlParameter[] parameters = { new SqlParameter("@HouseCode", houseCode) };
            //parameters[0].Direction = ParameterDirection.Output;
            DataTable dt = DBHelper.ExecuteProductData(strProcName, parameters);
            return dt;
        }
        #endregion
    }
}
MyWebApi/Web.config
@@ -10,6 +10,8 @@
      <add key="LineCode" value="509" />
      <!--流水线看板今日全部流水线编码:产线1、产线2、产线3、产线4、产线5、产线6-->
      <add key="LineCodeList" value="'509','510','511','512','513','514'" />
      <!--仓库看板编码-->
      <add key="HouseCode" value="509" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.7.2" />