Преглед на файлове

登记信息 的 转移 转入

gaobingyue преди 5 години
родител
ревизия
b80b295a50

+ 204 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_ATheChangeLog.cs

@@ -0,0 +1,204 @@
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_ATheChangeLog
12
+	{
13
+		private readonly CallCenterApi.DAL.T_Sys_ATheChangeLog dal=new CallCenterApi.DAL.T_Sys_ATheChangeLog();
14
+		public T_Sys_ATheChangeLog()
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_RoleUrlId)
30
+		{
31
+			return dal.Exists(F_RoleUrlId);
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_ATheChangeLog model)
46
+		{
47
+			return dal.Add(model);
48
+		}
49
+
50
+		/// <summary>
51
+		/// 更新一条数据
52
+		/// </summary>
53
+		public bool Update(CallCenterApi.Model.T_Sys_ATheChangeLog model)
54
+		{
55
+			return dal.Update(model);
56
+		}
57
+
58
+		/// <summary>
59
+		/// 删除一条数据
60
+		/// </summary>
61
+		public bool Delete(int F_RoleUrlId)
62
+		{
63
+			
64
+			return dal.Delete(F_RoleUrlId);
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_ATheChangeLog GetModel(int F_RoleUrlId)
78
+		{
79
+			
80
+			return dal.GetModel(F_RoleUrlId);
81
+		}
82
+
83
+		/// <summary>
84
+		/// 得到一个对象实体,从缓存中
85
+		/// </summary>
86
+        //public CallCenterApi.Model.T_Sys_ATheChangeLog GetModelByCache(int F_RoleUrlId)
87
+        //{
88
+			
89
+        //    string CacheKey = "T_Sys_FunctionModel-" + F_RoleUrlId;
90
+        //    object objModel = SZRX.Common.DataCache.GetCache(CacheKey);
91
+        //    if (objModel == null)
92
+        //    {
93
+        //        try
94
+        //        {
95
+        //            objModel = dal.GetModel(F_RoleUrlId);
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_ATheChangeLog)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_ATheChangeLog> 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_ATheChangeLog> DataTableToList(DataTable dt)
133
+		//{
134
+		//	List<CallCenterApi.Model.T_Sys_ATheChangeLog> modelList = new List<CallCenterApi.Model.T_Sys_ATheChangeLog>();
135
+		//	int rowsCount = dt.Rows.Count;
136
+		//	if (rowsCount > 0)
137
+		//	{
138
+		//		CallCenterApi.Model.T_Sys_ATheChangeLog model;
139
+		//		for (int n = 0; n < rowsCount; n++)
140
+		//		{
141
+		//			model = new CallCenterApi.Model.T_Sys_ATheChangeLog();
142
+		//			if(dt.Tables[0].Rows[0]["F_Id"]!=null && dt.Tables[0].Rows[0]["F_Id"].ToString()!="")
143
+		//		{
144
+		//			model.F_Id=int.Parse(dt.Tables[0].Rows[0]["F_Id"].ToString());
145
+		//		}
146
+		//		if(dt.Tables[0].Rows[0]["F_CreateUserId"] !=null && dt.Tables[0].Rows[0]["F_CreateUserId"].ToString()!="")
147
+		//		{
148
+		//			model.F_CreateUserId = int.Parse(dt.Tables[0].Rows[0]["F_CreateUserId"].ToString());
149
+		//		}
150
+  //              if (dt.Tables[0].Rows[0]["F_CreateUserName"] != null && dt.Tables[0].Rows[0]["F_CreateUserName"].ToString() != "")
151
+  //              {
152
+  //                  model.F_CreateUserName = dt.Tables[0].Rows[0]["F_CreateUserName"].ToString();
153
+  //              }
154
+  //              if (dt.Tables[0].Rows[0]["F_CreateDate"] !=null && dt.Tables[0].Rows[0]["F_CreateDate"].ToString()!="")
155
+		//		{
156
+		//			model.F_CreateDate = DateTime.Parse(dt.Tables[0].Rows[0]["F_CreateDate"].ToString());
157
+		//		}
158
+		//		if(dt.Tables[0].Rows[0]["F_deptid"] !=null && dt.Tables[0].Rows[0]["F_deptid"].ToString()!="")
159
+		//		{
160
+		//			model.F_deptid = int.Parse(dt.Tables[0].Rows[0]["F_deptid"].ToString());
161
+		//		}
162
+				
163
+  //              if (dt.Tables[0].Rows[0]["F_deptname"] != null && dt.Tables[0].Rows[0]["F_deptname"].ToString() != "")
164
+  //              {
165
+  //                  model.F_deptname = dt.Tables[0].Rows[0]["F_deptname"].ToString();
166
+  //              }if(dt.Tables[0].Rows[0]["F_type"] !=null && dt.Tables[0].Rows[0]["F_type"].ToString()!="")
167
+		//		{
168
+		//			model.F_type = int.Parse(dt.Tables[0].Rows[0]["F_type"].ToString());
169
+		//		}
170
+  //              if (dt.Tables[0].Rows[0]["F_CustomerId"] != null && dt.Tables[0].Rows[0]["F_CustomerId"].ToString() != "")
171
+  //              {
172
+  //                  model.F_CustomerId = int.Parse(dt.Tables[0].Rows[0]["F_CustomerId"].ToString());
173
+  //              }
174
+
175
+  //              if (dt.Tables[0].Rows[0]["F_Memo"] !=null && dt.Tables[0].Rows[0]["F_Memo"].ToString()!="")
176
+		//		{
177
+		//			model.F_Memo = dt.Tables[0].Rows[0]["F_Memo"].ToString();
178
+		//		}
179
+		//			modelList.Add(model);
180
+		//		}
181
+		//	}
182
+		//	return modelList;
183
+		//}
184
+
185
+		/// <summary>
186
+		/// 获得数据列表
187
+		/// </summary>
188
+		public DataSet GetAllList()
189
+		{
190
+			return GetList("");
191
+		}
192
+
193
+		/// <summary>
194
+		/// 分页获取数据列表
195
+		/// </summary>
196
+		//public DataSet GetList(int PageSize,int PageIndex,string strWhere)
197
+		//{
198
+			//return dal.GetList(PageSize,PageIndex,strWhere);
199
+		//}
200
+
201
+		#endregion  Method
202
+	}
203
+}
204
+

+ 201 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_BTheChangeLog.cs

@@ -0,0 +1,201 @@
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_BTheChangeLog
12
+	{
13
+		private readonly CallCenterApi.DAL.T_Sys_BTheChangeLog dal=new CallCenterApi.DAL.T_Sys_BTheChangeLog();
14
+		public T_Sys_BTheChangeLog()
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_RoleUrlId)
30
+		{
31
+			return dal.Exists(F_RoleUrlId);
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_BTheChangeLog model)
46
+		{
47
+			return dal.Add(model);
48
+		}
49
+
50
+		/// <summary>
51
+		/// 更新一条数据
52
+		/// </summary>
53
+		public bool Update(CallCenterApi.Model.T_Sys_BTheChangeLog model)
54
+		{
55
+			return dal.Update(model);
56
+		}
57
+
58
+		/// <summary>
59
+		/// 删除一条数据
60
+		/// </summary>
61
+		public bool Delete(int F_RoleUrlId)
62
+		{
63
+			
64
+			return dal.Delete(F_RoleUrlId);
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_BTheChangeLog GetModel(int F_RoleUrlId)
78
+		{
79
+			
80
+			return dal.GetModel(F_RoleUrlId);
81
+		}
82
+
83
+		/// <summary>
84
+		/// 得到一个对象实体,从缓存中
85
+		/// </summary>
86
+        //public CallCenterApi.Model.T_Sys_BTheChangeLog GetModelByCache(int F_RoleUrlId)
87
+        //{
88
+			
89
+        //    string CacheKey = "T_Sys_FunctionModel-" + F_RoleUrlId;
90
+        //    object objModel = SZRX.Common.DataCache.GetCache(CacheKey);
91
+        //    if (objModel == null)
92
+        //    {
93
+        //        try
94
+        //        {
95
+        //            objModel = dal.GetModel(F_RoleUrlId);
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_BTheChangeLog)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_BTheChangeLog> 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_BTheChangeLog> DataTableToList(DataTable dt)
133
+		//{
134
+		//	List<CallCenterApi.Model.T_Sys_BTheChangeLog> modelList = new List<CallCenterApi.Model.T_Sys_BTheChangeLog>();
135
+		//	int rowsCount = dt.Rows.Count;
136
+		//	if (rowsCount > 0)
137
+		//	{
138
+		//		CallCenterApi.Model.T_Sys_BTheChangeLog model;
139
+		//		for (int n = 0; n < rowsCount; n++)
140
+		//		{
141
+  //                  if (ds.Tables[0].Rows[0]["F_Id"] != null && ds.Tables[0].Rows[0]["F_Id"].ToString() != "")
142
+  //                  {
143
+  //                      model.F_Id = int.Parse(ds.Tables[0].Rows[0]["F_Id"].ToString());
144
+  //                  }
145
+  //                  if (ds.Tables[0].Rows[0]["F_CreateUserId"] != null && ds.Tables[0].Rows[0]["F_CreateUserId"].ToString() != "")
146
+  //                  {
147
+  //                      model.F_CreateUserId = ds.Tables[0].Rows[0]["F_CreateUserId"].ToString();
148
+  //                  }
149
+  //                  if (ds.Tables[0].Rows[0]["F_CreateUserName"] != null && ds.Tables[0].Rows[0]["F_CreateUserName"].ToString() != "")
150
+  //                  {
151
+  //                      model.F_CreateUserName = int.Parse(ds.Tables[0].Rows[0]["F_CreateUserName"].ToString());
152
+  //                  }
153
+  //                  if (ds.Tables[0].Rows[0]["F_CreateDate"] != null && ds.Tables[0].Rows[0]["F_CreateDate"].ToString() != "")
154
+  //                  {
155
+  //                      model.F_CreateDate = ds.Tables[0].Rows[0]["F_CreateDate"].ToString();
156
+  //                  }
157
+  //                  if (ds.Tables[0].Rows[0]["F_deptid"] != null && ds.Tables[0].Rows[0]["F_deptid"].ToString() != "")
158
+  //                  {
159
+  //                      model.F_deptid = int.Parse(ds.Tables[0].Rows[0]["F_deptid"].ToString());
160
+  //                  }
161
+
162
+  //                  if (ds.Tables[0].Rows[0]["F_deptname"] != null && ds.Tables[0].Rows[0]["F_deptname"].ToString() != "")
163
+  //                  {
164
+  //                      model.F_deptname = int.Parse(ds.Tables[0].Rows[0]["F_deptname"].ToString());
165
+  //                  }
166
+  //                  if (ds.Tables[0].Rows[0]["F_ATheChangeLog"] != null && ds.Tables[0].Rows[0]["F_ATheChangeLog"].ToString() != "")
167
+  //                  {
168
+  //                      model.F_ATheChangeLog = int.Parse(ds.Tables[0].Rows[0]["F_ATheChangeLog"].ToString());
169
+  //                  }
170
+
171
+  //                  if (ds.Tables[0].Rows[0]["F_Memo"] != null && ds.Tables[0].Rows[0]["F_Memo"].ToString() != "")
172
+  //                  {
173
+  //                      model.F_Memo = int.Parse(ds.Tables[0].Rows[0]["F_Memo"].ToString());
174
+  //                  }
175
+
176
+  //                  modelList.Add(model);
177
+		//		}
178
+		//	}
179
+		//	return modelList;
180
+		//}
181
+
182
+		/// <summary>
183
+		/// 获得数据列表
184
+		/// </summary>
185
+		public DataSet GetAllList()
186
+		{
187
+			return GetList("");
188
+		}
189
+
190
+		/// <summary>
191
+		/// 分页获取数据列表
192
+		/// </summary>
193
+		//public DataSet GetList(int PageSize,int PageIndex,string strWhere)
194
+		//{
195
+			//return dal.GetList(PageSize,PageIndex,strWhere);
196
+		//}
197
+
198
+		#endregion  Method
199
+	}
200
+}
201
+

+ 316 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_ATheChangeLog.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_ATheChangeLog
10
+	/// </summary>
11
+	public partial class T_Sys_ATheChangeLog
12
+	{
13
+		public T_Sys_ATheChangeLog()
14
+		{}
15
+		#region  Method
16
+
17
+		/// <summary>
18
+		/// 得到最大ID
19
+		/// </summary>
20
+		public int GetMaxId()
21
+		{
22
+		return DbHelperSQL.GetMaxID("F_Id", "T_Sys_ATheChangeLog"); 
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_ATheChangeLog");
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_ATheChangeLog 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_ATheChangeLog model)
62
+		{
63
+			StringBuilder strSql=new StringBuilder();
64
+			strSql.Append("insert into T_Sys_ATheChangeLog(");
65
+			strSql.Append(@"F_CreateUserId,F_CreateUserName,F_CreateDate,
66
+               F_deptid,F_deptname,F_type,F_CustomerId,F_Memo)");
67
+			strSql.Append(" values (");
68
+			strSql.Append(@"@F_CreateUserId,@F_CreateUserName,@F_CreateDate,@F_deptid,@F_deptname,@F_type,@F_CustomerId,@F_Memo)");
69
+            strSql.Append(";select @@IDENTITY");
70
+			SqlParameter[] parameters = {
71
+                      new SqlParameter("@F_CreateUserId", SqlDbType.Int,4),
72
+                         new SqlParameter("@F_CreateUserName", SqlDbType.NVarChar,50),
73
+                    new SqlParameter("@F_CreateDate", SqlDbType.DateTime),
74
+                    new SqlParameter("@F_deptid", SqlDbType.Int,4),
75
+                     new SqlParameter("@F_deptname", SqlDbType.NVarChar,50),
76
+                new SqlParameter("@F_type", SqlDbType.Int,4),
77
+                 new SqlParameter("@F_CustomerId", SqlDbType.Int,4),
78
+                    new SqlParameter("@F_Memo", SqlDbType.NVarChar,50)};
79
+
80
+            parameters[0].Value = model.F_CreateUserId;
81
+            parameters[1].Value = model.F_CreateUserName;
82
+            parameters[2].Value = model.F_CreateDate;
83
+            parameters[3].Value = model.F_deptid;
84
+            parameters[4].Value = model.F_deptname;
85
+            parameters[5].Value = model.F_type;
86
+            parameters[6].Value = model.F_CustomerId;
87
+            parameters[7].Value = model.F_Memo;
88
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
89
+            if (obj == null)
90
+            {
91
+                return 0;
92
+            }
93
+            else
94
+            {
95
+                return Convert.ToInt32(obj);
96
+            }
97
+			//return DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
98
+		}
99
+		/// <summary>
100
+		/// 更新一条数据
101
+		/// </summary>
102
+		public bool Update(CallCenterApi.Model.T_Sys_ATheChangeLog model)
103
+		{
104
+			StringBuilder strSql=new StringBuilder();
105
+			strSql.Append("update T_Sys_ATheChangeLog set ");
106
+			strSql.Append("F_CreateUserId=@F_CreateUserId,");
107
+            strSql.Append("F_CreateUserName=@F_CreateUserName,");
108
+            strSql.Append("F_CreateDate=@F_CreateDate,");
109
+			strSql.Append("F_deptid=@F_deptid,");
110
+			strSql.Append("F_deptname=@F_deptname,");
111
+     
112
+            strSql.Append("F_type=@F_type,");
113
+            strSql.Append("F_CustomerId=@F_CustomerId,");
114
+            strSql.Append("F_Memo=@F_Memo ");
115
+
116
+            SqlParameter[] parameters = {
117
+                    new SqlParameter("@F_CreateUserId", SqlDbType.Int,4),
118
+                new SqlParameter("@F_CreateUserName", SqlDbType.NVarChar,50),
119
+                    new SqlParameter("@F_CreateDate", SqlDbType.DateTime),
120
+                    new SqlParameter("@F_deptid", SqlDbType.Int, 4),
121
+                    new SqlParameter("@F_deptname", SqlDbType.NVarChar,50),
122
+                new SqlParameter("@F_type", SqlDbType.Int,4),
123
+            new SqlParameter("@F_CustomerId", SqlDbType.Int, 4),
124
+            new SqlParameter("@F_Memo", SqlDbType.NVarChar, 50) };
125
+
126
+        parameters[0].Value = model.F_CreateUserId;
127
+			parameters[1].Value = model.F_CreateUserName;
128
+			parameters[2].Value = model.F_CreateDate;
129
+			parameters[3].Value = model.F_deptid;
130
+            parameters[4].Value = model.F_deptname;
131
+            parameters[5].Value = model.F_type;
132
+            parameters[6].Value = model.F_CustomerId;
133
+            parameters[7].Value = model.F_Memo;
134
+
135
+            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
136
+			if (rows > 0)
137
+			{
138
+				return true;
139
+			}
140
+			else
141
+			{
142
+				return false;
143
+			}
144
+		}
145
+
146
+		/// <summary>
147
+		/// 删除一条数据
148
+		/// </summary>
149
+		public bool Delete(int F_Id)
150
+		{
151
+			
152
+			StringBuilder strSql=new StringBuilder();
153
+			strSql.Append("delete from T_Sys_ATheChangeLog ");
154
+			strSql.Append(" where F_Id=@F_Id ");
155
+			SqlParameter[] parameters = {
156
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
157
+			parameters[0].Value = F_Id;
158
+
159
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
160
+			if (rows > 0)
161
+			{
162
+				return true;
163
+			}
164
+			else
165
+			{
166
+				return false;
167
+			}
168
+		}
169
+		/// <summary>
170
+		/// 删除一条数据
171
+		/// </summary>
172
+		public bool DeleteList(string F_FunctionIdlist )
173
+		{
174
+			StringBuilder strSql=new StringBuilder();
175
+			strSql.Append("delete from T_Sys_ATheChangeLog ");
176
+			strSql.Append(" where F_Id in (" + F_FunctionIdlist + ")  ");
177
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
178
+			if (rows > 0)
179
+			{
180
+				return true;
181
+			}
182
+			else
183
+			{
184
+				return false;
185
+			}
186
+		}
187
+
188
+
189
+		/// <summary>
190
+		/// 得到一个对象实体
191
+		/// </summary>
192
+		public CallCenterApi.Model.T_Sys_ATheChangeLog GetModel(int F_Id)
193
+		{
194
+			
195
+			StringBuilder strSql=new StringBuilder();
196
+			strSql.Append("select  top 1 F_Id,F_CreateUserId,F_CreateUserName,F_CreateDate,F_deptid,F_deptname,F_type,F_CustomerId,F_Memo ");
197
+			strSql.Append(" where F_Id=@F_Id ");
198
+			SqlParameter[] parameters = {
199
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
200
+			parameters[0].Value = F_Id;
201
+
202
+			CallCenterApi.Model.T_Sys_ATheChangeLog model=new CallCenterApi.Model.T_Sys_ATheChangeLog();
203
+			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
204
+			if(ds.Tables[0].Rows.Count>0)
205
+			{
206
+				if(ds.Tables[0].Rows[0]["F_Id"]!=null && ds.Tables[0].Rows[0]["F_Id"].ToString()!="")
207
+				{
208
+					model.F_Id=int.Parse(ds.Tables[0].Rows[0]["F_Id"].ToString());
209
+				}
210
+				if(ds.Tables[0].Rows[0]["F_CreateUserId"] !=null && ds.Tables[0].Rows[0]["F_CreateUserId"].ToString()!="")
211
+				{
212
+					model.F_CreateUserId = int.Parse(ds.Tables[0].Rows[0]["F_CreateUserId"].ToString());
213
+				}
214
+                if (ds.Tables[0].Rows[0]["F_CreateUserName"] != null && ds.Tables[0].Rows[0]["F_CreateUserName"].ToString() != "")
215
+                {
216
+                    model.F_CreateUserName = ds.Tables[0].Rows[0]["F_CreateUserName"].ToString();
217
+                }
218
+                if (ds.Tables[0].Rows[0]["F_CreateDate"] !=null && ds.Tables[0].Rows[0]["F_CreateDate"].ToString()!="")
219
+				{
220
+					model.F_CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["F_CreateDate"].ToString());
221
+				}
222
+				if(ds.Tables[0].Rows[0]["F_deptid"] !=null && ds.Tables[0].Rows[0]["F_deptid"].ToString()!="")
223
+				{
224
+					model.F_deptid = int.Parse(ds.Tables[0].Rows[0]["F_deptid"].ToString());
225
+				}
226
+				
227
+                if (ds.Tables[0].Rows[0]["F_deptname"] != null && ds.Tables[0].Rows[0]["F_deptname"].ToString() != "")
228
+                {
229
+                    model.F_deptname = ds.Tables[0].Rows[0]["F_deptname"].ToString();
230
+                }if(ds.Tables[0].Rows[0]["F_type"] !=null && ds.Tables[0].Rows[0]["F_type"].ToString()!="")
231
+				{
232
+					model.F_type = int.Parse(ds.Tables[0].Rows[0]["F_type"].ToString());
233
+				}
234
+                if (ds.Tables[0].Rows[0]["F_CustomerId"] != null && ds.Tables[0].Rows[0]["F_CustomerId"].ToString() != "")
235
+                {
236
+                    model.F_CustomerId = int.Parse(ds.Tables[0].Rows[0]["F_CustomerId"].ToString());
237
+                }
238
+
239
+                if (ds.Tables[0].Rows[0]["F_Memo"] !=null && ds.Tables[0].Rows[0]["F_Memo"].ToString()!="")
240
+				{
241
+					model.F_Memo = ds.Tables[0].Rows[0]["F_Memo"].ToString();
242
+				}
243
+			
244
+				return model;
245
+			}
246
+			else
247
+			{
248
+				return null;
249
+			}
250
+		}
251
+
252
+		/// <summary>
253
+		/// 获得数据列表
254
+		/// </summary>
255
+		public DataSet GetList(string strWhere)
256
+		{
257
+			StringBuilder strSql=new StringBuilder();
258
+			strSql.Append("select F_Id,F_CreateUserId,F_CreateUserName,F_CreateDate,F_deptid,F_deptname,F_type,F_CustomerId,F_Memo ");
259
+			strSql.Append(" FROM T_Sys_ATheChangeLog ");
260
+			if(strWhere.Trim()!="")
261
+			{
262
+				strSql.Append(" where "+strWhere);
263
+			}
264
+			return DbHelperSQL.Query(strSql.ToString());
265
+		}
266
+
267
+		/// <summary>
268
+		/// 获得前几行数据
269
+		/// </summary>
270
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
271
+		{
272
+			StringBuilder strSql=new StringBuilder();
273
+			strSql.Append("select ");
274
+			if(Top>0)
275
+			{
276
+				strSql.Append(" top "+Top.ToString());
277
+			}
278
+			strSql.Append(" F_Id,F_CreateUserId,F_CreateUserName,F_CreateDate,F_deptid,F_deptname,F_type,F_CustomerId,F_Memo ");
279
+			strSql.Append(" FROM T_Sys_ATheChangeLog ");
280
+			if(strWhere.Trim()!="")
281
+			{
282
+				strSql.Append(" where "+strWhere);
283
+			}
284
+			strSql.Append(" order by " + filedOrder);
285
+			return DbHelperSQL.Query(strSql.ToString());
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_ATheChangeLog";
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
+

+ 313 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_BTheChangeLog.cs

@@ -0,0 +1,313 @@
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_BTheChangeLog
10
+	/// </summary>
11
+	public partial class T_Sys_BTheChangeLog
12
+	{
13
+		public T_Sys_BTheChangeLog()
14
+		{}
15
+		#region  Method
16
+
17
+		/// <summary>
18
+		/// 得到最大ID
19
+		/// </summary>
20
+		public int GetMaxId()
21
+		{
22
+		return DbHelperSQL.GetMaxID("F_Id", "T_Sys_BTheChangeLog"); 
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_BTheChangeLog");
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_BTheChangeLog 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_BTheChangeLog model)
62
+		{
63
+			StringBuilder strSql=new StringBuilder();
64
+			strSql.Append("insert into T_Sys_BTheChangeLog(");
65
+			strSql.Append(@"F_CreateUserId,F_CreateUserName,F_CreateDate,
66
+               F_deptid,F_deptname,F_ATheChangeLog,F_Memo)");
67
+			strSql.Append(" values (");
68
+			strSql.Append(@"@F_CreateUserId,@F_CreateUserName,@F_CreateDate,@F_deptid,@F_deptname,@F_ATheChangeLog,@F_Memo)");
69
+            strSql.Append(";select @@IDENTITY");
70
+			SqlParameter[] parameters = {
71
+                      new SqlParameter("@F_CreateUserId", SqlDbType.Int,4),
72
+                         new SqlParameter("@F_CreateUserName", SqlDbType.NVarChar,50),
73
+                    new SqlParameter("@F_CreateDate", SqlDbType.DateTime),
74
+                    new SqlParameter("@F_deptid", SqlDbType.Int,4),
75
+                     new SqlParameter("@F_deptname", SqlDbType.NVarChar,50),
76
+               
77
+                 new SqlParameter("@F_ATheChangeLog", SqlDbType.Int,4),
78
+                    new SqlParameter("@F_Memo", SqlDbType.NVarChar,50)};
79
+
80
+            parameters[0].Value = model.F_CreateUserId;
81
+            parameters[1].Value = model.F_CreateUserName;
82
+            parameters[2].Value = model.F_CreateDate;
83
+            parameters[3].Value = model.F_deptid;
84
+            parameters[4].Value = model.F_deptname;
85
+        
86
+            parameters[5].Value = model.F_ATheChangeLog;
87
+            parameters[6].Value = model.F_Memo;
88
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
89
+            if (obj == null)
90
+            {
91
+                return 0;
92
+            }
93
+            else
94
+            {
95
+                return Convert.ToInt32(obj);
96
+            }
97
+			//return DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
98
+		}
99
+		/// <summary>
100
+		/// 更新一条数据
101
+		/// </summary>
102
+		public bool Update(CallCenterApi.Model.T_Sys_BTheChangeLog model)
103
+		{
104
+			StringBuilder strSql=new StringBuilder();
105
+			strSql.Append("update T_Sys_BTheChangeLog set ");
106
+			strSql.Append("F_CreateUserId=@F_CreateUserId,");
107
+            strSql.Append("F_CreateUserName=@F_CreateUserName,");
108
+            strSql.Append("F_CreateDate=@F_CreateDate,");
109
+			strSql.Append("F_deptid=@F_deptid,");
110
+			strSql.Append("F_deptname=@F_deptname,");
111
+     
112
+         
113
+            strSql.Append("F_ATheChangeLog=@F_ATheChangeLog,");
114
+            strSql.Append("F_Memo=@F_Memo ");
115
+
116
+            SqlParameter[] parameters = {
117
+                    new SqlParameter("@F_CreateUserId", SqlDbType.Int,4),
118
+                new SqlParameter("@F_CreateUserName", SqlDbType.NVarChar,50),
119
+                    new SqlParameter("@F_CreateDate", SqlDbType.DateTime),
120
+                    new SqlParameter("@F_deptid", SqlDbType.Int, 4),
121
+                    new SqlParameter("@F_deptname", SqlDbType.NVarChar,50),
122
+               
123
+            new SqlParameter("@F_ATheChangeLog", SqlDbType.Int, 4),
124
+            new SqlParameter("@F_Memo", SqlDbType.NVarChar, 50) };
125
+
126
+        parameters[0].Value = model.F_CreateUserId;
127
+			parameters[1].Value = model.F_CreateUserName;
128
+			parameters[2].Value = model.F_CreateDate;
129
+			parameters[3].Value = model.F_deptid;
130
+            parameters[4].Value = model.F_deptname;
131
+    
132
+            parameters[5].Value = model.F_ATheChangeLog;
133
+            parameters[6].Value = model.F_Memo;
134
+
135
+            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
136
+			if (rows > 0)
137
+			{
138
+				return true;
139
+			}
140
+			else
141
+			{
142
+				return false;
143
+			}
144
+		}
145
+
146
+		/// <summary>
147
+		/// 删除一条数据
148
+		/// </summary>
149
+		public bool Delete(int F_Id)
150
+		{
151
+			
152
+			StringBuilder strSql=new StringBuilder();
153
+			strSql.Append("delete from T_Sys_BTheChangeLog ");
154
+			strSql.Append(" where F_Id=@F_Id ");
155
+			SqlParameter[] parameters = {
156
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
157
+			parameters[0].Value = F_Id;
158
+
159
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
160
+			if (rows > 0)
161
+			{
162
+				return true;
163
+			}
164
+			else
165
+			{
166
+				return false;
167
+			}
168
+		}
169
+		/// <summary>
170
+		/// 删除一条数据
171
+		/// </summary>
172
+		public bool DeleteList(string F_FunctionIdlist )
173
+		{
174
+			StringBuilder strSql=new StringBuilder();
175
+			strSql.Append("delete from T_Sys_BTheChangeLog ");
176
+			strSql.Append(" where F_Id in (" + F_FunctionIdlist + ")  ");
177
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
178
+			if (rows > 0)
179
+			{
180
+				return true;
181
+			}
182
+			else
183
+			{
184
+				return false;
185
+			}
186
+		}
187
+
188
+
189
+		/// <summary>
190
+		/// 得到一个对象实体
191
+		/// </summary>
192
+		public CallCenterApi.Model.T_Sys_BTheChangeLog GetModel(int F_Id)
193
+		{
194
+			
195
+			StringBuilder strSql=new StringBuilder();
196
+			strSql.Append("select  top 1 F_Id,F_CreateUserId,F_CreateUserName,F_CreateDate,F_deptid,F_deptname,F_ATheChangeLog,F_Memo ");
197
+			strSql.Append(" where F_Id=@F_Id ");
198
+			SqlParameter[] parameters = {
199
+					new SqlParameter("@F_Id", SqlDbType.Int,4)};
200
+			parameters[0].Value = F_Id;
201
+
202
+			CallCenterApi.Model.T_Sys_BTheChangeLog model=new CallCenterApi.Model.T_Sys_BTheChangeLog();
203
+			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
204
+			if(ds.Tables[0].Rows.Count>0)
205
+			{
206
+				if(ds.Tables[0].Rows[0]["F_Id"]!=null && ds.Tables[0].Rows[0]["F_Id"].ToString()!="")
207
+				{
208
+					model.F_Id=int.Parse(ds.Tables[0].Rows[0]["F_Id"].ToString());
209
+				}
210
+				if(ds.Tables[0].Rows[0]["F_CreateUserId"] !=null && ds.Tables[0].Rows[0]["F_CreateUserId"].ToString()!="")
211
+				{
212
+					model.F_CreateUserId = int.Parse(ds.Tables[0].Rows[0]["F_CreateUserId"].ToString());
213
+				}
214
+                if (ds.Tables[0].Rows[0]["F_CreateUserName"] != null && ds.Tables[0].Rows[0]["F_CreateUserName"].ToString() != "")
215
+                {
216
+                    model.F_CreateUserName = ds.Tables[0].Rows[0]["F_CreateUserName"].ToString();
217
+                }
218
+                if (ds.Tables[0].Rows[0]["F_CreateDate"] !=null && ds.Tables[0].Rows[0]["F_CreateDate"].ToString()!="")
219
+				{
220
+					model.F_CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["F_CreateDate"].ToString());
221
+				}
222
+				if(ds.Tables[0].Rows[0]["F_deptid"] !=null && ds.Tables[0].Rows[0]["F_deptid"].ToString()!="")
223
+				{
224
+					model.F_deptid = int.Parse(ds.Tables[0].Rows[0]["F_deptid"].ToString());
225
+				}
226
+				
227
+                if (ds.Tables[0].Rows[0]["F_deptname"] != null && ds.Tables[0].Rows[0]["F_deptname"].ToString() != "")
228
+                {
229
+                    model.F_deptname = ds.Tables[0].Rows[0]["F_deptname"].ToString();
230
+                }
231
+                if (ds.Tables[0].Rows[0]["F_ATheChangeLog"] != null && ds.Tables[0].Rows[0]["F_ATheChangeLog"].ToString() != "")
232
+                {
233
+                    model.F_ATheChangeLog = int.Parse(ds.Tables[0].Rows[0]["F_ATheChangeLog"].ToString());
234
+                }
235
+
236
+                if (ds.Tables[0].Rows[0]["F_Memo"] !=null && ds.Tables[0].Rows[0]["F_Memo"].ToString()!="")
237
+				{
238
+					model.F_Memo = ds.Tables[0].Rows[0]["F_Memo"].ToString();
239
+				}
240
+			
241
+				return model;
242
+			}
243
+			else
244
+			{
245
+				return null;
246
+			}
247
+		}
248
+
249
+		/// <summary>
250
+		/// 获得数据列表
251
+		/// </summary>
252
+		public DataSet GetList(string strWhere)
253
+		{
254
+			StringBuilder strSql=new StringBuilder();
255
+			strSql.Append("select F_Id,F_CreateUserId,F_CreateUserName,F_CreateDate,F_deptid,F_deptname,F_ATheChangeLog,F_Memo ");
256
+			strSql.Append(" FROM T_Sys_BTheChangeLog ");
257
+			if(strWhere.Trim()!="")
258
+			{
259
+				strSql.Append(" where "+strWhere);
260
+			}
261
+			return DbHelperSQL.Query(strSql.ToString());
262
+		}
263
+
264
+		/// <summary>
265
+		/// 获得前几行数据
266
+		/// </summary>
267
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
268
+		{
269
+			StringBuilder strSql=new StringBuilder();
270
+			strSql.Append("select ");
271
+			if(Top>0)
272
+			{
273
+				strSql.Append(" top "+Top.ToString());
274
+			}
275
+			strSql.Append(" F_Id,F_CreateUserId,F_CreateUserName,F_CreateDate,F_deptid,F_deptname,F_ATheChangeLog,F_Memo ");
276
+			strSql.Append(" FROM T_Sys_BTheChangeLog ");
277
+			if(strWhere.Trim()!="")
278
+			{
279
+				strSql.Append(" where "+strWhere);
280
+			}
281
+			strSql.Append(" order by " + filedOrder);
282
+			return DbHelperSQL.Query(strSql.ToString());
283
+		}
284
+
285
+		/*
286
+		/// <summary>
287
+		/// 分页获取数据列表
288
+		/// </summary>
289
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
290
+		{
291
+			SqlParameter[] parameters = {
292
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
293
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
294
+					new SqlParameter("@PageSize", SqlDbType.Int),
295
+					new SqlParameter("@PageIndex", SqlDbType.Int),
296
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
297
+					new SqlParameter("@OrderType", SqlDbType.Bit),
298
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
299
+					};
300
+			parameters[0].Value = "T_Sys_BTheChangeLog";
301
+			parameters[1].Value = "F_Id";
302
+			parameters[2].Value = PageSize;
303
+			parameters[3].Value = PageIndex;
304
+			parameters[4].Value = 0;
305
+			parameters[5].Value = 0;
306
+			parameters[6].Value = strWhere;	
307
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
308
+		}*/
309
+
310
+		#endregion  Method
311
+	}
312
+}
313
+

+ 240 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/ATheChangeLogController.cs

@@ -0,0 +1,240 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.DB;
3
+using CallCenterApi.Interface.Controllers.Base;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.Data;
7
+using System.Linq;
8
+using System.Web;
9
+using System.Web.Mvc;
10
+
11
+namespace CallCenterApi.Interface.Controllers
12
+{
13
+    [Authority]
14
+    public class ATheChangeLogController : BaseController
15
+    {
16
+        // GET: ATheChangeLog
17
+        private BLL.T_Sys_ATheChangeLog areaBLL = new BLL.T_Sys_ATheChangeLog();
18
+        private BLL.T_Sys_BTheChangeLog BreaBLL = new BLL.T_Sys_BTheChangeLog();
19
+        #region 区域
20
+        /// <summary>
21
+        /// 获取区域列表
22
+        /// </summary>
23
+        /// <returns></returns>
24
+        public ActionResult GetATheChangeLogList()
25
+        {
26
+            //int userId = CurrentUser.UserData.F_UserId;
27
+            //Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
28
+
29
+            string where = " F_IsDelete=0 ";
30
+            //if (!string.IsNullOrEmpty(userModel.groupcode))
31
+            //{
32
+            //    where += " and F_GroupCode = '" + userModel.groupcode + "'";
33
+            //}
34
+
35
+            DataTable dt = areaBLL.GetList(0, where, " F_Sort asc").Tables[0];
36
+            return Success("加载成功", dt);
37
+        }
38
+
39
+        /// <summary>
40
+        /// 获取区域列表
41
+        /// </summary>
42
+        /// <returns></returns>
43
+        public ActionResult GetAreaListById(int id = 0)
44
+        {
45
+            //int userId = CurrentUser.UserData.F_UserId;
46
+            //Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
47
+
48
+            string where = " isnull(F_ParentId,0)='" + id + "' and F_IsDelete=0 ";
49
+            //if (!string.IsNullOrEmpty(userModel.groupcode))
50
+            //{
51
+            //    where += " and F_GroupCode = '" + userModel.groupcode + "'";
52
+            //}
53
+
54
+            DataTable dt = areaBLL.GetList(0, where, " F_Sort asc").Tables[0];
55
+            return Success("列表加载成功", dt);
56
+        }
57
+
58
+        /// <summary>
59
+        /// 获取区域
60
+        /// </summary>
61
+        /// <param name="areaId"></param>
62
+        /// <returns></returns>
63
+        public ActionResult GetATheChangeLog()
64
+        {
65
+            int id = RequestString.GetInt("id", 0);
66
+            Model.T_Sys_ATheChangeLog dModel = areaBLL.GetModel(id);
67
+            if (dModel != null)
68
+                return Success("获取信息成功", dModel);
69
+            return Error("获取信息失败");
70
+
71
+        }
72
+
73
+        /// <summary>
74
+        /// 添加转移记录
75
+        /// </summary>
76
+        /// <param name="input"></param>
77
+        /// <returns></returns>
78
+        [HttpPost]
79
+        public ActionResult AddAreaATheChangeLog()
80
+        {
81
+            int userId = CurrentUser.UserData.F_UserId;
82
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
83
+            //接收Id
84
+            int id = RequestString.GetInt("id", 0);
85
+              //档案信息Id
86
+            int pid = RequestString.GetInt("F_CustomerId", 0);
87
+            //int sort = RequestString.GetInt("sort", 0);
88
+            //string name = RequestString.GetFormString("name");
89
+            //string code = RequestString.GetFormString("code");
90
+
91
+            Model.T_Sys_ATheChangeLog dModel = new Model.T_Sys_ATheChangeLog();
92
+            if (id == 0)
93
+            {
94
+               
95
+                    dModel.F_CreateUserId = userId;
96
+                    dModel.F_CreateUserName = userModel.F_UserName;
97
+                    dModel.F_CreateDate = DateTime.Now;
98
+                    dModel.F_deptid = userModel.F_DeptId;
99
+                    dModel.F_deptname = userModel.depname;
100
+                    dModel.F_type = 0;
101
+                    dModel.F_CustomerId = pid;
102
+                    dModel.F_Memo = "系统自动记录转移";
103
+                    int n = areaBLL.Add(dModel);
104
+                    if (n > 0)
105
+                        return Success("添加成功", n);
106
+                    else
107
+                        return Error("添加失败");
108
+                
109
+            }
110
+            else
111
+            {
112
+                dModel = areaBLL.GetModel(id);
113
+                if (dModel != null)
114
+                {
115
+
116
+                    dModel.F_CreateUserId = userId;
117
+                    dModel.F_CreateUserName = userModel.F_UserName;
118
+                    dModel.F_CreateDate = DateTime.Now;
119
+                    dModel.F_deptid = userModel.F_DeptId;
120
+                    dModel.F_deptname = userModel.depname;
121
+                    dModel.F_type = 0;
122
+                    dModel.F_CustomerId = pid;
123
+                    dModel.F_Memo = "系统自动记录转移编辑";
124
+                    if (areaBLL.Update(dModel))
125
+                            return Success("修改成功");
126
+                        else
127
+                            return Error("修改失败");
128
+                    
129
+                }
130
+                else
131
+                {
132
+                    return Error("修改失败");
133
+                }
134
+            }
135
+        }
136
+
137
+
138
+
139
+
140
+        /// <summary>
141
+        /// 添加接收记录
142
+        /// </summary>
143
+        /// <param name="input"></param>
144
+        /// <returns></returns>
145
+        [HttpPost]
146
+        public ActionResult AddBTheChangeLog()
147
+        {
148
+            int userId = CurrentUser.UserData.F_UserId;
149
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
150
+            //接收Id
151
+            int ATheChangeLogid = RequestString.GetInt("ATheChangeLogid", 0);
152
+            //档案信息Id
153
+            //int pid = RequestString.GetInt("F_CustomerId", 0);
154
+            //int sort = RequestString.GetInt("sort", 0);
155
+            //string name = RequestString.GetFormString("name");
156
+            //string code = RequestString.GetFormString("code");
157
+
158
+            Model.T_Sys_BTheChangeLog dModel = new Model.T_Sys_BTheChangeLog();
159
+
160
+            dModel.F_CreateUserId = userId;
161
+            dModel.F_CreateUserName = userModel.F_UserName;
162
+            dModel.F_CreateDate = DateTime.Now;
163
+            dModel.F_deptid = userModel.F_DeptId;
164
+            dModel.F_deptname = userModel.depname;
165
+           // dModel.F_type = 0;
166
+            dModel.F_ATheChangeLog = ATheChangeLogid;
167
+            dModel.F_Memo = "系统自动接收记录";
168
+            int n = BreaBLL.Add(dModel);
169
+
170
+            //转移方 状态变为 1 
171
+            string sql = " 	update T_Sys_ATheChangeLog set F_type=1 where F_Id="+ ATheChangeLogid;
172
+            int a =DbHelperSQL.ExecuteSql(sql);
173
+            if (n > 0 || a==1)
174
+                return Success("添加成功", n);
175
+            else
176
+                return Error("添加失败");
177
+
178
+        }
179
+
180
+
181
+        /// <summary>
182
+        /// 删除   之前看是否有接收记录
183
+        /// </summary>
184
+        /// <param name="ids"></param>
185
+        /// <returns></returns>
186
+        public ActionResult DelATheChangeLog(string[] ids)
187
+        {
188
+            if (ids == null || ids.Length <= 0)
189
+                return Error("请选择要删除的转移");
190
+
191
+            var idStr = string.Join(",", ids);
192
+            if (string.IsNullOrEmpty(idStr.Trim()))
193
+                return Error("请选择要删除的转移");
194
+
195
+            if (areaBLL.DeleteList(idStr))
196
+                return Success("删除成功");
197
+            return Error("删除失败");
198
+        }
199
+
200
+        /// <summary>
201
+        /// 删除区域和其下级区域
202
+        /// </summary>
203
+        /// <param name="ids"></param>
204
+        /// <returns></returns>
205
+        public ActionResult DelAreas(int id)
206
+        {
207
+            if (id > 0)
208
+            {
209
+                var model = new BLL.T_Sys_Area().GetModel(id);
210
+                if (DelAreasByPId(id))
211
+                {
212
+                    new BLL.T_Sys_Area().Delete(id);
213
+                }
214
+                return Success("删除成功");
215
+            }
216
+            else
217
+            {
218
+                return Error("删除失败");
219
+            }
220
+
221
+        }
222
+
223
+        public bool DelAreasByPId(int id)
224
+        {
225
+            bool bl = true;
226
+
227
+            var list = new BLL.T_Sys_Area().GetModelList(" F_ParentId ='" + id + "'");
228
+            foreach (var l in list)
229
+            {
230
+                if (DelAreasByPId(l.F_Id))
231
+                {
232
+                    new BLL.T_Sys_Area().Delete(l.F_Id);
233
+                }
234
+            }
235
+
236
+            return bl;
237
+        }
238
+        #endregion
239
+    }
240
+}

+ 4 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

@@ -62,9 +62,9 @@ namespace CallCenterApi.Interface.Controllers.customer
62 62
             #region 导出
63 63
             if (isdc > 0)
64 64
             {
65
-                string dccols = "F_Province,F_City,F_County,F_Address,F_Name,F_Phone,F_Sex,F_Remarks";
65
+                string dccols = "F_Province,F_City,F_County,F_Address,F_Name,F_Phone,F_Sex,case when isnull(F_SpecialTag,0)=1 then '是' else '否' end as F_SpecialTag,F_Remarks";
66 66
                 var dtdc = DbHelperSQL.Query(" select " + dccols + " from T_Cus_Customer where 1=1 " + sql).Tables[0];
67
-                string[] dccolnames = new string[] { "省份", "城市", "县/区", "详细地址", "姓名", "电话", "性别", "备注" };
67
+                string[] dccolnames = new string[] { "省份", "城市", "县/区", "详细地址", "姓名", "电话", "性别", "特殊信访人员", "备注" };
68 68
                 var msg = new NPOIHelper().ExportToExcel("客户列表", dtdc, dccolnames);
69 69
                 if (msg == "")
70 70
                 {
@@ -331,6 +331,8 @@ namespace CallCenterApi.Interface.Controllers.customer
331 331
                     dModel.F_Phone = dr["电话"].ToString();
332 332
                     dModel.F_Sex = dr["性别"].ToString();
333 333
                     dModel.F_Remarks = dr["备注"].ToString();
334
+                    dModel.F_SpecialTag= dr["特殊信访人员"].ToString()=="是"?1:0;
335
+
334 336
                     #endregion
335 337
                     var res = new BLL.T_Cus_Customer().Add(dModel);
336 338
                     if (res > 0)

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/RegionCategoryController.cs

@@ -195,16 +195,16 @@ namespace CallCenterApi.Interface.Controllers.customer
195 195
         /// <returns></returns>
196 196
         public ActionResult GetCountyList(int pId=-1)
197 197
         {
198
-            if (Request.IsAuthenticated)
199
-            {
198
+            //if (Request.IsAuthenticated)
199
+            //{
200 200
                 if (pId < 0)
201 201
                     return Success ("加载失败");
202 202
                 DataTable dt = new DataTable();
203 203
                 dt = new BLL.T_RegionCategory().GetList(" F_DeleteFlag=0 and F_ParentId=" + pId).Tables[0];
204 204
                         return Success("加载成功", dt);
205 205
                
206
-            }
207
-            return NoToken("未知错误,请重新登录");
206
+           // }
207
+           // return NoToken("未知错误,请重新登录");
208 208
         }
209 209
         /// <summary>
210 210
         /// 获取地市列表

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -324,8 +324,8 @@ namespace CallCenterApi.Interface.Controllers.tel
324 324
         /// <returns></returns>
325 325
         public ActionResult GetZSKList()
326 326
         {
327
-            if (!Request.IsAuthenticated)
328
-                return NoToken("未知错误,请重新登录");
327
+            //if (!Request.IsAuthenticated)
328
+            //    return NoToken("未知错误,请重新登录");
329 329
 
330 330
             DataTable dt = new DataTable();
331 331
             string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));

+ 90 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_ATheChangeLog.cs

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

+ 86 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_BTheChangeLog.cs

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