Sfoglia il codice sorgente

知识库,来电弹屏,数据字典修改

gaobingyue 5 anni fa
parent
commit
deb04e1d40
16 ha cambiato i file con 1163 aggiunte e 29 eliminazioni
  1. 1 0
      codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj
  2. 17 10
      codegit/CallCenterApi/CallCenterApi.BLL/T_RepositoryInformation.cs
  3. 195 0
      codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_AccessLog.cs
  4. 1 0
      codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj
  5. 126 6
      codegit/CallCenterApi/CallCenterApi.DAL/T_Rec_RegRecords.cs
  6. 14 5
      codegit/CallCenterApi/CallCenterApi.DAL/T_RepositoryInformation.cs
  7. 316 0
      codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_AccessLog.cs
  8. 1 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj
  9. 262 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AccessLogController.cs
  10. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs
  11. 21 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RegRecords/RegRecordsController.cs
  12. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs
  13. 39 4
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs
  14. 1 0
      codegit/CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj
  15. 89 1
      codegit/CallCenterApi/CallCenterApi.Model/T_Rec_RegRecords.cs
  16. 78 0
      codegit/CallCenterApi/CallCenterApi.Model/T_Sys_AccessLog.cs

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

@@ -60,6 +60,7 @@
60 60
     <Compile Include="T_RegionCategory.cs" />
61 61
     <Compile Include="T_RepositoryCategory.cs" />
62 62
     <Compile Include="T_RepositoryInformation.cs" />
63
+    <Compile Include="T_Sys_AccessLog.cs" />
63 64
     <Compile Include="T_Sys_Accessories.cs" />
64 65
     <Compile Include="T_Sys_Area.cs" />
65 66
     <Compile Include="T_Sys_Department.cs" />

+ 17 - 10
codegit/CallCenterApi/CallCenterApi.BLL/T_RepositoryInformation.cs

@@ -13,6 +13,7 @@ namespace CallCenterApi.BLL
13 13
 	public partial class T_RepositoryInformation
14 14
     {
15 15
         private readonly DAL.T_RepositoryInformation dal = new DAL.T_RepositoryInformation();
16
+       
16 17
         public T_RepositoryInformation()
17 18
         { }
18 19
         #region  BasicMethod
@@ -36,26 +37,31 @@ namespace CallCenterApi.BLL
36 37
         /// <summary>
37 38
         /// 增加一条数据
38 39
         /// </summary>
39
-        public int Add(Model.T_RepositoryInformation model)
40
+        public int Add(Model.T_RepositoryInformation model,int userId )
40 41
         {
41
-            return dal.Add(model);
42
+           
43
+            return dal.Add(model, userId);
44
+           
42 45
         }
43 46
 
44 47
         /// <summary>
45 48
         /// 更新一条数据
46 49
         /// </summary>
47
-        public bool Update(Model.T_RepositoryInformation model)
50
+        public bool Update(Model.T_RepositoryInformation model,int userId)
48 51
         {
49
-            return dal.Update(model);
52
+         
53
+            return dal.Update(model, userId);
54
+          
50 55
         }
51 56
 
52 57
         /// <summary>
53 58
         /// 删除一条数据
54 59
         /// </summary>
55
-        public bool Delete(int F_RepositoryId)
60
+        public bool Delete(int F_RepositoryId,int userId)
56 61
         {
57
-
58
-            return dal.Delete(F_RepositoryId);
62
+          
63
+            return dal.Delete(F_RepositoryId, userId);
64
+           
59 65
         }
60 66
         /// <summary>
61 67
         /// 删除一条数据
@@ -68,10 +74,11 @@ namespace CallCenterApi.BLL
68 74
         /// <summary>
69 75
         /// 得到一个对象实体
70 76
         /// </summary>
71
-        public Model.T_RepositoryInformation GetModel(int F_RepositoryId)
77
+        public Model.T_RepositoryInformation GetModel(int F_RepositoryId,int userId)
72 78
         {
73
-
74
-            return dal.GetModel(F_RepositoryId);
79
+          
80
+            return dal.GetModel(F_RepositoryId, userId);
81
+           
75 82
         }
76 83
 
77 84
         /// <summary>

+ 195 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_AccessLog.cs

@@ -0,0 +1,195 @@
1
+using System;
2
+using System.Data;
3
+using System.Collections.Generic;
4
+
5
+using CallCenterApi.Model;
6
+namespace CallCenterApi.BLL
7
+{
8
+	/// <summary>
9
+	/// 1
10
+	/// </summary>
11
+	public partial class T_Sys_AccessLog
12
+	{
13
+		private readonly CallCenterApi.DAL.T_Sys_AccessLog dal=new CallCenterApi.DAL.T_Sys_AccessLog();
14
+		public T_Sys_AccessLog()
15
+		{}
16
+		#region  Method
17
+
18
+		/// <summary>
19
+		/// 得到最大ID
20
+		/// </summary>
21
+		public int GetMaxId()
22
+		{
23
+			return dal.GetMaxId();
24
+		}
25
+
26
+		/// <summary>
27
+		/// 是否存在该记录
28
+		/// </summary>
29
+		public bool Exists(int F_CreateUserId)
30
+		{
31
+			return dal.Exists(F_CreateUserId);
32
+		}
33
+
34
+         /// <summary>
35
+        /// 由id返回code
36
+        /// </summary>
37
+        //public string GetCodeById(int functionId)
38
+        //{
39
+        //    return dal.GetCodeById(functionId);
40
+        //}
41
+
42
+		/// <summary>
43
+		/// 增加一条数据
44
+		/// </summary>
45
+		public  int Add(CallCenterApi.Model.T_Sys_AccessLog model)
46
+		{
47
+			return dal.Add(model);
48
+		}
49
+
50
+		/// <summary>
51
+		/// 更新一条数据
52
+		/// </summary>
53
+		public bool Update(CallCenterApi.Model.T_Sys_AccessLog model)
54
+		{
55
+			return dal.Update(model);
56
+		}
57
+
58
+		/// <summary>
59
+		/// 删除一条数据
60
+		/// </summary>
61
+		public bool Delete(int F_CreateUserId)
62
+		{
63
+			
64
+			return dal.Delete(F_CreateUserId);
65
+		}
66
+		/// <summary>
67
+		/// 删除一条数据
68
+		/// </summary>
69
+		public bool DeleteList(string F_FunctionIdlist )
70
+		{
71
+			return dal.DeleteList(F_FunctionIdlist );
72
+		}
73
+
74
+		/// <summary>
75
+		/// 得到一个对象实体
76
+		/// </summary>
77
+		public CallCenterApi.Model.T_Sys_AccessLog GetModel(int F_CreateUserId)
78
+		{
79
+			
80
+			return dal.GetModel(F_CreateUserId);
81
+		}
82
+
83
+		/// <summary>
84
+		/// 得到一个对象实体,从缓存中
85
+		/// </summary>
86
+        //public CallCenterApi.Model.T_Sys_AccessLog GetModelByCache(int F_CreateUserId)
87
+        //{
88
+			
89
+        //    string CacheKey = "T_Sys_FunctionModel-" + F_CreateUserId;
90
+        //    object objModel = SZRX.Common.DataCache.GetCache(CacheKey);
91
+        //    if (objModel == null)
92
+        //    {
93
+        //        try
94
+        //        {
95
+        //            objModel = dal.GetModel(F_CreateUserId);
96
+        //            if (objModel != null)
97
+        //            {
98
+        //                int ModelCache = SZRX.Common.ConfigHelper.GetConfigInt("ModelCache");
99
+        //                SZRX.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
100
+        //            }
101
+        //        }
102
+        //        catch{}
103
+        //    }
104
+        //    return (CallCenterApi.Model.T_Sys_AccessLog)objModel;
105
+        //}
106
+
107
+		/// <summary>
108
+		/// 获得数据列表
109
+		/// </summary>
110
+		public DataSet GetList(string strWhere)
111
+		{
112
+			return dal.GetList(strWhere);
113
+		}
114
+		/// <summary>
115
+		/// 获得前几行数据
116
+		/// </summary>
117
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
118
+		{
119
+			return dal.GetList(Top,strWhere,filedOrder);
120
+		}
121
+		/// <summary>
122
+		/// 获得数据列表
123
+		/// </summary>
124
+		public List<CallCenterApi.Model.T_Sys_AccessLog> GetModelList(string strWhere)
125
+		{
126
+			DataSet ds = dal.GetList(strWhere);
127
+			return DataTableToList(ds.Tables[0]);
128
+		}
129
+		/// <summary>
130
+		/// 获得数据列表
131
+		/// </summary>
132
+		public List<CallCenterApi.Model.T_Sys_AccessLog> DataTableToList(DataTable dt)
133
+		{
134
+			List<CallCenterApi.Model.T_Sys_AccessLog> modelList = new List<CallCenterApi.Model.T_Sys_AccessLog>();
135
+			int rowsCount = dt.Rows.Count;
136
+			if (rowsCount > 0)
137
+			{
138
+				CallCenterApi.Model.T_Sys_AccessLog model;
139
+				for (int n = 0; n < rowsCount; n++)
140
+				{
141
+					model = new CallCenterApi.Model.T_Sys_AccessLog();
142
+					if(dt.Rows[n]["F_CreateUserId"]!=null && dt.Rows[n]["F_CreateUserId"].ToString()!="")
143
+					{
144
+						model.F_CreateUserId=int.Parse(dt.Rows[n]["F_CreateUserId"].ToString());
145
+					}
146
+					if(dt.Rows[n]["F_CreateDate"] !=null && dt.Rows[n]["F_CreateDate"].ToString()!="")
147
+					{
148
+					model.F_CreateDate= DateTime.Parse(dt.Rows[n]["F_CreateDate"].ToString());
149
+					}
150
+					if(dt.Rows[n]["F_AccessType"] !=null && dt.Rows[n]["F_AccessType"].ToString()!="")
151
+					{
152
+					model.F_AccessType = dt.Rows[n]["F_AccessType"].ToString();
153
+					}
154
+					if(dt.Rows[n]["F_BizFormId"] !=null && dt.Rows[n]["F_BizFormId"].ToString()!="")
155
+					{
156
+						model.F_BizFormId = int.Parse(dt.Rows[n]["F_BizFormId"].ToString());
157
+					}
158
+					if(dt.Rows[n]["F_BizForm"] !=null && dt.Rows[n]["F_BizForm"].ToString()!="")
159
+					{
160
+						model.F_BizForm=dt.Rows[n]["F_BizForm"].ToString();
161
+					}
162
+					if(dt.Rows[n]["F_Memo"] !=null && dt.Rows[n]["F_Memo"].ToString()!="")
163
+					{
164
+						model.F_Memo = dt.Rows[n]["F_Memo"].ToString();
165
+					}
166
+					
167
+					modelList.Add(model);
168
+				}
169
+			}
170
+			return modelList;
171
+		}
172
+
173
+		/// <summary>
174
+		/// 获得数据列表
175
+		/// </summary>
176
+		public DataSet GetAllList()
177
+		{
178
+			return GetList("");
179
+		}
180
+        public void AddAccessLog(string type, string bizName, int id, int userid)
181
+        {
182
+            dal.AddAccessLog(type, bizName, id, userid);
183
+        }
184
+        /// <summary>
185
+        /// 分页获取数据列表
186
+        /// </summary>
187
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
188
+        //{
189
+        //return dal.GetList(PageSize,PageIndex,strWhere);
190
+        //}
191
+
192
+        #endregion  Method
193
+    }
194
+}
195
+

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

@@ -60,6 +60,7 @@
60 60
     <Compile Include="T_RegionCategory.cs" />
61 61
     <Compile Include="T_RepositoryCategory.cs" />
62 62
     <Compile Include="T_RepositoryInformation.cs" />
63
+    <Compile Include="T_Sys_AccessLog.cs" />
63 64
     <Compile Include="T_Sys_Accessories.cs" />
64 65
     <Compile Include="T_Sys_Area.cs" />
65 66
     <Compile Include="T_Sys_Department.cs" />

+ 126 - 6
codegit/CallCenterApi/CallCenterApi.DAL/T_Rec_RegRecords.cs

@@ -41,9 +41,17 @@ namespace CallCenterApi.DAL
41 41
         {
42 42
             StringBuilder strSql = new StringBuilder();
43 43
             strSql.Append("insert into T_Rec_RegRecords(");
44
-            strSql.Append("F_RecCode,F_CusID,F_Type,F_Direction,F_Complained,F_Content,F_Remark,F_CreateBy,F_CreateOn,F_IsDelete,F_DeleteOn,F_DeleteBy,F_Tel,F_CallId)");
44
+            strSql.Append(@"F_RecCode,F_CusID,F_Type,F_Direction,F_Complained,F_Content,
45
+F_Remark,F_CreateBy,F_CreateOn,F_IsDelete,F_DeleteOn,F_DeleteBy,F_Tel,F_CallId,
46
+F_userName,F_userPhone,F_userSex,F_userProvince,F_userCity,F_userArea,F_ProblemType,F_Unit,
47
+F_UnitOffice,F_CaseParty,F_CitizensType,F_PutRecord,F_ZXZType
48
+)");
45 49
             strSql.Append(" values (");
46
-            strSql.Append("@F_RecCode,@F_CusID,@F_Type,@F_Direction,@F_Complained,@F_Content,@F_Remark,@F_CreateBy,@F_CreateOn,@F_IsDelete,@F_DeleteOn,@F_DeleteBy,@F_Tel,@F_CallId)");
50
+            strSql.Append(@"@F_RecCode,@F_CusID,@F_Type,@F_Direction,@F_Complained,@F_Content,
51
+@F_Remark,@F_CreateBy,@F_CreateOn,@F_IsDelete,@F_DeleteOn,@F_DeleteBy,@F_Tel,@F_CallId,
52
+@F_userName,@F_userPhone,@F_userSex,@F_userProvince,@F_userCity,@F_userArea,@F_ProblemType,@F_Unit,
53
+@F_UnitOffice,@F_CaseParty,@F_CitizensType,@F_PutRecord,@F_ZXZType
54
+)");
47 55
             strSql.Append(";select @@IDENTITY");
48 56
             SqlParameter[] parameters = {
49 57
                     new SqlParameter("@F_RecCode", SqlDbType.NVarChar,50),
@@ -59,8 +67,22 @@ namespace CallCenterApi.DAL
59 67
                     new SqlParameter("@F_DeleteOn", SqlDbType.VarChar,50),
60 68
                     new SqlParameter("@F_DeleteBy", SqlDbType.DateTime),
61 69
                      new SqlParameter("@F_Tel", SqlDbType.VarChar,200),
62
-                      new SqlParameter("@F_CallId", SqlDbType.VarChar,50)
63
-                     
70
+                      new SqlParameter("@F_CallId", SqlDbType.VarChar,50),
71
+  new SqlParameter("@F_userName", SqlDbType.VarChar,50),
72
+ new SqlParameter("@F_userPhone", SqlDbType.VarChar,50),
73
+ new SqlParameter("@F_userSex", SqlDbType.VarChar,50),
74
+ new SqlParameter("@F_userProvince", SqlDbType.VarChar,50),
75
+ new SqlParameter("@F_userCity", SqlDbType.VarChar,50),
76
+ new SqlParameter("@F_userArea", SqlDbType.VarChar,50),
77
+ new SqlParameter("@F_ProblemType", SqlDbType.VarChar,50) ,
78
+
79
+  new SqlParameter("@F_Unit", SqlDbType.VarChar,50),
80
+ new SqlParameter("@F_UnitOffice", SqlDbType.VarChar,50),
81
+ new SqlParameter("@F_CaseParty", SqlDbType.VarChar,50),
82
+ new SqlParameter("@F_CitizensType", SqlDbType.VarChar,50),
83
+ new SqlParameter("@F_PutRecord", SqlDbType.VarChar,50) ,
84
+  new SqlParameter("@F_ZXZType", SqlDbType.VarChar,50)
85
+
64 86
             };
65 87
             parameters[0].Value = model.F_RecCode;
66 88
             parameters[1].Value = model.F_CusID;
@@ -76,6 +98,22 @@ namespace CallCenterApi.DAL
76 98
             parameters[11].Value = model.F_DeleteBy;
77 99
             parameters[12].Value = model.F_Tel;
78 100
             parameters[13].Value = model.F_CallId;
101
+
102
+            parameters[14].Value = model.F_userName;
103
+            parameters[15].Value = model.F_userPhone;
104
+            parameters[16].Value = model.F_userSex;
105
+            parameters[17].Value = model.F_userProvince;
106
+            parameters[18].Value = model.F_userCity;
107
+            parameters[19].Value = model.F_userArea;
108
+
109
+
110
+            parameters[20].Value = model.F_ProblemType;
111
+            parameters[21].Value = model.F_Unit;
112
+parameters[22].Value = model.F_UnitOffice;
113
+            parameters[23].Value = model.F_CaseParty;
114
+            parameters[24].Value = model.F_CitizensType;
115
+            parameters[25].Value = model.F_PutRecord; 
116
+ parameters[26].Value = model.F_ZXZType;
79 117
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
80 118
             if (obj == null)
81 119
             {
@@ -107,6 +145,20 @@ namespace CallCenterApi.DAL
107 145
             strSql.Append("F_DeleteBy=@F_DeleteBy,");
108 146
             strSql.Append("F_Tel=@F_Tel,");
109 147
             strSql.Append("F_CallId=@F_CallId");
148
+            strSql.Append("F_userName    =@F_userName,");
149
+            strSql.Append("F_userPhone   =@F_userPhone,");
150
+            strSql.Append("F_userSex     =@F_userSex,");
151
+            strSql.Append("F_userProvince=@F_userProvince,");
152
+            strSql.Append("F_userCity    =@F_userCity,");
153
+            strSql.Append("F_userArea    =@F_userArea,");
154
+
155
+            strSql.Append("F_ProblemType =@F_ProblemType,");
156
+            strSql.Append("F_Unit        =@F_Unit, ");
157
+            strSql.Append("F_UnitOffice  =@F_UnitOffice,");
158
+            strSql.Append("F_CaseParty   =@F_CaseParty,");
159
+            strSql.Append("F_CitizensType=@F_CitizensType,");
160
+            strSql.Append("F_PutRecord   =@F_PutRecord,"); 
161
+                 strSql.Append("F_ZXZType   =@F_ZXZType,");
110 162
             strSql.Append(" where F_ID=@F_ID");
111 163
             SqlParameter[] parameters = {
112 164
                     new SqlParameter("@F_RecCode", SqlDbType.NVarChar,50),
@@ -124,7 +176,22 @@ namespace CallCenterApi.DAL
124 176
                       new SqlParameter("@F_Tel", SqlDbType.VarChar,200),
125 177
                        new SqlParameter("@F_CallId", SqlDbType.VarChar,50),
126 178
                       
127
-                    new SqlParameter("@F_ID", SqlDbType.Int,4)};
179
+                    new SqlParameter("@F_ID", SqlDbType.Int,4),
180
+                      new SqlParameter("@F_userName", SqlDbType.VarChar,50),
181
+ new SqlParameter("@F_userPhone", SqlDbType.VarChar,50),
182
+ new SqlParameter("@F_userSex", SqlDbType.VarChar,50),
183
+ new SqlParameter("@F_userProvince", SqlDbType.VarChar,50),
184
+ new SqlParameter("@F_userCity", SqlDbType.VarChar,50),
185
+ new SqlParameter("@F_userArea", SqlDbType.VarChar,50),
186
+ new SqlParameter("@F_ProblemType", SqlDbType.VarChar,50) ,
187
+
188
+  new SqlParameter("@F_Unit", SqlDbType.VarChar,50),
189
+ new SqlParameter("@F_UnitOffice", SqlDbType.VarChar,50),
190
+ new SqlParameter("@F_CaseParty", SqlDbType.VarChar,50),
191
+ new SqlParameter("@F_CitizensType", SqlDbType.VarChar,50),
192
+ new SqlParameter("@F_PutRecord", SqlDbType.VarChar,50),
193
+  new SqlParameter("@F_ZXZType", SqlDbType.VarChar,50)
194
+            };
128 195
             parameters[0].Value = model.F_RecCode;
129 196
             parameters[1].Value = model.F_CusID;
130 197
             parameters[2].Value = model.F_Type;
@@ -140,7 +207,21 @@ namespace CallCenterApi.DAL
140 207
             parameters[12].Value = model.F_Tel;
141 208
             parameters[13].Value = model.F_CallId;
142 209
             parameters[14].Value = model.F_ID;
143
-            
210
+            parameters[14].Value = model.F_userName;
211
+            parameters[15].Value = model.F_userPhone;
212
+            parameters[16].Value = model.F_userSex;
213
+            parameters[17].Value = model.F_userProvince;
214
+            parameters[18].Value = model.F_userCity;
215
+            parameters[19].Value = model.F_userArea;
216
+
217
+
218
+            parameters[20].Value = model.F_ProblemType;
219
+            parameters[21].Value = model.F_Unit;
220
+            parameters[22].Value = model.F_UnitOffice;
221
+            parameters[23].Value = model.F_CaseParty;
222
+            parameters[24].Value = model.F_CitizensType;
223
+            parameters[25].Value = model.F_PutRecord;
224
+            parameters[26].Value = model.F_ZXZType; 
144 225
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
145 226
             if (rows > 0)
146 227
             {
@@ -290,6 +371,45 @@ namespace CallCenterApi.DAL
290 371
                 {
291 372
                     model.F_CallId = row["F_CallId"].ToString();
292 373
                 }
374
+                if (row["F_userName"] != null && row["F_userName"].ToString() != "")
375
+                { model.F_userName = row["F_userName"].ToString(); }
376
+
377
+                if (row["F_userPhone"] != null && row["F_userPhone"].ToString() != "")
378
+                { model.F_userPhone = row["F_userPhone"].ToString(); }
379
+
380
+                if (row["F_userSex"] != null && row["F_userSex"].ToString() != "")
381
+                { model.F_userSex = row["F_userSex"].ToString(); }
382
+
383
+                if (row["F_userProvince"] != null && row["F_userProvince"].ToString() != "")
384
+                { model.F_userProvince = row["F_userProvince"].ToString(); }
385
+
386
+                if (row["F_userCity"] != null && row["F_userCity"].ToString() != "")
387
+                { model.F_userCity = row["F_userCity"].ToString(); }
388
+
389
+                if (row["F_userArea"] != null && row["F_userArea"].ToString() != "")
390
+                { model.F_userArea = row["F_userArea"].ToString(); }
391
+
392
+
393
+                if (row["F_ProblemType"] != null && row["F_ProblemType"].ToString() != "")
394
+                { model.F_ProblemType = row["F_ProblemType"].ToString(); }
395
+
396
+                if (row["F_Unit"] != null && row["F_Unit"].ToString() != "")
397
+                { model.F_Unit = row["F_Unit"].ToString(); }
398
+
399
+                if (row["F_UnitOffice"] != null && row["F_UnitOffice"].ToString() != "")
400
+                { model.F_UnitOffice = row["F_UnitOffice"].ToString(); }
401
+
402
+                if (row["F_CaseParty"] != null && row["F_CaseParty"].ToString() != "")
403
+                { model.F_CaseParty = row["F_CaseParty"].ToString(); }
404
+
405
+                if (row["F_CitizensType"] != null && row["F_CitizensType"].ToString() != "")
406
+                { model.F_CitizensType = row["F_CitizensType"].ToString(); }
407
+
408
+                if (row["F_PutRecord"] != null && row["F_PutRecord"].ToString() != "")
409
+                { model.F_PutRecord = row["F_PutRecord"].ToString(); }
410
+
411
+                if (row["F_ZXZType"] != null && row["F_ZXZType"].ToString() != "")
412
+                { model.F_ZXZType = row["F_ZXZType"].ToString(); }
293 413
                 
294 414
 
295 415
             }

+ 14 - 5
codegit/CallCenterApi/CallCenterApi.DAL/T_RepositoryInformation.cs

@@ -1,4 +1,5 @@
1 1
 using CallCenterApi.DB;
2
+
2 3
 using System;
3 4
 using System.Collections.Generic;
4 5
 using System.Data;
@@ -14,6 +15,7 @@ namespace CallCenterApi.DAL
14 15
 	/// </summary>
15 16
 	public partial class T_RepositoryInformation
16 17
     {
18
+        private readonly CallCenterApi.DAL.T_Sys_AccessLog AccessLogdal = new CallCenterApi.DAL.T_Sys_AccessLog();
17 19
         public T_RepositoryInformation()
18 20
         { }
19 21
         #region  BasicMethod
@@ -46,7 +48,7 @@ namespace CallCenterApi.DAL
46 48
         /// <summary>
47 49
         /// 增加一条数据
48 50
         /// </summary>
49
-        public int Add(Model.T_RepositoryInformation model)
51
+        public int Add(Model.T_RepositoryInformation model,int userId)
50 52
         {
51 53
             StringBuilder strSql = new StringBuilder();
52 54
             strSql.Append("insert into T_RepositoryInformation(");
@@ -105,13 +107,17 @@ namespace CallCenterApi.DAL
105 107
             }
106 108
             else
107 109
             {
110
+                //日志添加
111
+                AccessLogdal.AddAccessLog("新增", "T_RepositoryInformation", Convert.ToInt32(obj), userId);
108 112
                 return Convert.ToInt32(obj);
109 113
             }
114
+           
115
+
110 116
         }
111 117
         /// <summary>
112 118
         /// 更新一条数据
113 119
         /// </summary>
114
-        public bool Update(Model.T_RepositoryInformation model)
120
+        public bool Update(Model.T_RepositoryInformation model,int userid)
115 121
         {
116 122
             StringBuilder strSql = new StringBuilder();
117 123
             strSql.Append("update T_RepositoryInformation set ");
@@ -186,6 +192,7 @@ namespace CallCenterApi.DAL
186 192
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
187 193
             if (rows > 0)
188 194
             {
195
+                AccessLogdal.AddAccessLog("修改", "T_RepositoryInformation", model.F_RepositoryId, userid);
189 196
                 return true;
190 197
             }
191 198
             else
@@ -197,7 +204,7 @@ namespace CallCenterApi.DAL
197 204
         /// <summary>
198 205
         /// 删除一条数据
199 206
         /// </summary>
200
-        public bool Delete(int F_RepositoryId)
207
+        public bool Delete(int F_RepositoryId,int UserId )
201 208
         {
202 209
 
203 210
             StringBuilder strSql = new StringBuilder();
@@ -212,6 +219,7 @@ namespace CallCenterApi.DAL
212 219
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
213 220
             if (rows > 0)
214 221
             {
222
+                AccessLogdal.AddAccessLog("删除", "T_RepositoryInformation", F_RepositoryId, UserId);
215 223
                 return true;
216 224
             }
217 225
             else
@@ -243,7 +251,7 @@ namespace CallCenterApi.DAL
243 251
         /// <summary>
244 252
         /// 得到一个对象实体
245 253
         /// </summary>
246
-        public Model.T_RepositoryInformation GetModel(int F_RepositoryId)
254
+        public Model.T_RepositoryInformation GetModel(int F_RepositoryId,int userId )
247 255
         {
248 256
 
249 257
             StringBuilder strSql = new StringBuilder();
@@ -258,6 +266,7 @@ namespace CallCenterApi.DAL
258 266
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
259 267
             if (ds.Tables[0].Rows.Count > 0)
260 268
             {
269
+                AccessLogdal.AddAccessLog("获取查看", "T_RepositoryInformation", F_RepositoryId, userId);
261 270
                 return DataRowToModel(ds.Tables[0].Rows[0]);
262 271
             }
263 272
             else
@@ -449,7 +458,7 @@ namespace CallCenterApi.DAL
449 458
             strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
450 459
             return DbHelperSQL.Query(strSql.ToString());
451 460
         }
452
-
461
+        
453 462
         #endregion  BasicMethod
454 463
         #region  ExtensionMethod
455 464
 

+ 316 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_AccessLog.cs

@@ -0,0 +1,316 @@
1
+using System;
2
+using System.Data;
3
+using System.Text;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
6
+namespace CallCenterApi.DAL
7
+{
8
+	/// <summary>
9
+	/// 数据访问类:T_Sys_AccessLog
10
+	/// </summary>
11
+	public partial class T_Sys_AccessLog
12
+	{
13
+		public T_Sys_AccessLog()
14
+		{}
15
+		#region  Method
16
+
17
+		/// <summary>
18
+		/// 得到最大ID
19
+		/// </summary>
20
+		public int GetMaxId()
21
+		{
22
+		return DbHelperSQL.GetMaxID("F_Id", "T_Sys_AccessLog"); 
23
+		}
24
+
25
+		/// <summary>
26
+		/// 是否存在该记录
27
+		/// </summary>
28
+		public bool Exists(int F_Id)
29
+		{
30
+			StringBuilder strSql=new StringBuilder();
31
+			strSql.Append("select count(1) from T_Sys_AccessLog");
32
+			strSql.Append(" where F_Id=@F_Id ");
33
+			SqlParameter[] parameters = {
34
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
35
+			parameters[0].Value = F_Id;
36
+
37
+			return DbHelperSQL.Exists(strSql.ToString(),parameters);
38
+		}
39
+
40
+        ///// <summary>
41
+        ///// 由id返回code
42
+        ///// </summary>
43
+        //public string GetCodeById(int functionId)
44
+        //{
45
+        //    string code = "";
46
+        //    string sql = "select F_FunctionCode from T_Sys_AccessLog where F_Id=" + F_Id;
47
+        //    DataSet ds = DbHelperSQL.Query(sql);
48
+        //    if (ds.Tables[0].Rows.Count > 0)
49
+        //    {
50
+        //        if (ds.Tables[0].Rows[0]["F_FunctionCode"] != null && ds.Tables[0].Rows[0]["F_FunctionCode"].ToString() != "")
51
+        //        {
52
+        //            code = ds.Tables[0].Rows[0]["F_FunctionCode"].ToString();
53
+        //        }
54
+        //    }
55
+        //    return code;
56
+        //}
57
+
58
+		/// <summary>
59
+		/// 增加一条数据
60
+		/// </summary>
61
+		public  int Add(CallCenterApi.Model.T_Sys_AccessLog model)
62
+		{
63
+			StringBuilder strSql=new StringBuilder();
64
+			strSql.Append("insert into T_Sys_AccessLog(");
65
+			strSql.Append("F_CreateUserId,F_CreateDate,F_AccessType,F_BizFormId,F_BizForm,F_Memo)");
66
+			strSql.Append(" values (");
67
+			strSql.Append("@F_CreateUserId,@F_CreateDate,@F_AccessType,@F_BizFormId,@F_BizForm,@F_Memo)");
68
+            strSql.Append(";select @@IDENTITY");
69
+			SqlParameter[] parameters = {
70
+                      new SqlParameter("@F_CreateUserId", SqlDbType.Int,4),
71
+                    new SqlParameter("@F_CreateDate", SqlDbType.DateTime),
72
+                    new SqlParameter("@F_AccessType", SqlDbType.NVarChar,50),
73
+                    new SqlParameter("@F_BizFormId", SqlDbType.Int,4),
74
+                     new SqlParameter("@F_BizForm", SqlDbType.NVarChar,50),
75
+                    new SqlParameter("@F_Memo", SqlDbType.NVarChar,50)};
76
+
77
+            parameters[0].Value = model.F_CreateUserId;
78
+            parameters[1].Value = model.F_CreateDate;
79
+            parameters[2].Value = model.F_AccessType;
80
+            parameters[3].Value = model.F_BizFormId;
81
+            parameters[4].Value = model.F_BizForm;
82
+            parameters[5].Value = model.F_Memo;
83
+
84
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
85
+            if (obj == null)
86
+            {
87
+                return 0;
88
+            }
89
+            else
90
+            {
91
+                return Convert.ToInt32(obj);
92
+            }
93
+			//return DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
94
+		}
95
+		/// <summary>
96
+		/// 更新一条数据
97
+		/// </summary>
98
+		public bool Update(CallCenterApi.Model.T_Sys_AccessLog model)
99
+		{
100
+			StringBuilder strSql=new StringBuilder();
101
+			strSql.Append("update T_Sys_AccessLog set ");
102
+			strSql.Append("F_CreateUserId=@F_CreateUserId,");
103
+			strSql.Append("F_CreateDate=@F_CreateDate,");
104
+			strSql.Append("F_AccessType=@F_AccessType,");
105
+			strSql.Append("F_BizFormId=@F_BizFormId,");
106
+            strSql.Append("F_BizForm=@F_BizForm,");
107
+            strSql.Append("F_Memo=@F_Memo,");
108
+
109
+            SqlParameter[] parameters = {
110
+                    new SqlParameter("@F_CreateUserId", SqlDbType.Int,4),
111
+                    new SqlParameter("@F_CreateDate", SqlDbType.DateTime),
112
+                    new SqlParameter("@F_AccessType", SqlDbType.NVarChar,50),
113
+                    new SqlParameter("@F_BizFormId", SqlDbType.Int,4),
114
+                    new SqlParameter("@F_BizForm", SqlDbType.NVarChar,50),
115
+                    new SqlParameter("@F_Memo", SqlDbType.NVarChar,50) };
116
+					
117
+			parameters[0].Value = model.F_CreateUserId;
118
+			parameters[1].Value = model.F_CreateDate;
119
+			parameters[2].Value = model.F_AccessType;
120
+			parameters[3].Value = model.F_BizFormId;
121
+            parameters[4].Value = model.F_BizForm;
122
+            parameters[5].Value = model.F_Memo;
123
+		
124
+
125
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
126
+			if (rows > 0)
127
+			{
128
+				return true;
129
+			}
130
+			else
131
+			{
132
+				return false;
133
+			}
134
+		}
135
+
136
+		/// <summary>
137
+		/// 删除一条数据
138
+		/// </summary>
139
+		public bool Delete(int F_Id)
140
+		{
141
+			
142
+			StringBuilder strSql=new StringBuilder();
143
+			strSql.Append("delete from T_Sys_AccessLog ");
144
+			strSql.Append(" where F_Id=@F_Id ");
145
+			SqlParameter[] parameters = {
146
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
147
+			parameters[0].Value = F_Id;
148
+
149
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
150
+			if (rows > 0)
151
+			{
152
+				return true;
153
+			}
154
+			else
155
+			{
156
+				return false;
157
+			}
158
+		}
159
+		/// <summary>
160
+		/// 删除一条数据
161
+		/// </summary>
162
+		public bool DeleteList(string F_FunctionIdlist )
163
+		{
164
+			StringBuilder strSql=new StringBuilder();
165
+			strSql.Append("delete from T_Sys_AccessLog ");
166
+			strSql.Append(" where F_Id in (" + F_FunctionIdlist + ")  ");
167
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
168
+			if (rows > 0)
169
+			{
170
+				return true;
171
+			}
172
+			else
173
+			{
174
+				return false;
175
+			}
176
+		}
177
+
178
+
179
+		/// <summary>
180
+		/// 得到一个对象实体
181
+		/// </summary>
182
+		public CallCenterApi.Model.T_Sys_AccessLog GetModel(int F_Id)
183
+		{
184
+			
185
+			StringBuilder strSql=new StringBuilder();
186
+			strSql.Append("select  top 1 F_Id,F_CreateUserId,F_CreateDate,F_AccessType,F_BizFormId,F_BizForm,F_Memo from T_Sys_AccessLog ");
187
+			strSql.Append(" where F_Id=@F_Id ");
188
+			SqlParameter[] parameters = {
189
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
190
+			parameters[0].Value = F_Id;
191
+
192
+			CallCenterApi.Model.T_Sys_AccessLog model=new CallCenterApi.Model.T_Sys_AccessLog();
193
+			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
194
+			if(ds.Tables[0].Rows.Count>0)
195
+			{
196
+				if(ds.Tables[0].Rows[0]["F_Id"]!=null && ds.Tables[0].Rows[0]["F_Id"].ToString()!="")
197
+				{
198
+					model.F_Id=int.Parse(ds.Tables[0].Rows[0]["F_Id"].ToString());
199
+				}
200
+				if(ds.Tables[0].Rows[0]["F_CreateUserId"] !=null && ds.Tables[0].Rows[0]["F_CreateUserId"].ToString()!="")
201
+				{
202
+					model.F_CreateUserId = int.Parse(ds.Tables[0].Rows[0]["F_CreateUserId"].ToString());
203
+				}
204
+				if(ds.Tables[0].Rows[0]["F_CreateDate"] !=null && ds.Tables[0].Rows[0]["F_CreateDate"].ToString()!="")
205
+				{
206
+					model.F_CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["F_CreateDate"].ToString());
207
+				}
208
+				if(ds.Tables[0].Rows[0]["F_AccessType"] !=null && ds.Tables[0].Rows[0]["F_AccessType"].ToString()!="")
209
+				{
210
+					model.F_AccessType = ds.Tables[0].Rows[0]["F_AccessType"].ToString();
211
+				}
212
+				if(ds.Tables[0].Rows[0]["F_BizFormId"] !=null && ds.Tables[0].Rows[0]["F_BizFormId"].ToString()!="")
213
+				{
214
+					model.F_BizFormId=int.Parse(ds.Tables[0].Rows[0]["F_BizFormId"].ToString());
215
+				}
216
+                if (ds.Tables[0].Rows[0]["F_BizForm"] != null && ds.Tables[0].Rows[0]["F_BizForm"].ToString() != "")
217
+                {
218
+                    model.F_BizForm = ds.Tables[0].Rows[0]["F_BizForm"].ToString();
219
+                }
220
+                if (ds.Tables[0].Rows[0]["F_Memo"] !=null && ds.Tables[0].Rows[0]["F_Memo"].ToString()!="")
221
+				{
222
+					model.F_Memo = ds.Tables[0].Rows[0]["F_Memo"].ToString();
223
+				}
224
+			
225
+				return model;
226
+			}
227
+			else
228
+			{
229
+				return null;
230
+			}
231
+		}
232
+
233
+		/// <summary>
234
+		/// 获得数据列表
235
+		/// </summary>
236
+		public DataSet GetList(string strWhere)
237
+		{
238
+			StringBuilder strSql=new StringBuilder();
239
+			strSql.Append("select F_Id,F_CreateUserId,F_CreateDate,F_AccessType,F_BizFormId,F_BizForm,F_Memo ");
240
+			strSql.Append(" FROM T_Sys_AccessLog ");
241
+			if(strWhere.Trim()!="")
242
+			{
243
+				strSql.Append(" where "+strWhere);
244
+			}
245
+			return DbHelperSQL.Query(strSql.ToString());
246
+		}
247
+
248
+		/// <summary>
249
+		/// 获得前几行数据
250
+		/// </summary>
251
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
252
+		{
253
+			StringBuilder strSql=new StringBuilder();
254
+			strSql.Append("select ");
255
+			if(Top>0)
256
+			{
257
+				strSql.Append(" top "+Top.ToString());
258
+			}
259
+			strSql.Append(" F_Id,F_CreateUserId,F_CreateDate,F_AccessType,F_BizFormId,F_BizForm,F_Memo ");
260
+			strSql.Append(" FROM T_Sys_AccessLog ");
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
+        /// <summary>
269
+        /// 系统内部添加操作记录
270
+        /// </summary>
271
+        /// <param name="type">操作类型 增删改查</param>
272
+        /// <param name="bizName">表单</param>
273
+        /// <param name="id">表单id </param>
274
+        /// <param name="userid">当前登陆人Id </param>
275
+        public void AddAccessLog(string type, string bizName, int id, int userid)
276
+        {
277
+            Model.T_Sys_AccessLog sModel = new Model.T_Sys_AccessLog();
278
+            sModel.F_CreateDate = DateTime.Now;
279
+            sModel.F_CreateUserId = userid;
280
+            sModel.F_AccessType = type;
281
+            sModel.F_BizFormId = id;
282
+            sModel.F_BizForm = bizName;
283
+            Add(sModel);
284
+            //sModel.F_CreateByName = CurrentUser.UserData.F_UserName;
285
+            //sModel.F_CreateBy = CurrentUser.UserData.F_UserId;
286
+        }
287
+
288
+        /*
289
+		/// <summary>
290
+		/// 分页获取数据列表
291
+		/// </summary>
292
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
293
+		{
294
+			SqlParameter[] parameters = {
295
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
296
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
297
+					new SqlParameter("@PageSize", SqlDbType.Int),
298
+					new SqlParameter("@PageIndex", SqlDbType.Int),
299
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
300
+					new SqlParameter("@OrderType", SqlDbType.Bit),
301
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
302
+					};
303
+			parameters[0].Value = "T_Sys_AccessLog";
304
+			parameters[1].Value = "F_Id";
305
+			parameters[2].Value = PageSize;
306
+			parameters[3].Value = PageIndex;
307
+			parameters[4].Value = 0;
308
+			parameters[5].Value = 0;
309
+			parameters[6].Value = strWhere;	
310
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
311
+		}*/
312
+
313
+        #endregion  Method
314
+    }
315
+}
316
+

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

@@ -170,6 +170,7 @@
170 170
     <Compile Include="App_Start\FilterConfig.cs" />
171 171
     <Compile Include="App_Start\ErrorAttribute.cs" />
172 172
     <Compile Include="App_Start\RouteConfig.cs" />
173
+    <Compile Include="Controllers\AccessLogController.cs" />
173 174
     <Compile Include="Controllers\AddressBookController.cs" />
174 175
     <Compile Include="Controllers\AreaController.cs" />
175 176
     <Compile Include="Controllers\Base\BaseController.cs" />

+ 262 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AccessLogController.cs

@@ -0,0 +1,262 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.Common;
3
+using CallCenterApi.DB;
4
+using CallCenterApi.Interface.Controllers.Base;
5
+using CallCenterApi.Interface.Models.Input;
6
+using System;
7
+using System.Collections.Generic;
8
+using System.Data;
9
+using System.Linq;
10
+using System.Text;
11
+using System.Web;
12
+using System.Web.Mvc;
13
+
14
+namespace CallCenterApi.Interface.Controllers
15
+{
16
+    [Authority]
17
+    public class AccessLogController : BaseController
18
+    {
19
+        BLL.T_Sys_AccessLog AccessLogBLL = new BLL.T_Sys_AccessLog();
20
+        BLL.T_RepositoryInformation RepositoryBll = new BLL.T_RepositoryInformation();
21
+        /// <summary>
22
+        /// 获取列表
23
+        /// </summary>
24
+        /// <returns></returns>
25
+        public ActionResult GetList()
26
+        {
27
+            DataTable dt = new DataTable();
28
+            string strpageindex = RequestString.GetQueryString("page");
29
+            int pageindex = 1;
30
+            string strpagesize = RequestString.GetQueryString("pagesize");
31
+            int pagesize = 10;
32
+            string strcontent = RequestString.GetQueryString("content");
33
+
34
+            string sql = "";
35
+            if (strcontent != null && strcontent != "")
36
+            {
37
+                sql = " and( F_BizForm like '%" + strcontent + "%' or F_AccessType  like '%" + strcontent + "%' )";
38
+            }
39
+            if (strpageindex.Trim() != "")
40
+            {
41
+                pageindex = Convert.ToInt32(strpageindex);
42
+            }
43
+
44
+            if (strpagesize.Trim() != "")
45
+            {
46
+                pagesize = Convert.ToInt32(strpagesize);
47
+            }
48
+            int recordCount = 0;
49
+            dt = BLL.PagerBLL.GetListPager(
50
+                "T_Sys_AccessLog",
51
+                "F_Id",
52
+                "*",
53
+                sql,
54
+                "ORDER BY F_Id desc",
55
+                pagesize,
56
+                pageindex,
57
+                true,
58
+                out recordCount);
59
+
60
+            var obj = new
61
+            {
62
+                rows = dt,
63
+                total = recordCount
64
+            };
65
+
66
+            return Content(obj.ToJson());
67
+        }
68
+
69
+
70
+        /// <summary>
71
+        /// 获取列表
72
+        /// </summary>
73
+        /// <returns></returns>
74
+        public ActionResult GetHightFrequencyList()
75
+        {
76
+            //        DataTable dt = new DataTable();
77
+            //        DataSet dt1 = new DataSet();
78
+
79
+            //        string sql = @"    F_RepositoryId in ( select F_BizFormId from (
80
+
81
+            //select top 10 F_BizFormId ,COUNT(F_Id) as CID from T_Sys_AccessLog
82
+
83
+            //where F_BizForm = 'T_RepositoryInformation'   group by F_BizFormId ) as qq where 1 = 1 order by CID desc )  ";
84
+            //        dt1= RepositoryBll.GetList(sql);
85
+            //        dt = dt1.Tables[0];
86
+
87
+            StringBuilder strSql = new StringBuilder();
88
+            strSql.Append(@" select F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,
89
+F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,
90
+F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag  FROM T_RepositoryInformation WITH(NOLOCK) 
91
+left join      ( select F_BizFormId, CID from (
92
+    select F_BizFormId ,COUNT(F_Id) as CID from T_Sys_AccessLog
93
+
94
+    where F_BizForm = 'T_RepositoryInformation'   group by F_BizFormId ) as qq where 1 = 1  ) as qq  
95
+    on F_RepositoryId =qq.F_BizFormId where 1=1 order by qq.CID desc 
96
+     ");
97
+            
98
+
99
+            var ds = DbHelperSQL.Query(strSql.ToString());
100
+            DataTable dt = new DataTable();
101
+            dt = ds.Tables[0];
102
+
103
+
104
+
105
+            var obj = new
106
+            {
107
+                rows = dt
108
+
109
+            };
110
+
111
+            return Content(obj.ToJson());
112
+        }
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+        //获取坐席组列表
123
+        public ActionResult GetSeatList()
124
+        {
125
+            if (Request.IsAuthenticated)
126
+            {
127
+                List<Model.T_Sys_AccessLog> seatList = AccessLogBLL.GetModelList(" 1=1 order by F_Id desc ");
128
+                if (seatList.Count > 0)
129
+                    return Success("列表加载成功", seatList);
130
+                else
131
+                    return Error("列表加载失败");
132
+            }
133
+            return NoToken("未知错误,请重新登录");
134
+        }
135
+
136
+        /// <summary>
137
+        /// 获取坐席组
138
+        /// </summary>
139
+        /// <param name="deptId"></param>
140
+        /// <returns></returns>
141
+        public ActionResult GetSeatGroup(int ZXZID = 0)
142
+        {
143
+            if (Request.IsAuthenticated)
144
+            {
145
+                Model.T_Sys_AccessLog sModel = AccessLogBLL.GetModel(ZXZID);
146
+                if (sModel != null)
147
+                    return Success("获取坐席组信息成功", sModel);
148
+                return Error("获取坐席组信息失败");
149
+            }
150
+            return NoToken("未知错误,请重新登录");
151
+        }
152
+
153
+        /// <summary>
154
+        /// 添加
155
+        /// </summary>
156
+        /// <param name="input"></param>
157
+        /// <returns></returns>
158
+        //[HttpPost]
159
+        public void AddSeatGroup(Model.T_Sys_AccessLog AccessLog)
160
+        {
161
+           // Model.T_Sys_AccessLog sModel = new Model.T_Sys_AccessLog();
162
+
163
+            //sModel.F_ZXZCode = input.ZXZCode.Trim();
164
+
165
+            //sModel.F_CreateTime = DateTime.Now;
166
+            //sModel.F_CreateByName = CurrentUser.UserData.F_UserName;
167
+            //sModel.F_CreateBy = CurrentUser.UserData.F_UserId;
168
+
169
+            if (AccessLogBLL.Add(AccessLog) > 0)
170
+                throw new  Exception("添加成功");
171
+            else
172
+                throw new Exception("添加失败");
173
+        }
174
+
175
+        /// <summary>
176
+        /// 编辑坐席组
177
+        /// </summary>
178
+        /// <param name="input"></param>
179
+        /// <returns></returns>
180
+        //[HttpPost]
181
+        //public ActionResult EditSeatGroup(SeatGroupInput input)
182
+        //{
183
+        //    if (Request.IsAuthenticated)
184
+        //    {
185
+        //        if (input.ZXZID <= 0)
186
+        //            return Error("请选择要编辑的坐席组");
187
+
188
+        //        Model.T_Sys_AccessLog sModel = AccessLogBLL.GetModel(input.ZXZID);
189
+        //        if (sModel == null)
190
+        //            return Error("获取信息失败");
191
+
192
+        //        if (input.ZXZCode != null)
193
+        //            sModel.F_ZXZCode = input.ZXZCode.Trim();
194
+        //        if (input.ZXZName != null)
195
+        //            sModel.F_ZXZName = input.ZXZName.Trim();
196
+        //        if (input.ZXAtt != null)
197
+        //            sModel.F_ZXAtt = input.ZXAtt.Trim();
198
+        //        if (input.WHWDKey != null)
199
+        //            sModel.F_WHWDKey = input.WHWDKey.Trim();
200
+        //        if (input.WHBDKey != null)
201
+        //            sModel.F_WHBDKey = input.WHBDKey.Trim();
202
+        //        if (input.IVRKey != null)
203
+        //            sModel.F_IVRKey = input.IVRKey;
204
+        //        if (input.Des != null)
205
+        //            sModel.F_Des = input.Des.Trim();
206
+
207
+        //        if (AccessLogBLL.Update(sModel))
208
+        //            return Success("编辑成功");
209
+        //        return Error("编辑失败");
210
+        //    }
211
+        //    return NoToken("未知错误,请重新登录");
212
+        //}
213
+
214
+        /// <summary>
215
+        /// 删除坐席组
216
+        /// </summary>
217
+        /// <param name="ids"></param>
218
+        /// <returns></returns>
219
+        //public ActionResult DelSeatGroup(string[] ids)
220
+        //{
221
+        //    if (Request.IsAuthenticated)
222
+        //    {
223
+        //        if (ids == null || ids.Length <= 0)
224
+        //            return Error("请选择要删除的坐席组");
225
+
226
+        //        var idStr = string.Join(",", ids);
227
+        //        if (string.IsNullOrEmpty(idStr.Trim()))
228
+        //            return Error("请选择要删除的坐席组");
229
+
230
+        //        if (AccessLogBLL.DeleteList(idStr))
231
+        //            return Success("删除成功");
232
+        //        return Error("删除失败");
233
+        //    }
234
+        //    return NoToken("未知错误,请重新登录");
235
+        //}
236
+
237
+        #region 按内容搜索
238
+        /// <summary>
239
+        /// 获取坐席组
240
+        /// </summary>
241
+        /// <param name="deptId"></param>
242
+        /// <returns></returns>
243
+        public ActionResult GetSearch()
244
+        {
245
+            if (Request.IsAuthenticated)
246
+            {
247
+                string strcontent = RequestString.GetQueryString("content");
248
+                string strwhere = "";
249
+                if (strcontent != "")
250
+                {
251
+                    strwhere = " F_ZXZCode='" + strcontent + "' or F_ZXZName='" + strcontent + "'";
252
+                }
253
+                DataSet ds = AccessLogBLL.GetList(strwhere);
254
+                if (ds != null)
255
+                    return Success("查询坐席组信息成功", ds);
256
+                return Error("查询坐席组信息失败");
257
+            }
258
+            return NoToken("未知错误,请重新登录");
259
+        }
260
+        #endregion
261
+    }
262
+}

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs

@@ -131,7 +131,7 @@ namespace CallCenterApi.Interface.Controllers
131 131
         /// <returns></returns>
132 132
         public ActionResult EditDic(DictionaryBaseInput input)
133 133
         {
134
-            if (Request.IsAuthenticated)
134
+            if (!Request.IsAuthenticated)
135 135
                 return NoToken("未知错误,请重新登录");
136 136
             if(input.DicId<=0)
137 137
                 return Error("请选择要编辑的字典分类");

+ 21 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RegRecords/RegRecordsController.cs

@@ -127,7 +127,12 @@ namespace CallCenterApi.Interface.Controllers.RegRecords
127 127
             return Success("获取成功", newobj);
128 128
         }
129 129
         //添加
130
-        public ActionResult Save(string tel,string callid,int cusid,int type,int direction,string complained, string content, string remark, int id=0)
130
+        public ActionResult Save(string tel,string callid,int cusid,int type,
131
+            int direction,string complained, string content, string remark, 
132
+            string F_userName, string F_userPhone, string F_userSex, string F_userProvince, string F_userCity,
133
+string F_userArea, string F_ProblemType, string F_Unit, string F_UnitOffice, string F_CaseParty, 
134
+string F_CitizensType, string F_PutRecord,string  F_ZXZType ,int id = 0
135
+            )
131 136
         {
132 137
             if (!Request.IsAuthenticated)
133 138
                 return NoToken("未知错误,请重新登录");
@@ -154,6 +159,21 @@ namespace CallCenterApi.Interface.Controllers.RegRecords
154 159
             dModel.F_Content = content;
155 160
             dModel.F_Remark = remark;
156 161
             dModel.F_CallId = callid;
162
+
163
+            dModel.F_userName = F_userName;
164
+             dModel.F_userPhone = F_userPhone;
165
+            dModel.F_userSex = F_userSex;
166
+            dModel.F_userProvince = F_userProvince;
167
+            dModel.F_userCity = F_userCity;
168
+            dModel.F_userArea = F_userArea;
169
+
170
+            dModel.F_ProblemType = F_ProblemType;
171
+            dModel.F_Unit = F_Unit;
172
+            dModel.F_UnitOffice = F_UnitOffice;
173
+            dModel.F_CaseParty = F_CaseParty;
174
+            dModel.F_CitizensType = F_CitizensType;
175
+            dModel.F_PutRecord = F_PutRecord; 
176
+            dModel.F_ZXZType = F_ZXZType;
157 177
             var res = false;
158 178
             if(id>0)
159 179
             {

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs

@@ -331,7 +331,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
331 331
                             rid = dt.Rows[i]["F_RepositoryId"].ToString();
332 332
                             if (!string.IsNullOrEmpty(rid))
333 333
                             {
334
-                                new BLL.T_RepositoryInformation().Delete(Convert.ToInt32(rid));
334
+                                new BLL.T_RepositoryInformation().Delete(Convert.ToInt32(rid), CurrentUser.UserData.F_UserId);
335 335
                             }
336 336
                         }
337 337
                     }

+ 39 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -1,9 +1,11 @@
1 1
 using CallCenter.Utility;
2
+using CallCenterApi.DB;
2 3
 using CallCenterApi.Interface.Controllers.Base;
3 4
 using System;
4 5
 using System.Collections.Generic;
5 6
 using System.Data;
6 7
 using System.Linq;
8
+using System.Text;
7 9
 using System.Web;
8 10
 using System.Web.Mvc;
9 11
 
@@ -31,6 +33,13 @@ namespace CallCenterApi.Interface.Controllers.knowledge
31 33
                 dr = new BLL.T_RepositoryCategory().GetList(" 1=1 " + "and F_CategoryId=" + pid).Tables[0];
32 34
                 string modelList = BindTree(dr, pid);
33 35
                 sql += " and F_CategoryId in(" + modelList.Trim() + ")";
36
+                //根据 F_CategoryId 获取知识分类信息 如果是 -常用接待用语   则部门区分(获取属于当前登录部门的信息)
37
+                // CurrentUser.UserData.F_DeptId;当前登录人部门
38
+                //(select  u.F_DeptId  from  dbo.T_Sys_UserAccount  u where u.F_UserId = F_CreateBy )
39
+                if (GetHightFrequencyList(modelList.Trim())>0) {
40
+                   sql += @" and (select  u.F_DeptId  from  dbo.T_Sys_UserAccount  u where u.F_UserId = F_CreateBy )="+ CurrentUser.UserData.F_DeptId;
41
+                }
42
+
34 43
             }
35 44
             if (keywords.Trim() != "")
36 45
             {
@@ -77,6 +86,32 @@ namespace CallCenterApi.Interface.Controllers.knowledge
77 86
 
78 87
             return NoToken("未知错误,请重新登录");
79 88
         }
89
+
90
+        /// <summary>
91
+        /// 获取列表
92
+        /// </summary>
93
+        /// <returns></returns>
94
+        public int GetHightFrequencyList( string ids)
95
+        {
96
+
97
+            StringBuilder strSql = new StringBuilder();
98
+            strSql.Append(@" select F_CategoryId FROM T_RepositoryCategory  
99
+         where  1=1  and F_DeleteFlag=0 and F_CategoryType is null and F_ParentId=0 and F_CategoryId in ("+ ids + ") ");
100
+
101
+            strSql.Append(@"  and F_CategoryName='常用接待用语'");
102
+            var ds = DbHelperSQL.Query(strSql.ToString());
103
+            DataTable dt = new DataTable();
104
+            dt = ds.Tables[0];
105
+
106
+            int aa = dt.Rows.Count;
107
+            return aa;
108
+
109
+           
110
+        }
111
+
112
+
113
+
114
+
80 115
         private string BindTree(DataTable tab, string parentid)
81 116
         {
82 117
 
@@ -100,7 +135,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
100 135
                 if (infoid != null && infoid.Trim() != "")
101 136
                 {
102 137
                     BLL.T_RepositoryInformation dBLL = new BLL.T_RepositoryInformation();
103
-                    Model.T_RepositoryInformation dModel = dBLL.GetModel(int.Parse(infoid.Trim()));
138
+                    Model.T_RepositoryInformation dModel = dBLL.GetModel(int.Parse(infoid.Trim()), CurrentUser.UserData.F_UserId);
104 139
                     if (dModel != null)
105 140
                     {
106 141
                         return Success("获取知识库信息成功", dModel);
@@ -148,7 +183,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
148 183
             dModel.F_ModifyOn = DateTime.Now;
149 184
             dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
150 185
             dModel.F_DeleteFlag = 0;
151
-            int b = new BLL.T_RepositoryInformation().Add(dModel);
186
+            int b = new BLL.T_RepositoryInformation().Add(dModel, CurrentUser.UserData.F_UserId);
152 187
             if (b > 0)
153 188
             {
154 189
                 return Success("添加成功");
@@ -176,7 +211,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
176 211
             if (string.IsNullOrEmpty(pid))
177 212
                 return Error("请选择所属分类!");
178 213
             BLL.T_RepositoryInformation dBLL = new BLL.T_RepositoryInformation();
179
-            Model.T_RepositoryInformation dModel = dBLL.GetModel(int.Parse(infoid.Trim()));
214
+            Model.T_RepositoryInformation dModel = dBLL.GetModel(int.Parse(infoid.Trim()), CurrentUser.UserData.F_UserId);
180 215
             if (dModel == null)
181 216
                 return Error("获取信息失败");
182 217
 
@@ -192,7 +227,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
192 227
 
193 228
             dModel.F_ModifyBy = CurrentUser.UserData.F_UserId;
194 229
             dModel.F_ModifyOn = DateTime.Now;
195
-            bool b = dBLL.Update(dModel);
230
+            bool b = dBLL.Update(dModel, CurrentUser.UserData.F_UserId);
196 231
             if (b)
197 232
             {
198 233
                 return Success("编辑成功");

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

@@ -63,6 +63,7 @@
63 63
     <Compile Include="T_RegionCategory.cs" />
64 64
     <Compile Include="T_RepositoryCategory.cs" />
65 65
     <Compile Include="T_RepositoryInformation.cs" />
66
+    <Compile Include="T_Sys_AccessLog.cs" />
66 67
     <Compile Include="T_Sys_Accessories.cs" />
67 68
     <Compile Include="T_Sys_Area.cs" />
68 69
     <Compile Include="T_Sys_Department.cs" />

+ 89 - 1
codegit/CallCenterApi/CallCenterApi.Model/T_Rec_RegRecords.cs

@@ -30,6 +30,22 @@ namespace CallCenterApi.Model
30 30
         private DateTime? _f_deleteby;
31 31
         private string _f_tel;
32 32
         private string _f_callid;
33
+
34
+        private string _F_userName;
35
+        private string _F_userPhone;
36
+        private string _F_userSex;
37
+        private string _F_userProvince;
38
+        private string _F_userCity;
39
+        private string _F_userArea;
40
+
41
+
42
+        private string _F_ProblemType;
43
+        private string _F_Unit;
44
+        private string _F_UnitOffice;
45
+        private string _F_CitizensType;
46
+        private string _F_CaseParty;
47
+        private string _F_PutRecord;
48
+        private string _F_ZXZType;
33 49
         /// <summary>
34 50
         /// 
35 51
         /// </summary>
@@ -38,7 +54,79 @@ namespace CallCenterApi.Model
38 54
             set { _f_id = value; }
39 55
             get { return _f_id; }
40 56
         }
41
-        
57
+        public string F_ZXZType
58
+        {
59
+            set { _F_ZXZType = value; }
60
+            get { return _F_ZXZType; }
61
+        }
62
+        public string F_userName
63
+        {
64
+            set { _F_userName = value; }
65
+            get { return _F_userName; }
66
+        }
67
+        public string F_userPhone
68
+        {
69
+            set { _F_userPhone = value; }
70
+            get { return _F_userPhone; }
71
+        }
72
+        public string F_userSex
73
+        {
74
+            set { _F_userSex = value; }
75
+            get { return _F_userSex; }
76
+        }
77
+        public string F_userProvince
78
+        {
79
+            set { _F_userProvince = value; }
80
+            get { return _F_userProvince; }
81
+        }
82
+        public string F_userCity
83
+        {
84
+            set { _F_userCity = value; }
85
+            get { return _F_userCity; }
86
+        }
87
+        public string F_userArea
88
+        {
89
+            set { _F_userArea = value; }
90
+            get { return _F_userArea; }
91
+        }
92
+
93
+
94
+        public string F_ProblemType
95
+        {
96
+            set { _F_ProblemType = value; }
97
+            get { return _F_ProblemType; }
98
+        }
99
+        public string F_Unit
100
+        {
101
+            set { _F_Unit = value; }
102
+            get { return _F_Unit; }
103
+        }
104
+        public string F_UnitOffice
105
+        {
106
+            set { _F_UnitOffice = value; }
107
+            get { return _F_UnitOffice; }
108
+        }
109
+        public string F_CitizensType
110
+        {
111
+            set { _F_CitizensType = value; }
112
+            get { return _F_CitizensType; }
113
+        }
114
+        public string F_CaseParty
115
+        {
116
+            set { _F_CaseParty = value; }
117
+            get { return _F_CaseParty; }
118
+        }
119
+        public string F_PutRecord
120
+        {
121
+            set { _F_PutRecord = value; }
122
+            get { return _F_PutRecord; }
123
+        }
124
+
125
+
126
+
127
+
128
+
129
+
42 130
         public string F_CallId
43 131
         {
44 132
             set { _f_callid = value; }

+ 78 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_AccessLog.cs

@@ -0,0 +1,78 @@
1
+using System;
2
+namespace CallCenterApi.Model
3
+{
4
+	/// <summary>
5
+	/// 1
6
+	/// </summary>
7
+	[Serializable]
8
+	public partial class T_Sys_AccessLog
9
+	{
10
+		public T_Sys_AccessLog()
11
+		{}
12
+		#region Model
13
+		private int _F_Id; 
14
+		private int _F_CreateUserId;
15
+		private DateTime? _F_CreateDate;
16
+		private string _F_AccessType;
17
+		private int _F_BizFormId;
18
+		private string _F_BizForm;
19
+        private string _F_Memo;
20
+
21
+        /// <summary>
22
+        /// 
23
+        /// </summary>
24
+        public int F_Id
25
+        {
26
+			set{  _F_Id = value;}
27
+			get{return _F_Id; }
28
+		}
29
+        /// <summary>
30
+        /// 创建人
31
+        /// </summary>
32
+        public int F_CreateUserId
33
+        {
34
+			set{ _F_CreateUserId = value;}
35
+			get{return _F_CreateUserId; }
36
+		}
37
+        /// <summary>
38
+        /// 创建时间
39
+        /// </summary>
40
+        public DateTime? F_CreateDate
41
+        {
42
+			set{ _F_CreateDate = value;}
43
+			get{return _F_CreateDate; }
44
+		}
45
+        /// <summary>
46
+        /// 操作类型
47
+        /// </summary>
48
+        public string F_AccessType
49
+        {
50
+			set{ _F_AccessType = value;}
51
+			get{return _F_AccessType; }
52
+		}
53
+		/// <summary>
54
+		/// 操作表单Id
55
+		/// </summary>
56
+		public int  F_BizFormId
57
+        {
58
+			set{ _F_BizFormId = value;}
59
+			get{return _F_BizFormId; }
60
+		}
61
+		/// <summary>
62
+		/// 操作表单
63
+		/// </summary>
64
+		public string  F_BizForm
65
+        {
66
+			set{ _F_BizForm = value;}
67
+			get{return _F_BizForm; }
68
+		}
69
+        public string F_Memo
70
+        {
71
+            set { _F_Memo = value; }
72
+            get { return _F_Memo; }
73
+        }
74
+        #endregion Model
75
+
76
+    }
77
+}
78
+