Browse Source

操作记录、物料管理

zhengbingbing 6 years ago
parent
commit
3db614fd45

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

@@ -100,6 +100,7 @@
100 100
     <Compile Include="T_Sys_MobileData.cs" />
101 101
     <Compile Include="T_Sys_ModuleInfo.cs" />
102 102
     <Compile Include="T_Sys_ModuleFunctions.cs" />
103
+    <Compile Include="T_Sys_OperateLogs.cs" />
103 104
     <Compile Include="T_Sys_RoleFunction.cs" />
104 105
     <Compile Include="T_Sys_RoleInfo.cs" />
105 106
     <Compile Include="T_Sys_SeatGroup.cs" />
@@ -112,6 +113,7 @@
112 113
     <Compile Include="T_Sys_WorkOFFDays.cs" />
113 114
     <Compile Include="T_Sys_WorkTimes.cs" />
114 115
     <Compile Include="T_Wo_BusinessManage.cs" />
116
+    <Compile Include="T_Wo_MaterialManage.cs" />
115 117
     <Compile Include="T_Wo_WorkOrder.cs" />
116 118
     <Compile Include="T_Wo_WorkOrderItem_New.cs" />
117 119
     <Compile Include="T_Wo_WorkOrderTimeOut.cs" />

+ 110 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_OperateLogs.cs

@@ -0,0 +1,110 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    /// <summary>
11
+	/// T_Sys_OperateLogs
12
+	/// </summary>
13
+	public partial class T_Sys_OperateLogs
14
+    {
15
+        private readonly CallCenterApi.DAL.T_Sys_OperateLogs dal = new CallCenterApi.DAL.T_Sys_OperateLogs();
16
+        public T_Sys_OperateLogs()
17
+        { }
18
+        #region  BasicMethod
19
+        /// <summary>
20
+        /// 增加一条数据
21
+        /// </summary>
22
+        public int Add(CallCenterApi.Model.T_Sys_OperateLogs model)
23
+        {
24
+            return dal.Add(model);
25
+        }
26
+        /// <summary>
27
+        /// 获得数据列表
28
+        /// </summary>
29
+        public DataSet GetList(string strWhere)
30
+        {
31
+            return dal.GetList(strWhere);
32
+        }
33
+        /// <summary>
34
+        /// 获得前几行数据
35
+        /// </summary>
36
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
37
+        {
38
+            return dal.GetList(Top, strWhere, filedOrder);
39
+        }
40
+        /// <summary>
41
+        /// 获得数据列表
42
+        /// </summary>
43
+        public List<CallCenterApi.Model.T_Sys_OperateLogs> GetModelList(string strWhere)
44
+        {
45
+            DataSet ds = dal.GetList(strWhere);
46
+            return DataTableToList(ds.Tables[0]);
47
+        }
48
+        /// <summary>
49
+        /// 获得数据列表
50
+        /// </summary>
51
+        public List<CallCenterApi.Model.T_Sys_OperateLogs> DataTableToList(DataTable dt)
52
+        {
53
+            List<CallCenterApi.Model.T_Sys_OperateLogs> modelList = new List<CallCenterApi.Model.T_Sys_OperateLogs>();
54
+            int rowsCount = dt.Rows.Count;
55
+            if (rowsCount > 0)
56
+            {
57
+                CallCenterApi.Model.T_Sys_OperateLogs model;
58
+                for (int n = 0; n < rowsCount; n++)
59
+                {
60
+                    model = dal.DataRowToModel(dt.Rows[n]);
61
+                    if (model != null)
62
+                    {
63
+                        modelList.Add(model);
64
+                    }
65
+                }
66
+            }
67
+            return modelList;
68
+        }
69
+
70
+        /// <summary>
71
+        /// 获得数据列表
72
+        /// </summary>
73
+        public DataSet GetAllList()
74
+        {
75
+            return GetList("");
76
+        }
77
+
78
+        /// <summary>
79
+        /// 分页获取数据列表
80
+        /// </summary>
81
+        public int GetRecordCount(string strWhere)
82
+        {
83
+            return dal.GetRecordCount(strWhere);
84
+        }
85
+        /// <summary>
86
+        /// 分页获取数据列表
87
+        /// </summary>
88
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
89
+        {
90
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
91
+        }
92
+
93
+        #endregion  BasicMethod
94
+        #region  ExtensionMethod
95
+        public int AddOptLog(string module,string optuser,string optip,string des,string optcode,string tables,string optid)
96
+        {
97
+            Model.T_Sys_OperateLogs optmodel = new Model.T_Sys_OperateLogs();
98
+            optmodel.F_Module = module;
99
+            optmodel.F_OptBy = optuser;
100
+            optmodel.F_OptOn = DateTime.Now;
101
+            optmodel.F_OptIP = optip;
102
+            optmodel.F_OptCode = optcode;
103
+            optmodel.F_OptTables = tables;
104
+            optmodel.F_OptID = optid;
105
+            optmodel.F_Descript = des;
106
+            return Add(optmodel);
107
+        }
108
+        #endregion  ExtensionMethod
109
+    }
110
+}

+ 140 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Wo_MaterialManage.cs

@@ -0,0 +1,140 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    /// <summary>
11
+	/// 物料管理表
12
+	/// </summary>
13
+	public partial class T_Wo_MaterialManage
14
+    {
15
+        private readonly CallCenterApi.DAL.T_Wo_MaterialManage dal = new CallCenterApi.DAL.T_Wo_MaterialManage();
16
+        public T_Wo_MaterialManage()
17
+        { }
18
+        #region  BasicMethod
19
+        /// <summary>
20
+        /// 是否存在该记录
21
+        /// </summary>
22
+        public bool Exists(int F_Id)
23
+        {
24
+            return dal.Exists(F_Id);
25
+        }
26
+
27
+        /// <summary>
28
+        /// 增加一条数据
29
+        /// </summary>
30
+        public int Add(CallCenterApi.Model.T_Wo_MaterialManage model)
31
+        {
32
+            return dal.Add(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 更新一条数据
37
+        /// </summary>
38
+        public bool Update(CallCenterApi.Model.T_Wo_MaterialManage model)
39
+        {
40
+            return dal.Update(model);
41
+        }
42
+
43
+        /// <summary>
44
+        /// 删除一条数据
45
+        /// </summary>
46
+        public bool Delete(int F_Id, string usercode, DateTime deltime)
47
+        {
48
+
49
+            return dal.Delete(F_Id, usercode, deltime);
50
+        }
51
+        /// <summary>
52
+        /// 删除一条数据
53
+        /// </summary>
54
+        public bool DeleteList(string F_Idlist, string usercode, DateTime deltime)
55
+        {
56
+            return dal.DeleteList(F_Idlist, usercode, deltime);
57
+        }
58
+
59
+        /// <summary>
60
+        /// 得到一个对象实体
61
+        /// </summary>
62
+        public CallCenterApi.Model.T_Wo_MaterialManage GetModel(int F_Id)
63
+        {
64
+
65
+            return dal.GetModel(F_Id);
66
+        }
67
+
68
+        /// <summary>
69
+        /// 获得数据列表
70
+        /// </summary>
71
+        public DataSet GetList(string strWhere)
72
+        {
73
+            return dal.GetList(strWhere);
74
+        }
75
+        /// <summary>
76
+        /// 获得前几行数据
77
+        /// </summary>
78
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
79
+        {
80
+            return dal.GetList(Top, strWhere, filedOrder);
81
+        }
82
+        /// <summary>
83
+        /// 获得数据列表
84
+        /// </summary>
85
+        public List<CallCenterApi.Model.T_Wo_MaterialManage> GetModelList(string strWhere)
86
+        {
87
+            DataSet ds = dal.GetList(strWhere);
88
+            return DataTableToList(ds.Tables[0]);
89
+        }
90
+        /// <summary>
91
+        /// 获得数据列表
92
+        /// </summary>
93
+        public List<CallCenterApi.Model.T_Wo_MaterialManage> DataTableToList(DataTable dt)
94
+        {
95
+            List<CallCenterApi.Model.T_Wo_MaterialManage> modelList = new List<CallCenterApi.Model.T_Wo_MaterialManage>();
96
+            int rowsCount = dt.Rows.Count;
97
+            if (rowsCount > 0)
98
+            {
99
+                CallCenterApi.Model.T_Wo_MaterialManage model;
100
+                for (int n = 0; n < rowsCount; n++)
101
+                {
102
+                    model = dal.DataRowToModel(dt.Rows[n]);
103
+                    if (model != null)
104
+                    {
105
+                        modelList.Add(model);
106
+                    }
107
+                }
108
+            }
109
+            return modelList;
110
+        }
111
+
112
+        /// <summary>
113
+        /// 获得数据列表
114
+        /// </summary>
115
+        public DataSet GetAllList()
116
+        {
117
+            return GetList("");
118
+        }
119
+
120
+        /// <summary>
121
+        /// 分页获取数据列表
122
+        /// </summary>
123
+        public int GetRecordCount(string strWhere)
124
+        {
125
+            return dal.GetRecordCount(strWhere);
126
+        }
127
+        /// <summary>
128
+        /// 分页获取数据列表
129
+        /// </summary>
130
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
131
+        {
132
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
133
+        }
134
+
135
+        #endregion  BasicMethod
136
+        #region  ExtensionMethod
137
+
138
+        #endregion  ExtensionMethod
139
+    }
140
+}

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

@@ -100,6 +100,7 @@
100 100
     <Compile Include="T_Sys_MobileData.cs" />
101 101
     <Compile Include="T_Sys_ModuleInfo.cs" />
102 102
     <Compile Include="T_Sys_ModuleFunctions.cs" />
103
+    <Compile Include="T_Sys_OperateLogs.cs" />
103 104
     <Compile Include="T_Sys_RoleFunction.cs" />
104 105
     <Compile Include="T_Sys_RoleInfo.cs" />
105 106
     <Compile Include="T_Sys_SeatGroup.cs" />
@@ -112,6 +113,7 @@
112 113
     <Compile Include="T_Sys_WorkOFFDays.cs" />
113 114
     <Compile Include="T_Sys_WorkTimes.cs" />
114 115
     <Compile Include="T_Wo_BusinessManage.cs" />
116
+    <Compile Include="T_Wo_MaterialManage.cs" />
115 117
     <Compile Include="T_Wo_WorkOrder.cs" />
116 118
     <Compile Include="T_Wo_WorkOrderItem_New.cs" />
117 119
     <Compile Include="T_Wo_WorkOrderTimeOut.cs" />

+ 197 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_OperateLogs.cs

@@ -0,0 +1,197 @@
1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Data.SqlClient;
6
+using System.Linq;
7
+using System.Text;
8
+using System.Threading.Tasks;
9
+
10
+namespace CallCenterApi.DAL
11
+{
12
+    /// <summary>
13
+	/// 数据访问类:T_Sys_OperateLogs
14
+	/// </summary>
15
+	public partial class T_Sys_OperateLogs
16
+    {
17
+        public T_Sys_OperateLogs()
18
+        { }
19
+        #region  BasicMethod
20
+
21
+        /// <summary>
22
+		/// 增加一条数据
23
+		/// </summary>
24
+		public int Add(CallCenterApi.Model.T_Sys_OperateLogs model)
25
+        {
26
+            StringBuilder strSql = new StringBuilder();
27
+            strSql.Append("insert into T_Sys_OperateLogs(");
28
+            strSql.Append("F_OptBy,F_OptIP,F_OptOn,F_OptCode,F_Module,F_OptTables,F_OptID,F_Descript)");
29
+            strSql.Append(" values (");
30
+            strSql.Append("@F_OptBy,@F_OptIP,@F_OptOn,@F_OptCode,@F_Module,@F_OptTables,@F_OptID,@F_Descript)");
31
+            strSql.Append(";select @@IDENTITY");
32
+            SqlParameter[] parameters = {
33
+                    new SqlParameter("@F_OptBy", SqlDbType.NVarChar,500),
34
+                    new SqlParameter("@F_OptIP", SqlDbType.NVarChar,500),
35
+                    new SqlParameter("@F_OptOn", SqlDbType.DateTime),
36
+                    new SqlParameter("@F_OptCode", SqlDbType.NVarChar,50),
37
+                    new SqlParameter("@F_Module", SqlDbType.NVarChar,2000),
38
+                    new SqlParameter("@F_OptTables", SqlDbType.NVarChar,500),
39
+                    new SqlParameter("@F_OptID", SqlDbType.NVarChar,500),
40
+                    new SqlParameter("@F_Descript", SqlDbType.NText)};
41
+            parameters[0].Value = model.F_OptBy;
42
+            parameters[1].Value = model.F_OptIP;
43
+            parameters[2].Value = model.F_OptOn;
44
+            parameters[3].Value = model.F_OptCode;
45
+            parameters[4].Value = model.F_Module;
46
+            parameters[5].Value = model.F_OptTables;
47
+            parameters[6].Value = model.F_OptID;
48
+            parameters[7].Value = model.F_Descript;
49
+
50
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
51
+            if (obj == null)
52
+            {
53
+                return 0;
54
+            }
55
+            else
56
+            {
57
+                return Convert.ToInt32(obj);
58
+            }
59
+        }
60
+
61
+        /// <summary>
62
+		/// 得到一个对象实体
63
+		/// </summary>
64
+		public CallCenterApi.Model.T_Sys_OperateLogs DataRowToModel(DataRow row)
65
+        {
66
+            CallCenterApi.Model.T_Sys_OperateLogs model = new CallCenterApi.Model.T_Sys_OperateLogs();
67
+            if (row != null)
68
+            {
69
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
70
+                {
71
+                    model.F_Id = int.Parse(row["F_Id"].ToString());
72
+                }
73
+                if (row["F_OptBy"] != null)
74
+                {
75
+                    model.F_OptBy = row["F_OptBy"].ToString();
76
+                }
77
+                if (row["F_OptIP"] != null)
78
+                {
79
+                    model.F_OptIP = row["F_OptIP"].ToString();
80
+                }
81
+                if (row["F_OptOn"] != null && row["F_OptOn"].ToString() != "")
82
+                {
83
+                    model.F_OptOn = DateTime.Parse(row["F_OptOn"].ToString());
84
+                }
85
+                if (row["F_OptCode"] != null)
86
+                {
87
+                    model.F_OptCode = row["F_OptCode"].ToString();
88
+                }
89
+                if (row["F_Module"] != null)
90
+                {
91
+                    model.F_Module = row["F_Module"].ToString();
92
+                }
93
+                if (row["F_OptTables"] != null)
94
+                {
95
+                    model.F_OptTables = row["F_OptTables"].ToString();
96
+                }
97
+                if (row["F_OptID"] != null)
98
+                {
99
+                    model.F_OptID = row["F_OptID"].ToString();
100
+                }
101
+                if (row["F_Descript"] != null)
102
+                {
103
+                    model.F_Descript = row["F_Descript"].ToString();
104
+                }
105
+            }
106
+            return model;
107
+        }
108
+
109
+        /// <summary>
110
+        /// 获得数据列表
111
+        /// </summary>
112
+        public DataSet GetList(string strWhere)
113
+        {
114
+            StringBuilder strSql = new StringBuilder();
115
+            strSql.Append("select * ");
116
+            strSql.Append(" FROM T_Sys_OperateLogs ");
117
+            if (strWhere.Trim() != "")
118
+            {
119
+                strSql.Append(" where " + strWhere);
120
+            }
121
+            return DbHelperSQL.Query(strSql.ToString());
122
+        }
123
+
124
+        /// <summary>
125
+        /// 获得前几行数据
126
+        /// </summary>
127
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
128
+        {
129
+            StringBuilder strSql = new StringBuilder();
130
+            strSql.Append("select ");
131
+            if (Top > 0)
132
+            {
133
+                strSql.Append(" top " + Top.ToString());
134
+            }
135
+            strSql.Append(" * ");
136
+            strSql.Append(" FROM T_Sys_OperateLogs ");
137
+            if (strWhere.Trim() != "")
138
+            {
139
+                strSql.Append(" where " + strWhere);
140
+            }
141
+            strSql.Append(" order by " + filedOrder);
142
+            return DbHelperSQL.Query(strSql.ToString());
143
+        }
144
+
145
+        /// <summary>
146
+        /// 获取记录总数
147
+        /// </summary>
148
+        public int GetRecordCount(string strWhere)
149
+        {
150
+            StringBuilder strSql = new StringBuilder();
151
+            strSql.Append("select count(1) FROM T_Sys_OperateLogs ");
152
+            if (strWhere.Trim() != "")
153
+            {
154
+                strSql.Append(" where " + strWhere);
155
+            }
156
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
157
+            if (obj == null)
158
+            {
159
+                return 0;
160
+            }
161
+            else
162
+            {
163
+                return Convert.ToInt32(obj);
164
+            }
165
+        }
166
+        /// <summary>
167
+        /// 分页获取数据列表
168
+        /// </summary>
169
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
170
+        {
171
+            StringBuilder strSql = new StringBuilder();
172
+            strSql.Append("SELECT * FROM ( ");
173
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
174
+            if (!string.IsNullOrEmpty(orderby.Trim()))
175
+            {
176
+                strSql.Append("order by T." + orderby);
177
+            }
178
+            else
179
+            {
180
+                strSql.Append("order by T.F_Id desc");
181
+            }
182
+            strSql.Append(")AS Row, T.*  from T_Sys_OperateLogs T ");
183
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
184
+            {
185
+                strSql.Append(" WHERE " + strWhere);
186
+            }
187
+            strSql.Append(" ) TT");
188
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
189
+            return DbHelperSQL.Query(strSql.ToString());
190
+        }
191
+        
192
+        #endregion  BasicMethod
193
+        #region  ExtensionMethod
194
+
195
+        #endregion  ExtensionMethod
196
+    }
197
+}

+ 455 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_MaterialManage.cs

@@ -0,0 +1,455 @@
1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Data.SqlClient;
6
+using System.Linq;
7
+using System.Text;
8
+using System.Threading.Tasks;
9
+
10
+namespace CallCenterApi.DAL
11
+{
12
+    /// <summary>
13
+	/// 数据访问类:T_Wo_MaterialManage
14
+	/// </summary>
15
+	public partial class T_Wo_MaterialManage
16
+    {
17
+        public T_Wo_MaterialManage()
18
+        { }
19
+        #region  BasicMethod
20
+        /// <summary>
21
+        /// 是否存在该记录
22
+        /// </summary>
23
+        public bool Exists(int F_Id)
24
+        {
25
+            StringBuilder strSql = new StringBuilder();
26
+            strSql.Append("select count(1) from T_Wo_MaterialManage");
27
+            strSql.Append(" where F_Id=@F_Id");
28
+            SqlParameter[] parameters = {
29
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
30
+            };
31
+            parameters[0].Value = F_Id;
32
+
33
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
34
+        }
35
+
36
+
37
+        /// <summary>
38
+		/// 增加一条数据
39
+		/// </summary>
40
+		public int Add(CallCenterApi.Model.T_Wo_MaterialManage model)
41
+        {
42
+            StringBuilder strSql = new StringBuilder();
43
+            strSql.Append("insert into T_Wo_MaterialManage(");
44
+            strSql.Append("F_MaterialCode,F_MaterialName,F_Model,F_Specs,F_Level1,F_Level2,F_Level3,F_Brand,F_MaterialEffect,F_Pipeline,F_Craft,F_Remark,F_CreateBy,F_CreateOn,F_UpdateCount,F_UpdateBy,F_UpdateOn,F_IsDelete,F_DeleteBy,F_DeleteOn)");
45
+            strSql.Append(" values (");
46
+            strSql.Append("@F_MaterialCode,@F_MaterialName,@F_Model,@F_Specs,@F_Level1,@F_Level2,@F_Level3,@F_Brand,@F_MaterialEffect,@F_Pipeline,@F_Craft,@F_Remark,@F_CreateBy,@F_CreateOn,@F_UpdateCount,@F_UpdateBy,@F_UpdateOn,@F_IsDelete,@F_DeleteBy,@F_DeleteOn)");
47
+            strSql.Append(";select @@IDENTITY");
48
+            SqlParameter[] parameters = {
49
+                    new SqlParameter("@F_MaterialCode", SqlDbType.NVarChar,11),
50
+                    new SqlParameter("@F_MaterialName", SqlDbType.NVarChar,2000),
51
+                    new SqlParameter("@F_Model", SqlDbType.NVarChar,500),
52
+                    new SqlParameter("@F_Specs", SqlDbType.NVarChar,500),
53
+                    new SqlParameter("@F_Level1", SqlDbType.NVarChar,500),
54
+                    new SqlParameter("@F_Level2", SqlDbType.NVarChar,500),
55
+                    new SqlParameter("@F_Level3", SqlDbType.NVarChar,500),
56
+                    new SqlParameter("@F_Brand", SqlDbType.NVarChar,500),
57
+                    new SqlParameter("@F_MaterialEffect", SqlDbType.NText),
58
+                    new SqlParameter("@F_Pipeline", SqlDbType.NVarChar,500),
59
+                    new SqlParameter("@F_Craft", SqlDbType.NVarChar,500),
60
+                    new SqlParameter("@F_Remark", SqlDbType.NText),
61
+                    new SqlParameter("@F_CreateBy", SqlDbType.VarChar,50),
62
+                    new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
63
+                    new SqlParameter("@F_UpdateCount", SqlDbType.Int,4),
64
+                    new SqlParameter("@F_UpdateBy", SqlDbType.VarChar,50),
65
+                    new SqlParameter("@F_UpdateOn", SqlDbType.DateTime),
66
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
67
+                    new SqlParameter("@F_DeleteBy", SqlDbType.VarChar,50),
68
+                    new SqlParameter("@F_DeleteOn", SqlDbType.DateTime)};
69
+            parameters[0].Value = model.F_MaterialCode;
70
+            parameters[1].Value = model.F_MaterialName;
71
+            parameters[2].Value = model.F_Model;
72
+            parameters[3].Value = model.F_Specs;
73
+            parameters[4].Value = model.F_Level1;
74
+            parameters[5].Value = model.F_Level2;
75
+            parameters[6].Value = model.F_Level3;
76
+            parameters[7].Value = model.F_Brand;
77
+            parameters[8].Value = model.F_MaterialEffect;
78
+            parameters[9].Value = model.F_Pipeline;
79
+            parameters[10].Value = model.F_Craft;
80
+            parameters[11].Value = model.F_Remark;
81
+            parameters[12].Value = model.F_CreateBy;
82
+            parameters[13].Value = model.F_CreateOn;
83
+            parameters[14].Value = model.F_UpdateCount;
84
+            parameters[15].Value = model.F_UpdateBy;
85
+            parameters[16].Value = model.F_UpdateOn;
86
+            parameters[17].Value = model.F_IsDelete;
87
+            parameters[18].Value = model.F_DeleteBy;
88
+            parameters[19].Value = model.F_DeleteOn;
89
+
90
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
91
+            if (obj == null)
92
+            {
93
+                return 0;
94
+            }
95
+            else
96
+            {
97
+                return Convert.ToInt32(obj);
98
+            }
99
+        }
100
+        /// <summary>
101
+        /// 更新一条数据
102
+        /// </summary>
103
+        public bool Update(CallCenterApi.Model.T_Wo_MaterialManage model)
104
+        {
105
+            StringBuilder strSql = new StringBuilder();
106
+            strSql.Append("update T_Wo_MaterialManage set ");
107
+            strSql.Append("F_MaterialCode=@F_MaterialCode,");
108
+            strSql.Append("F_MaterialName=@F_MaterialName,");
109
+            strSql.Append("F_Model=@F_Model,");
110
+            strSql.Append("F_Specs=@F_Specs,");
111
+            strSql.Append("F_Level1=@F_Level1,");
112
+            strSql.Append("F_Level2=@F_Level2,");
113
+            strSql.Append("F_Level3=@F_Level3,");
114
+            strSql.Append("F_Brand=@F_Brand,");
115
+            strSql.Append("F_MaterialEffect=@F_MaterialEffect,");
116
+            strSql.Append("F_Pipeline=@F_Pipeline,");
117
+            strSql.Append("F_Craft=@F_Craft,");
118
+            strSql.Append("F_Remark=@F_Remark,");
119
+            strSql.Append("F_CreateBy=@F_CreateBy,");
120
+            strSql.Append("F_CreateOn=@F_CreateOn,");
121
+            strSql.Append("F_UpdateCount=@F_UpdateCount,");
122
+            strSql.Append("F_UpdateBy=@F_UpdateBy,");
123
+            strSql.Append("F_UpdateOn=@F_UpdateOn,");
124
+            strSql.Append("F_IsDelete=@F_IsDelete,");
125
+            strSql.Append("F_DeleteBy=@F_DeleteBy,");
126
+            strSql.Append("F_DeleteOn=@F_DeleteOn");
127
+            strSql.Append(" where F_Id=@F_Id");
128
+            SqlParameter[] parameters = {
129
+                    new SqlParameter("@F_MaterialCode", SqlDbType.NVarChar,11),
130
+                    new SqlParameter("@F_MaterialName", SqlDbType.NVarChar,2000),
131
+                    new SqlParameter("@F_Model", SqlDbType.NVarChar,500),
132
+                    new SqlParameter("@F_Specs", SqlDbType.NVarChar,500),
133
+                    new SqlParameter("@F_Level1", SqlDbType.NVarChar,500),
134
+                    new SqlParameter("@F_Level2", SqlDbType.NVarChar,500),
135
+                    new SqlParameter("@F_Level3", SqlDbType.NVarChar,500),
136
+                    new SqlParameter("@F_Brand", SqlDbType.NVarChar,500),
137
+                    new SqlParameter("@F_MaterialEffect", SqlDbType.NText),
138
+                    new SqlParameter("@F_Pipeline", SqlDbType.NVarChar,500),
139
+                    new SqlParameter("@F_Craft", SqlDbType.NVarChar,500),
140
+                    new SqlParameter("@F_Remark", SqlDbType.NText),
141
+                    new SqlParameter("@F_CreateBy", SqlDbType.VarChar,50),
142
+                    new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
143
+                    new SqlParameter("@F_UpdateCount", SqlDbType.Int,4),
144
+                    new SqlParameter("@F_UpdateBy", SqlDbType.VarChar,50),
145
+                    new SqlParameter("@F_UpdateOn", SqlDbType.DateTime),
146
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
147
+                    new SqlParameter("@F_DeleteBy", SqlDbType.VarChar,50),
148
+                    new SqlParameter("@F_DeleteOn", SqlDbType.DateTime),
149
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)};
150
+            parameters[0].Value = model.F_MaterialCode;
151
+            parameters[1].Value = model.F_MaterialName;
152
+            parameters[2].Value = model.F_Model;
153
+            parameters[3].Value = model.F_Specs;
154
+            parameters[4].Value = model.F_Level1;
155
+            parameters[5].Value = model.F_Level2;
156
+            parameters[6].Value = model.F_Level3;
157
+            parameters[7].Value = model.F_Brand;
158
+            parameters[8].Value = model.F_MaterialEffect;
159
+            parameters[9].Value = model.F_Pipeline;
160
+            parameters[10].Value = model.F_Craft;
161
+            parameters[11].Value = model.F_Remark;
162
+            parameters[12].Value = model.F_CreateBy;
163
+            parameters[13].Value = model.F_CreateOn;
164
+            parameters[14].Value = model.F_UpdateCount;
165
+            parameters[15].Value = model.F_UpdateBy;
166
+            parameters[16].Value = model.F_UpdateOn;
167
+            parameters[17].Value = model.F_IsDelete;
168
+            parameters[18].Value = model.F_DeleteBy;
169
+            parameters[19].Value = model.F_DeleteOn;
170
+            parameters[20].Value = model.F_Id;
171
+
172
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
173
+            if (rows > 0)
174
+            {
175
+                return true;
176
+            }
177
+            else
178
+            {
179
+                return false;
180
+            }
181
+        }
182
+
183
+        /// <summary>
184
+        /// 删除一条数据
185
+        /// </summary>
186
+        public bool Delete(int F_Id, string usercode, DateTime deltime)
187
+        {
188
+
189
+            StringBuilder strSql = new StringBuilder();
190
+            //strSql.Append("delete from T_Wo_MaterialManage ");
191
+            strSql.Append("update T_Wo_MaterialManage set F_IsDelete=1,");
192
+            strSql.Append("F_DeleteBy=@F_DeleteBy,");
193
+            strSql.Append("F_DeleteOn=@F_DeleteOn");
194
+            strSql.Append(" where F_Id=@F_Id");
195
+            SqlParameter[] parameters = {
196
+                    new SqlParameter("@F_DeleteBy", SqlDbType.VarChar,50),
197
+                    new SqlParameter("@F_DeleteOn", SqlDbType.DateTime),
198
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
199
+            };
200
+            parameters[0].Value = usercode;
201
+            parameters[1].Value = deltime;
202
+            parameters[2].Value = F_Id;
203
+
204
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
205
+            if (rows > 0)
206
+            {
207
+                return true;
208
+            }
209
+            else
210
+            {
211
+                return false;
212
+            }
213
+        }
214
+        /// <summary>
215
+        /// 批量删除数据
216
+        /// </summary>
217
+        public bool DeleteList(string F_Idlist, string usercode, DateTime deltime)
218
+        {
219
+            StringBuilder strSql = new StringBuilder();
220
+            //strSql.Append("delete from T_Wo_MaterialManage ");
221
+            strSql.Append("update T_Wo_MaterialManage set F_IsDelete=1,");
222
+            strSql.Append("F_DeleteBy=@F_DeleteBy,");
223
+            strSql.Append("F_DeleteOn=@F_DeleteOn");
224
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
225
+            SqlParameter[] parameters = {
226
+                    new SqlParameter("@F_DeleteBy", SqlDbType.VarChar,50),
227
+                    new SqlParameter("@F_DeleteOn", SqlDbType.DateTime)
228
+            };
229
+            parameters[0].Value = usercode;
230
+            parameters[1].Value = deltime;
231
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
232
+            if (rows > 0)
233
+            {
234
+                return true;
235
+            }
236
+            else
237
+            {
238
+                return false;
239
+            }
240
+        }
241
+
242
+
243
+        /// <summary>
244
+        /// 得到一个对象实体
245
+        /// </summary>
246
+        public CallCenterApi.Model.T_Wo_MaterialManage GetModel(int F_Id)
247
+        {
248
+
249
+            StringBuilder strSql = new StringBuilder();
250
+            strSql.Append("select  top 1 * from T_Wo_MaterialManage ");
251
+            strSql.Append(" where F_Id=@F_Id");
252
+            SqlParameter[] parameters = {
253
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
254
+            };
255
+            parameters[0].Value = F_Id;
256
+
257
+            CallCenterApi.Model.T_Wo_MaterialManage model = new CallCenterApi.Model.T_Wo_MaterialManage();
258
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
259
+            if (ds.Tables[0].Rows.Count > 0)
260
+            {
261
+                return DataRowToModel(ds.Tables[0].Rows[0]);
262
+            }
263
+            else
264
+            {
265
+                return null;
266
+            }
267
+        }
268
+
269
+
270
+        /// <summary>
271
+		/// 得到一个对象实体
272
+		/// </summary>
273
+		public CallCenterApi.Model.T_Wo_MaterialManage DataRowToModel(DataRow row)
274
+        {
275
+            CallCenterApi.Model.T_Wo_MaterialManage model = new CallCenterApi.Model.T_Wo_MaterialManage();
276
+            if (row != null)
277
+            {
278
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
279
+                {
280
+                    model.F_Id = int.Parse(row["F_Id"].ToString());
281
+                }
282
+                if (row["F_MaterialCode"] != null)
283
+                {
284
+                    model.F_MaterialCode = row["F_MaterialCode"].ToString();
285
+                }
286
+                if (row["F_MaterialName"] != null)
287
+                {
288
+                    model.F_MaterialName = row["F_MaterialName"].ToString();
289
+                }
290
+                if (row["F_Model"] != null)
291
+                {
292
+                    model.F_Model = row["F_Model"].ToString();
293
+                }
294
+                if (row["F_Specs"] != null)
295
+                {
296
+                    model.F_Specs = row["F_Specs"].ToString();
297
+                }
298
+                if (row["F_Level1"] != null)
299
+                {
300
+                    model.F_Level1 = row["F_Level1"].ToString();
301
+                }
302
+                if (row["F_Level2"] != null)
303
+                {
304
+                    model.F_Level2 = row["F_Level2"].ToString();
305
+                }
306
+                if (row["F_Level3"] != null)
307
+                {
308
+                    model.F_Level3 = row["F_Level3"].ToString();
309
+                }
310
+                if (row["F_Brand"] != null)
311
+                {
312
+                    model.F_Brand = row["F_Brand"].ToString();
313
+                }
314
+                if (row["F_MaterialEffect"] != null)
315
+                {
316
+                    model.F_MaterialEffect = row["F_MaterialEffect"].ToString();
317
+                }
318
+                if (row["F_Pipeline"] != null)
319
+                {
320
+                    model.F_Pipeline = row["F_Pipeline"].ToString();
321
+                }
322
+                if (row["F_Craft"] != null)
323
+                {
324
+                    model.F_Craft = row["F_Craft"].ToString();
325
+                }
326
+                if (row["F_Remark"] != null)
327
+                {
328
+                    model.F_Remark = row["F_Remark"].ToString();
329
+                }
330
+                if (row["F_CreateBy"] != null)
331
+                {
332
+                    model.F_CreateBy = row["F_CreateBy"].ToString();
333
+                }
334
+                if (row["F_CreateOn"] != null && row["F_CreateOn"].ToString() != "")
335
+                {
336
+                    model.F_CreateOn = DateTime.Parse(row["F_CreateOn"].ToString());
337
+                }
338
+                if (row["F_UpdateCount"] != null && row["F_UpdateCount"].ToString() != "")
339
+                {
340
+                    model.F_UpdateCount = int.Parse(row["F_UpdateCount"].ToString());
341
+                }
342
+                if (row["F_UpdateBy"] != null)
343
+                {
344
+                    model.F_UpdateBy = row["F_UpdateBy"].ToString();
345
+                }
346
+                if (row["F_UpdateOn"] != null && row["F_UpdateOn"].ToString() != "")
347
+                {
348
+                    model.F_UpdateOn = DateTime.Parse(row["F_UpdateOn"].ToString());
349
+                }
350
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
351
+                {
352
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
353
+                }
354
+                if (row["F_DeleteBy"] != null)
355
+                {
356
+                    model.F_DeleteBy = row["F_DeleteBy"].ToString();
357
+                }
358
+                if (row["F_DeleteOn"] != null && row["F_DeleteOn"].ToString() != "")
359
+                {
360
+                    model.F_DeleteOn = DateTime.Parse(row["F_DeleteOn"].ToString());
361
+                }
362
+            }
363
+            return model;
364
+        }
365
+
366
+        /// <summary>
367
+        /// 获得数据列表
368
+        /// </summary>
369
+        public DataSet GetList(string strWhere)
370
+        {
371
+            StringBuilder strSql = new StringBuilder();
372
+            strSql.Append("select * ");
373
+            strSql.Append(" FROM T_Wo_MaterialManage ");
374
+            if (strWhere.Trim() != "")
375
+            {
376
+                strSql.Append(" where " + strWhere);
377
+            }
378
+            return DbHelperSQL.Query(strSql.ToString());
379
+        }
380
+
381
+        /// <summary>
382
+        /// 获得前几行数据
383
+        /// </summary>
384
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
385
+        {
386
+            StringBuilder strSql = new StringBuilder();
387
+            strSql.Append("select ");
388
+            if (Top > 0)
389
+            {
390
+                strSql.Append(" top " + Top.ToString());
391
+            }
392
+            strSql.Append(" * ");
393
+            strSql.Append(" FROM T_Wo_MaterialManage ");
394
+            if (strWhere.Trim() != "")
395
+            {
396
+                strSql.Append(" where " + strWhere);
397
+            }
398
+            strSql.Append(" order by " + filedOrder);
399
+            return DbHelperSQL.Query(strSql.ToString());
400
+        }
401
+
402
+        /// <summary>
403
+        /// 获取记录总数
404
+        /// </summary>
405
+        public int GetRecordCount(string strWhere)
406
+        {
407
+            StringBuilder strSql = new StringBuilder();
408
+            strSql.Append("select count(1) FROM T_Wo_MaterialManage ");
409
+            if (strWhere.Trim() != "")
410
+            {
411
+                strSql.Append(" where " + strWhere);
412
+            }
413
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
414
+            if (obj == null)
415
+            {
416
+                return 0;
417
+            }
418
+            else
419
+            {
420
+                return Convert.ToInt32(obj);
421
+            }
422
+        }
423
+        /// <summary>
424
+        /// 分页获取数据列表
425
+        /// </summary>
426
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
427
+        {
428
+            StringBuilder strSql = new StringBuilder();
429
+            strSql.Append("SELECT * FROM ( ");
430
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
431
+            if (!string.IsNullOrEmpty(orderby.Trim()))
432
+            {
433
+                strSql.Append("order by T." + orderby);
434
+            }
435
+            else
436
+            {
437
+                strSql.Append("order by T.F_Id desc");
438
+            }
439
+            strSql.Append(")AS Row, T.*  from T_Wo_MaterialManage T ");
440
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
441
+            {
442
+                strSql.Append(" WHERE " + strWhere);
443
+            }
444
+            strSql.Append(" ) TT");
445
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
446
+            return DbHelperSQL.Query(strSql.ToString());
447
+        }
448
+        
449
+
450
+        #endregion  BasicMethod
451
+        #region  ExtensionMethod
452
+
453
+        #endregion  ExtensionMethod
454
+    }
455
+}

+ 3 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -242,6 +242,7 @@
242 242
     <Compile Include="Controllers\weixin\WxCustomController.cs" />
243 243
     <Compile Include="Controllers\weixin\WxLoginController.cs" />
244 244
     <Compile Include="Controllers\weixin\WxReceiveController.cs" />
245
+    <Compile Include="Controllers\workorder\MaterialManageController.cs" />
245 246
     <Compile Include="Controllers\workorder\WorkOrderController.cs" />
246 247
     <Compile Include="Controllers\workorder\WorkOrderLogsController.cs" />
247 248
     <Compile Include="Controllers\workorder\WorkTypeController.cs" />
@@ -292,6 +293,7 @@
292 293
     <Compile Include="Models\Input\SysConfigInput.cs" />
293 294
     <Compile Include="Models\Input\UserAccountInput.cs" />
294 295
     <Compile Include="Models\Input\WoBillInput.cs" />
296
+    <Compile Include="Models\Input\WoMaterialManageInput.cs" />
295 297
     <Compile Include="Properties\AssemblyInfo.cs" />
296 298
   </ItemGroup>
297 299
   <ItemGroup>
@@ -361,6 +363,7 @@
361 363
     <Folder Include="Views\Knowledge\" />
362 364
     <Folder Include="Views\Login\" />
363 365
     <Folder Include="Views\Log\" />
366
+    <Folder Include="Views\MaterialManage\" />
364 367
     <Folder Include="Views\Mobiledata\" />
365 368
     <Folder Include="Views\Module\" />
366 369
     <Folder Include="Views\Msg\" />

+ 435 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/MaterialManageController.cs

@@ -0,0 +1,435 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.Common;
3
+using CallCenterApi.DB;
4
+using CallCenterApi.Interface.Controllers.Base;
5
+using CallCenterApi.Interface.Models.Input;
6
+using CallCenterApi.Model;
7
+using System;
8
+using System.Collections.Generic;
9
+using System.Data;
10
+using System.IO;
11
+using System.Linq;
12
+using System.Text.RegularExpressions;
13
+using System.Web;
14
+using System.Web.Mvc;
15
+
16
+namespace CallCenterApi.Interface.Controllers.workorder
17
+{
18
+    public class MaterialManageController : BaseController
19
+    {
20
+        BLL.T_Wo_MaterialManage mmBLL = new BLL.T_Wo_MaterialManage();
21
+        BLL.T_Sys_DictionaryValue dvBLL = new BLL.T_Sys_DictionaryValue();
22
+        BLL.T_Sys_UserAccount userBLL = new BLL.T_Sys_UserAccount();
23
+        // 获取物料列表
24
+        public ActionResult GetList(string MaterialCode, string MaterialName,int pageindex = 1, int pagesize = 10)
25
+        {
26
+            string sql = " and F_IsDelete=0";
27
+            #region 筛选
28
+            if (!string.IsNullOrWhiteSpace(MaterialCode))
29
+            {//先验证物料编码为11位纯数字,再查询
30
+                if (MaterialCode.Length != 11)
31
+                    return Error("物料编号必须是11位");
32
+                if (!Regex.IsMatch(MaterialCode, @"^d{11}$"))
33
+                    return Error("物料编号必须为数字");
34
+                sql += " and F_MaterialCode='" + MaterialCode + "'";
35
+            }
36
+            if(!string.IsNullOrWhiteSpace(MaterialName))
37
+            {
38
+                sql += " and F_MaterialName like '%" + MaterialName + "%'";
39
+            }
40
+            #endregion
41
+            int recordCount = 0;
42
+            DataTable dt = BLL.PagerBLL.GetListPager(
43
+                "T_Wo_MaterialManage",
44
+                "F_Id",
45
+                "*,dbo.GetUserName(F_CreateBy) as F_CreateByName",
46
+                sql,
47
+                "ORDER BY F_RepositoryId desc",
48
+                pagesize,
49
+                pageindex,
50
+                true,
51
+                out recordCount);
52
+
53
+            var obj = new
54
+            {
55
+                rows = dt,
56
+                total = recordCount
57
+            };
58
+
59
+            return Content(obj.ToJson());
60
+        }
61
+
62
+        //获取物料
63
+        public ActionResult GetInfo(string infoid)
64
+        {
65
+            if (infoid != null && infoid.Trim() != "")
66
+            {
67
+                Model.T_Wo_MaterialManage dModel = mmBLL.GetModel(int.Parse(infoid.Trim()));
68
+                if (dModel != null)
69
+                {
70
+                    var dvList = dvBLL.GetModelList(" F_DictionaryFlag in ('WLPP','WLFHFFX','WLCPX') ");
71
+                    var createusername = userBLL.GetModel(dModel.F_CreateBy);
72
+                    var obj = new
73
+                    {
74
+                        model = dModel,
75
+                        CreateByName = createusername
76
+                    };
77
+
78
+                    return Success("获取物料信息成功", obj);
79
+                }
80
+                else
81
+                {
82
+                    return Error("获取物料信息失败");
83
+                }
84
+            }
85
+            else
86
+            {
87
+                return Error("获取参数失败");
88
+            }
89
+        }
90
+
91
+        //[Authority]
92
+        //添加物料
93
+        public ActionResult AddInfo(WoMaterialManageInput input)
94
+        {
95
+            Model.T_Wo_MaterialManage dModel = new Model.T_Wo_MaterialManage();
96
+            #region 验证物料编码为11位纯数字
97
+            if (string.IsNullOrWhiteSpace(input.F_MaterialCode))
98
+                return Error("物料编号不能为空");
99
+            if (!valcode(input.F_MaterialCode))
100
+                return Error("物料编号必须是11位数字");
101
+            #endregion
102
+            #region
103
+            dModel.F_MaterialCode = input.F_MaterialCode;//物料编号
104
+            dModel.F_MaterialName = input.F_MaterialName;//物料名称
105
+            dModel.F_Model = input.F_Model;//型号
106
+            dModel.F_Specs = input.F_Specs;//规格
107
+            dModel.F_Level1 = input.F_Level1;//一级分类
108
+            dModel.F_Level2 = input.F_Level2;//二级分类
109
+            dModel.F_Level3 = input.F_Level3;//三级分类
110
+            dModel.F_Brand = input.F_Brand;//品牌
111
+            dModel.F_MaterialEffect = input.F_MaterialEffect;//复合肥肥效
112
+            dModel.F_Craft = input.F_Craft;//工艺
113
+            dModel.F_Pipeline = input.F_Pipeline;//产品线
114
+            dModel.F_Remark = input.F_Remark;
115
+            
116
+            dModel.F_IsDelete = 0;
117
+            dModel.F_CreateOn = DateTime.Now;
118
+            dModel.F_CreateBy = CurrentUser.UserData.F_UserCode;
119
+            #endregion
120
+            int b = mmBLL.Add(dModel);
121
+            if (b > 0)
122
+            {
123
+                addoptlog(CurrentUser.UserData.F_UserCode, DTRequest.GetIP(), EnumOpt.add.ToString(), b.ToString(), "添加成功,物料编号为"+ dModel.F_MaterialCode+"的资料");
124
+                return Success("添加成功");
125
+            }
126
+            else
127
+            {
128
+                return Error("添加失败");
129
+            }
130
+
131
+        }
132
+        //[Authority]
133
+        //编辑物料
134
+        public ActionResult EditInfo(WoMaterialManageInput input)
135
+        {
136
+            if (input.F_Id > 0)
137
+            {
138
+                Model.T_Wo_MaterialManage dModel = mmBLL.GetModel(input.F_Id);
139
+                if (dModel != null)
140
+                {
141
+                    #region 验证物料编码为11位纯数字
142
+                    if (string.IsNullOrWhiteSpace(input.F_MaterialCode))
143
+                        return Error("物料编号不能为空");
144
+                    if (!valcode(input.F_MaterialCode))
145
+                        return Error("物料编号必须是11位数字");
146
+                    #endregion
147
+                    #region
148
+                    dModel.F_MaterialCode = input.F_MaterialCode;//物料编号
149
+                    dModel.F_MaterialName = input.F_MaterialName;//物料名称
150
+                    dModel.F_Model = input.F_Model;//型号
151
+                    dModel.F_Specs = input.F_Specs;//规格
152
+                    dModel.F_Level1 = input.F_Level1;//一级分类
153
+                    dModel.F_Level2 = input.F_Level2;//二级分类
154
+                    dModel.F_Level3 = input.F_Level3;//三级分类
155
+                    dModel.F_Brand = input.F_Brand;//品牌
156
+                    dModel.F_MaterialEffect = input.F_MaterialEffect;//复合肥肥效
157
+                    dModel.F_Craft = input.F_Craft;//工艺
158
+                    dModel.F_Pipeline = input.F_Pipeline;//产品线
159
+                    dModel.F_Remark = input.F_Remark;
160
+
161
+                    dModel.F_UpdateBy = CurrentUser.UserData.F_UserCode;
162
+                    dModel.F_UpdateOn = DateTime.Now;
163
+                    dModel.F_UpdateCount += 1;
164
+                    #endregion
165
+                    bool b = mmBLL.Update(dModel);
166
+                    if (b)
167
+                    {
168
+                        addoptlog(CurrentUser.UserData.F_UserCode, DTRequest.GetIP(), EnumOpt.edit.ToString(), dModel.F_Id.ToString(), "编辑成功,物料编号为" + dModel.F_MaterialCode + "的资料");
169
+                        return Success("编辑成功");
170
+                    }
171
+                    else
172
+                    {
173
+                        return Success("编辑失败");
174
+                    }
175
+                }
176
+                else
177
+                    return Error("获取信息失败");
178
+            }
179
+            else
180
+            {
181
+                return Error("获取参数失败");
182
+            }
183
+
184
+        }
185
+        //[Authority]
186
+        //批量删除物料
187
+        public ActionResult DelInfos(string[] ids)
188
+        {
189
+            if (ids != null && ids.Length > 0)
190
+            {
191
+                string idd = " ";
192
+                foreach (string str in ids)
193
+                {
194
+                    idd += str + ",";
195
+                }
196
+                string optuser = CurrentUser.UserData.F_UserCode;
197
+                DateTime dtnow = DateTime.Now;
198
+                if (new BLL.T_Wo_MaterialManage().DeleteList(idd.TrimEnd(','), optuser, dtnow))
199
+                {
200
+                    if (ids.Length > 1)
201
+                        addoptlog(optuser, DTRequest.GetIP(), EnumOpt.deletion.ToString(), idd.TrimEnd(','), "批量删除成功");
202
+                    else
203
+                        addoptlog(optuser, DTRequest.GetIP(), EnumOpt.delete.ToString(), idd.TrimEnd(','), "删除成功");
204
+                    return Success("删除成功");
205
+                }
206
+                else
207
+                    return Error("删除失败");
208
+            }
209
+            else
210
+            {
211
+                return Error("获取参数失败");
212
+            }
213
+        }
214
+
215
+        /// <summary>
216
+        /// 导入excel
217
+        /// </summary>
218
+        /// <returns></returns>
219
+        public ActionResult ImportExcel()
220
+        {
221
+            string userscode = CurrentUser.UserData.F_UserCode;
222
+            HttpPostedFile _upFile = RequestString.GetFile("upFile");
223
+            if (_upFile != null)
224
+            {
225
+                int headrow = 0;
226
+                #region 上传文件
227
+                string filepath = "";
228
+                string datepath = DateTime.Now.ToString("yyyyMMddHHMMss");
229
+                string aLastName = Path.GetExtension(_upFile.FileName);
230
+                string oriname = Path.GetFileNameWithoutExtension(_upFile.FileName);
231
+                if (aLastName != "xls" && aLastName != "xlsx")
232
+                {
233
+                    return Error("文件类型错误,请选择Excel文件");
234
+                }
235
+                string newpath = datepath + "_" + _upFile.FileName;
236
+                if (!Directory.Exists(Server.MapPath(this.Request.ApplicationPath + "\\ExcelData")))
237
+                {
238
+                    Directory.CreateDirectory(Server.MapPath(this.Request.ApplicationPath + "\\ExcelData"));
239
+                }
240
+                filepath = this.Request.ApplicationPath + "/ExcelData/" + newpath;
241
+                string PhysicalPath = Server.MapPath(filepath);
242
+                _upFile.SaveAs(PhysicalPath);
243
+                #endregion
244
+                #region 添加附件日志
245
+                Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
246
+                model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
247
+                model_T_Sys_Accessories.F_FileName = newpath;//附件名称
248
+                model_T_Sys_Accessories.F_FileType = aLastName;//附件类型
249
+                model_T_Sys_Accessories.F_FileUrl = filepath;//附件地址
250
+                model_T_Sys_Accessories.F_UserCode = userscode;//上传人  
251
+                model_T_Sys_Accessories.F_OriName = oriname;
252
+                int fid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
253
+                #endregion
254
+                NPOIHelper np = new NPOIHelper();
255
+                DataTable dt = np.ExcelToTable(_upFile, headrow);
256
+                string msg = string.Empty;
257
+                if (dt == null || dt.Rows.Count == 0)
258
+                    return Error("文件没有数据");
259
+                else
260
+                {
261
+                    foreach (DataRow dr in dt.Rows)
262
+                    {
263
+                        #region 数据入库
264
+                        headrow = headrow + 1;
265
+                        
266
+                        if (dr["物料管理"].ToString() != "" && valcode(dr["物料管理"].ToString()))
267
+                        {
268
+                            Model.T_Wo_MaterialManage dModel = new Model.T_Wo_MaterialManage();
269
+                            dModel.F_MaterialCode = dr["物料管理"].ToString();//物料编号
270
+                            dModel.F_MaterialName = dr["物料名称"].ToString();//物料名称
271
+                            dModel.F_Model = dr["型号"].ToString();//型号
272
+                            dModel.F_Specs = dr["规格"].ToString();//规格
273
+                            dModel.F_Level1 = dr["一级分类"].ToString();//一级分类
274
+                            dModel.F_Level2 = dr["二级分类"].ToString();//二级分类
275
+                            dModel.F_Level3 = dr["三级分类"].ToString();//三级分类
276
+                            dModel.F_Brand = dr["品牌"].ToString();//品牌
277
+                            dModel.F_MaterialEffect = dr["复合肥肥效"].ToString();//复合肥肥效
278
+                            dModel.F_Pipeline = dr["产品线"].ToString();//产品线
279
+                            dModel.F_Craft = dr["工艺"].ToString();//工艺
280
+                            dModel.F_CreateBy = userscode;
281
+                            dModel.F_CreateOn = DateTime.Now;
282
+                            dModel.F_IsDelete = 0;
283
+                            var res = mmBLL.Add(dModel);
284
+                            if(res>0)
285
+                            {
286
+                                addoptlog(userscode, DTRequest.GetIP(), EnumOpt.import.ToString(), res.ToString(), "导入成功,导入的文件为:"+ newpath+",当前为第"+ headrow + "行");
287
+                            }
288
+                            else
289
+                            {
290
+                                
291
+                                msg = msg + "第" + headrow + "行,导入失败<br>";
292
+                            }
293
+                        }
294
+                        else
295
+                            msg = msg + "第" + headrow + "行,物料编号为空或格式不正确,未导入<br>";
296
+                        #endregion
297
+                    }
298
+                    if (string.IsNullOrEmpty(msg))
299
+                        return Success("导入成功 ");
300
+                    else
301
+                        return Error(msg);
302
+                }
303
+
304
+            }
305
+            return Error("文件不能为空");
306
+        }
307
+
308
+        
309
+        #region 上传附件
310
+        public DataTable GetFileData(string ids, string prefix)
311
+        {
312
+            DataTable dt = new DataTable();
313
+            if (!string.IsNullOrEmpty(ids))
314
+            {
315
+                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_FileId in (" + ids + ")").Tables[0];
316
+                foreach (DataRow dr in dt.Rows)
317
+                {
318
+                    dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
319
+                }
320
+            }
321
+            return dt;
322
+        }
323
+
324
+        /// <summary>
325
+        /// 上传附件
326
+        /// </summary>
327
+        /// <returns></returns>
328
+        [Authority]
329
+        public ActionResult UpLoadProcess(string id, string name, string type, string lastModifiedDate, int size, HttpPostedFileBase file)
330
+        {
331
+            try
332
+            {
333
+                if (file == null) return Error("参数传入失败");
334
+                if (Request.Files.Count == 0) return Error("保存失败");
335
+
336
+                string userCode = CurrentUser.UserData.F_UserCode;
337
+                string filePathName = string.Empty;
338
+                #region 保存文件到本地路径
339
+                string path = "/Upload/Files/" + DateTime.Now.ToString("yyyy/MM/dd") + "/";
340
+                string localPath = Server.MapPath(Path.Combine(HttpRuntime.AppDomainAppPath, path));
341
+                string ex = Path.GetExtension(file.FileName);
342
+                string oriname = Path.GetFileNameWithoutExtension(file.FileName);
343
+                filePathName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + Guid.NewGuid().ToString("N") + ex;
344
+                if (!System.IO.Directory.Exists(localPath))
345
+                {
346
+                    System.IO.Directory.CreateDirectory(localPath);
347
+                }
348
+                string physicalpath = Path.Combine(localPath, filePathName);
349
+                file.SaveAs(physicalpath);
350
+                #endregion
351
+                #region 读取配置的上传路径-原文件和修改过格式的文件均上传至此
352
+                string savedir = Configs.GetValue("saveloc");
353
+                if (!System.IO.Directory.Exists(savedir))
354
+                {
355
+                    System.IO.Directory.CreateDirectory(savedir);
356
+                }
357
+                #endregion
358
+                if (!string.IsNullOrEmpty(physicalpath))
359
+                {
360
+                    #region 上传到ftp
361
+                    uploadFile upfile = new uploadFile();
362
+                    //通过读取配置文件,获取数据库
363
+                    string _ftp = Configs.GetValue("ftp");
364
+                    string _acc = Configs.GetValue("account");
365
+                    string _pwd = Configs.GetValue("password");
366
+
367
+                    upfile.ftpPath = _ftp;
368
+                    upfile.ftpUserID = _acc;
369
+                    upfile.ftpPassword = _pwd;
370
+                    //20180207 原文件同时保存
371
+                    string uploadBeforres = upfile.UploadLocalToFtp(physicalpath);
372
+                    #endregion
373
+                    if (uploadBeforres.Equals("上传成功!"))
374
+                    {
375
+                        #region 添加日志
376
+                        Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
377
+                        model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
378
+                        model_T_Sys_Accessories.F_FileName = filePathName;//附件名称
379
+                        model_T_Sys_Accessories.F_FileType = type;//附件类型
380
+                        model_T_Sys_Accessories.F_FileUrl = (filePathName).Replace('\\', '/');//附件地址
381
+                        model_T_Sys_Accessories.F_Size = size;
382
+                        model_T_Sys_Accessories.F_UserCode = userCode;//上传人  
383
+                        model_T_Sys_Accessories.F_OriName = oriname;
384
+                        int fid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
385
+                        #endregion
386
+                        if (fid > 0)
387
+                        {
388
+                            //返回附件的ID
389
+                            model_T_Sys_Accessories.F_FileId = fid;//修改为返回对象以便查看图片
390
+                            return Success("文件上传成功", model_T_Sys_Accessories);
391
+                        }
392
+                        else
393
+                            return Success("文件上传成功,日志记录失败");
394
+                    }
395
+                    else
396
+                        return Error("文件上传失败,请重新上传,失败原因:" + uploadBeforres);
397
+                }
398
+                else
399
+                    return Error("格式修改出错,请重新上传");
400
+            }
401
+            catch (Exception ex)
402
+            {
403
+                return Error(ex.Message);
404
+            }
405
+        }
406
+
407
+        #endregion
408
+
409
+        #region 私有方法
410
+        /// <summary>
411
+        /// 验证物料编码为11位纯数字
412
+        /// </summary>
413
+        private bool valcode(string code)
414
+        {
415
+            var res = false;
416
+            //11位数字
417
+            if (code.Length == 11 && Regex.IsMatch(code, @"^d{11}$"))
418
+                res = true;
419
+            return res;
420
+        }
421
+        /// <summary>
422
+        /// 操作日志
423
+        /// </summary>
424
+        /// <param name="usercode">操作人工号</param>
425
+        /// <param name="ip">操作人IP</param>
426
+        /// <param name="optcode">操作编号</param>
427
+        /// <param name="optid">操作id</param>
428
+        /// <param name="des">操作描述</param>
429
+        private void addoptlog(string usercode, string ip, string optcode, string optid, string des)
430
+        {
431
+            new BLL.T_Sys_OperateLogs().AddOptLog("物料管理", usercode, ip, des, optcode, "T_Wo_MaterialManage", optid);
432
+        }
433
+        #endregion
434
+    }
435
+}

+ 63 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WoMaterialManageInput.cs

@@ -0,0 +1,63 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Web;
5
+
6
+namespace CallCenterApi.Interface.Models.Input
7
+{
8
+    public class WoMaterialManageInput
9
+    {
10
+        /// <summary>
11
+        /// ID
12
+        /// </summary>
13
+        public int F_Id { get; set; }
14
+        /// <summary>
15
+        /// 物料编码
16
+        /// </summary>
17
+        public string F_MaterialCode { get; set; }
18
+        /// <summary>
19
+        /// 物料编码
20
+        /// </summary>
21
+        public string F_MaterialName { get; set; }
22
+        /// <summary>
23
+        /// 型号
24
+        /// </summary>
25
+        public string F_Model { get; set; }
26
+        /// <summary>
27
+        /// 规格
28
+        /// </summary>
29
+        public string F_Specs { get; set; }
30
+        /// <summary>
31
+        /// 一级分类
32
+        /// </summary>
33
+        public string F_Level1 { get; set; }
34
+        /// <summary>
35
+        /// 二级分类
36
+        /// </summary>
37
+        public string F_Level2 { get; set; }
38
+        /// <summary>
39
+        /// 三级分类
40
+        /// </summary>
41
+        public string F_Level3 { get; set; }
42
+        /// <summary>
43
+        /// 品牌
44
+        /// </summary>
45
+        public string F_Brand { get; set; }
46
+        /// <summary>
47
+        /// 复合肥肥效
48
+        /// </summary>
49
+        public string F_MaterialEffect { get; set; }
50
+        /// <summary>
51
+        /// 产品线
52
+        /// </summary>
53
+        public string F_Pipeline { get; set; }
54
+        /// <summary>
55
+        /// 工艺
56
+        /// </summary>
57
+        public string F_Craft { get; set; }
58
+        /// <summary>
59
+        /// 备注
60
+        /// </summary>
61
+        public string F_Remark { get; set; }
62
+    }
63
+}

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj

@@ -106,6 +106,7 @@
106 106
     <Compile Include="T_Sys_MobileData.cs" />
107 107
     <Compile Include="T_Sys_ModuleFunctions.cs" />
108 108
     <Compile Include="T_Sys_ModuleInfo.cs" />
109
+    <Compile Include="T_Sys_OperateLogs.cs" />
109 110
     <Compile Include="T_Sys_RoleFunction.cs" />
110 111
     <Compile Include="T_Sys_RoleInfo.cs" />
111 112
     <Compile Include="T_Sys_SeatGroup.cs" />
@@ -118,6 +119,7 @@
118 119
     <Compile Include="T_Sys_WorkOFFDays.cs" />
119 120
     <Compile Include="T_Sys_WorkTimes.cs" />
120 121
     <Compile Include="T_Wo_BusinessManage.cs" />
122
+    <Compile Include="T_Wo_MaterialManage.cs" />
121 123
     <Compile Include="T_Wo_WorkOrder.cs" />
122 124
     <Compile Include="T_Wo_WorkOrderItem_New.cs" />
123 125
     <Compile Include="T_Wo_WorkOrderTimeOut.cs" />

+ 132 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_OperateLogs.cs

@@ -0,0 +1,132 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace CallCenterApi.Model
8
+{
9
+    /// <summary>
10
+	/// T_Sys_OperateLogs:实体类(属性说明自动提取数据库字段的描述信息)
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_Sys_OperateLogs
14
+    {
15
+        public T_Sys_OperateLogs()
16
+        { }
17
+        #region Model
18
+        private int _f_id;
19
+        private string _f_optby;
20
+        private string _f_optip;
21
+        private DateTime? _f_opton;
22
+        private string _f_optcode;
23
+        private string _f_module;
24
+        private string _f_opttables;
25
+        private string _f_optid;
26
+        private string _f_descript;
27
+        /// <summary>
28
+        /// 
29
+        /// </summary>
30
+        public int F_Id
31
+        {
32
+            set { _f_id = value; }
33
+            get { return _f_id; }
34
+        }
35
+        /// <summary>
36
+        /// 操作人工号
37
+        /// </summary>
38
+        public string F_OptBy
39
+        {
40
+            set { _f_optby = value; }
41
+            get { return _f_optby; }
42
+        }
43
+        /// <summary>
44
+        /// 操作人IP
45
+        /// </summary>
46
+        public string F_OptIP
47
+        {
48
+            set { _f_optip = value; }
49
+            get { return _f_optip; }
50
+        }
51
+        /// <summary>
52
+        /// 操作时间
53
+        /// </summary>
54
+        public DateTime? F_OptOn
55
+        {
56
+            set { _f_opton = value; }
57
+            get { return _f_opton; }
58
+        }
59
+        /// <summary>
60
+        /// 操作编号:add,edit,delete
61
+        /// </summary>
62
+        public string F_OptCode
63
+        {
64
+            set { _f_optcode = value; }
65
+            get { return _f_optcode; }
66
+        }
67
+        /// <summary>
68
+        /// 模块名称
69
+        /// </summary>
70
+        public string F_Module
71
+        {
72
+            set { _f_module = value; }
73
+            get { return _f_module; }
74
+        }
75
+        /// <summary>
76
+        /// 操作表名
77
+        /// </summary>
78
+        public string F_OptTables
79
+        {
80
+            set { _f_opttables = value; }
81
+            get { return _f_opttables; }
82
+        }
83
+        /// <summary>
84
+        /// 操作ID
85
+        /// </summary>
86
+        public string F_OptID
87
+        {
88
+            set { _f_optid = value; }
89
+            get { return _f_optid; }
90
+        }
91
+        /// <summary>
92
+        /// 操作描述
93
+        /// </summary>
94
+        public string F_Descript
95
+        {
96
+            set { _f_descript = value; }
97
+            get { return _f_descript; }
98
+        }
99
+        #endregion Model
100
+    }
101
+
102
+    /// <summary>
103
+    /// 操作
104
+    /// </summary>
105
+    public enum EnumOpt
106
+    {
107
+        /// <summary>
108
+        /// 添加
109
+        /// </summary>
110
+        add,
111
+        /// <summary>
112
+        /// 编辑
113
+        /// </summary>
114
+        edit,
115
+        /// <summary>
116
+        /// 删除
117
+        /// </summary>
118
+        delete,
119
+        /// <summary>
120
+        /// 批量删除
121
+        /// </summary>
122
+        deletion,
123
+        /// <summary>
124
+        /// 导入
125
+        /// </summary>
126
+        import,
127
+        /// <summary>
128
+        /// 导出
129
+        /// </summary>
130
+        export
131
+    }
132
+}

+ 209 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_MaterialManage.cs

@@ -0,0 +1,209 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace CallCenterApi.Model
8
+{
9
+    /// <summary>
10
+	/// 物料管理表
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_Wo_MaterialManage
14
+    {
15
+        public T_Wo_MaterialManage()
16
+        { }
17
+        #region Model
18
+        private int _f_id;
19
+        private string _f_materialcode;
20
+        private string _f_materialname;
21
+        private string _f_model;
22
+        private string _f_specs;
23
+        private string _f_level1;
24
+        private string _f_level2;
25
+        private string _f_level3;
26
+        private string _f_brand;
27
+        private string _f_materialeffect;
28
+        private string _f_pipeline;
29
+        private string _f_craft;
30
+        private string _f_remark;
31
+        private string _f_createby;
32
+        private DateTime? _f_createon;
33
+        private int? _f_updatecount;
34
+        private string _f_updateby;
35
+        private DateTime? _f_updateon;
36
+        private int? _f_isdelete;
37
+        private string _f_deleteby;
38
+        private DateTime? _f_deleteon;
39
+        /// <summary>
40
+        /// ID
41
+        /// </summary>
42
+        public int F_Id
43
+        {
44
+            set { _f_id = value; }
45
+            get { return _f_id; }
46
+        }
47
+        /// <summary>
48
+        /// 物料编码
49
+        /// </summary>
50
+        public string F_MaterialCode
51
+        {
52
+            set { _f_materialcode = value; }
53
+            get { return _f_materialcode; }
54
+        }
55
+        /// <summary>
56
+        /// 物料编码
57
+        /// </summary>
58
+        public string F_MaterialName
59
+        {
60
+            set { _f_materialname = value; }
61
+            get { return _f_materialname; }
62
+        }
63
+        /// <summary>
64
+        /// 型号
65
+        /// </summary>
66
+        public string F_Model
67
+        {
68
+            set { _f_model = value; }
69
+            get { return _f_model; }
70
+        }
71
+        /// <summary>
72
+        /// 规格
73
+        /// </summary>
74
+        public string F_Specs
75
+        {
76
+            set { _f_specs = value; }
77
+            get { return _f_specs; }
78
+        }
79
+        /// <summary>
80
+        /// 一级分类
81
+        /// </summary>
82
+        public string F_Level1
83
+        {
84
+            set { _f_level1 = value; }
85
+            get { return _f_level1; }
86
+        }
87
+        /// <summary>
88
+        /// 二级分类
89
+        /// </summary>
90
+        public string F_Level2
91
+        {
92
+            set { _f_level2 = value; }
93
+            get { return _f_level2; }
94
+        }
95
+        /// <summary>
96
+        /// 三级分类
97
+        /// </summary>
98
+        public string F_Level3
99
+        {
100
+            set { _f_level3 = value; }
101
+            get { return _f_level3; }
102
+        }
103
+        /// <summary>
104
+        /// 品牌
105
+        /// </summary>
106
+        public string F_Brand
107
+        {
108
+            set { _f_brand = value; }
109
+            get { return _f_brand; }
110
+        }
111
+        /// <summary>
112
+        /// 复合肥肥效
113
+        /// </summary>
114
+        public string F_MaterialEffect
115
+        {
116
+            set { _f_materialeffect = value; }
117
+            get { return _f_materialeffect; }
118
+        }
119
+        /// <summary>
120
+        /// 产品线
121
+        /// </summary>
122
+        public string F_Pipeline
123
+        {
124
+            set { _f_pipeline = value; }
125
+            get { return _f_pipeline; }
126
+        }
127
+        /// <summary>
128
+        /// 工艺
129
+        /// </summary>
130
+        public string F_Craft
131
+        {
132
+            set { _f_craft = value; }
133
+            get { return _f_craft; }
134
+        }
135
+        /// <summary>
136
+        /// 备注
137
+        /// </summary>
138
+        public string F_Remark
139
+        {
140
+            set { _f_remark = value; }
141
+            get { return _f_remark; }
142
+        }
143
+        /// <summary>
144
+        /// 创建人工号
145
+        /// </summary>
146
+        public string F_CreateBy
147
+        {
148
+            set { _f_createby = value; }
149
+            get { return _f_createby; }
150
+        }
151
+        /// <summary>
152
+        /// 创建时间
153
+        /// </summary>
154
+        public DateTime? F_CreateOn
155
+        {
156
+            set { _f_createon = value; }
157
+            get { return _f_createon; }
158
+        }
159
+        /// <summary>
160
+        /// 修改次数
161
+        /// </summary>
162
+        public int? F_UpdateCount
163
+        {
164
+            set { _f_updatecount = value; }
165
+            get { return _f_updatecount; }
166
+        }
167
+        /// <summary>
168
+        /// 修改人工号
169
+        /// </summary>
170
+        public string F_UpdateBy
171
+        {
172
+            set { _f_updateby = value; }
173
+            get { return _f_updateby; }
174
+        }
175
+        /// <summary>
176
+        /// 修改时间
177
+        /// </summary>
178
+        public DateTime? F_UpdateOn
179
+        {
180
+            set { _f_updateon = value; }
181
+            get { return _f_updateon; }
182
+        }
183
+        /// <summary>
184
+        /// 是否删除:0否,1是
185
+        /// </summary>
186
+        public int? F_IsDelete
187
+        {
188
+            set { _f_isdelete = value; }
189
+            get { return _f_isdelete; }
190
+        }
191
+        /// <summary>
192
+        /// 删除人工号
193
+        /// </summary>
194
+        public string F_DeleteBy
195
+        {
196
+            set { _f_deleteby = value; }
197
+            get { return _f_deleteby; }
198
+        }
199
+        /// <summary>
200
+        /// 删除时间
201
+        /// </summary>
202
+        public DateTime? F_DeleteOn
203
+        {
204
+            set { _f_deleteon = value; }
205
+            get { return _f_deleteon; }
206
+        }
207
+        #endregion Model
208
+    }
209
+}