zhupei il y a 4 ans
Parent
commit
4e3d3cdd14

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

@@ -66,6 +66,7 @@
66 66
     <Compile Include="T_Sys_DictionaryValue.cs" />
67 67
     <Compile Include="T_Sys_GongDan.cs" />
68 68
     <Compile Include="T_Sys_GongDanType.cs" />
69
+    <Compile Include="T_Sys_Knowledge.cs" />
69 70
     <Compile Include="T_Sys_Menu.cs" />
70 71
     <Compile Include="T_Sys_MobileData.cs" />
71 72
     <Compile Include="T_Sys_Role.cs" />

+ 140 - 0
RMYY_CallCenter_Api.Bll/T_Sys_Knowledge.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 RMYY_CallCenter_Api.Bll
9
+{
10
+    /// <summary>
11
+    /// T_Sys_Knowledge
12
+    /// </summary>
13
+    public partial class T_Sys_Knowledge
14
+    {
15
+        private readonly RMYY_CallCenter_Api.Dal.T_Sys_Knowledge dal = new RMYY_CallCenter_Api.Dal.T_Sys_Knowledge();
16
+        public T_Sys_Knowledge()
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(RMYY_CallCenter_Api.Model.T_Sys_Knowledge model)
31
+        {
32
+            return dal.Add(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 更新一条数据
37
+        /// </summary>
38
+        public bool Update(RMYY_CallCenter_Api.Model.T_Sys_Knowledge 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 RMYY_CallCenter_Api.Model.T_Sys_Knowledge 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<RMYY_CallCenter_Api.Model.T_Sys_Knowledge> 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<RMYY_CallCenter_Api.Model.T_Sys_Knowledge> DataTableToList(DataTable dt)
94
+        {
95
+            List<RMYY_CallCenter_Api.Model.T_Sys_Knowledge> modelList = new List<RMYY_CallCenter_Api.Model.T_Sys_Knowledge>();
96
+            int rowsCount = dt.Rows.Count;
97
+            if (rowsCount > 0)
98
+            {
99
+                RMYY_CallCenter_Api.Model.T_Sys_Knowledge 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
+}

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

@@ -66,6 +66,7 @@
66 66
     <Compile Include="T_Sys_DictionaryValue.cs" />
67 67
     <Compile Include="T_Sys_GongDan.cs" />
68 68
     <Compile Include="T_Sys_GongDanType.cs" />
69
+    <Compile Include="T_Sys_Knowledge.cs" />
69 70
     <Compile Include="T_Sys_Menu.cs" />
70 71
     <Compile Include="T_Sys_MobileData.cs" />
71 72
     <Compile Include="T_Sys_Role.cs" />

+ 1 - 1
RMYY_CallCenter_Api.Dal/T_Con_WorkOrder.cs

@@ -352,7 +352,7 @@ namespace RMYY_CallCenter_Api.Dal
352 352
         {
353 353
 
354 354
             StringBuilder strSql = new StringBuilder();
355
-            strSql.Append("delete from T_Con_WorkOrder with(nolock)");
355
+            strSql.Append("delete from T_Con_WorkOrder");
356 356
             strSql.Append(" where F_ID=@F_ID");
357 357
             SqlParameter[] parameters = {
358 358
                     new SqlParameter("@F_ID", SqlDbType.Int,4)

+ 384 - 0
RMYY_CallCenter_Api.Dal/T_Sys_Knowledge.cs

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

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

@@ -65,6 +65,7 @@
65 65
     <Compile Include="T_Sys_DictionaryValue.cs" />
66 66
     <Compile Include="T_Sys_GongDan.cs" />
67 67
     <Compile Include="T_Sys_GongDanType.cs" />
68
+    <Compile Include="T_Sys_Knowledge.cs" />
68 69
     <Compile Include="T_Sys_Menu.cs" />
69 70
     <Compile Include="T_Sys_MobileData.cs" />
70 71
     <Compile Include="T_Sys_Role.cs" />

+ 1 - 1
RMYY_CallCenter_Api.Model/T_Con_WorkOrder.cs

@@ -438,7 +438,7 @@ namespace RMYY_CallCenter_Api.Model
438 438
             get { return _f_state; }
439 439
         }
440 440
         /// <summary>
441
-        /// 工单类型:1健康咨询,2投诉建议,3外聘专家咨询,4家庭预约上门
441
+        /// 工单类型:1健康咨询,2投诉建议,3外聘专家咨询,4家庭预约上门,5静脉置管维护
442 442
         /// </summary>
443 443
         public int? F_type1
444 444
         {

+ 156 - 0
RMYY_CallCenter_Api.Model/T_Sys_Knowledge.cs

@@ -0,0 +1,156 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace RMYY_CallCenter_Api.Model
8
+{
9
+    /// <summary>
10
+    /// T_Sys_Knowledge:实体类(属性说明自动提取数据库字段的描述信息)
11
+    /// </summary>
12
+    [Serializable]
13
+    public partial class T_Sys_Knowledge
14
+    {
15
+        public T_Sys_Knowledge()
16
+        { }
17
+        #region Model
18
+        private int _f_id;
19
+        private int? _f_typeid;
20
+        private string _f_title;
21
+        private string _f_content;
22
+        private string _f_description;
23
+        private string _f_keywords;
24
+        private string _f_typename;
25
+        private string _f_files;
26
+        private string _f_createcode;
27
+        private string _f_createname;
28
+        private DateTime? _f_createtime;
29
+        private DateTime? _f_modifytime;
30
+        private string _f_modifycode;
31
+        private string _f_modifyname;
32
+        private int? _f_isdel = 0;
33
+        /// <summary>
34
+        /// 主键id
35
+        /// </summary>
36
+        public int F_Id
37
+        {
38
+            set { _f_id = value; }
39
+            get { return _f_id; }
40
+        }
41
+        /// <summary>
42
+        /// 工单类型id
43
+        /// </summary>
44
+        public int? F_TypeId
45
+        {
46
+            set { _f_typeid = value; }
47
+            get { return _f_typeid; }
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_Description
69
+        {
70
+            set { _f_description = value; }
71
+            get { return _f_description; }
72
+        }
73
+        /// <summary>
74
+        /// 关键字
75
+        /// </summary>
76
+        public string F_KeyWords
77
+        {
78
+            set { _f_keywords = value; }
79
+            get { return _f_keywords; }
80
+        }
81
+        /// <summary>
82
+        /// 工单类型名称
83
+        /// </summary>
84
+        public string F_TypeName
85
+        {
86
+            set { _f_typename = value; }
87
+            get { return _f_typename; }
88
+        }
89
+        /// <summary>
90
+        /// 附件id
91
+        /// </summary>
92
+        public string F_Files
93
+        {
94
+            set { _f_files = value; }
95
+            get { return _f_files; }
96
+        }
97
+        /// <summary>
98
+        /// 创建人
99
+        /// </summary>
100
+        public string F_CreateCode
101
+        {
102
+            set { _f_createcode = value; }
103
+            get { return _f_createcode; }
104
+        }
105
+        /// <summary>
106
+        /// 创建人姓名
107
+        /// </summary>
108
+        public string F_CreateName
109
+        {
110
+            set { _f_createname = value; }
111
+            get { return _f_createname; }
112
+        }
113
+        /// <summary>
114
+        /// 创建时间
115
+        /// </summary>
116
+        public DateTime? F_CreateTime
117
+        {
118
+            set { _f_createtime = value; }
119
+            get { return _f_createtime; }
120
+        }
121
+        /// <summary>
122
+        /// 修改时间
123
+        /// </summary>
124
+        public DateTime? F_ModifyTime
125
+        {
126
+            set { _f_modifytime = value; }
127
+            get { return _f_modifytime; }
128
+        }
129
+        /// <summary>
130
+        /// 修改人
131
+        /// </summary>
132
+        public string F_ModifyCode
133
+        {
134
+            set { _f_modifycode = value; }
135
+            get { return _f_modifycode; }
136
+        }
137
+        /// <summary>
138
+        /// 修改人姓名
139
+        /// </summary>
140
+        public string F_ModifyName
141
+        {
142
+            set { _f_modifyname = value; }
143
+            get { return _f_modifyname; }
144
+        }
145
+        /// <summary>
146
+        /// 是否删除
147
+        /// </summary>
148
+        public int? F_IsDel
149
+        {
150
+            set { _f_isdel = value; }
151
+            get { return _f_isdel; }
152
+        }
153
+        #endregion Model
154
+
155
+    }
156
+}

+ 3 - 1
RMYY_CallCenter_Api/Controllers/System/DepartmentController.cs

@@ -17,7 +17,7 @@ namespace RMYY_CallCenter_Api.Controllers.System
17 17
         /// 获取列表
18 18
         /// </summary>
19 19
         /// <returns></returns>
20
-        public ActionResult GetList(string keyword,int pid=0, int pageindex = 1, int pagesize = 10)
20
+        public ActionResult GetList(string keyword,int hosid,int pid=0, int pageindex = 1, int pagesize = 10)
21 21
         {
22 22
             DataTable date = new DataTable();
23 23
             string sql = "";
@@ -26,6 +26,8 @@ namespace RMYY_CallCenter_Api.Controllers.System
26 26
             sql += $" and F_DeptName like '%" + keyword + "%'";
27 27
             if(pid!=0)
28 28
             sql += $" and F_ParentId= "+pid;
29
+            if (hosid != 0)
30
+            sql += $" and T_Woid="+hosid;
29 31
             int recordCount = 0;
30 32
             if (!string.IsNullOrEmpty(sql))
31 33
             {

+ 17 - 0
RMYY_CallCenter_Api/Controllers/System/KnowledgeController.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 KnowledgeController : BaseController
10
+    {
11
+        // GET: Knowledge
12
+        public ActionResult Index()
13
+        {
14
+            return View();
15
+        }
16
+    }
17
+}

+ 9 - 10
RMYY_CallCenter_Api/Controllers/WorkOrder/Con_WorkOrderController.cs

@@ -235,11 +235,9 @@ namespace RMYY_CallCenter_Api.Controllers
235 235
         /// <returns></returns>
236 236
         public ActionResult AddWorkOrder(Con_WorkOrderInput input, int overtime=0, int opt = 0,string cont="")
237 237
         {
238
-            int userId = 1;
239
-            if (userId != 0)
238
+  
239
+            if (User != null)
240 240
             {
241
-                string usercode = "8000";
242
-                Model.T_Sys_UserAccount user = userbll.GetModel(userId);
243 241
                 #region 添加判断
244 242
                 if (!(input.F_Type1 > 0 && input.F_Type1 < 6))
245 243
                     return Error("工单类型错误!");
@@ -271,18 +269,18 @@ namespace RMYY_CallCenter_Api.Controllers
271 269
                 if (n > 0)
272 270
                 {
273 271
                     Model.T_Con_WorkOrder work = orderbll.GetModel(n);
274
-                    var deptmodel = deptbll.GetModel(user.F_DeptId);
272
+                    var deptmodel = deptbll.GetModel(User.F_DeptId);
275 273
                     string deptname = "";
276 274
                     if (deptmodel != null)
277 275
                         deptname = deptmodel.F_DeptName + "-";
278
-                    AddLog(work.F_ID, 0, deptname + user.F_UserName + "(" + user.F_UserCode + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, user);
276
+                    AddLog(work.F_ID, 0, deptname + User.F_UserName + "(" + User.F_UserCode + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, User);
279 277
                     if (opt == 1)//立即办理
280 278
                     {
281 279
                         if (work != null)
282 280
                         {
283 281
                             if(input.F_Type1==1 || input.F_Type1 == 3)
284 282
                             {
285
-                                var res = DealWO(user, work, cont, "", 1);
283
+                                var res = DealWO(User, work, cont, "", 1);
286 284
                                 if (res)
287 285
                                 {
288 286
                                     #region 给患者发送短信
@@ -302,7 +300,7 @@ namespace RMYY_CallCenter_Api.Controllers
302 300
                             Model.T_Sys_UserAccount userleader = userbll.GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=60 ").FirstOrDefault();//护士长角色
303 301
                             if (userleader != null)
304 302
                             {
305
-                                AddLog(work.F_ID, 0, deptname + userleader.F_UserName + "(" + user.F_UserCode + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, userleader.F_UserCode, userleader.F_DeptId, user);
303
+                                AddLog(work.F_ID, 0, deptname + userleader.F_UserName + "(" + User.F_UserCode + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, userleader.F_UserCode, userleader.F_DeptId, User);
306 304
                                 return Success("已提交审核!");
307 305
                             }
308 306
                             else
@@ -315,7 +313,7 @@ namespace RMYY_CallCenter_Api.Controllers
315 313
                         if (input.F_Type1 == 4 || input.F_Type1 == 5)//家庭预约,静脉置管维护 立即处理并给健康事业部或置管室 推送一条钉钉消息
316 314
                         {
317 315
                             int clbm = 0;//健康事业部的部门Id
318
-                            bool tt = DealWO(user, work, cont, "", 1);
316
+                            bool tt = DealWO(User, work, cont, "", 1);
319 317
                             if (tt)
320 318
                             {
321 319
                                 #region  给健康事业部或 置管室 推送一条钉钉消息
@@ -367,7 +365,7 @@ namespace RMYY_CallCenter_Api.Controllers
367 365
          /// <param name="opt"></param>
368 366
          /// <param name="cont"></param>
369 367
          /// <returns></returns>
370
-        public ActionResult UpdataeWorkOrder(Con_WorkOrderInput input,int opt=0,string cont="")
368
+        public ActionResult UpdateWorkOrder(Con_WorkOrderInput input,int opt=0,string cont="")
371 369
         {
372 370
             int userId = 1;
373 371
             if (userId != 0)
@@ -806,6 +804,7 @@ namespace RMYY_CallCenter_Api.Controllers
806 804
         /// <summary>
807 805
         /// 转派工单
808 806
         /// </summary>
807
+
809 808
         private bool AssignWO(Model.T_Sys_UserAccount nowUser,Model.T_Con_WorkOrder wokerModel,string cont,int clid=0, int clbm = 0)
810 809
         {
811 810
 

+ 2 - 0
RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj

@@ -131,6 +131,7 @@
131 131
     <Compile Include="Controllers\CarManage\T_Car_MessageController.cs" />
132 132
     <Compile Include="Controllers\CarManage\T_Car_WorkOrderController.cs" />
133 133
     <Compile Include="Controllers\System\AddressBookController.cs" />
134
+    <Compile Include="Controllers\System\KnowledgeController.cs" />
134 135
     <Compile Include="Controllers\System\SeatGroupController.cs" />
135 136
     <Compile Include="Controllers\WorkOrderBaseController.cs" />
136 137
     <Compile Include="Controllers\WorkOrder\Con_WorkOrderController.cs" />
@@ -192,6 +193,7 @@
192 193
     <Folder Include="App_Data\" />
193 194
     <Folder Include="img\" />
194 195
     <Folder Include="Views\AddressBook\" />
196
+    <Folder Include="Views\Knowledge\" />
195 197
     <Folder Include="Views\T_Acc_WorkOrder\" />
196 198
     <Folder Include="Views\T_Dis_WorkOrder\" />
197 199
     <Folder Include="Views\T_Hos_WorkOrder\" />