看板后端(旧版不需要了)
wyb
2021-05-13 db942dd220a9463732a29334afb497187f5084a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using MyWebApi.Models;
using MyWebApi.Tools;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
 
namespace MyWebApi.DLL.DAL
{
    public class LoadDataDAL
    {
        #region【业务逻辑层数据过度,流水线看板图型数据】
        public static List<DataTable> LineData(string lineCode, string LineCodeList)
        {
            List<DataTable> list = new List<DataTable>();
            //执行存储过程@lineCodeList
            // 存储过程名称
            string strProcName = "LineProduct_Radio";
            //创建参数
            SqlParameter[] parameters = { new SqlParameter("@lineCode", lineCode), new SqlParameter("@lineCodeList", LineCodeList) };
            //parameters[0].Direction = ParameterDirection.Output;
            list = DBHelper.ExecuteProductDataList(strProcName, parameters);
            return list;
        }
        #endregion
 
        #region【业务逻辑层数据过度,流水线看板图型数据】
        public static List<LineWork> LineTableData(string LineCode, int startNum, int endNum, out int count)
        {
            List<LineWork> list = new List<LineWork>();
            //执行存储过程@lineCodeList
            // 存储过程名称
            string strProcName = "kb_LineProduct_Table";
            //创建参数
            SqlParameter[] parameters = { 
                new SqlParameter("@lineCode", LineCode),
                new SqlParameter("@startNum", startNum),
                new SqlParameter("@endNum", endNum),
                new SqlParameter("@total", ParameterDirection.Output)
            };
            parameters[3].Direction = ParameterDirection.Output;
            DataTable dt = DBHelper.ExecuteProductData(strProcName, parameters);
            if (dt != null && dt.Rows.Count > 0)
            {
                count = Convert.ToInt32(parameters[3].Value);
                return dt.AsEnumerable().Select(t => new LineWork(t)).ToList();
            }
            count = Convert.ToInt32(parameters[3].Value);
            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
 
        #region 地图数据看板
        /// <summary>
        /// 地图数据看板
        /// </summary>
        /// <returns></returns>
        public static List<DataTable> MyMap ()
        {
            List<DataTable> list = new List<DataTable>();
            //执行存储过程h_p_Xs_SeOrderQtySort
            // 存储过程名称
            string strProcName = "h_p_Xs_SeOrderQtySort";
            //创建参数
            SqlParameter[] parameters = {};
            list  = DBHelper.ExecuteProductDataList(strProcName, parameters);
           
            return list;
        }
        #endregion
    }
}