zhoufan преди 4 години
родител
ревизия
747eb3a234

+ 1 - 0
RMYY_CallCenter_Api.Bll/RMYY_CallCenter_Api.Bll.csproj

@@ -63,6 +63,7 @@
63 63
     <Compile Include="T_Sys_Menu.cs" />
64 64
     <Compile Include="T_Sys_MobileData.cs" />
65 65
     <Compile Include="T_Sys_Role.cs" />
66
+    <Compile Include="T_Sys_SeatGroup.cs" />
66 67
     <Compile Include="T_Sys_SystemConfig.cs" />
67 68
     <Compile Include="T_Sys_TelTitleData.cs" />
68 69
     <Compile Include="T_Sys_UserAccount.cs" />

+ 121 - 0
RMYY_CallCenter_Api.Bll/T_Sys_SeatGroup.cs

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

+ 1 - 0
RMYY_CallCenter_Api.Dal/RMYY_CallCenter_Api.Dal.csproj

@@ -63,6 +63,7 @@
63 63
     <Compile Include="T_Sys_Menu.cs" />
64 64
     <Compile Include="T_Sys_MobileData.cs" />
65 65
     <Compile Include="T_Sys_Role.cs" />
66
+    <Compile Include="T_Sys_SeatGroup.cs" />
66 67
     <Compile Include="T_Sys_SystemConfig.cs" />
67 68
     <Compile Include="T_Sys_TelTitleData.cs" />
68 69
     <Compile Include="T_Sys_UserAccount.cs" />

+ 294 - 0
RMYY_CallCenter_Api.Dal/T_Sys_SeatGroup.cs

@@ -0,0 +1,294 @@
1
+using System;
2
+using System.Data;
3
+using System.Text;
4
+using System.Data.SqlClient;
5
+using RMYY_CallCenter_Api.DB;
6
+
7
+namespace RMYY_CallCenter_Api.DAL
8
+{
9
+    /// <summary>
10
+    /// 数据访问类:T_Sys_SeatGroup
11
+    /// </summary>
12
+    public partial class T_Sys_SeatGroup
13
+    {
14
+        public T_Sys_SeatGroup()
15
+        { }
16
+        #region  BasicMethod
17
+
18
+
19
+        /// <summary>
20
+        /// 增加一条数据
21
+        /// </summary>
22
+        public int Add(RMYY_CallCenter_Api.Model.T_Sys_SeatGroup model)
23
+        {
24
+            StringBuilder strSql = new StringBuilder();
25
+            strSql.Append("insert into T_Sys_SeatGroup(");
26
+            strSql.Append("F_ZXZCode,F_ZXZName,F_IVRKey,F_WHBDKey,F_WHWDKey,F_ZXAtt,F_Des,F_CreateTime,F_CreateUser)");
27
+            strSql.Append(" values (");
28
+            strSql.Append("@F_ZXZCode,@F_ZXZName,@F_IVRKey,@F_WHBDKey,@F_WHWDKey,@F_ZXAtt,@F_Des,@F_CreateTime,@F_CreateUser)");
29
+            strSql.Append(";select @@IDENTITY");
30
+            SqlParameter[] parameters = {
31
+                    new SqlParameter("@F_ZXZCode", SqlDbType.NVarChar,50),
32
+                    new SqlParameter("@F_ZXZName", SqlDbType.NVarChar,50),
33
+                    new SqlParameter("@F_IVRKey", SqlDbType.Int,4),
34
+                    new SqlParameter("@F_WHBDKey", SqlDbType.NChar,10),
35
+                    new SqlParameter("@F_WHWDKey", SqlDbType.NChar,10),
36
+                    new SqlParameter("@F_ZXAtt", SqlDbType.NVarChar,50),
37
+                    new SqlParameter("@F_Des", SqlDbType.NText),
38
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
39
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50)};
40
+            parameters[0].Value = model.F_ZXZCode;
41
+            parameters[1].Value = model.F_ZXZName;
42
+            parameters[2].Value = model.F_IVRKey;
43
+            parameters[3].Value = model.F_WHBDKey;
44
+            parameters[4].Value = model.F_WHWDKey;
45
+            parameters[5].Value = model.F_ZXAtt;
46
+            parameters[6].Value = model.F_Des;
47
+            parameters[7].Value = model.F_CreateTime;
48
+            parameters[8].Value = model.F_CreateUser;
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
+        /// <summary>
61
+        /// 更新一条数据
62
+        /// </summary>
63
+        public bool Update(RMYY_CallCenter_Api.Model.T_Sys_SeatGroup model)
64
+        {
65
+            StringBuilder strSql = new StringBuilder();
66
+            strSql.Append("update T_Sys_SeatGroup set ");
67
+            strSql.Append("F_ZXZCode=@F_ZXZCode,");
68
+            strSql.Append("F_ZXZName=@F_ZXZName,");
69
+            strSql.Append("F_IVRKey=@F_IVRKey,");
70
+            strSql.Append("F_WHBDKey=@F_WHBDKey,");
71
+            strSql.Append("F_WHWDKey=@F_WHWDKey,");
72
+            strSql.Append("F_ZXAtt=@F_ZXAtt,");
73
+            strSql.Append("F_Des=@F_Des,");
74
+            strSql.Append("F_CreateTime=@F_CreateTime,");
75
+            strSql.Append("F_CreateUser=@F_CreateUser");
76
+            strSql.Append(" where F_ID=@F_ID");
77
+            SqlParameter[] parameters = {
78
+                    new SqlParameter("@F_ZXZCode", SqlDbType.NVarChar,50),
79
+                    new SqlParameter("@F_ZXZName", SqlDbType.NVarChar,50),
80
+                    new SqlParameter("@F_IVRKey", SqlDbType.Int,4),
81
+                    new SqlParameter("@F_WHBDKey", SqlDbType.NChar,10),
82
+                    new SqlParameter("@F_WHWDKey", SqlDbType.NChar,10),
83
+                    new SqlParameter("@F_ZXAtt", SqlDbType.NVarChar,50),
84
+                    new SqlParameter("@F_Des", SqlDbType.NText),
85
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
86
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
87
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)};
88
+            parameters[0].Value = model.F_ZXZCode;
89
+            parameters[1].Value = model.F_ZXZName;
90
+            parameters[2].Value = model.F_IVRKey;
91
+            parameters[3].Value = model.F_WHBDKey;
92
+            parameters[4].Value = model.F_WHWDKey;
93
+            parameters[5].Value = model.F_ZXAtt;
94
+            parameters[6].Value = model.F_Des;
95
+            parameters[7].Value = model.F_CreateTime;
96
+            parameters[8].Value = model.F_CreateUser;
97
+            parameters[9].Value = model.F_ID;
98
+
99
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
100
+            if (rows > 0)
101
+            {
102
+                return true;
103
+            }
104
+            else
105
+            {
106
+                return false;
107
+            }
108
+        }
109
+
110
+        /// <summary>
111
+        /// 删除一条数据
112
+        /// </summary>
113
+        public bool Delete(int F_ID)
114
+        {
115
+
116
+            StringBuilder strSql = new StringBuilder();
117
+            strSql.Append("delete from T_Sys_SeatGroup ");
118
+            strSql.Append(" where F_ID=@F_ID");
119
+            SqlParameter[] parameters = {
120
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
121
+            };
122
+            parameters[0].Value = F_ID;
123
+
124
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
125
+            if (rows > 0)
126
+            {
127
+                return true;
128
+            }
129
+            else
130
+            {
131
+                return false;
132
+            }
133
+        }
134
+        /// <summary>
135
+        /// 批量删除数据
136
+        /// </summary>
137
+        public bool DeleteList(string F_IDlist)
138
+        {
139
+            StringBuilder strSql = new StringBuilder();
140
+            strSql.Append("delete from T_Sys_SeatGroup ");
141
+            strSql.Append(" where F_ID in (" + F_IDlist + ")  ");
142
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
143
+            if (rows > 0)
144
+            {
145
+                return true;
146
+            }
147
+            else
148
+            {
149
+                return false;
150
+            }
151
+        }
152
+
153
+
154
+        /// <summary>
155
+        /// 得到一个对象实体
156
+        /// </summary>
157
+        public RMYY_CallCenter_Api.Model.T_Sys_SeatGroup GetModel(int F_ID)
158
+        {
159
+
160
+            StringBuilder strSql = new StringBuilder();
161
+            strSql.Append("select  top 1 F_ID,F_ZXZCode,F_ZXZName,F_IVRKey,F_WHBDKey,F_WHWDKey,F_ZXAtt,F_Des,F_CreateTime,F_CreateUser from T_Sys_SeatGroup with(nolock)");
162
+            strSql.Append(" where F_ID=@F_ID");
163
+            SqlParameter[] parameters = {
164
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
165
+            };
166
+            parameters[0].Value = F_ID;
167
+
168
+            RMYY_CallCenter_Api.Model.T_Sys_SeatGroup model = new RMYY_CallCenter_Api.Model.T_Sys_SeatGroup();
169
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
170
+            if (ds.Tables[0].Rows.Count > 0)
171
+            {
172
+                return DataRowToModel(ds.Tables[0].Rows[0]);
173
+            }
174
+            else
175
+            {
176
+                return null;
177
+            }
178
+        }
179
+
180
+
181
+        /// <summary>
182
+        /// 得到一个对象实体
183
+        /// </summary>
184
+        public RMYY_CallCenter_Api.Model.T_Sys_SeatGroup DataRowToModel(DataRow row)
185
+        {
186
+            RMYY_CallCenter_Api.Model.T_Sys_SeatGroup model = new RMYY_CallCenter_Api.Model.T_Sys_SeatGroup();
187
+            if (row != null)
188
+            {
189
+                if (row["F_ID"] != null && row["F_ID"].ToString() != "")
190
+                {
191
+                    model.F_ID = int.Parse(row["F_ID"].ToString());
192
+                }
193
+                if (row["F_ZXZCode"] != null)
194
+                {
195
+                    model.F_ZXZCode = row["F_ZXZCode"].ToString();
196
+                }
197
+                if (row["F_ZXZName"] != null)
198
+                {
199
+                    model.F_ZXZName = row["F_ZXZName"].ToString();
200
+                }
201
+                if (row["F_IVRKey"] != null && row["F_IVRKey"].ToString() != "")
202
+                {
203
+                    model.F_IVRKey = int.Parse(row["F_IVRKey"].ToString());
204
+                }
205
+                if (row["F_WHBDKey"] != null)
206
+                {
207
+                    model.F_WHBDKey = row["F_WHBDKey"].ToString();
208
+                }
209
+                if (row["F_WHWDKey"] != null)
210
+                {
211
+                    model.F_WHWDKey = row["F_WHWDKey"].ToString();
212
+                }
213
+                if (row["F_ZXAtt"] != null)
214
+                {
215
+                    model.F_ZXAtt = row["F_ZXAtt"].ToString();
216
+                }
217
+                if (row["F_Des"] != null)
218
+                {
219
+                    model.F_Des = row["F_Des"].ToString();
220
+                }
221
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
222
+                {
223
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
224
+                }
225
+                if (row["F_CreateUser"] != null)
226
+                {
227
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
228
+                }
229
+            }
230
+            return model;
231
+        }
232
+
233
+        /// <summary>
234
+        /// 获得数据列表
235
+        /// </summary>
236
+        public DataSet GetList(string strWhere)
237
+        {
238
+            StringBuilder strSql = new StringBuilder();
239
+            strSql.Append("select F_ID,F_ZXZCode,F_ZXZName,F_IVRKey,F_WHBDKey,F_WHWDKey,F_ZXAtt,F_Des,F_CreateTime,F_CreateUser ");
240
+            strSql.Append(" FROM T_Sys_SeatGroup with(nolock)");
241
+            if (strWhere.Trim() != "")
242
+            {
243
+                strSql.Append(" where " + strWhere);
244
+            }
245
+            return DbHelperSQL.Query(strSql.ToString());
246
+        }
247
+
248
+        /// <summary>
249
+        /// 获得前几行数据
250
+        /// </summary>
251
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
252
+        {
253
+            StringBuilder strSql = new StringBuilder();
254
+            strSql.Append("select ");
255
+            if (Top > 0)
256
+            {
257
+                strSql.Append(" top " + Top.ToString());
258
+            }
259
+            strSql.Append(" F_ID,F_ZXZCode,F_ZXZName,F_IVRKey,F_WHBDKey,F_WHWDKey,F_ZXAtt,F_Des,F_CreateTime,F_CreateUser ");
260
+            strSql.Append(" FROM T_Sys_SeatGroup with(nolock)");
261
+            if (strWhere.Trim() != "")
262
+            {
263
+                strSql.Append(" where " + strWhere);
264
+            }
265
+            strSql.Append(" order by " + filedOrder);
266
+            return DbHelperSQL.Query(strSql.ToString());
267
+        }
268
+
269
+        /// <summary>
270
+        /// 获取记录总数
271
+        /// </summary>
272
+        public int GetRecordCount(string strWhere)
273
+        {
274
+            StringBuilder strSql = new StringBuilder();
275
+            strSql.Append("select count(1) FROM T_Sys_SeatGroup with(nolock)");
276
+            if (strWhere.Trim() != "")
277
+            {
278
+                strSql.Append(" where " + strWhere);
279
+            }
280
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
281
+            if (obj == null)
282
+            {
283
+                return 0;
284
+            }
285
+            else
286
+            {
287
+                return Convert.ToInt32(obj);
288
+            }
289
+        }
290
+
291
+        #endregion  BasicMethod
292
+    }
293
+}
294
+

+ 1 - 0
RMYY_CallCenter_Api.Model/RMYY_CallCenter_Api.Model.csproj

@@ -62,6 +62,7 @@
62 62
     <Compile Include="T_Sys_Menu.cs" />
63 63
     <Compile Include="T_Sys_MobileData.cs" />
64 64
     <Compile Include="T_Sys_Role.cs" />
65
+    <Compile Include="T_Sys_SeatGroup.cs" />
65 66
     <Compile Include="T_Sys_SystemConfig.cs" />
66 67
     <Compile Include="T_Sys_TelTitleData.cs" />
67 68
     <Compile Include="T_Sys_UserAccount.cs" />

+ 107 - 0
RMYY_CallCenter_Api.Model/T_Sys_SeatGroup.cs

@@ -0,0 +1,107 @@
1
+using System;
2
+namespace RMYY_CallCenter_Api.Model
3
+{
4
+    /// <summary>
5
+    /// T_Sys_SeatGroup:实体类(属性说明自动提取数据库字段的描述信息)
6
+    /// </summary>
7
+    [Serializable]
8
+    public partial class T_Sys_SeatGroup
9
+    {
10
+        public T_Sys_SeatGroup()
11
+        { }
12
+        #region Model
13
+        private int _f_id;
14
+        private string _f_zxzcode;
15
+        private string _f_zxzname;
16
+        private int? _f_ivrkey;
17
+        private string _f_whbdkey;
18
+        private string _f_whwdkey;
19
+        private string _f_zxatt;
20
+        private string _f_des;
21
+        private DateTime? _f_createtime;
22
+        private string _f_createuser;
23
+        /// <summary>
24
+        /// 
25
+        /// </summary>
26
+        public int F_ID
27
+        {
28
+            set { _f_id = value; }
29
+            get { return _f_id; }
30
+        }
31
+        /// <summary>
32
+        /// 坐席组编号
33
+        /// </summary>
34
+        public string F_ZXZCode
35
+        {
36
+            set { _f_zxzcode = value; }
37
+            get { return _f_zxzcode; }
38
+        }
39
+        /// <summary>
40
+        /// 坐席组名称
41
+        /// </summary>
42
+        public string F_ZXZName
43
+        {
44
+            set { _f_zxzname = value; }
45
+            get { return _f_zxzname; }
46
+        }
47
+        /// <summary>
48
+        /// ivr按键
49
+        /// </summary>
50
+        public int? F_IVRKey
51
+        {
52
+            set { _f_ivrkey = value; }
53
+            get { return _f_ivrkey; }
54
+        }
55
+        /// <summary>
56
+        /// 外呼本地前缀
57
+        /// </summary>
58
+        public string F_WHBDKey
59
+        {
60
+            set { _f_whbdkey = value; }
61
+            get { return _f_whbdkey; }
62
+        }
63
+        /// <summary>
64
+        /// 外呼外地前缀
65
+        /// </summary>
66
+        public string F_WHWDKey
67
+        {
68
+            set { _f_whwdkey = value; }
69
+            get { return _f_whwdkey; }
70
+        }
71
+        /// <summary>
72
+        /// 坐席所属地
73
+        /// </summary>
74
+        public string F_ZXAtt
75
+        {
76
+            set { _f_zxatt = value; }
77
+            get { return _f_zxatt; }
78
+        }
79
+        /// <summary>
80
+        /// 描述说明
81
+        /// </summary>
82
+        public string F_Des
83
+        {
84
+            set { _f_des = value; }
85
+            get { return _f_des; }
86
+        }
87
+        /// <summary>
88
+        /// 创建时间
89
+        /// </summary>
90
+        public DateTime? F_CreateTime
91
+        {
92
+            set { _f_createtime = value; }
93
+            get { return _f_createtime; }
94
+        }
95
+        /// <summary>
96
+        /// 创建人
97
+        /// </summary>
98
+        public string F_CreateUser
99
+        {
100
+            set { _f_createuser = value; }
101
+            get { return _f_createuser; }
102
+        }
103
+        #endregion Model
104
+
105
+    }
106
+}
107
+

+ 17 - 0
RMYY_CallCenter_Api/Controllers/System/SeatGroupController.cs

@@ -0,0 +1,17 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Web;
5
+using System.Web.Mvc;
6
+
7
+namespace RMYY_CallCenter_Api.Controllers.System
8
+{
9
+    public class SeatGroupController : BaseController
10
+    {
11
+        // GET: SeatGroup
12
+        public ActionResult Index()
13
+        {
14
+            return View();
15
+        }
16
+    }
17
+}

+ 1 - 1
RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj

@@ -128,6 +128,7 @@
128 128
     <Compile Include="Controllers\CallTel\CallrecordsController.cs" />
129 129
     <Compile Include="Controllers\CarManage\T_Car_MessageController.cs" />
130 130
     <Compile Include="Controllers\CarManage\T_Car_WorkOrderController.cs" />
131
+    <Compile Include="Controllers\System\SeatGroupController.cs" />
131 132
     <Compile Include="Controllers\WorkOrder\Con_WorkOrderController.cs" />
132 133
     <Compile Include="Controllers\System\CustomerController.cs" />
133 134
     <Compile Include="Controllers\System\MobiledataController.cs" />
@@ -174,7 +175,6 @@
174 175
   </ItemGroup>
175 176
   <ItemGroup>
176 177
     <Folder Include="App_Data\" />
177
-    <Folder Include="Views\T_Mat_WorkOrder\" />
178 178
   </ItemGroup>
179 179
   <ItemGroup>
180 180
     <Content Include="Configs\log4net.config" />