瀏覽代碼

知识库相关类提交

zhengbingbing 8 年之前
父節點
當前提交
e6d67a62ac

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

@@ -58,6 +58,8 @@
58 58
     <Compile Include="T_Call_ZBDH.cs" />
59 59
     <Compile Include="T_CTI_Task.cs" />
60 60
     <Compile Include="T_Cus_CustomerBase.cs" />
61
+    <Compile Include="T_RepositoryAudit.cs" />
62
+    <Compile Include="T_RepositoryCategory.cs" />
61 63
     <Compile Include="T_RepositoryInformation.cs" />
62 64
     <Compile Include="T_SMS_RecvSMS.cs" />
63 65
     <Compile Include="T_SMS_SendSMSTask.cs" />

+ 140 - 0
CallCenterApi/CallCenterApi.BLL/T_RepositoryAudit.cs

@@ -0,0 +1,140 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    /// <summary>
11
+	/// T_RepositoryAudit
12
+	/// </summary>
13
+	public partial class T_RepositoryAudit
14
+    {
15
+        private readonly CallCenterApi.DAL.T_RepositoryAudit dal = new CallCenterApi.DAL.T_RepositoryAudit();
16
+        public T_RepositoryAudit()
17
+        { }
18
+        #region  BasicMethod
19
+        /// <summary>
20
+        /// 是否存在该记录
21
+        /// </summary>
22
+        public bool Exists(int F_AuditId)
23
+        {
24
+            return dal.Exists(F_AuditId);
25
+        }
26
+
27
+        /// <summary>
28
+        /// 增加一条数据
29
+        /// </summary>
30
+        public int Add(CallCenterApi.Model.T_RepositoryAudit model)
31
+        {
32
+            return dal.Add(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 更新一条数据
37
+        /// </summary>
38
+        public bool Update(CallCenterApi.Model.T_RepositoryAudit model)
39
+        {
40
+            return dal.Update(model);
41
+        }
42
+
43
+        /// <summary>
44
+        /// 删除一条数据
45
+        /// </summary>
46
+        public bool Delete(int F_AuditId)
47
+        {
48
+
49
+            return dal.Delete(F_AuditId);
50
+        }
51
+        /// <summary>
52
+        /// 删除一条数据
53
+        /// </summary>
54
+        public bool DeleteList(string F_AuditIdlist)
55
+        {
56
+            return dal.DeleteList(F_AuditIdlist);
57
+        }
58
+
59
+        /// <summary>
60
+        /// 得到一个对象实体
61
+        /// </summary>
62
+        public CallCenterApi.Model.T_RepositoryAudit GetModel(int F_AuditId)
63
+        {
64
+
65
+            return dal.GetModel(F_AuditId);
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_RepositoryAudit> 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_RepositoryAudit> DataTableToList(DataTable dt)
94
+        {
95
+            List<CallCenterApi.Model.T_RepositoryAudit> modelList = new List<CallCenterApi.Model.T_RepositoryAudit>();
96
+            int rowsCount = dt.Rows.Count;
97
+            if (rowsCount > 0)
98
+            {
99
+                CallCenterApi.Model.T_RepositoryAudit 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
+}

+ 140 - 0
CallCenterApi/CallCenterApi.BLL/T_RepositoryCategory.cs

@@ -0,0 +1,140 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    /// <summary>
11
+	/// T_RepositoryCategory
12
+	/// </summary>
13
+	public partial class T_RepositoryCategory
14
+    {
15
+        private readonly CallCenterApi.DAL.T_RepositoryCategory dal = new CallCenterApi.DAL.T_RepositoryCategory();
16
+        public T_RepositoryCategory()
17
+        { }
18
+        #region  BasicMethod
19
+        /// <summary>
20
+        /// 是否存在该记录
21
+        /// </summary>
22
+        public bool Exists(int F_CategoryId)
23
+        {
24
+            return dal.Exists(F_CategoryId);
25
+        }
26
+
27
+        /// <summary>
28
+        /// 增加一条数据
29
+        /// </summary>
30
+        public int Add(CallCenterApi.Model.T_RepositoryCategory model)
31
+        {
32
+            return dal.Add(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 更新一条数据
37
+        /// </summary>
38
+        public bool Update(CallCenterApi.Model.T_RepositoryCategory model)
39
+        {
40
+            return dal.Update(model);
41
+        }
42
+
43
+        /// <summary>
44
+        /// 删除一条数据
45
+        /// </summary>
46
+        public bool Delete(int F_CategoryId)
47
+        {
48
+
49
+            return dal.Delete(F_CategoryId);
50
+        }
51
+        /// <summary>
52
+        /// 删除一条数据
53
+        /// </summary>
54
+        public bool DeleteList(string F_CategoryIdlist)
55
+        {
56
+            return dal.DeleteList(F_CategoryIdlist);
57
+        }
58
+
59
+        /// <summary>
60
+        /// 得到一个对象实体
61
+        /// </summary>
62
+        public CallCenterApi.Model.T_RepositoryCategory GetModel(int F_CategoryId)
63
+        {
64
+
65
+            return dal.GetModel(F_CategoryId);
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_RepositoryCategory> 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_RepositoryCategory> DataTableToList(DataTable dt)
94
+        {
95
+            List<CallCenterApi.Model.T_RepositoryCategory> modelList = new List<CallCenterApi.Model.T_RepositoryCategory>();
96
+            int rowsCount = dt.Rows.Count;
97
+            if (rowsCount > 0)
98
+            {
99
+                CallCenterApi.Model.T_RepositoryCategory 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
+}

+ 24 - 11
CallCenterApi/CallCenterApi.BLL/T_RepositoryInformation.cs

@@ -5,9 +5,9 @@ using CallCenterApi.Model;
5 5
 namespace CallCenterApi.BLL
6 6
 {
7 7
     /// <summary>
8
-    /// T_RepositoryInformation
9
-    /// </summary>
10
-    public partial class T_RepositoryInformation
8
+	/// T_RepositoryInformation
9
+	/// </summary>
10
+	public partial class T_RepositoryInformation
11 11
     {
12 12
         private readonly CallCenterApi.DAL.T_RepositoryInformation dal = new CallCenterApi.DAL.T_RepositoryInformation();
13 13
         public T_RepositoryInformation()
@@ -128,17 +128,30 @@ namespace CallCenterApi.BLL
128 128
         {
129 129
             return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
130 130
         }
131
-        /// <summary>
132
-        /// 分页获取数据列表
133
-        /// </summary>
134
-        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
135
-        //{
136
-        //return dal.GetList(PageSize,PageIndex,strWhere);
137
-        //}
138 131
 
139 132
         #endregion  BasicMethod
140 133
         #region  ExtensionMethod
141
-
134
+        /// <summary>
135
+        /// 更新点击量
136
+        /// </summary>
137
+        public bool UpdateClick(int rid)
138
+        {
139
+            return dal.UpdateClick(rid);
140
+        }
141
+        /// <summary>
142
+        /// 更新审核ID
143
+        /// </summary>
144
+        public bool UpdateAuditID(int rid, int auditid)
145
+        {
146
+            return dal.UpdateAuditID(rid, auditid);
147
+        }
148
+        /// <summary>
149
+        /// 更新审核
150
+        /// </summary>
151
+        public bool UpdateAudit(int rid, int auditUserid)
152
+        {
153
+            return dal.UpdateAudit(rid, auditUserid);
154
+        }
142 155
         #endregion  ExtensionMethod
143 156
     }
144 157
 }

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

@@ -58,6 +58,8 @@
58 58
     <Compile Include="T_Call_ZBDH.cs" />
59 59
     <Compile Include="T_CTI_Task.cs" />
60 60
     <Compile Include="T_Cus_CustomerBase.cs" />
61
+    <Compile Include="T_RepositoryAudit.cs" />
62
+    <Compile Include="T_RepositoryCategory.cs" />
61 63
     <Compile Include="T_RepositoryInformation.cs" />
62 64
     <Compile Include="T_SMS_RecvSMS.cs" />
63 65
     <Compile Include="T_SMS_SendSMSTask.cs" />

+ 376 - 0
CallCenterApi/CallCenterApi.DAL/T_RepositoryAudit.cs

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

+ 321 - 0
CallCenterApi/CallCenterApi.DAL/T_RepositoryCategory.cs

@@ -0,0 +1,321 @@
1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Data.SqlClient;
6
+using System.Linq;
7
+using System.Text;
8
+using System.Threading.Tasks;
9
+
10
+namespace CallCenterApi.DAL
11
+{
12
+    /// <summary>
13
+	/// 数据访问类:T_RepositoryCategory
14
+	/// </summary>
15
+	public partial class T_RepositoryCategory
16
+    {
17
+        public T_RepositoryCategory()
18
+        { }
19
+        #region  BasicMethod
20
+        /// <summary>
21
+        /// 是否存在该记录
22
+        /// </summary>
23
+        public bool Exists(int F_CategoryId)
24
+        {
25
+            StringBuilder strSql = new StringBuilder();
26
+            strSql.Append("select count(1) from T_RepositoryCategory");
27
+            strSql.Append(" where F_CategoryId=@F_CategoryId");
28
+            SqlParameter[] parameters = {
29
+                    new SqlParameter("@F_CategoryId", SqlDbType.Int,4)
30
+            };
31
+            parameters[0].Value = F_CategoryId;
32
+
33
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
34
+        }
35
+
36
+
37
+        /// <summary>
38
+        /// 增加一条数据
39
+        /// </summary>
40
+        public int Add(CallCenterApi.Model.T_RepositoryCategory model)
41
+        {
42
+            StringBuilder strSql = new StringBuilder();
43
+            strSql.Append("insert into T_RepositoryCategory(");
44
+            strSql.Append("F_CategoryName,F_ParentId,F_ParentPath,F_Expand1,F_Expand2,F_CreateOn,F_CreateBy)");
45
+            strSql.Append(" values (");
46
+            strSql.Append("@F_CategoryName,@F_ParentId,@F_ParentPath,@F_Expand1,@F_Expand2,@F_CreateOn,@F_CreateBy)");
47
+            strSql.Append(";select @@IDENTITY");
48
+            SqlParameter[] parameters = {
49
+                    new SqlParameter("@F_CategoryName", SqlDbType.NVarChar,50),
50
+                    new SqlParameter("@F_ParentId", SqlDbType.Int,4),
51
+                    new SqlParameter("@F_ParentPath", SqlDbType.NVarChar,50),
52
+                    new SqlParameter("@F_Expand1", SqlDbType.NVarChar,50),
53
+                    new SqlParameter("@F_Expand2", SqlDbType.NVarChar,50),
54
+                    new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
55
+                    new SqlParameter("@F_CreateBy", SqlDbType.Int,4)};
56
+            parameters[0].Value = model.F_CategoryName;
57
+            parameters[1].Value = model.F_ParentId;
58
+            parameters[2].Value = model.F_ParentPath;
59
+            parameters[3].Value = model.F_Expand1;
60
+            parameters[4].Value = model.F_Expand2;
61
+            parameters[5].Value = model.F_CreateOn;
62
+            parameters[6].Value = model.F_CreateBy;
63
+
64
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
65
+            if (obj == null)
66
+            {
67
+                return 0;
68
+            }
69
+            else
70
+            {
71
+                return Convert.ToInt32(obj);
72
+            }
73
+        }
74
+        /// <summary>
75
+        /// 更新一条数据
76
+        /// </summary>
77
+        public bool Update(CallCenterApi.Model.T_RepositoryCategory model)
78
+        {
79
+            StringBuilder strSql = new StringBuilder();
80
+            strSql.Append("update T_RepositoryCategory set ");
81
+            strSql.Append("F_CategoryName=@F_CategoryName,");
82
+            strSql.Append("F_ParentId=@F_ParentId,");
83
+            strSql.Append("F_ParentPath=@F_ParentPath,");
84
+            strSql.Append("F_Expand1=@F_Expand1,");
85
+            strSql.Append("F_Expand2=@F_Expand2,");
86
+            strSql.Append("F_CreateOn=@F_CreateOn,");
87
+            strSql.Append("F_CreateBy=@F_CreateBy");
88
+            strSql.Append(" where F_CategoryId=@F_CategoryId");
89
+            SqlParameter[] parameters = {
90
+                    new SqlParameter("@F_CategoryName", SqlDbType.NVarChar,50),
91
+                    new SqlParameter("@F_ParentId", SqlDbType.Int,4),
92
+                    new SqlParameter("@F_ParentPath", SqlDbType.NVarChar,50),
93
+                    new SqlParameter("@F_Expand1", SqlDbType.NVarChar,50),
94
+                    new SqlParameter("@F_Expand2", SqlDbType.NVarChar,50),
95
+                    new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
96
+                    new SqlParameter("@F_CreateBy", SqlDbType.Int,4),
97
+                    new SqlParameter("@F_CategoryId", SqlDbType.Int,4)};
98
+            parameters[0].Value = model.F_CategoryName;
99
+            parameters[1].Value = model.F_ParentId;
100
+            parameters[2].Value = model.F_ParentPath;
101
+            parameters[3].Value = model.F_Expand1;
102
+            parameters[4].Value = model.F_Expand2;
103
+            parameters[5].Value = model.F_CreateOn;
104
+            parameters[6].Value = model.F_CreateBy;
105
+            parameters[7].Value = model.F_CategoryId;
106
+
107
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
108
+            if (rows > 0)
109
+            {
110
+                return true;
111
+            }
112
+            else
113
+            {
114
+                return false;
115
+            }
116
+        }
117
+
118
+        /// <summary>
119
+        /// 删除一条数据
120
+        /// </summary>
121
+        public bool Delete(int F_CategoryId)
122
+        {
123
+
124
+            StringBuilder strSql = new StringBuilder();
125
+            strSql.Append("delete from T_RepositoryCategory ");
126
+            strSql.Append(" where F_CategoryId=@F_CategoryId");
127
+            SqlParameter[] parameters = {
128
+                    new SqlParameter("@F_CategoryId", SqlDbType.Int,4)
129
+            };
130
+            parameters[0].Value = F_CategoryId;
131
+
132
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
133
+            if (rows > 0)
134
+            {
135
+                return true;
136
+            }
137
+            else
138
+            {
139
+                return false;
140
+            }
141
+        }
142
+        /// <summary>
143
+        /// 批量删除数据
144
+        /// </summary>
145
+        public bool DeleteList(string F_CategoryIdlist)
146
+        {
147
+            StringBuilder strSql = new StringBuilder();
148
+            strSql.Append("delete from T_RepositoryCategory ");
149
+            strSql.Append(" where F_CategoryId in (" + F_CategoryIdlist + ")  ");
150
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
151
+            if (rows > 0)
152
+            {
153
+                return true;
154
+            }
155
+            else
156
+            {
157
+                return false;
158
+            }
159
+        }
160
+
161
+
162
+        /// <summary>
163
+        /// 得到一个对象实体
164
+        /// </summary>
165
+        public CallCenterApi.Model.T_RepositoryCategory GetModel(int F_CategoryId)
166
+        {
167
+
168
+            StringBuilder strSql = new StringBuilder();
169
+            strSql.Append("select  top 1 F_CategoryId,F_CategoryName,F_ParentId,F_ParentPath,F_Expand1,F_Expand2,F_CreateOn,F_CreateBy from T_RepositoryCategory ");
170
+            strSql.Append(" where F_CategoryId=@F_CategoryId");
171
+            SqlParameter[] parameters = {
172
+                    new SqlParameter("@F_CategoryId", SqlDbType.Int,4)
173
+            };
174
+            parameters[0].Value = F_CategoryId;
175
+
176
+            CallCenterApi.Model.T_RepositoryCategory model = new CallCenterApi.Model.T_RepositoryCategory();
177
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
178
+            if (ds.Tables[0].Rows.Count > 0)
179
+            {
180
+                return DataRowToModel(ds.Tables[0].Rows[0]);
181
+            }
182
+            else
183
+            {
184
+                return null;
185
+            }
186
+        }
187
+
188
+
189
+        /// <summary>
190
+        /// 得到一个对象实体
191
+        /// </summary>
192
+        public CallCenterApi.Model.T_RepositoryCategory DataRowToModel(DataRow row)
193
+        {
194
+            CallCenterApi.Model.T_RepositoryCategory model = new CallCenterApi.Model.T_RepositoryCategory();
195
+            if (row != null)
196
+            {
197
+                if (row["F_CategoryId"] != null && row["F_CategoryId"].ToString() != "")
198
+                {
199
+                    model.F_CategoryId = int.Parse(row["F_CategoryId"].ToString());
200
+                }
201
+                if (row["F_CategoryName"] != null)
202
+                {
203
+                    model.F_CategoryName = row["F_CategoryName"].ToString();
204
+                }
205
+                if (row["F_ParentId"] != null && row["F_ParentId"].ToString() != "")
206
+                {
207
+                    model.F_ParentId = int.Parse(row["F_ParentId"].ToString());
208
+                }
209
+                if (row["F_ParentPath"] != null)
210
+                {
211
+                    model.F_ParentPath = row["F_ParentPath"].ToString();
212
+                }
213
+                if (row["F_Expand1"] != null)
214
+                {
215
+                    model.F_Expand1 = row["F_Expand1"].ToString();
216
+                }
217
+                if (row["F_Expand2"] != null)
218
+                {
219
+                    model.F_Expand2 = row["F_Expand2"].ToString();
220
+                }
221
+                if (row["F_CreateOn"] != null && row["F_CreateOn"].ToString() != "")
222
+                {
223
+                    model.F_CreateOn = DateTime.Parse(row["F_CreateOn"].ToString());
224
+                }
225
+                if (row["F_CreateBy"] != null && row["F_CreateBy"].ToString() != "")
226
+                {
227
+                    model.F_CreateBy = int.Parse(row["F_CreateBy"].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_CategoryId,F_CategoryName,F_ParentId,F_ParentPath,F_Expand1,F_Expand2,F_CreateOn,F_CreateBy ");
240
+            strSql.Append(" FROM T_RepositoryCategory ");
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_CategoryId,F_CategoryName,F_ParentId,F_ParentPath,F_Expand1,F_Expand2,F_CreateOn,F_CreateBy ");
260
+            strSql.Append(" FROM T_RepositoryCategory ");
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_RepositoryCategory ");
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
+        /// <summary>
291
+        /// 分页获取数据列表
292
+        /// </summary>
293
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
294
+        {
295
+            StringBuilder strSql = new StringBuilder();
296
+            strSql.Append("SELECT * FROM ( ");
297
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
298
+            if (!string.IsNullOrEmpty(orderby.Trim()))
299
+            {
300
+                strSql.Append("order by T." + orderby);
301
+            }
302
+            else
303
+            {
304
+                strSql.Append("order by T.F_CategoryId desc");
305
+            }
306
+            strSql.Append(")AS Row, T.*  from T_RepositoryCategory T ");
307
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
308
+            {
309
+                strSql.Append(" WHERE " + strWhere);
310
+            }
311
+            strSql.Append(" ) TT");
312
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
313
+            return DbHelperSQL.Query(strSql.ToString());
314
+        }
315
+        
316
+        #endregion  BasicMethod
317
+        #region  ExtensionMethod
318
+
319
+        #endregion  ExtensionMethod
320
+    }
321
+}

+ 158 - 118
CallCenterApi/CallCenterApi.DAL/T_RepositoryInformation.cs

@@ -7,9 +7,9 @@ using CallCenterApi.DB;
7 7
 namespace CallCenterApi.DAL
8 8
 {
9 9
     /// <summary>
10
-    /// 数据访问类:T_RepositoryInformation
11
-    /// </summary>
12
-    public partial class T_RepositoryInformation
10
+	/// 数据访问类:T_RepositoryInformation
11
+	/// </summary>
12
+	public partial class T_RepositoryInformation
13 13
     {
14 14
         public T_RepositoryInformation()
15 15
         { }
@@ -38,47 +38,45 @@ namespace CallCenterApi.DAL
38 38
         {
39 39
             StringBuilder strSql = new StringBuilder();
40 40
             strSql.Append("insert into T_RepositoryInformation(");
41
-            strSql.Append("F_DeptId,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_State)");
41
+            strSql.Append("F_CategoryId,F_Title,F_Content,F_Description,F_Url,F_KeyWords,F_ClickCount,F_ISPass,F_ISSubmitAudit,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_AuditID,F_AuditOn,F_AuditBy)");
42 42
             strSql.Append(" values (");
43
-            strSql.Append("@F_DeptId,@F_Title,@F_Content,@F_Description,@F_Comments,@F_Url,@F_KeyWords,@F_Expand1,@F_Expand2,@F_IntExpand1,@F_CreateOn,@F_CreateBy,@F_CreateName,@F_ModifyOn,@F_ModifyBy,@F_ModifyName,@F_DeleteFlag,@F_State)");
43
+            strSql.Append("@F_CategoryId,@F_Title,@F_Content,@F_Description,@F_Url,@F_KeyWords,@F_ClickCount,@F_ISPass,@F_ISSubmitAudit,@F_Expand1,@F_Expand2,@F_IntExpand1,@F_CreateOn,@F_CreateBy,@F_AuditID,@F_AuditOn,@F_AuditBy)");
44 44
             strSql.Append(";select @@IDENTITY");
45 45
             SqlParameter[] parameters = {
46
-                    new SqlParameter("@F_DeptId", SqlDbType.Int,4),
46
+                    new SqlParameter("@F_CategoryId", SqlDbType.Int,4),
47 47
                     new SqlParameter("@F_Title", SqlDbType.NVarChar,200),
48 48
                     new SqlParameter("@F_Content", SqlDbType.NText),
49 49
                     new SqlParameter("@F_Description", SqlDbType.NText),
50
-                    new SqlParameter("@F_Comments", SqlDbType.NVarChar,500),
51
-                    new SqlParameter("@F_Url", SqlDbType.NVarChar,200),
50
+                    new SqlParameter("@F_Url", SqlDbType.NText),
52 51
                     new SqlParameter("@F_KeyWords", SqlDbType.NVarChar,500),
52
+                    new SqlParameter("@F_ClickCount", SqlDbType.Int,4),
53
+                    new SqlParameter("@F_ISPass", SqlDbType.Int,4),
54
+                    new SqlParameter("@F_ISSubmitAudit", SqlDbType.Int,4),
53 55
                     new SqlParameter("@F_Expand1", SqlDbType.NVarChar,100),
54 56
                     new SqlParameter("@F_Expand2", SqlDbType.NVarChar,200),
55 57
                     new SqlParameter("@F_IntExpand1", SqlDbType.SmallInt,2),
56 58
                     new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
57
-                    new SqlParameter("@F_CreateBy", SqlDbType.VarChar,50),
58
-                    new SqlParameter("@F_CreateName", SqlDbType.NVarChar,200),
59
-                    new SqlParameter("@F_ModifyOn", SqlDbType.DateTime),
60
-                    new SqlParameter("@F_ModifyBy", SqlDbType.VarChar,50),
61
-                    new SqlParameter("@F_ModifyName", SqlDbType.NVarChar,200),
62
-                    new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2),
63
-                    new SqlParameter("@F_State", SqlDbType.Int,4)};
64
-            parameters[0].Value = model.F_DeptId;
59
+                    new SqlParameter("@F_CreateBy", SqlDbType.Int,4),
60
+                    new SqlParameter("@F_AuditID", SqlDbType.Int,4),
61
+                    new SqlParameter("@F_AuditOn", SqlDbType.DateTime),
62
+                    new SqlParameter("@F_AuditBy", SqlDbType.Int,4)};
63
+            parameters[0].Value = model.F_CategoryId;
65 64
             parameters[1].Value = model.F_Title;
66 65
             parameters[2].Value = model.F_Content;
67 66
             parameters[3].Value = model.F_Description;
68
-            parameters[4].Value = model.F_Comments;
69
-            parameters[5].Value = model.F_Url;
70
-            parameters[6].Value = model.F_KeyWords;
71
-            parameters[7].Value = model.F_Expand1;
72
-            parameters[8].Value = model.F_Expand2;
73
-            parameters[9].Value = model.F_IntExpand1;
74
-            parameters[10].Value = model.F_CreateOn;
75
-            parameters[11].Value = model.F_CreateBy;
76
-            parameters[12].Value = model.F_CreateName;
77
-            parameters[13].Value = model.F_ModifyOn;
78
-            parameters[14].Value = model.F_ModifyBy;
79
-            parameters[15].Value = model.F_ModifyName;
80
-            parameters[16].Value = model.F_DeleteFlag;
81
-            parameters[17].Value = model.F_State;
67
+            parameters[4].Value = model.F_Url;
68
+            parameters[5].Value = model.F_KeyWords;
69
+            parameters[6].Value = model.F_ClickCount;
70
+            parameters[7].Value = model.F_ISPass;
71
+            parameters[8].Value = model.F_ISSubmitAudit;
72
+            parameters[9].Value = model.F_Expand1;
73
+            parameters[10].Value = model.F_Expand2;
74
+            parameters[11].Value = model.F_IntExpand1;
75
+            parameters[12].Value = model.F_CreateOn;
76
+            parameters[13].Value = model.F_CreateBy;
77
+            parameters[14].Value = model.F_AuditID;
78
+            parameters[15].Value = model.F_AuditOn;
79
+            parameters[16].Value = model.F_AuditBy;
82 80
 
83 81
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
84 82
             if (obj == null)
@@ -97,64 +95,61 @@ namespace CallCenterApi.DAL
97 95
         {
98 96
             StringBuilder strSql = new StringBuilder();
99 97
             strSql.Append("update T_RepositoryInformation set ");
100
-            strSql.Append("F_DeptId=@F_DeptId,");
98
+            strSql.Append("F_CategoryId=@F_CategoryId,");
101 99
             strSql.Append("F_Title=@F_Title,");
102 100
             strSql.Append("F_Content=@F_Content,");
103 101
             strSql.Append("F_Description=@F_Description,");
104
-            strSql.Append("F_Comments=@F_Comments,");
105 102
             strSql.Append("F_Url=@F_Url,");
106 103
             strSql.Append("F_KeyWords=@F_KeyWords,");
104
+            strSql.Append("F_ClickCount=@F_ClickCount,");
105
+            strSql.Append("F_ISPass=@F_ISPass,");
106
+            strSql.Append("F_ISSubmitAudit=@F_ISSubmitAudit,");
107 107
             strSql.Append("F_Expand1=@F_Expand1,");
108 108
             strSql.Append("F_Expand2=@F_Expand2,");
109 109
             strSql.Append("F_IntExpand1=@F_IntExpand1,");
110 110
             strSql.Append("F_CreateOn=@F_CreateOn,");
111 111
             strSql.Append("F_CreateBy=@F_CreateBy,");
112
-            strSql.Append("F_CreateName=@F_CreateName,");
113
-            strSql.Append("F_ModifyOn=@F_ModifyOn,");
114
-            strSql.Append("F_ModifyBy=@F_ModifyBy,");
115
-            strSql.Append("F_ModifyName=@F_ModifyName,");
116
-            strSql.Append("F_DeleteFlag=@F_DeleteFlag,");
117
-            strSql.Append("F_State=@F_State");
112
+            strSql.Append("F_AuditID=@F_AuditID,");
113
+            strSql.Append("F_AuditOn=@F_AuditOn,");
114
+            strSql.Append("F_AuditBy=@F_AuditBy");
118 115
             strSql.Append(" where F_RepositoryId=@F_RepositoryId");
119 116
             SqlParameter[] parameters = {
120
-                    new SqlParameter("@F_DeptId", SqlDbType.Int,4),
117
+                    new SqlParameter("@F_CategoryId", SqlDbType.Int,4),
121 118
                     new SqlParameter("@F_Title", SqlDbType.NVarChar,200),
122 119
                     new SqlParameter("@F_Content", SqlDbType.NText),
123 120
                     new SqlParameter("@F_Description", SqlDbType.NText),
124
-                    new SqlParameter("@F_Comments", SqlDbType.NVarChar,500),
125
-                    new SqlParameter("@F_Url", SqlDbType.NVarChar,200),
121
+                    new SqlParameter("@F_Url", SqlDbType.NText),
126 122
                     new SqlParameter("@F_KeyWords", SqlDbType.NVarChar,500),
123
+                    new SqlParameter("@F_ClickCount", SqlDbType.Int,4),
124
+                    new SqlParameter("@F_ISPass", SqlDbType.Int,4),
125
+                    new SqlParameter("@F_ISSubmitAudit", SqlDbType.Int,4),
127 126
                     new SqlParameter("@F_Expand1", SqlDbType.NVarChar,100),
128 127
                     new SqlParameter("@F_Expand2", SqlDbType.NVarChar,200),
129 128
                     new SqlParameter("@F_IntExpand1", SqlDbType.SmallInt,2),
130 129
                     new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
131
-                    new SqlParameter("@F_CreateBy", SqlDbType.VarChar,50),
132
-                    new SqlParameter("@F_CreateName", SqlDbType.NVarChar,200),
133
-                    new SqlParameter("@F_ModifyOn", SqlDbType.DateTime),
134
-                    new SqlParameter("@F_ModifyBy", SqlDbType.VarChar,50),
135
-                    new SqlParameter("@F_ModifyName", SqlDbType.NVarChar,200),
136
-                    new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2),
137
-                    new SqlParameter("@F_State", SqlDbType.Int,4),
130
+                    new SqlParameter("@F_CreateBy", SqlDbType.Int,4),
131
+                    new SqlParameter("@F_AuditID", SqlDbType.Int,4),
132
+                    new SqlParameter("@F_AuditOn", SqlDbType.DateTime),
133
+                    new SqlParameter("@F_AuditBy", SqlDbType.Int,4),
138 134
                     new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)};
139
-            parameters[0].Value = model.F_DeptId;
135
+            parameters[0].Value = model.F_CategoryId;
140 136
             parameters[1].Value = model.F_Title;
141 137
             parameters[2].Value = model.F_Content;
142 138
             parameters[3].Value = model.F_Description;
143
-            parameters[4].Value = model.F_Comments;
144
-            parameters[5].Value = model.F_Url;
145
-            parameters[6].Value = model.F_KeyWords;
146
-            parameters[7].Value = model.F_Expand1;
147
-            parameters[8].Value = model.F_Expand2;
148
-            parameters[9].Value = model.F_IntExpand1;
149
-            parameters[10].Value = model.F_CreateOn;
150
-            parameters[11].Value = model.F_CreateBy;
151
-            parameters[12].Value = model.F_CreateName;
152
-            parameters[13].Value = model.F_ModifyOn;
153
-            parameters[14].Value = model.F_ModifyBy;
154
-            parameters[15].Value = model.F_ModifyName;
155
-            parameters[16].Value = model.F_DeleteFlag;
156
-            parameters[17].Value = model.F_State;
157
-            parameters[18].Value = model.F_RepositoryId;
139
+            parameters[4].Value = model.F_Url;
140
+            parameters[5].Value = model.F_KeyWords;
141
+            parameters[6].Value = model.F_ClickCount;
142
+            parameters[7].Value = model.F_ISPass;
143
+            parameters[8].Value = model.F_ISSubmitAudit;
144
+            parameters[9].Value = model.F_Expand1;
145
+            parameters[10].Value = model.F_Expand2;
146
+            parameters[11].Value = model.F_IntExpand1;
147
+            parameters[12].Value = model.F_CreateOn;
148
+            parameters[13].Value = model.F_CreateBy;
149
+            parameters[14].Value = model.F_AuditID;
150
+            parameters[15].Value = model.F_AuditOn;
151
+            parameters[16].Value = model.F_AuditBy;
152
+            parameters[17].Value = model.F_RepositoryId;
158 153
 
159 154
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
160 155
             if (rows > 0)
@@ -218,7 +213,7 @@ namespace CallCenterApi.DAL
218 213
         {
219 214
 
220 215
             StringBuilder strSql = new StringBuilder();
221
-            strSql.Append("select  top 1 F_RepositoryId,F_DeptId,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_State from T_RepositoryInformation ");
216
+            strSql.Append("select  top 1 F_RepositoryId,F_CategoryId,F_Title,F_Content,F_Description,F_Url,F_KeyWords,F_ClickCount,F_ISPass,F_ISSubmitAudit,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_AuditID,F_AuditOn,F_AuditBy from T_RepositoryInformation ");
222 217
             strSql.Append(" where F_RepositoryId=@F_RepositoryId");
223 218
             SqlParameter[] parameters = {
224 219
                     new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)
@@ -250,9 +245,9 @@ namespace CallCenterApi.DAL
250 245
                 {
251 246
                     model.F_RepositoryId = int.Parse(row["F_RepositoryId"].ToString());
252 247
                 }
253
-                if (row["F_DeptId"] != null && row["F_DeptId"].ToString() != "")
248
+                if (row["F_CategoryId"] != null && row["F_CategoryId"].ToString() != "")
254 249
                 {
255
-                    model.F_DeptId = int.Parse(row["F_DeptId"].ToString());
250
+                    model.F_CategoryId = int.Parse(row["F_CategoryId"].ToString());
256 251
                 }
257 252
                 if (row["F_Title"] != null)
258 253
                 {
@@ -266,10 +261,6 @@ namespace CallCenterApi.DAL
266 261
                 {
267 262
                     model.F_Description = row["F_Description"].ToString();
268 263
                 }
269
-                if (row["F_Comments"] != null)
270
-                {
271
-                    model.F_Comments = row["F_Comments"].ToString();
272
-                }
273 264
                 if (row["F_Url"] != null)
274 265
                 {
275 266
                     model.F_Url = row["F_Url"].ToString();
@@ -278,6 +269,18 @@ namespace CallCenterApi.DAL
278 269
                 {
279 270
                     model.F_KeyWords = row["F_KeyWords"].ToString();
280 271
                 }
272
+                if (row["F_ClickCount"] != null && row["F_ClickCount"].ToString() != "")
273
+                {
274
+                    model.F_ClickCount = int.Parse(row["F_ClickCount"].ToString());
275
+                }
276
+                if (row["F_ISPass"] != null && row["F_ISPass"].ToString() != "")
277
+                {
278
+                    model.F_ISPass = int.Parse(row["F_ISPass"].ToString());
279
+                }
280
+                if (row["F_ISSubmitAudit"] != null && row["F_ISSubmitAudit"].ToString() != "")
281
+                {
282
+                    model.F_ISSubmitAudit = int.Parse(row["F_ISSubmitAudit"].ToString());
283
+                }
281 284
                 if (row["F_Expand1"] != null)
282 285
                 {
283 286
                     model.F_Expand1 = row["F_Expand1"].ToString();
@@ -294,33 +297,21 @@ namespace CallCenterApi.DAL
294 297
                 {
295 298
                     model.F_CreateOn = DateTime.Parse(row["F_CreateOn"].ToString());
296 299
                 }
297
-                if (row["F_CreateBy"] != null)
298
-                {
299
-                    model.F_CreateBy = row["F_CreateBy"].ToString();
300
-                }
301
-                if (row["F_CreateName"] != null)
302
-                {
303
-                    model.F_CreateName = row["F_CreateName"].ToString();
304
-                }
305
-                if (row["F_ModifyOn"] != null && row["F_ModifyOn"].ToString() != "")
306
-                {
307
-                    model.F_ModifyOn = DateTime.Parse(row["F_ModifyOn"].ToString());
308
-                }
309
-                if (row["F_ModifyBy"] != null)
300
+                if (row["F_CreateBy"] != null && row["F_CreateBy"].ToString() != "")
310 301
                 {
311
-                    model.F_ModifyBy = row["F_ModifyBy"].ToString();
302
+                    model.F_CreateBy = int.Parse(row["F_CreateBy"].ToString());
312 303
                 }
313
-                if (row["F_ModifyName"] != null)
304
+                if (row["F_AuditID"] != null && row["F_AuditID"].ToString() != "")
314 305
                 {
315
-                    model.F_ModifyName = row["F_ModifyName"].ToString();
306
+                    model.F_AuditID = int.Parse(row["F_AuditID"].ToString());
316 307
                 }
317
-                if (row["F_DeleteFlag"] != null && row["F_DeleteFlag"].ToString() != "")
308
+                if (row["F_AuditOn"] != null && row["F_AuditOn"].ToString() != "")
318 309
                 {
319
-                    model.F_DeleteFlag = int.Parse(row["F_DeleteFlag"].ToString());
310
+                    model.F_AuditOn = DateTime.Parse(row["F_AuditOn"].ToString());
320 311
                 }
321
-                if (row["F_State"] != null && row["F_State"].ToString() != "")
312
+                if (row["F_AuditBy"] != null && row["F_AuditBy"].ToString() != "")
322 313
                 {
323
-                    model.F_State = int.Parse(row["F_State"].ToString());
314
+                    model.F_AuditBy = int.Parse(row["F_AuditBy"].ToString());
324 315
                 }
325 316
             }
326 317
             return model;
@@ -332,7 +323,7 @@ namespace CallCenterApi.DAL
332 323
         public DataSet GetList(string strWhere)
333 324
         {
334 325
             StringBuilder strSql = new StringBuilder();
335
-            strSql.Append("select F_RepositoryId,F_DeptId,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_State ");
326
+            strSql.Append("select F_RepositoryId,F_CategoryId,F_Title,F_Content,F_Description,F_Url,F_KeyWords,F_ClickCount,F_ISPass,F_ISSubmitAudit,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_AuditID,F_AuditOn,F_AuditBy ");
336 327
             strSql.Append(" FROM T_RepositoryInformation ");
337 328
             if (strWhere.Trim() != "")
338 329
             {
@@ -352,7 +343,7 @@ namespace CallCenterApi.DAL
352 343
             {
353 344
                 strSql.Append(" top " + Top.ToString());
354 345
             }
355
-            strSql.Append(" F_RepositoryId,F_DeptId,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_State ");
346
+            strSql.Append(" F_RepositoryId,F_CategoryId,F_Title,F_Content,F_Description,F_Url,F_KeyWords,F_ClickCount,F_ISPass,F_ISSubmitAudit,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_AuditID,F_AuditOn,F_AuditBy ");
356 347
             strSql.Append(" FROM T_RepositoryInformation ");
357 348
             if (strWhere.Trim() != "")
358 349
             {
@@ -409,33 +400,82 @@ namespace CallCenterApi.DAL
409 400
             return DbHelperSQL.Query(strSql.ToString());
410 401
         }
411 402
 
412
-        /*
413
-		/// <summary>
414
-		/// 分页获取数据列表
415
-		/// </summary>
416
-		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
417
-		{
418
-			SqlParameter[] parameters = {
419
-					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
420
-					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
421
-					new SqlParameter("@PageSize", SqlDbType.Int),
422
-					new SqlParameter("@PageIndex", SqlDbType.Int),
423
-					new SqlParameter("@IsReCount", SqlDbType.Bit),
424
-					new SqlParameter("@OrderType", SqlDbType.Bit),
425
-					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
426
-					};
427
-			parameters[0].Value = "T_RepositoryInformation";
428
-			parameters[1].Value = "F_RepositoryId";
429
-			parameters[2].Value = PageSize;
430
-			parameters[3].Value = PageIndex;
431
-			parameters[4].Value = 0;
432
-			parameters[5].Value = 0;
433
-			parameters[6].Value = strWhere;	
434
-			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
435
-		}*/
436
-
437 403
         #endregion  BasicMethod
438 404
         #region  ExtensionMethod
405
+        /// <summary>
406
+        /// 更新点击量
407
+        /// </summary>
408
+        public bool UpdateClick(int rid)
409
+        {
410
+            StringBuilder strSql = new StringBuilder();
411
+            strSql.Append("update T_RepositoryInformation set ");
412
+            strSql.Append(" F_ClickCount=F_ClickCount+1 ");
413
+            strSql.Append(" where F_RepositoryId=@F_RepositoryId");
414
+            SqlParameter[] parameters = {
415
+                    new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)};
416
+            parameters[0].Value = rid;
417
+
418
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
419
+            if (rows > 0)
420
+            {
421
+                return true;
422
+            }
423
+            else
424
+            {
425
+                return false;
426
+            }
427
+        }
428
+        /// <summary>
429
+        /// 更新审核ID 
430
+        /// </summary>
431
+        public bool UpdateAuditID(int rid,int auditid)
432
+        {
433
+            StringBuilder strSql = new StringBuilder();
434
+            strSql.Append("update T_RepositoryInformation set ");
435
+            strSql.Append(" F_AuditID=@F_AuditID ");
436
+            strSql.Append(" where F_RepositoryId=@F_RepositoryId");
437
+            SqlParameter[] parameters = {
438
+                    new SqlParameter("@F_AuditID", SqlDbType.Int,4),
439
+                    new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)};
440
+            parameters[0].Value = auditid;
441
+            parameters[1].Value = rid;
442
+
443
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
444
+            if (rows > 0)
445
+            {
446
+                return true;
447
+            }
448
+            else
449
+            {
450
+                return false;
451
+            }
452
+        }
453
+        /// <summary>
454
+        /// 更新审核
455
+        /// </summary>
456
+        public bool UpdateAudit(int rid, int audituserid)
457
+        {
458
+            StringBuilder strSql = new StringBuilder();
459
+            strSql.Append("update T_RepositoryInformation set ");
460
+            strSql.Append(" F_AuditOn=getdate(), ");
461
+            strSql.Append(" F_AuditBy=@F_AuditBy, ");
462
+            strSql.Append(" where F_RepositoryId=@F_RepositoryId");
463
+            SqlParameter[] parameters = {
464
+                    new SqlParameter("@F_AuditBy", SqlDbType.Int,4),
465
+                    new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)};
466
+            parameters[0].Value = audituserid;
467
+            parameters[1].Value = rid;
468
+
469
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
470
+            if (rows > 0)
471
+            {
472
+                return true;
473
+            }
474
+            else
475
+            {
476
+                return false;
477
+            }
478
+        }
439 479
 
440 480
         #endregion  ExtensionMethod
441 481
     }

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

@@ -159,6 +159,7 @@
159 159
     <Compile Include="Controllers\HomeController.cs" />
160 160
     <Compile Include="Controllers\IndexController.cs" />
161 161
     <Compile Include="Controllers\InfoController.cs" />
162
+    <Compile Include="Controllers\knowledge\KnowledgeClassController.cs" />
162 163
     <Compile Include="Controllers\knowledge\KnowledgeController.cs" />
163 164
     <Compile Include="Controllers\LogController.cs" />
164 165
     <Compile Include="Controllers\Login\LoginController.cs" />

+ 231 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs

@@ -0,0 +1,231 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.Interface.Controllers.Base;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Data;
6
+using System.Linq;
7
+using System.Web;
8
+using System.Web.Mvc;
9
+
10
+namespace CallCenterApi.Interface.Controllers.knowledge
11
+{
12
+    public class KnowledgeClassController : BaseController
13
+    {
14
+        // 获取知识库分类列表
15
+        public ActionResult GetAllList()
16
+        {
17
+            ActionResult res = NoToken("未知错误,请重新登录");
18
+
19
+            DataTable dt = new DataTable();
20
+            string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));
21
+            string sql = "";
22
+
23
+            dt = new BLL.T_RepositoryCategory().GetList(sql).Tables[0];
24
+
25
+            res = Success("加载成功", dt);
26
+
27
+            return res;
28
+        }
29
+        // 获取知识库分类列表
30
+        public ActionResult GetList()
31
+        {
32
+            ActionResult res = NoToken("未知错误,请重新登录");
33
+
34
+            DataTable dt = new DataTable();
35
+            string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));
36
+            string sql = "";
37
+            if (pid.Trim() != "")
38
+            {
39
+                sql += " and F_ParentId=" + pid.Trim();
40
+            }
41
+            else
42
+                sql += " and F_ParentId=0";
43
+
44
+            dt = new BLL.T_RepositoryCategory().GetList(" 1=1 " + sql).Tables[0];
45
+            List<Model.TreeModel> modelList = BindTree(dt, "0");
46
+
47
+            if (modelList.Count > 0)
48
+            {
49
+                res = Success("加载成功", modelList);
50
+            }
51
+            else
52
+                res = Error("加载失败");
53
+
54
+            return res;
55
+        }
56
+        //tree  树形知识库分类
57
+        private List<Model.TreeModel> BindTree(DataTable tab, string parentid)
58
+        {
59
+            DataTable tab2 = new DataTable();
60
+
61
+            if (tab != null && tab.Rows.Count > 0)
62
+            {
63
+                List<Model.T_RepositoryCategory> categorylist = new BLL.T_RepositoryCategory().DataTableToList(tab);
64
+                List<Model.TreeModel> modelList = new List<Model.TreeModel>(categorylist.Count);
65
+                for (int i = 0; i < categorylist.Count; i++)
66
+                {
67
+                    Model.TreeModel model = new Model.TreeModel();
68
+                    string currentID = categorylist[i].F_CategoryId.ToString();//当前功能ID
69
+                    model.id = currentID;
70
+                    model.IconCls = "";//图标
71
+                    model.text = categorylist[i].F_CategoryName;
72
+                    tab2 = new BLL.T_RepositoryCategory().GetList(" F_ParentId=" + currentID + " ").Tables[0];
73
+                    if (tab2 != null && tab2.Rows.Count > 0)
74
+                    {
75
+                        model.children = BindTree(tab2, currentID);
76
+                    }
77
+                    modelList.Add(model);
78
+                }
79
+                return modelList;
80
+
81
+            }
82
+            else
83
+            {
84
+                return null;
85
+            }
86
+
87
+        }
88
+
89
+        //获取知识库分类
90
+        public ActionResult GetClass(string categoryid)
91
+        {
92
+            ActionResult res = NoToken("未知错误,请重新登录");
93
+
94
+            if (categoryid != null && categoryid.Trim() != "")
95
+            {
96
+                BLL.T_RepositoryCategory dBLL = new BLL.T_RepositoryCategory();
97
+                Model.T_RepositoryCategory dModel = dBLL.GetModel(int.Parse(categoryid.Trim()));
98
+                if (dModel != null)
99
+                {
100
+                    res = Success("获取知识库分类信息成功", dModel);
101
+                }
102
+                else
103
+                {
104
+                    res = Error("获取知识库分类信息失败");
105
+                }
106
+            }
107
+            else
108
+            {
109
+                res = Error("获取参数失败");
110
+            }
111
+
112
+            return res;
113
+        }
114
+        //[Authority]
115
+        //添加知识库分类
116
+        public ActionResult AddClass(string cname, string pid)
117
+        {
118
+            ActionResult res = NoToken("未知错误,请重新登录");
119
+            if (Request.IsAuthenticated)
120
+            {
121
+
122
+                Model.T_RepositoryCategory dModel = new Model.T_RepositoryCategory();
123
+                if (pid != "")
124
+                {
125
+                    dModel.F_ParentId = int.Parse(pid.Trim());
126
+                }
127
+                else
128
+                    dModel.F_ParentId = 0;
129
+                
130
+                dModel.F_CategoryName = cname.Trim();
131
+
132
+                dModel.F_CreateOn = DateTime.Now;
133
+                dModel.F_CreateBy = int.Parse(User.UserData["F_UserID"]);
134
+                
135
+                int b = new BLL.T_RepositoryCategory().Add(dModel);
136
+                if (b > 0)
137
+                {
138
+                    res = Success("添加成功");
139
+                }
140
+                else
141
+                {
142
+                    res = Success("添加失败");
143
+                }
144
+
145
+            }
146
+            return res;
147
+        }
148
+        //[Authority]
149
+        //编辑知识库分类
150
+        public ActionResult EditClass(string cid, string cname, string pid)
151
+        {
152
+            ActionResult res = NoToken("未知错误,请重新登录");
153
+            if (Request.IsAuthenticated)
154
+            {
155
+
156
+                if (cid != null && cid.Trim() != "")
157
+                {
158
+                    BLL.T_RepositoryCategory dBLL = new BLL.T_RepositoryCategory();
159
+                    Model.T_RepositoryCategory dModel = dBLL.GetModel(int.Parse(cid.Trim()));
160
+                    if (dModel != null)
161
+                    {
162
+                        if (pid.Trim() != "")
163
+                        {
164
+                            dModel.F_ParentId = int.Parse(pid.Trim());
165
+                        }
166
+                        
167
+                        if (cname.Trim() != "")
168
+                        {
169
+                            dModel.F_CategoryName = cname.Trim();
170
+                        }
171
+                        bool b = dBLL.Update(dModel);
172
+                        if (b)
173
+                        {
174
+                            res = Success("编辑成功");
175
+                        }
176
+                        else
177
+                        {
178
+                            res = Success("编辑失败");
179
+                        }
180
+                    }
181
+                    else
182
+                        res = Error("获取信息失败");
183
+                }
184
+                else
185
+                {
186
+                    res = Error("请选择要编辑的知识库分类");
187
+                }
188
+
189
+            }
190
+            return res;
191
+        }
192
+        //[Authority]
193
+        //删除知识库分类
194
+        public ActionResult DelClass(string ids)
195
+        {
196
+            ActionResult res = NoToken("未知错误,请重新登录");
197
+            
198
+            if (ids != null && ids.Length > 0)
199
+            {
200
+                DataTable dt = new BLL.T_RepositoryInformation().GetList("F_CategoryId=" + Convert.ToInt32(ids)).Tables[0];
201
+                string rid = string.Empty;
202
+                if (dt.Rows.Count > 0)
203
+                {
204
+                    //先删除知识库信息再删除知识库分类
205
+                    for (int i = 0; i < dt.Rows.Count; i++)
206
+                    {
207
+                        rid = dt.Rows[i]["F_RepositoryId"].ToString();
208
+                        if (!string.IsNullOrEmpty(rid))
209
+                        {
210
+                            new BLL.T_RepositoryInformation().Delete(Convert.ToInt32(rid));
211
+                        }
212
+                    }
213
+                }
214
+                bool r = new BLL.T_RepositoryCategory().Delete(Convert.ToInt32(ids));
215
+
216
+                if (r)
217
+                    res = Success("删除成功");
218
+                else
219
+                {
220
+                    res = Error("删除失败");
221
+                }
222
+            }
223
+            else
224
+            {
225
+                res = Error("获取参数失败");
226
+            }
227
+
228
+            return res;
229
+        }
230
+    }
231
+}

+ 19 - 46
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -11,6 +11,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
11 11
 {
12 12
     public class KnowledgeController : BaseController
13 13
     {
14
+        BLL.T_RepositoryInformation dBLL = new BLL.T_RepositoryInformation();
14 15
         // 获取知识库列表
15 16
         public ActionResult GetList()
16 17
         {
@@ -25,7 +26,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
25 26
                 string strpagesize = RequestString.GetQueryString("pagesize");
26 27
                 int pagesize = 10;
27 28
 
28
-                string sql = " and F_DeleteFlag=0";
29
+                string sql = " ";
29 30
                 if (pid.Trim() != "")
30 31
                 {
31 32
                     sql += " and F_CategoryId=" + pid.Trim();
@@ -49,7 +50,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
49 50
                 dt = BLL.PagerBLL.GetListPager(
50 51
                     "T_RepositoryInformation",
51 52
                     "F_RepositoryId",
52
-                    "*,dbo.GetDeptName(F_DeptId) as DeptName",
53
+                    "*",
53 54
                     sql,
54 55
                     "ORDER BY F_RepositoryId desc",
55 56
                     pagesize,
@@ -57,15 +58,6 @@ namespace CallCenterApi.Interface.Controllers.knowledge
57 58
                     true,
58 59
                     out recordCount);
59 60
 
60
-                //System.Collections.Generic.List<Model.T_RepositoryInformation> modelList = new BLL.T_RepositoryInformation().DataTableToList(dt);
61
-
62
-                //if (modelList.Count > 0)
63
-                //{
64
-                //    res = Success("加载成功", modelList);
65
-                //}
66
-                //else
67
-                //    res = Error("加载失败");
68
-
69 61
                 var obj = new
70 62
                 {
71 63
                     rows = dt,
@@ -86,18 +78,12 @@ namespace CallCenterApi.Interface.Controllers.knowledge
86 78
             {
87 79
                 if (infoid != null && infoid.Trim() != "")
88 80
                 {
89
-                    BLL.T_RepositoryInformation dBLL = new BLL.T_RepositoryInformation();
90 81
                     Model.T_RepositoryInformation dModel = dBLL.GetModel(int.Parse(infoid.Trim()));
91 82
                     if (dModel != null)
92 83
                     {
93
-                        var cate = new BLL.T_Sys_Department().GetModel(dModel.F_DeptId.Value);
94
-
95
-                        var obj = new
96
-                        {
97
-                            data = dModel,
98
-                            catename = (cate == null?"": cate.F_DeptName)
99
-                        };
100
-                        res = Success("获取知识库信息成功", obj);
84
+                        //获取信息更新点击量
85
+                        dBLL.UpdateClick(int.Parse(infoid.Trim()));
86
+                        res = Success("获取知识库信息成功", dModel);
101 87
                     }
102 88
                     else
103 89
                     {
@@ -121,15 +107,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
121 107
             if (Request.IsAuthenticated)
122 108
             {
123 109
                 Model.T_RepositoryInformation dModel = new Model.T_RepositoryInformation();
124
-                if (pid.Trim() != "")
125
-                {
126
-                    Model.T_Sys_Department pModel = new BLL.T_Sys_Department().GetModel(int.Parse(pid.Trim()));
127
-                    dModel.F_DeptId = int.Parse(pid.Trim());
128
-                    if (pModel != null)
129
-                        dModel.F_Expand1 = pModel.F_DeptName;
130
-                }
131
-                else
132
-                    dModel.F_DeptId = 0;
110
+                
133 111
 
134 112
                 dModel.F_Title = title.Trim();
135 113
                 dModel.F_KeyWords = key.Trim();
@@ -137,10 +115,9 @@ namespace CallCenterApi.Interface.Controllers.knowledge
137 115
                 dModel.F_Description = WebHelper.NoHtml(WebHelper.UrlDecode(con.Trim()));
138 116
 
139 117
                 dModel.F_CreateOn = DateTime.Now;
140
-                dModel.F_ModifyOn = DateTime.Now;
141
-                dModel.F_CreateBy = User.UserData["F_UserCode"];
142
-                dModel.F_DeleteFlag = 0;
143
-                int b = new BLL.T_RepositoryInformation().Add(dModel);
118
+                dModel.F_CreateBy = int.Parse(User.UserData["F_UserID"]);
119
+                
120
+                int b = dBLL.Add(dModel);
144 121
                 if (b > 0)
145 122
                 {
146 123
                     res = Success("添加成功");
@@ -162,17 +139,9 @@ namespace CallCenterApi.Interface.Controllers.knowledge
162 139
             {
163 140
                 if (infoid != null && infoid.Trim() != "")
164 141
                 {
165
-                    BLL.T_RepositoryInformation dBLL = new BLL.T_RepositoryInformation();
166 142
                     Model.T_RepositoryInformation dModel = dBLL.GetModel(int.Parse(infoid.Trim()));
167 143
                     if (dModel != null)
168 144
                     {
169
-                        if (pid.Trim() != "")
170
-                        {
171
-                            Model.T_Sys_Department pModel = new BLL.T_Sys_Department().GetModel(int.Parse(pid.Trim()));
172
-                            dModel.F_DeptId = int.Parse(pid.Trim());
173
-                            if (pModel != null)
174
-                                dModel.F_Expand1 = pModel.F_DeptName;
175
-                        }
176 145
                         if (title.Trim() != "")
177 146
                         {
178 147
                             dModel.F_Title = title.Trim();
@@ -186,9 +155,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
186 155
                             dModel.F_Content = WebHelper.UrlDecode(con.Trim());
187 156
                             dModel.F_Description = WebHelper.NoHtml(WebHelper.UrlDecode(con.Trim()));
188 157
                         }
189
-
190
-                        dModel.F_ModifyBy = User.UserData["F_UserCode"];
191
-                        dModel.F_ModifyOn = DateTime.Now;
158
+                        
192 159
                         bool b = dBLL.Update(dModel);
193 160
                         if (b)
194 161
                         {
@@ -217,7 +184,6 @@ namespace CallCenterApi.Interface.Controllers.knowledge
217 184
             ActionResult res = NoToken("未知错误,请重新登录");
218 185
             if (Request.IsAuthenticated)
219 186
             {
220
-                //string ids = RequestString.GetQueryString("ids");
221 187
                 if (ids != null && ids.Length > 0)
222 188
                 {
223 189
                     string idd = " ";
@@ -225,7 +191,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
225 191
                     {
226 192
                         idd += str + ",";
227 193
                     }
228
-                    if (new BLL.T_RepositoryInformation().DeleteList(idd.TrimEnd(',')))
194
+                    if (dBLL.DeleteList(idd.TrimEnd(',')))
229 195
                     {
230 196
                         res = Success("删除成功");
231 197
                     }
@@ -239,5 +205,12 @@ namespace CallCenterApi.Interface.Controllers.knowledge
239 205
             }
240 206
             return res;
241 207
         }
208
+
209
+        private int auditandlog(int rid,int userid,int action)
210
+        {
211
+            int auditid = 0;
212
+
213
+            return auditid;
214
+        }
242 215
     }
243 216
 }

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

@@ -60,6 +60,8 @@
60 60
     <Compile Include="T_Call_ZBDH.cs" />
61 61
     <Compile Include="T_CTI_Task.cs" />
62 62
     <Compile Include="T_Cus_CustomerBase.cs" />
63
+    <Compile Include="T_RepositoryAudit.cs" />
64
+    <Compile Include="T_RepositoryCategory.cs" />
63 65
     <Compile Include="T_RepositoryInformation.cs" />
64 66
     <Compile Include="T_SMS_RecvSMS.cs" />
65 67
     <Compile Include="T_SMS_SendSMSTask.cs" />

+ 146 - 0
CallCenterApi/CallCenterApi.Model/T_RepositoryAudit.cs

@@ -0,0 +1,146 @@
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_RepositoryAudit:实体类(属性说明自动提取数据库字段的描述信息)
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_RepositoryAudit
14
+    {
15
+        public T_RepositoryAudit()
16
+        { }
17
+        #region Model
18
+        private int _f_auditid;
19
+        private int? _f_repositoryid;
20
+        private int? _f_action;
21
+        private DateTime? _f_createon;
22
+        private int? _f_createby;
23
+        private int? _f_prelogid;
24
+        private int? _f_afterlogid;
25
+        private DateTime? _f_auditon;
26
+        private int? _f_auditby;
27
+        private int? _f_ispass;
28
+        private string _f_auditremark;
29
+        private string _f_expand1;
30
+        private string _f_expand2;
31
+        private int? _f_intexpand1;
32
+        /// <summary>
33
+        /// 审核ID
34
+        /// </summary>
35
+        public int F_AuditId
36
+        {
37
+            set { _f_auditid = value; }
38
+            get { return _f_auditid; }
39
+        }
40
+        /// <summary>
41
+        /// 知识库条目ID
42
+        /// </summary>
43
+        public int? F_RepositoryId
44
+        {
45
+            set { _f_repositoryid = value; }
46
+            get { return _f_repositoryid; }
47
+        }
48
+        /// <summary>
49
+        /// 操作(1添加2修改3删除)
50
+        /// </summary>
51
+        public int? F_Action
52
+        {
53
+            set { _f_action = value; }
54
+            get { return _f_action; }
55
+        }
56
+        /// <summary>
57
+        /// 添加时间
58
+        /// </summary>
59
+        public DateTime? F_CreateOn
60
+        {
61
+            set { _f_createon = value; }
62
+            get { return _f_createon; }
63
+        }
64
+        /// <summary>
65
+        /// 添加人
66
+        /// </summary>
67
+        public int? F_CreateBy
68
+        {
69
+            set { _f_createby = value; }
70
+            get { return _f_createby; }
71
+        }
72
+        /// <summary>
73
+        /// 修改前内容id
74
+        /// </summary>
75
+        public int? F_PreLogID
76
+        {
77
+            set { _f_prelogid = value; }
78
+            get { return _f_prelogid; }
79
+        }
80
+        /// <summary>
81
+        /// 修改后内容id
82
+        /// </summary>
83
+        public int? F_AfterLogID
84
+        {
85
+            set { _f_afterlogid = value; }
86
+            get { return _f_afterlogid; }
87
+        }
88
+        /// <summary>
89
+        /// 审核时间
90
+        /// </summary>
91
+        public DateTime? F_AuditOn
92
+        {
93
+            set { _f_auditon = value; }
94
+            get { return _f_auditon; }
95
+        }
96
+        /// <summary>
97
+        /// 审核人
98
+        /// </summary>
99
+        public int? F_AuditBy
100
+        {
101
+            set { _f_auditby = value; }
102
+            get { return _f_auditby; }
103
+        }
104
+        /// <summary>
105
+        /// 是否通过审核(1是-2否-0未审核)
106
+        /// </summary>
107
+        public int? F_ISPass
108
+        {
109
+            set { _f_ispass = value; }
110
+            get { return _f_ispass; }
111
+        }
112
+        /// <summary>
113
+        /// 审核备注
114
+        /// </summary>
115
+        public string F_AuditRemark
116
+        {
117
+            set { _f_auditremark = value; }
118
+            get { return _f_auditremark; }
119
+        }
120
+        /// <summary>
121
+        /// 扩展
122
+        /// </summary>
123
+        public string F_Expand1
124
+        {
125
+            set { _f_expand1 = value; }
126
+            get { return _f_expand1; }
127
+        }
128
+        /// <summary>
129
+        /// 扩展2
130
+        /// </summary>
131
+        public string F_Expand2
132
+        {
133
+            set { _f_expand2 = value; }
134
+            get { return _f_expand2; }
135
+        }
136
+        /// <summary>
137
+        /// Int扩展
138
+        /// </summary>
139
+        public int? F_IntExpand1
140
+        {
141
+            set { _f_intexpand1 = value; }
142
+            get { return _f_intexpand1; }
143
+        }
144
+        #endregion Model
145
+    }
146
+}

+ 92 - 0
CallCenterApi/CallCenterApi.Model/T_RepositoryCategory.cs

@@ -0,0 +1,92 @@
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_RepositoryCategory:实体类(属性说明自动提取数据库字段的描述信息)
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_RepositoryCategory
14
+    {
15
+        public T_RepositoryCategory()
16
+        { }
17
+        #region Model
18
+        private int _f_categoryid;
19
+        private string _f_categoryname;
20
+        private int? _f_parentid;
21
+        private string _f_parentpath;
22
+        private string _f_expand1;
23
+        private string _f_expand2;
24
+        private DateTime? _f_createon;
25
+        private int? _f_createby;
26
+        /// <summary>
27
+        /// 分类id
28
+        /// </summary>
29
+        public int F_CategoryId
30
+        {
31
+            set { _f_categoryid = value; }
32
+            get { return _f_categoryid; }
33
+        }
34
+        /// <summary>
35
+        /// 分类名称
36
+        /// </summary>
37
+        public string F_CategoryName
38
+        {
39
+            set { _f_categoryname = value; }
40
+            get { return _f_categoryname; }
41
+        }
42
+        /// <summary>
43
+        /// 父id
44
+        /// </summary>
45
+        public int? F_ParentId
46
+        {
47
+            set { _f_parentid = value; }
48
+            get { return _f_parentid; }
49
+        }
50
+        /// <summary>
51
+        /// 父路径
52
+        /// </summary>
53
+        public string F_ParentPath
54
+        {
55
+            set { _f_parentpath = value; }
56
+            get { return _f_parentpath; }
57
+        }
58
+        /// <summary>
59
+        /// 扩展
60
+        /// </summary>
61
+        public string F_Expand1
62
+        {
63
+            set { _f_expand1 = value; }
64
+            get { return _f_expand1; }
65
+        }
66
+        /// <summary>
67
+        /// 扩展2
68
+        /// </summary>
69
+        public string F_Expand2
70
+        {
71
+            set { _f_expand2 = value; }
72
+            get { return _f_expand2; }
73
+        }
74
+        /// <summary>
75
+        /// 添加时间
76
+        /// </summary>
77
+        public DateTime? F_CreateOn
78
+        {
79
+            set { _f_createon = value; }
80
+            get { return _f_createon; }
81
+        }
82
+        /// <summary>
83
+        /// 添加人
84
+        /// </summary>
85
+        public int? F_CreateBy
86
+        {
87
+            set { _f_createby = value; }
88
+            get { return _f_createby; }
89
+        }
90
+        #endregion Model
91
+    }
92
+}

+ 61 - 70
CallCenterApi/CallCenterApi.Model/T_RepositoryInformation.cs

@@ -2,35 +2,34 @@
2 2
 namespace CallCenterApi.Model
3 3
 {
4 4
     /// <summary>
5
-    /// T_RepositoryInformation:实体类(属性说明自动提取数据库字段的描述信息)
6
-    /// </summary>
7
-    [Serializable]
5
+	/// T_RepositoryInformation:实体类(属性说明自动提取数据库字段的描述信息)
6
+	/// </summary>
7
+	[Serializable]
8 8
     public partial class T_RepositoryInformation
9 9
     {
10 10
         public T_RepositoryInformation()
11 11
         { }
12 12
         #region Model
13 13
         private int _f_repositoryid;
14
-        private int? _f_deptid;
14
+        private int? _f_categoryid;
15 15
         private string _f_title;
16 16
         private string _f_content;
17 17
         private string _f_description;
18
-        private string _f_comments;
19 18
         private string _f_url;
20 19
         private string _f_keywords;
20
+        private int? _f_clickcount;
21
+        private int? _f_ispass;
22
+        private int? _f_issubmitaudit;
21 23
         private string _f_expand1;
22 24
         private string _f_expand2;
23 25
         private int? _f_intexpand1;
24 26
         private DateTime? _f_createon;
25
-        private string _f_createby;
26
-        private string _f_createname;
27
-        private DateTime? _f_modifyon;
28
-        private string _f_modifyby;
29
-        private string _f_modifyname;
30
-        private int _f_deleteflag = 0;
31
-        private int? _f_state;
27
+        private int? _f_createby;
28
+        private int? _f_auditid;
29
+        private DateTime? _f_auditon;
30
+        private int? _f_auditby;
32 31
         /// <summary>
33
-        /// id
32
+        /// 知识库条目id
34 33
         /// </summary>
35 34
         public int F_RepositoryId
36 35
         {
@@ -38,15 +37,15 @@ namespace CallCenterApi.Model
38 37
             get { return _f_repositoryid; }
39 38
         }
40 39
         /// <summary>
41
-        /// 部门id
40
+        /// 分类id
42 41
         /// </summary>
43
-        public int? F_DeptId
42
+        public int? F_CategoryId
44 43
         {
45
-            set { _f_deptid = value; }
46
-            get { return _f_deptid; }
44
+            set { _f_categoryid = value; }
45
+            get { return _f_categoryid; }
47 46
         }
48 47
         /// <summary>
49
-        /// 标题
48
+        /// 知识库条目名称
50 49
         /// </summary>
51 50
         public string F_Title
52 51
         {
@@ -54,7 +53,7 @@ namespace CallCenterApi.Model
54 53
             get { return _f_title; }
55 54
         }
56 55
         /// <summary>
57
-        /// 内容
56
+        /// 知识库条目内容
58 57
         /// </summary>
59 58
         public string F_Content
60 59
         {
@@ -70,15 +69,7 @@ namespace CallCenterApi.Model
70 69
             get { return _f_description; }
71 70
         }
72 71
         /// <summary>
73
-        /// 
74
-        /// </summary>
75
-        public string F_Comments
76
-        {
77
-            set { _f_comments = value; }
78
-            get { return _f_comments; }
79
-        }
80
-        /// <summary>
81
-        /// 
72
+        /// 附件地址(可多个)
82 73
         /// </summary>
83 74
         public string F_Url
84 75
         {
@@ -86,7 +77,7 @@ namespace CallCenterApi.Model
86 77
             get { return _f_url; }
87 78
         }
88 79
         /// <summary>
89
-        /// 
80
+        /// 关键字
90 81
         /// </summary>
91 82
         public string F_KeyWords
92 83
         {
@@ -94,15 +85,39 @@ namespace CallCenterApi.Model
94 85
             get { return _f_keywords; }
95 86
         }
96 87
         /// <summary>
88
+        /// 点击量
89
+        /// </summary>
90
+        public int? F_ClickCount
91
+        {
92
+            set { _f_clickcount = value; }
93
+            get { return _f_clickcount; }
94
+        }
95
+        /// <summary>
96
+        /// 是否通过审核(1是-2否-0未审核)
97
+        /// </summary>
98
+        public int? F_ISPass
99
+        {
100
+            set { _f_ispass = value; }
101
+            get { return _f_ispass; }
102
+        }
103
+        /// <summary>
97 104
         /// 
98 105
         /// </summary>
106
+        public int? F_ISSubmitAudit
107
+        {
108
+            set { _f_issubmitaudit = value; }
109
+            get { return _f_issubmitaudit; }
110
+        }
111
+        /// <summary>
112
+        /// 扩展
113
+        /// </summary>
99 114
         public string F_Expand1
100 115
         {
101 116
             set { _f_expand1 = value; }
102 117
             get { return _f_expand1; }
103 118
         }
104 119
         /// <summary>
105
-        /// 
120
+        /// 扩展2
106 121
         /// </summary>
107 122
         public string F_Expand2
108 123
         {
@@ -110,7 +125,7 @@ namespace CallCenterApi.Model
110 125
             get { return _f_expand2; }
111 126
         }
112 127
         /// <summary>
113
-        /// 
128
+        /// Int扩展
114 129
         /// </summary>
115 130
         public int? F_IntExpand1
116 131
         {
@@ -118,7 +133,7 @@ namespace CallCenterApi.Model
118 133
             get { return _f_intexpand1; }
119 134
         }
120 135
         /// <summary>
121
-        /// 
136
+        /// 添加时间
122 137
         /// </summary>
123 138
         public DateTime? F_CreateOn
124 139
         {
@@ -126,60 +141,36 @@ namespace CallCenterApi.Model
126 141
             get { return _f_createon; }
127 142
         }
128 143
         /// <summary>
129
-        /// 
144
+        /// 添加人
130 145
         /// </summary>
131
-        public string F_CreateBy
146
+        public int? F_CreateBy
132 147
         {
133 148
             set { _f_createby = value; }
134 149
             get { return _f_createby; }
135 150
         }
136 151
         /// <summary>
137
-        /// 
138
-        /// </summary>
139
-        public string F_CreateName
140
-        {
141
-            set { _f_createname = value; }
142
-            get { return _f_createname; }
143
-        }
144
-        /// <summary>
145
-        /// 
146
-        /// </summary>
147
-        public DateTime? F_ModifyOn
148
-        {
149
-            set { _f_modifyon = value; }
150
-            get { return _f_modifyon; }
151
-        }
152
-        /// <summary>
153
-        /// 
154
-        /// </summary>
155
-        public string F_ModifyBy
156
-        {
157
-            set { _f_modifyby = value; }
158
-            get { return _f_modifyby; }
159
-        }
160
-        /// <summary>
161
-        /// 
152
+        /// 审核ID
162 153
         /// </summary>
163
-        public string F_ModifyName
154
+        public int? F_AuditID
164 155
         {
165
-            set { _f_modifyname = value; }
166
-            get { return _f_modifyname; }
156
+            set { _f_auditid = value; }
157
+            get { return _f_auditid; }
167 158
         }
168 159
         /// <summary>
169
-        /// 
160
+        /// 审核时间
170 161
         /// </summary>
171
-        public int F_DeleteFlag
162
+        public DateTime? F_AuditOn
172 163
         {
173
-            set { _f_deleteflag = value; }
174
-            get { return _f_deleteflag; }
164
+            set { _f_auditon = value; }
165
+            get { return _f_auditon; }
175 166
         }
176 167
         /// <summary>
177
-        /// 0审批中,1审批通过,-1审批不通过
168
+        /// 审核人
178 169
         /// </summary>
179
-        public int? F_State
170
+        public int? F_AuditBy
180 171
         {
181
-            set { _f_state = value; }
182
-            get { return _f_state; }
172
+            set { _f_auditby = value; }
173
+            get { return _f_auditby; }
183 174
         }
184 175
         #endregion Model
185 176
 

+ 46 - 0
CallCenterApi/CallCenterApi.Model/TreeModel.cs

@@ -0,0 +1,46 @@
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
+    public class TreeModel
10
+    {
11
+        private string _id;
12
+        /// <summary>
13
+        /// Id
14
+        /// </summary>
15
+        public string id
16
+        {
17
+            set { _id = value; }
18
+            get { return _id; }
19
+        }
20
+
21
+        private string iconCls;
22
+        /// <summary>
23
+        /// 图标
24
+        /// </summary>
25
+        public string IconCls
26
+        {
27
+            set { iconCls = value; }
28
+            get { return iconCls; }
29
+        }
30
+        private string _text;
31
+        /// <summary>
32
+        /// 树节点显示文本
33
+        /// </summary>
34
+        public string text
35
+        {
36
+            set { _text = value; }
37
+            get { return _text; }
38
+        }
39
+        private List<TreeModel> _children;
40
+        public List<TreeModel> children
41
+        {
42
+            set { _children = value; }
43
+            get { return _children; }
44
+        }
45
+    }
46
+}