Bladeren bron

添加申诉

mengjie 5 jaren geleden
bovenliggende
commit
8ec0d88f42

+ 1 - 0
CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

@@ -44,6 +44,7 @@
44 44
     <Compile Include="Properties\AssemblyInfo.cs" />
45 45
     <Compile Include="Rep_Dept_Assessment.cs" />
46 46
     <Compile Include="T_Bus_Additional.cs" />
47
+    <Compile Include="T_Bus_AppealInfo.cs" />
47 48
     <Compile Include="T_Bus_AssignedInfo.cs" />
48 49
     <Compile Include="T_Bus_AssignedInfo_Next.cs" />
49 50
     <Compile Include="T_Bus_AssignedItemInfo.cs" />

+ 147 - 0
CallCenterApi/CallCenterApi.BLL/T_Bus_AppealInfo.cs

@@ -0,0 +1,147 @@
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_Bus_AppealInfo
12
+    /// </summary>
13
+    public partial class T_Bus_AppealInfo
14
+    {
15
+        private readonly CallCenterApi.DAL.T_Bus_AppealInfo dal = new CallCenterApi.DAL.T_Bus_AppealInfo();
16
+        public T_Bus_AppealInfo()
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_Bus_AppealInfo model)
31
+        {
32
+            return dal.Add(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 更新一条数据
37
+        /// </summary>
38
+        public bool Update(CallCenterApi.Model.T_Bus_AppealInfo model)
39
+        {
40
+            return dal.Update(model);
41
+        }
42
+
43
+        /// <summary>
44
+        /// 删除一条数据
45
+        /// </summary>
46
+        public bool Delete(int F_Id)
47
+        {
48
+
49
+            return dal.Delete(F_Id);
50
+        }
51
+        /// <summary>
52
+        /// 删除一条数据
53
+        /// </summary>
54
+        public bool DeleteList(string F_Idlist)
55
+        {
56
+            return dal.DeleteList(F_Idlist);
57
+        }
58
+
59
+        /// <summary>
60
+        /// 得到一个对象实体
61
+        /// </summary>
62
+        public CallCenterApi.Model.T_Bus_AppealInfo 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_Bus_AppealInfo> 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_Bus_AppealInfo> DataTableToList(DataTable dt)
94
+        {
95
+            List<CallCenterApi.Model.T_Bus_AppealInfo> modelList = new List<CallCenterApi.Model.T_Bus_AppealInfo>();
96
+            int rowsCount = dt.Rows.Count;
97
+            if (rowsCount > 0)
98
+            {
99
+                CallCenterApi.Model.T_Bus_AppealInfo 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
+        /// <summary>
135
+        /// 分页获取数据列表
136
+        /// </summary>
137
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
138
+        //{
139
+        //return dal.GetList(PageSize,PageIndex,strWhere);
140
+        //}
141
+
142
+        #endregion  BasicMethod
143
+        #region  ExtensionMethod
144
+
145
+        #endregion  ExtensionMethod
146
+    }
147
+}

+ 1 - 0
CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

@@ -45,6 +45,7 @@
45 45
     <Compile Include="Properties\AssemblyInfo.cs" />
46 46
     <Compile Include="Rep_Dept_Assessment.cs" />
47 47
     <Compile Include="T_Bus_Additional.cs" />
48
+    <Compile Include="T_Bus_AppealInfo.cs" />
48 49
     <Compile Include="T_Bus_AssignedInfo.cs" />
49 50
     <Compile Include="T_Bus_AssignedInfo_Next.cs" />
50 51
     <Compile Include="T_Bus_AssignedItemInfo.cs" />

+ 387 - 0
CallCenterApi/CallCenterApi.DAL/T_Bus_AppealInfo.cs

@@ -0,0 +1,387 @@
1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Data.SqlClient;
6
+using System.IO;
7
+using System.Linq;
8
+using System.Text;
9
+
10
+namespace CallCenterApi.DAL
11
+{
12
+    /// <summary>
13
+    /// 数据访问类:T_Bus_AppealInfo
14
+    /// </summary>
15
+    public partial class T_Bus_AppealInfo
16
+    {
17
+        public T_Bus_AppealInfo()
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_Bus_AppealInfo");
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_Bus_AppealInfo model)
41
+        {
42
+            StringBuilder strSql = new StringBuilder();
43
+            strSql.Append("insert into T_Bus_AppealInfo(");
44
+            strSql.Append("F_WorkOrderId,F_Title,F_Content,F_Remark,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime,F_DeptIds,F_NoticeID,F_NoticeInfo,F_SureTime)");
45
+            strSql.Append(" values (");
46
+            strSql.Append("@F_WorkOrderId,@F_Title,@F_Content,@F_Remark,@F_State,@F_CreateUser,@F_CreateTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime,@F_DeptIds,@F_NoticeID,@F_NoticeInfo,@F_SureTime)");
47
+            strSql.Append(";select @@IDENTITY");
48
+            SqlParameter[] parameters = {
49
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.NVarChar,20),
50
+                    new SqlParameter("@F_Title", SqlDbType.NVarChar,500),
51
+                    new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),
52
+                    new SqlParameter("@F_Remark", SqlDbType.NVarChar,-1),
53
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
54
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
55
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
56
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
57
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
58
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
59
+                    new SqlParameter("@F_DeptIds", SqlDbType.VarChar,500),
60
+            new SqlParameter("@F_NoticeID", SqlDbType.Int,4),
61
+            new SqlParameter("@F_NoticeInfo", SqlDbType.VarChar,500),
62
+            new SqlParameter("@F_SureTime", SqlDbType.DateTime)
63
+            };
64
+            parameters[0].Value = model.F_WorkOrderId;
65
+            parameters[1].Value = model.F_Title;
66
+            parameters[2].Value = model.F_Content;
67
+            parameters[3].Value = model.F_Remark;
68
+            parameters[4].Value = model.F_State;
69
+            parameters[5].Value = model.F_CreateUser;
70
+            parameters[6].Value = model.F_CreateTime;
71
+            parameters[7].Value = model.F_IsDelete;
72
+            parameters[8].Value = model.F_DeleteUser;
73
+            parameters[9].Value = model.F_DeleteTime;
74
+            parameters[10].Value = model.F_DeptIds;
75
+            parameters[11].Value = model.F_NoticeID;
76
+            parameters[12].Value = model.F_NoticeInfo;
77
+            parameters[13].Value = model.F_SureTime;
78
+
79
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
80
+            if (obj == null)
81
+            {
82
+                return 0;
83
+            }
84
+            else
85
+            {
86
+                return Convert.ToInt32(obj);
87
+            }
88
+        }
89
+        /// <summary>
90
+        /// 更新一条数据
91
+        /// </summary>
92
+        public bool Update(CallCenterApi.Model.T_Bus_AppealInfo model)
93
+        {
94
+            StringBuilder strSql = new StringBuilder();
95
+            strSql.Append("update T_Bus_AppealInfo set ");
96
+            strSql.Append("F_WorkOrderId=@F_WorkOrderId,");
97
+            strSql.Append("F_Title=@F_Title,");
98
+            strSql.Append("F_Content=@F_Content,");
99
+            strSql.Append("F_Remark=@F_Remark,");
100
+            strSql.Append("F_State=@F_State,");
101
+            strSql.Append("F_CreateUser=@F_CreateUser,");
102
+            strSql.Append("F_CreateTime=@F_CreateTime,");
103
+            strSql.Append("F_IsDelete=@F_IsDelete,");
104
+            strSql.Append("F_DeleteUser=@F_DeleteUser,");
105
+            strSql.Append("F_DeleteTime=@F_DeleteTime,");
106
+            strSql.Append("F_DeptIds=@F_DeptIds,");
107
+            strSql.Append("F_NoticeID=@F_NoticeID,");
108
+            strSql.Append("F_NoticeInfo=@F_NoticeInfo,"); 
109
+                strSql.Append("F_SureTime=@F_SureTime");
110
+            strSql.Append(" where F_Id=@F_Id");
111
+            SqlParameter[] parameters = {
112
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.NVarChar,20),
113
+                    new SqlParameter("@F_Title", SqlDbType.NVarChar,500),
114
+                    new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),
115
+                    new SqlParameter("@F_Remark", SqlDbType.NVarChar,-1),
116
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
117
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
118
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
119
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
120
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
121
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
122
+                    new SqlParameter("@F_DeptIds", SqlDbType.VarChar,500),
123
+                    new SqlParameter("@F_Id", SqlDbType.Int,4),
124
+            new SqlParameter("@F_NoticeID", SqlDbType.Int,4),
125
+            new SqlParameter("@F_NoticeInfo", SqlDbType.VarChar,500),
126
+            new SqlParameter("@F_SureTime", SqlDbType.DateTime)};
127
+            parameters[0].Value = model.F_WorkOrderId;
128
+            parameters[1].Value = model.F_Title;
129
+            parameters[2].Value = model.F_Content;
130
+            parameters[3].Value = model.F_Remark;
131
+            parameters[4].Value = model.F_State;
132
+            parameters[5].Value = model.F_CreateUser;
133
+            parameters[6].Value = model.F_CreateTime;
134
+            parameters[7].Value = model.F_IsDelete;
135
+            parameters[8].Value = model.F_DeleteUser;
136
+            parameters[9].Value = model.F_DeleteTime;
137
+            parameters[10].Value = model.F_DeptIds;
138
+            parameters[11].Value = model.F_Id;
139
+            parameters[12].Value = model.F_NoticeID;
140
+            parameters[13].Value = model.F_NoticeInfo;
141
+            parameters[14].Value = model.F_SureTime;
142
+
143
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
144
+            if (rows > 0)
145
+            {
146
+                return true;
147
+            }
148
+            else
149
+            {
150
+                return false;
151
+            }
152
+        }
153
+
154
+        /// <summary>
155
+        /// 删除一条数据
156
+        /// </summary>
157
+        public bool Delete(int F_Id)
158
+        {
159
+
160
+            StringBuilder strSql = new StringBuilder();
161
+            strSql.Append("delete from T_Bus_AppealInfo ");
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
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
169
+            if (rows > 0)
170
+            {
171
+                return true;
172
+            }
173
+            else
174
+            {
175
+                return false;
176
+            }
177
+        }
178
+        /// <summary>
179
+        /// 批量删除数据
180
+        /// </summary>
181
+        public bool DeleteList(string F_Idlist)
182
+        {
183
+            StringBuilder strSql = new StringBuilder();
184
+            strSql.Append("delete from T_Bus_AppealInfo ");
185
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
186
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
187
+            if (rows > 0)
188
+            {
189
+                return true;
190
+            }
191
+            else
192
+            {
193
+                return false;
194
+            }
195
+        }
196
+
197
+
198
+        /// <summary>
199
+        /// 得到一个对象实体
200
+        /// </summary>
201
+        public CallCenterApi.Model.T_Bus_AppealInfo GetModel(int F_Id)
202
+        {
203
+
204
+            StringBuilder strSql = new StringBuilder();
205
+            strSql.Append("select  top 1 F_Id,F_WorkOrderId,F_Title,F_Content,F_Remark,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime,F_DeptIds,F_NoticeID,F_NoticeInfo,F_SureTime from T_Bus_AppealInfo ");
206
+            strSql.Append(" where F_Id=@F_Id");
207
+            SqlParameter[] parameters = {
208
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
209
+            };
210
+            parameters[0].Value = F_Id;
211
+
212
+            CallCenterApi.Model.T_Bus_AppealInfo model = new CallCenterApi.Model.T_Bus_AppealInfo();
213
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
214
+            if (ds.Tables[0].Rows.Count > 0)
215
+            {
216
+                return DataRowToModel(ds.Tables[0].Rows[0]);
217
+            }
218
+            else
219
+            {
220
+                return null;
221
+            }
222
+        }
223
+
224
+
225
+        /// <summary>
226
+        /// 得到一个对象实体
227
+        /// </summary>
228
+        public CallCenterApi.Model.T_Bus_AppealInfo DataRowToModel(DataRow row)
229
+        {
230
+            CallCenterApi.Model.T_Bus_AppealInfo model = new CallCenterApi.Model.T_Bus_AppealInfo();
231
+            if (row != null)
232
+            {
233
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
234
+                {
235
+                    model.F_Id = int.Parse(row["F_Id"].ToString());
236
+                }
237
+                if (row["F_WorkOrderId"] != null)
238
+                {
239
+                    model.F_WorkOrderId = row["F_WorkOrderId"].ToString();
240
+                }
241
+                if (row["F_Title"] != null)
242
+                {
243
+                    model.F_Title = row["F_Title"].ToString();
244
+                }
245
+                if (row["F_Content"] != null)
246
+                {
247
+                    model.F_Content = row["F_Content"].ToString();
248
+                }
249
+                if (row["F_Remark"] != null)
250
+                {
251
+                    model.F_Remark = row["F_Remark"].ToString();
252
+                }
253
+                if (row["F_State"] != null && row["F_State"].ToString() != "")
254
+                {
255
+                    model.F_State = int.Parse(row["F_State"].ToString());
256
+                }
257
+                if (row["F_CreateUser"] != null)
258
+                {
259
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
260
+                }
261
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
262
+                {
263
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
264
+                }
265
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
266
+                {
267
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
268
+                }
269
+                if (row["F_DeleteUser"] != null)
270
+                {
271
+                    model.F_DeleteUser = row["F_DeleteUser"].ToString();
272
+                }
273
+                if (row["F_DeleteTime"] != null && row["F_DeleteTime"].ToString() != "")
274
+                {
275
+                    model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
276
+                }
277
+                if (row["F_DeptIds"] != null)
278
+                {
279
+                    model.F_DeptIds = row["F_DeptIds"].ToString();
280
+                }
281
+                if (row["F_NoticeID"] != null && row["F_NoticeID"].ToString() != "")
282
+                {
283
+                    model.F_NoticeID = int.Parse(row["F_NoticeID"].ToString());
284
+                }
285
+                if (row["F_NoticeInfo"] != null)
286
+                {
287
+                    model.F_NoticeInfo = row["F_NoticeInfo"].ToString();
288
+                }
289
+                
290
+                if (row["F_SureTime"] != null && row["F_SureTime"].ToString() != "")
291
+                {
292
+                    model.F_SureTime = DateTime.Parse(row["F_SureTime"].ToString());
293
+                }
294
+            }
295
+            return model;
296
+        }
297
+
298
+        /// <summary>
299
+        /// 获得数据列表
300
+        /// </summary>
301
+        public DataSet GetList(string strWhere)
302
+        {
303
+            StringBuilder strSql = new StringBuilder();
304
+            strSql.Append("select F_Id,F_WorkOrderId,F_Title,F_Content,F_Remark,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime,F_DeptIds,F_NoticeID,F_NoticeInfo,F_SureTime ");
305
+            strSql.Append(" FROM T_Bus_AppealInfo ");
306
+            if (strWhere.Trim() != "")
307
+            {
308
+                strSql.Append(" where " + strWhere);
309
+            }
310
+            return DbHelperSQL.Query(strSql.ToString());
311
+        }
312
+
313
+        /// <summary>
314
+        /// 获得前几行数据
315
+        /// </summary>
316
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
317
+        {
318
+            StringBuilder strSql = new StringBuilder();
319
+            strSql.Append("select ");
320
+            if (Top > 0)
321
+            {
322
+                strSql.Append(" top " + Top.ToString());
323
+            }
324
+            strSql.Append(" F_Id,F_WorkOrderId,F_Title,F_Content,F_Remark,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime,F_DeptIds,F_NoticeID,F_NoticeInfo,F_SureTime ");
325
+            strSql.Append(" FROM T_Bus_AppealInfo ");
326
+            if (strWhere.Trim() != "")
327
+            {
328
+                strSql.Append(" where " + strWhere);
329
+            }
330
+            strSql.Append(" order by " + filedOrder);
331
+            return DbHelperSQL.Query(strSql.ToString());
332
+        }
333
+
334
+        /// <summary>
335
+        /// 获取记录总数
336
+        /// </summary>
337
+        public int GetRecordCount(string strWhere)
338
+        {
339
+            StringBuilder strSql = new StringBuilder();
340
+            strSql.Append("select count(1) FROM T_Bus_AppealInfo ");
341
+            if (strWhere.Trim() != "")
342
+            {
343
+                strSql.Append(" where " + strWhere);
344
+            }
345
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
346
+            if (obj == null)
347
+            {
348
+                return 0;
349
+            }
350
+            else
351
+            {
352
+                return Convert.ToInt32(obj);
353
+            }
354
+        }
355
+        /// <summary>
356
+        /// 分页获取数据列表
357
+        /// </summary>
358
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
359
+        {
360
+            StringBuilder strSql = new StringBuilder();
361
+            strSql.Append("SELECT * FROM ( ");
362
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
363
+            if (!string.IsNullOrEmpty(orderby.Trim()))
364
+            {
365
+                strSql.Append("order by T." + orderby);
366
+            }
367
+            else
368
+            {
369
+                strSql.Append("order by T.F_Id desc");
370
+            }
371
+            strSql.Append(")AS Row, T.*  from T_Bus_AppealInfo T ");
372
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
373
+            {
374
+                strSql.Append(" WHERE " + strWhere);
375
+            }
376
+            strSql.Append(" ) TT");
377
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
378
+            return DbHelperSQL.Query(strSql.ToString());
379
+        }
380
+
381
+       
382
+        #endregion  BasicMethod
383
+        #region  ExtensionMethod
384
+
385
+        #endregion  ExtensionMethod
386
+    }
387
+}

+ 2 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -164,6 +164,7 @@
164 164
     <Compile Include="App_Start\RouteConfig.cs" />
165 165
     <Compile Include="App_Start\WechatActionFilter.cs" />
166 166
     <Compile Include="Controllers\APPController.cs" />
167
+    <Compile Include="Controllers\AppealController.cs" />
167 168
     <Compile Include="Controllers\AreaController.cs" />
168 169
     <Compile Include="Controllers\Base\BaseController.cs" />
169 170
     <Compile Include="Controllers\CallOutOptController.cs" />
@@ -289,6 +290,7 @@
289 290
   <ItemGroup>
290 291
     <Folder Include="App_Data\" />
291 292
     <Folder Include="Views\AddressBook\" />
293
+    <Folder Include="Views\Appeal\" />
292 294
     <Folder Include="Views\ApplicationsRefresh\" />
293 295
     <Folder Include="Views\APP\" />
294 296
     <Folder Include="Views\Area\" />

+ 195 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AppealController.cs

@@ -0,0 +1,195 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.DB;
3
+using CallCenterApi.Interface.Controllers.Base;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.Data;
7
+using System.Linq;
8
+using System.Web;
9
+using System.Web.Mvc;
10
+
11
+namespace CallCenterApi.Interface.Controllers
12
+{
13
+    public class AppealController : BaseController
14
+    {
15
+        BLL.T_Bus_AppealInfo bll = new BLL.T_Bus_AppealInfo();
16
+
17
+        // GET: Appeal
18
+        public ActionResult Index()
19
+        {
20
+            return View();
21
+        }
22
+
23
+        // 获取申诉列表
24
+        public ActionResult GetList(string startdate, string enddate,string deptid)
25
+        {
26
+            DataTable dt = new DataTable();
27
+            string strpageindex = RequestString.GetQueryString("page");
28
+            int pageindex = 1;
29
+            string strpagesize = RequestString.GetQueryString("pagesize");
30
+            int pagesize = 10;
31
+            string sql = " ";
32
+            if (startdate != null && startdate.Trim() != "")
33
+            {
34
+                sql += " and Datediff(day,F_CreateTime,'" + startdate.Trim() + "')>=0";
35
+            }
36
+            if (enddate != null && enddate.Trim() != "")
37
+            {
38
+                sql += " and Datediff(day,F_CreateTime,'" + enddate.Trim() + "')<=0";
39
+            }
40
+            if (!string.IsNullOrEmpty(deptid))
41
+            {
42
+                sql += " and charindex(','+'"+deptid +"'+',',','+F_DeptIds+',')>0";
43
+            }
44
+            //sql += " and (F_WorkOrderId is null or F_WorkOrderId='')";
45
+            if (strpageindex.Trim() != "")
46
+            {
47
+                pageindex = Convert.ToInt32(strpageindex);
48
+            }
49
+            if (strpagesize.Trim() != "")
50
+            {
51
+                pagesize = Convert.ToInt32(strpagesize);
52
+            }
53
+            int recordCount = 0;
54
+            dt = BLL.PagerBLL.GetListPager(
55
+                "T_Bus_AppealInfo",
56
+                "F_Id",
57
+                "*,dbo.GetDeptNames(F_DeptIds) as NoticeDeptName",
58
+                sql,
59
+                "ORDER BY F_Id desc",
60
+                pagesize,
61
+                pageindex,
62
+                true,
63
+                out recordCount);
64
+
65
+            var obj = new
66
+            {
67
+                dt,
68
+                total = recordCount
69
+            };
70
+
71
+            return Content(obj.ToJson());
72
+
73
+        }
74
+
75
+        //添加申诉接口
76
+        public ActionResult AddAppeal(string deptids, string content, int noticeid, string noticeinfo,string workorderid,string remark)
77
+        {
78
+            Model.T_Bus_AppealInfo modelT_Bus_AppealInfo = new Model.T_Bus_AppealInfo();
79
+            modelT_Bus_AppealInfo.F_DeptIds = deptids;
80
+            modelT_Bus_AppealInfo.F_WorkOrderId = workorderid;
81
+            modelT_Bus_AppealInfo.F_Content = content;
82
+            modelT_Bus_AppealInfo.F_State = 1;
83
+            modelT_Bus_AppealInfo.F_IsDelete = 0;
84
+            modelT_Bus_AppealInfo.F_CreateTime = DateTime.Now;
85
+            modelT_Bus_AppealInfo.F_CreateUser = User.UserData["F_UserID"];
86
+            modelT_Bus_AppealInfo.F_NoticeID = noticeid;
87
+            modelT_Bus_AppealInfo.F_NoticeInfo = noticeinfo;
88
+            modelT_Bus_AppealInfo.F_Remark = remark;
89
+
90
+            int b = new BLL.T_Bus_AppealInfo().Add(modelT_Bus_AppealInfo);
91
+
92
+            if (b > 0)
93
+            {
94
+                return Success("添加成功");
95
+            }
96
+            else
97
+            {
98
+                return Success("添加失败");
99
+            }
100
+        }
101
+
102
+        //编辑
103
+        public ActionResult EditAppeal(string nid, string deptids, string content, int noticeid, string noticeinfo, string remark,int state)
104
+        {
105
+
106
+            if (nid != null && nid.Trim() != "")
107
+            {
108
+                Model.T_Bus_AppealInfo dModel = bll.GetModel(int.Parse(nid.Trim()));
109
+                if (dModel != null)
110
+                {
111
+
112
+                    dModel.F_DeptIds = deptids;
113
+                    //dModel.F_WorkOrderId = "";
114
+                    dModel.F_Content = content;
115
+                    dModel.F_State = state;
116
+                    dModel.F_IsDelete = 0;
117
+                    //dModel.F_CreateTime = DateTime.Now;
118
+                    //dModel.F_CreateUser = User.UserData["F_UserID"];
119
+                    dModel.F_NoticeID = noticeid;
120
+                    dModel.F_NoticeInfo = noticeinfo;
121
+                    dModel.F_Remark = remark;
122
+
123
+                    bool b = bll.Update(dModel);
124
+                    if (b)
125
+                    {
126
+                        return Success("编辑成功");
127
+                    }
128
+                    else
129
+                    {
130
+                        return Success("编辑失败");
131
+                    }
132
+                }
133
+                else
134
+                    return Error("获取信息失败");
135
+            }
136
+            else
137
+            {
138
+                return Error("id不能为空");
139
+            }
140
+
141
+        }
142
+        [Authority]
143
+        //删除
144
+        public ActionResult DelAppeal(string[] ids)
145
+        {
146
+            if (ids != null && ids.Length > 0)
147
+            {
148
+                string idds = "";
149
+                for (int i = 0; i < ids.Length; i++)
150
+                {
151
+                    idds += ids[i] + ",";
152
+                }
153
+                bool r = bll.DeleteList(idds.Trim(','));
154
+
155
+                if (r)
156
+                    return Success("删除成功");
157
+                else
158
+                {
159
+                    return Error("删除失败");
160
+                }
161
+            }
162
+            else
163
+            {
164
+                return Error("获取参数失败");
165
+            }
166
+
167
+        }
168
+
169
+        //获取申诉详情
170
+        public ActionResult GetAppeal(string nid)
171
+        {
172
+            Model.T_Bus_AppealInfo dModel = bll.GetModel(int.Parse(nid.Trim()));
173
+            if (dModel != null)
174
+            {
175
+                string NoticeDeptName = "";
176
+                if (dModel.F_DeptIds != null && dModel.F_DeptIds.ToString() != "")
177
+                {
178
+                    NoticeDeptName = DbHelperSQL.GetSingle(" select dbo.GetDeptNames('" + dModel.F_DeptIds.ToString() + "')").ToString();
179
+                }
180
+                var obj = new
181
+                {
182
+                    dModel,
183
+                    NoticeDeptName
184
+                };
185
+                return Success("获取申诉详情成功", obj);
186
+            }
187
+            else
188
+            {
189
+                return Error("获取申诉详情失败");
190
+            }
191
+
192
+        }
193
+
194
+    }
195
+}

+ 4 - 4
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/NoticeCriticismController.cs

@@ -105,14 +105,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
105 105
                 Model.T_Bus_NoticeCriticism dModel = bll.GetModel(int.Parse(nid.Trim()));
106 106
                 if (dModel != null)
107 107
                 {
108
-                    //Model.T_Bus_NoticeCriticism modelT_Bus_NoticeCriticism = new Model.T_Bus_NoticeCriticism();
108
+                    
109 109
                     dModel.F_DeptIds = deptids;
110
-                    //modelT_Bus_NoticeCriticism.F_WorkOrderId = "";
110
+                    //dModel.F_WorkOrderId = "";
111 111
                     dModel.F_Content = content;
112 112
                     dModel.F_State = 1;
113 113
                     dModel.F_IsDelete = 0;
114
-                    //modelT_Bus_NoticeCriticism.F_CreateTime = DateTime.Now;
115
-                    //modelT_Bus_NoticeCriticism.F_CreateUser = User.UserData["F_UserID"];
114
+                    //dModel.F_CreateTime = DateTime.Now;
115
+                    //dModel.F_CreateUser = User.UserData["F_UserID"];
116 116
                     dModel.F_NoticeID = noticeid;
117 117
                     dModel.F_NoticeInfo = noticeinfo;
118 118
 

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

@@ -46,6 +46,7 @@
46 46
     <Compile Include="Rep_Dept_Assessment.cs" />
47 47
     <Compile Include="SeatGroupInput.cs" />
48 48
     <Compile Include="T_Bus_Additional.cs" />
49
+    <Compile Include="T_Bus_AppealInfo.cs" />
49 50
     <Compile Include="T_Bus_AssignedInfo_Next.cs" />
50 51
     <Compile Include="T_Bus_AssignedItemInfo.cs" />
51 52
     <Compile Include="T_Bus_CityTurn.cs" />

+ 158 - 0
CallCenterApi/CallCenterApi.Model/T_Bus_AppealInfo.cs

@@ -0,0 +1,158 @@
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_Bus_AppealInfo:实体类(属性说明自动提取数据库字段的描述信息)
11
+    /// </summary>
12
+    [Serializable]
13
+    public partial class T_Bus_AppealInfo
14
+    {
15
+        public T_Bus_AppealInfo()
16
+        { }
17
+        #region Model
18
+        private int _f_id;
19
+        private string _f_workorderid;
20
+        private string _f_title;
21
+        private string _f_content;
22
+        private string _f_remark;
23
+        private int? _f_state;
24
+        private string _f_createuser;
25
+        private DateTime? _f_createtime;
26
+        private int? _f_isdelete;
27
+        private string _f_deleteuser;
28
+        private DateTime? _f_deletetime;
29
+        private string _f_deptids;
30
+        private string _f_noticeinfo;
31
+        private int? _f_noticeid;
32
+        private DateTime? _f_suretime;
33
+        /// <summary>
34
+        /// 
35
+        /// </summary>
36
+        public int F_Id
37
+        {
38
+            set { _f_id = value; }
39
+            get { return _f_id; }
40
+        }
41
+        /// <summary>
42
+        /// 
43
+        /// </summary>
44
+        public string F_WorkOrderId
45
+        {
46
+            set { _f_workorderid = value; }
47
+            get { return _f_workorderid; }
48
+        }
49
+        /// <summary>
50
+        /// 
51
+        /// </summary>
52
+        public string F_Title
53
+        {
54
+            set { _f_title = value; }
55
+            get { return _f_title; }
56
+        }
57
+        /// <summary>
58
+        /// 
59
+        /// </summary>
60
+        public string F_Content
61
+        {
62
+            set { _f_content = value; }
63
+            get { return _f_content; }
64
+        }
65
+        /// <summary>
66
+        /// 
67
+        /// </summary>
68
+        public string F_Remark
69
+        {
70
+            set { _f_remark = value; }
71
+            get { return _f_remark; }
72
+        }
73
+        /// <summary>
74
+        /// 
75
+        /// </summary>
76
+        public int? F_State
77
+        {
78
+            set { _f_state = value; }
79
+            get { return _f_state; }
80
+        }
81
+        /// <summary>
82
+        /// 
83
+        /// </summary>
84
+        public string F_CreateUser
85
+        {
86
+            set { _f_createuser = value; }
87
+            get { return _f_createuser; }
88
+        }
89
+        /// <summary>
90
+        /// 
91
+        /// </summary>
92
+        public DateTime? F_CreateTime
93
+        {
94
+            set { _f_createtime = value; }
95
+            get { return _f_createtime; }
96
+        }
97
+        /// <summary>
98
+        /// 
99
+        /// </summary>
100
+        public int? F_IsDelete
101
+        {
102
+            set { _f_isdelete = value; }
103
+            get { return _f_isdelete; }
104
+        }
105
+        /// <summary>
106
+        /// 
107
+        /// </summary>
108
+        public string F_DeleteUser
109
+        {
110
+            set { _f_deleteuser = value; }
111
+            get { return _f_deleteuser; }
112
+        }
113
+        /// <summary>
114
+        /// 
115
+        /// </summary>
116
+        public DateTime? F_DeleteTime
117
+        {
118
+            set { _f_deletetime = value; }
119
+            get { return _f_deletetime; }
120
+        }
121
+        /// <summary>
122
+        /// 
123
+        /// </summary>
124
+        public string F_DeptIds
125
+        {
126
+            set { _f_deptids = value; }
127
+            get { return _f_deptids; }
128
+        }
129
+        #endregion Model
130
+
131
+        /// <summary>
132
+        /// 通报内容
133
+        /// </summary>
134
+        public string F_NoticeInfo
135
+        {
136
+            set { _f_noticeinfo = value; }
137
+            get { return _f_noticeinfo; }
138
+        }
139
+
140
+        /// <summary>
141
+        /// 通报内容id
142
+        /// </summary>
143
+        public int? F_NoticeID
144
+        {
145
+            set { _f_noticeid = value; }
146
+            get { return _f_noticeid; }
147
+        }
148
+
149
+        /// <summary>
150
+        /// 申诉通过时间
151
+        /// </summary>
152
+        public DateTime? F_SureTime
153
+        {
154
+            set { _f_suretime = value; }
155
+            get { return _f_suretime; }
156
+        }
157
+    }
158
+}

+ 1 - 1
CallCenterApi/CallCenterApi.Model/T_Bus_NoticeCriticism.cs

@@ -119,7 +119,7 @@ namespace CallCenterApi.Model
119 119
         {
120 120
             set { _f_deptids = value; }
121 121
             get { return _f_deptids; }
122
-        }
122
+        }      
123 123
         #endregion Model
124 124
 
125 125