瀏覽代碼

修改归属地模块

zhoufan 8 年之前
父節點
當前提交
99d3ffff79

+ 32 - 21
CallCenterApi/CallCenterApi.BLL/T_Sys_MobileData.cs

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
 using System.Data;
2
 using System.Data;
4
-using System.Linq;
5
-using System.Text;
6
-using System.Threading.Tasks;
7
-
3
+using System.Collections.Generic;
4
+using CallCenterApi.Model;
8
 namespace CallCenterApi.BLL
5
 namespace CallCenterApi.BLL
9
 {
6
 {
10
     /// <summary>
7
     /// <summary>
12
     /// </summary>
9
     /// </summary>
13
     public partial class T_Sys_MobileData
10
     public partial class T_Sys_MobileData
14
     {
11
     {
15
-        private readonly DAL.T_Sys_MobileData dal = new DAL.T_Sys_MobileData();
12
+        private readonly CallCenterApi.DAL.T_Sys_MobileData dal = new CallCenterApi.DAL.T_Sys_MobileData();
16
         public T_Sys_MobileData()
13
         public T_Sys_MobileData()
17
         { }
14
         { }
18
         #region  BasicMethod
15
         #region  BasicMethod
19
         /// <summary>
16
         /// <summary>
20
         /// 是否存在该记录
17
         /// 是否存在该记录
21
         /// </summary>
18
         /// </summary>
22
-        public bool Exists(string F_MobileNum)
19
+        public bool Exists(int F_Id)
23
         {
20
         {
24
-            return dal.Exists(F_MobileNum);
21
+            return dal.Exists(F_Id);
25
         }
22
         }
26
 
23
 
27
         /// <summary>
24
         /// <summary>
28
         /// 增加一条数据
25
         /// 增加一条数据
29
         /// </summary>
26
         /// </summary>
30
-        public bool Add(Model.T_Sys_MobileData model)
27
+        public int Add(CallCenterApi.Model.T_Sys_MobileData model)
31
         {
28
         {
32
             return dal.Add(model);
29
             return dal.Add(model);
33
         }
30
         }
35
         /// <summary>
32
         /// <summary>
36
         /// 更新一条数据
33
         /// 更新一条数据
37
         /// </summary>
34
         /// </summary>
38
-        public bool Update(Model.T_Sys_MobileData model)
35
+        public bool Update(CallCenterApi.Model.T_Sys_MobileData model)
39
         {
36
         {
40
             return dal.Update(model);
37
             return dal.Update(model);
41
         }
38
         }
43
         /// <summary>
40
         /// <summary>
44
         /// 删除一条数据
41
         /// 删除一条数据
45
         /// </summary>
42
         /// </summary>
46
-        public bool Delete(string F_MobileNum)
43
+        public bool Delete(int F_Id)
47
         {
44
         {
48
 
45
 
49
-            return dal.Delete(F_MobileNum);
46
+            return dal.Delete(F_Id);
50
         }
47
         }
51
         /// <summary>
48
         /// <summary>
52
         /// 删除一条数据
49
         /// 删除一条数据
53
         /// </summary>
50
         /// </summary>
54
-        public bool DeleteList(string F_MobileNumlist)
51
+        public bool DeleteList(string F_Idlist)
55
         {
52
         {
56
-            return dal.DeleteList(F_MobileNumlist);
53
+            return dal.DeleteList(F_Idlist);
54
+        }
55
+        /// <summary>
56
+        /// 删除一条数据
57
+        /// </summary>
58
+        public bool DeleteList(string F_Idlist, string usercode)
59
+        {
60
+            return dal.DeleteList(F_Idlist, usercode);
57
         }
61
         }
58
 
62
 
59
         /// <summary>
63
         /// <summary>
60
         /// 得到一个对象实体
64
         /// 得到一个对象实体
61
         /// </summary>
65
         /// </summary>
62
-        public Model.T_Sys_MobileData GetModel(string F_MobileNum)
66
+        public CallCenterApi.Model.T_Sys_MobileData GetModel(int F_Id)
63
         {
67
         {
64
 
68
 
65
-            return dal.GetModel(F_MobileNum);
69
+            return dal.GetModel(F_Id);
66
         }
70
         }
67
 
71
 
68
         /// <summary>
72
         /// <summary>
82
         /// <summary>
86
         /// <summary>
83
         /// 获得数据列表
87
         /// 获得数据列表
84
         /// </summary>
88
         /// </summary>
85
-        public List<Model.T_Sys_MobileData> GetModelList(string strWhere)
89
+        public List<CallCenterApi.Model.T_Sys_MobileData> GetModelList(string strWhere)
86
         {
90
         {
87
             DataSet ds = dal.GetList(strWhere);
91
             DataSet ds = dal.GetList(strWhere);
88
             return DataTableToList(ds.Tables[0]);
92
             return DataTableToList(ds.Tables[0]);
90
         /// <summary>
94
         /// <summary>
91
         /// 获得数据列表
95
         /// 获得数据列表
92
         /// </summary>
96
         /// </summary>
93
-        public List<Model.T_Sys_MobileData> DataTableToList(DataTable dt)
97
+        public List<CallCenterApi.Model.T_Sys_MobileData> DataTableToList(DataTable dt)
94
         {
98
         {
95
-            List<Model.T_Sys_MobileData> modelList = new List<Model.T_Sys_MobileData>();
99
+            List<CallCenterApi.Model.T_Sys_MobileData> modelList = new List<CallCenterApi.Model.T_Sys_MobileData>();
96
             int rowsCount = dt.Rows.Count;
100
             int rowsCount = dt.Rows.Count;
97
             if (rowsCount > 0)
101
             if (rowsCount > 0)
98
             {
102
             {
99
-                Model.T_Sys_MobileData model;
103
+                CallCenterApi.Model.T_Sys_MobileData model;
100
                 for (int n = 0; n < rowsCount; n++)
104
                 for (int n = 0; n < rowsCount; n++)
101
                 {
105
                 {
102
                     model = dal.DataRowToModel(dt.Rows[n]);
106
                     model = dal.DataRowToModel(dt.Rows[n]);
131
         {
135
         {
132
             return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
136
             return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
133
         }
137
         }
134
-
138
+        /// <summary>
139
+        /// 分页获取数据列表
140
+        /// </summary>
141
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
142
+        //{
143
+        //return dal.GetList(PageSize,PageIndex,strWhere);
144
+        //}
135
 
145
 
136
         #endregion  BasicMethod
146
         #endregion  BasicMethod
137
         #region  ExtensionMethod
147
         #region  ExtensionMethod
139
         #endregion  ExtensionMethod
149
         #endregion  ExtensionMethod
140
     }
150
     }
141
 }
151
 }
152
+

+ 0 - 162
CallCenterApi/CallCenterApi.BLL/T_Sys_ModuleFunctions.cs

1
-using System;
2
-using System.Collections.Generic;
3
-using System.Data;
4
-using System.Linq;
5
-using System.Text;
6
-using System.Threading.Tasks;
7
-
8
-namespace CallCenterApi.BLL
9
-{
10
-    /// <summary>
11
-    /// T_Sys_ModuleFunctions
12
-    /// </summary>
13
-    public partial class T_Sys_ModuleFunctions
14
-    {
15
-        private readonly DAL.T_Sys_ModuleFunctions dal = new DAL.T_Sys_ModuleFunctions();
16
-        public T_Sys_ModuleFunctions()
17
-        { }
18
-        #region  BasicMethod
19
-        /// <summary>
20
-        /// 是否存在该记录
21
-        /// </summary>
22
-        public bool Exists(int F_FunctionId)
23
-        {
24
-            return dal.Exists(F_FunctionId);
25
-        }
26
-
27
-        /// <summary>
28
-        /// 增加一条数据
29
-        /// </summary>
30
-        public int Add(Model.T_Sys_ModuleFunctions model)
31
-        {
32
-            return dal.Add(model);
33
-        }
34
-
35
-        /// <summary>
36
-        /// 更新一条数据
37
-        /// </summary>
38
-        public bool Update(Model.T_Sys_ModuleFunctions model)
39
-        {
40
-            return dal.Update(model);
41
-        }
42
-
43
-        /// <summary>
44
-        /// 删除一条数据
45
-        /// </summary>
46
-        public bool Delete(int F_FunctionId)
47
-        {
48
-
49
-            return dal.Delete(F_FunctionId);
50
-        }
51
-        /// <summary>
52
-        /// 删除一条数据
53
-        /// </summary>
54
-        public bool DeleteList(string F_FunctionIdlist)
55
-        {
56
-            return dal.DeleteList(F_FunctionIdlist);
57
-        }
58
-
59
-        /// <summary>
60
-        /// 得到一个对象实体
61
-        /// </summary>
62
-        public Model.T_Sys_ModuleFunctions GetModel(int F_FunctionId)
63
-        {
64
-
65
-            return dal.GetModel(F_FunctionId);
66
-        }
67
-        /// <summary>
68
-        /// 得到一个对象实体
69
-        /// </summary>
70
-        public Model.T_Sys_ModuleFunctions GetModel(string controller, string action)
71
-        {
72
-
73
-            return dal.GetModel(controller, action);
74
-        }
75
-        /// <summary>
76
-        /// 得到一个对象实体
77
-        /// </summary>
78
-        public Model.T_Sys_ModuleFunctions GetModel(string url)
79
-        {
80
-
81
-            return dal.GetModel(url);
82
-        }
83
-        /// <summary>
84
-        /// 获得数据列表
85
-        /// </summary>
86
-        public DataSet GetList(string strWhere)
87
-        {
88
-            return dal.GetList(strWhere);
89
-        }
90
-        /// <summary>
91
-        /// 获得前几行数据
92
-        /// </summary>
93
-        public DataSet GetList(int Top, string strWhere, string filedOrder)
94
-        {
95
-            return dal.GetList(Top, strWhere, filedOrder);
96
-        }
97
-        /// <summary>
98
-        /// 获得数据列表
99
-        /// </summary>
100
-        public List<Model.T_Sys_ModuleFunctions> GetModelList(string strWhere)
101
-        {
102
-            DataSet ds = dal.GetList(strWhere);
103
-            return DataTableToList(ds.Tables[0]);
104
-        }
105
-        /// <summary>
106
-        /// 获得数据列表
107
-        /// </summary>
108
-        public List<Model.T_Sys_ModuleFunctions> DataTableToList(DataTable dt)
109
-        {
110
-            List<Model.T_Sys_ModuleFunctions> modelList = new List<Model.T_Sys_ModuleFunctions>();
111
-            int rowsCount = dt.Rows.Count;
112
-            if (rowsCount > 0)
113
-            {
114
-                Model.T_Sys_ModuleFunctions model;
115
-                for (int n = 0; n < rowsCount; n++)
116
-                {
117
-                    model = dal.DataRowToModel(dt.Rows[n]);
118
-                    if (model != null)
119
-                    {
120
-                        modelList.Add(model);
121
-                    }
122
-                }
123
-            }
124
-            return modelList;
125
-        }
126
-
127
-        /// <summary>
128
-        /// 获得数据列表
129
-        /// </summary>
130
-        public DataSet GetAllList()
131
-        {
132
-            return GetList("");
133
-        }
134
-
135
-        /// <summary>
136
-        /// 分页获取数据列表
137
-        /// </summary>
138
-        public int GetRecordCount(string strWhere)
139
-        {
140
-            return dal.GetRecordCount(strWhere);
141
-        }
142
-        /// <summary>
143
-        /// 分页获取数据列表
144
-        /// </summary>
145
-        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
146
-        {
147
-            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
148
-        }
149
-        /// <summary>
150
-        /// 分页获取数据列表
151
-        /// </summary>
152
-        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
153
-        //{
154
-        //return dal.GetList(PageSize,PageIndex,strWhere);
155
-        //}
156
-
157
-        #endregion  BasicMethod
158
-        #region  ExtensionMethod
159
-
160
-        #endregion  ExtensionMethod
161
-    }
162
-}

+ 139 - 45
CallCenterApi/CallCenterApi.DAL/T_Sys_MobileData.cs

1
-using CallCenterApi.DB;
2
-using System;
3
-using System.Collections.Generic;
1
+using System;
4
 using System.Data;
2
 using System.Data;
5
-using System.Data.SqlClient;
6
-using System.Linq;
7
 using System.Text;
3
 using System.Text;
8
-using System.Threading.Tasks;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
9
 
6
 
10
 namespace CallCenterApi.DAL
7
 namespace CallCenterApi.DAL
11
 {
8
 {
17
         public T_Sys_MobileData()
14
         public T_Sys_MobileData()
18
         { }
15
         { }
19
         #region  BasicMethod
16
         #region  BasicMethod
20
-
21
         /// <summary>
17
         /// <summary>
22
         /// 是否存在该记录
18
         /// 是否存在该记录
23
         /// </summary>
19
         /// </summary>
24
-        public bool Exists(string F_MobileNum)
20
+        public bool Exists(int F_Id)
25
         {
21
         {
26
             StringBuilder strSql = new StringBuilder();
22
             StringBuilder strSql = new StringBuilder();
27
             strSql.Append("select count(1) from T_Sys_MobileData");
23
             strSql.Append("select count(1) from T_Sys_MobileData");
28
-            strSql.Append(" where F_MobileNum=@F_MobileNum ");
24
+            strSql.Append(" where F_Id=@F_Id");
29
             SqlParameter[] parameters = {
25
             SqlParameter[] parameters = {
30
-                    new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20)          };
31
-            parameters[0].Value = F_MobileNum;
26
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
27
+            };
28
+            parameters[0].Value = F_Id;
32
 
29
 
33
             return DbHelperSQL.Exists(strSql.ToString(), parameters);
30
             return DbHelperSQL.Exists(strSql.ToString(), parameters);
34
         }
31
         }
37
         /// <summary>
34
         /// <summary>
38
         /// 增加一条数据
35
         /// 增加一条数据
39
         /// </summary>
36
         /// </summary>
40
-        public bool Add(Model.T_Sys_MobileData model)
37
+        public int Add(CallCenterApi.Model.T_Sys_MobileData model)
41
         {
38
         {
42
             StringBuilder strSql = new StringBuilder();
39
             StringBuilder strSql = new StringBuilder();
43
             strSql.Append("insert into T_Sys_MobileData(");
40
             strSql.Append("insert into T_Sys_MobileData(");
44
-            strSql.Append("F_MobileNum,F_ZipCode,F_CityDes,F_CardDes)");
41
+            strSql.Append("F_MobileNum,F_ZipCode,F_CityDes,F_CardDes,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime)");
45
             strSql.Append(" values (");
42
             strSql.Append(" values (");
46
-            strSql.Append("@F_MobileNum,@F_ZipCode,@F_CityDes,@F_CardDes)");
43
+            strSql.Append("@F_MobileNum,@F_ZipCode,@F_CityDes,@F_CardDes,@F_CreateUser,@F_CreateTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime)");
44
+            strSql.Append(";select @@IDENTITY");
47
             SqlParameter[] parameters = {
45
             SqlParameter[] parameters = {
48
                     new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20),
46
                     new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20),
49
                     new SqlParameter("@F_ZipCode", SqlDbType.VarChar,10),
47
                     new SqlParameter("@F_ZipCode", SqlDbType.VarChar,10),
50
                     new SqlParameter("@F_CityDes", SqlDbType.VarChar,50),
48
                     new SqlParameter("@F_CityDes", SqlDbType.VarChar,50),
51
-                    new SqlParameter("@F_CardDes", SqlDbType.VarChar,50)};
49
+                    new SqlParameter("@F_CardDes", SqlDbType.VarChar,50),
50
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
51
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
52
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
53
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
54
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime)};
52
             parameters[0].Value = model.F_MobileNum;
55
             parameters[0].Value = model.F_MobileNum;
53
             parameters[1].Value = model.F_ZipCode;
56
             parameters[1].Value = model.F_ZipCode;
54
             parameters[2].Value = model.F_CityDes;
57
             parameters[2].Value = model.F_CityDes;
55
             parameters[3].Value = model.F_CardDes;
58
             parameters[3].Value = model.F_CardDes;
59
+            parameters[4].Value = model.F_CreateUser;
60
+            parameters[5].Value = model.F_CreateTime;
61
+            parameters[6].Value = model.F_IsDelete;
62
+            parameters[7].Value = model.F_DeleteUser;
63
+            parameters[8].Value = model.F_DeleteTime;
56
 
64
 
57
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
58
-            if (rows > 0)
65
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
66
+            if (obj == null)
59
             {
67
             {
60
-                return true;
68
+                return 0;
61
             }
69
             }
62
             else
70
             else
63
             {
71
             {
64
-                return false;
72
+                return Convert.ToInt32(obj);
65
             }
73
             }
66
         }
74
         }
67
         /// <summary>
75
         /// <summary>
68
         /// 更新一条数据
76
         /// 更新一条数据
69
         /// </summary>
77
         /// </summary>
70
-        public bool Update(Model.T_Sys_MobileData model)
78
+        public bool Update(CallCenterApi.Model.T_Sys_MobileData model)
71
         {
79
         {
72
             StringBuilder strSql = new StringBuilder();
80
             StringBuilder strSql = new StringBuilder();
73
             strSql.Append("update T_Sys_MobileData set ");
81
             strSql.Append("update T_Sys_MobileData set ");
82
+            strSql.Append("F_MobileNum=@F_MobileNum,");
74
             strSql.Append("F_ZipCode=@F_ZipCode,");
83
             strSql.Append("F_ZipCode=@F_ZipCode,");
75
             strSql.Append("F_CityDes=@F_CityDes,");
84
             strSql.Append("F_CityDes=@F_CityDes,");
76
-            strSql.Append("F_CardDes=@F_CardDes");
77
-            strSql.Append(" where F_MobileNum=@F_MobileNum ");
85
+            strSql.Append("F_CardDes=@F_CardDes,");
86
+            strSql.Append("F_CreateUser=@F_CreateUser,");
87
+            strSql.Append("F_CreateTime=@F_CreateTime,");
88
+            strSql.Append("F_IsDelete=@F_IsDelete,");
89
+            strSql.Append("F_DeleteUser=@F_DeleteUser,");
90
+            strSql.Append("F_DeleteTime=@F_DeleteTime");
91
+            strSql.Append(" where F_Id=@F_Id");
78
             SqlParameter[] parameters = {
92
             SqlParameter[] parameters = {
93
+                    new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20),
79
                     new SqlParameter("@F_ZipCode", SqlDbType.VarChar,10),
94
                     new SqlParameter("@F_ZipCode", SqlDbType.VarChar,10),
80
                     new SqlParameter("@F_CityDes", SqlDbType.VarChar,50),
95
                     new SqlParameter("@F_CityDes", SqlDbType.VarChar,50),
81
                     new SqlParameter("@F_CardDes", SqlDbType.VarChar,50),
96
                     new SqlParameter("@F_CardDes", SqlDbType.VarChar,50),
82
-                    new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20)};
83
-            parameters[0].Value = model.F_ZipCode;
84
-            parameters[1].Value = model.F_CityDes;
85
-            parameters[2].Value = model.F_CardDes;
86
-            parameters[3].Value = model.F_MobileNum;
97
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
98
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
99
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
100
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
101
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
102
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)};
103
+            parameters[0].Value = model.F_MobileNum;
104
+            parameters[1].Value = model.F_ZipCode;
105
+            parameters[2].Value = model.F_CityDes;
106
+            parameters[3].Value = model.F_CardDes;
107
+            parameters[4].Value = model.F_CreateUser;
108
+            parameters[5].Value = model.F_CreateTime;
109
+            parameters[6].Value = model.F_IsDelete;
110
+            parameters[7].Value = model.F_DeleteUser;
111
+            parameters[8].Value = model.F_DeleteTime;
112
+            parameters[9].Value = model.F_Id;
87
 
113
 
88
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
114
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
89
             if (rows > 0)
115
             if (rows > 0)
99
         /// <summary>
125
         /// <summary>
100
         /// 删除一条数据
126
         /// 删除一条数据
101
         /// </summary>
127
         /// </summary>
102
-        public bool Delete(string F_MobileNum)
128
+        public bool Delete(int F_Id)
103
         {
129
         {
104
 
130
 
105
             StringBuilder strSql = new StringBuilder();
131
             StringBuilder strSql = new StringBuilder();
106
             strSql.Append("delete from T_Sys_MobileData ");
132
             strSql.Append("delete from T_Sys_MobileData ");
107
-            strSql.Append(" where F_MobileNum=@F_MobileNum ");
133
+            strSql.Append(" where F_Id=@F_Id");
108
             SqlParameter[] parameters = {
134
             SqlParameter[] parameters = {
109
-                    new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20)          };
110
-            parameters[0].Value = F_MobileNum;
135
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
136
+            };
137
+            parameters[0].Value = F_Id;
111
 
138
 
112
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
139
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
113
             if (rows > 0)
140
             if (rows > 0)
122
         /// <summary>
149
         /// <summary>
123
         /// 批量删除数据
150
         /// 批量删除数据
124
         /// </summary>
151
         /// </summary>
125
-        public bool DeleteList(string F_MobileNumlist)
152
+        public bool DeleteList(string F_Idlist)
126
         {
153
         {
127
             StringBuilder strSql = new StringBuilder();
154
             StringBuilder strSql = new StringBuilder();
128
             strSql.Append("delete from T_Sys_MobileData ");
155
             strSql.Append("delete from T_Sys_MobileData ");
129
-            strSql.Append(" where F_MobileNum in (" + F_MobileNumlist + ")  ");
156
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
130
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
157
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
131
             if (rows > 0)
158
             if (rows > 0)
132
             {
159
             {
138
             }
165
             }
139
         }
166
         }
140
 
167
 
168
+        /// <summary>
169
+        /// 批量删除数据
170
+        /// </summary>
171
+        public bool DeleteList(string F_Idlist, string usercode)
172
+        {
173
+            StringBuilder strSql = new StringBuilder();
174
+            strSql.Append("update T_Sys_MobileData set F_IsDelete=1,F_DeleteUser='" + usercode + "',F_DeleteTime=getdate() ");
175
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
176
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
177
+            if (rows > 0)
178
+            {
179
+                return true;
180
+            }
181
+            else
182
+            {
183
+                return false;
184
+            }
185
+        }
141
 
186
 
142
         /// <summary>
187
         /// <summary>
143
         /// 得到一个对象实体
188
         /// 得到一个对象实体
144
         /// </summary>
189
         /// </summary>
145
-        public Model.T_Sys_MobileData GetModel(string F_MobileNum)
190
+        public CallCenterApi.Model.T_Sys_MobileData GetModel(int F_Id)
146
         {
191
         {
147
 
192
 
148
             StringBuilder strSql = new StringBuilder();
193
             StringBuilder strSql = new StringBuilder();
149
-            strSql.Append("select  top 1 F_MobileNum,F_ZipCode,F_CityDes,F_CardDes from T_Sys_MobileData ");
150
-            strSql.Append(" where F_MobileNum=@F_MobileNum ");
194
+            strSql.Append("select  top 1 F_Id,F_MobileNum,F_ZipCode,F_CityDes,F_CardDes,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime from T_Sys_MobileData ");
195
+            strSql.Append(" where F_Id=@F_Id");
151
             SqlParameter[] parameters = {
196
             SqlParameter[] parameters = {
152
-                    new SqlParameter("@F_MobileNum", SqlDbType.VarChar,20)          };
153
-            parameters[0].Value = F_MobileNum;
197
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
198
+            };
199
+            parameters[0].Value = F_Id;
154
 
200
 
155
-            Model.T_Sys_MobileData model = new Model.T_Sys_MobileData();
201
+            CallCenterApi.Model.T_Sys_MobileData model = new CallCenterApi.Model.T_Sys_MobileData();
156
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
202
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
157
             if (ds.Tables[0].Rows.Count > 0)
203
             if (ds.Tables[0].Rows.Count > 0)
158
             {
204
             {
168
         /// <summary>
214
         /// <summary>
169
         /// 得到一个对象实体
215
         /// 得到一个对象实体
170
         /// </summary>
216
         /// </summary>
171
-        public Model.T_Sys_MobileData DataRowToModel(DataRow row)
217
+        public CallCenterApi.Model.T_Sys_MobileData DataRowToModel(DataRow row)
172
         {
218
         {
173
-            Model.T_Sys_MobileData model = new Model.T_Sys_MobileData();
219
+            CallCenterApi.Model.T_Sys_MobileData model = new CallCenterApi.Model.T_Sys_MobileData();
174
             if (row != null)
220
             if (row != null)
175
             {
221
             {
222
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
223
+                {
224
+                    model.F_Id = int.Parse(row["F_Id"].ToString());
225
+                }
176
                 if (row["F_MobileNum"] != null)
226
                 if (row["F_MobileNum"] != null)
177
                 {
227
                 {
178
                     model.F_MobileNum = row["F_MobileNum"].ToString();
228
                     model.F_MobileNum = row["F_MobileNum"].ToString();
189
                 {
239
                 {
190
                     model.F_CardDes = row["F_CardDes"].ToString();
240
                     model.F_CardDes = row["F_CardDes"].ToString();
191
                 }
241
                 }
242
+                if (row["F_CreateUser"] != null)
243
+                {
244
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
245
+                }
246
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
247
+                {
248
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
249
+                }
250
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
251
+                {
252
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
253
+                }
254
+                if (row["F_DeleteUser"] != null)
255
+                {
256
+                    model.F_DeleteUser = row["F_DeleteUser"].ToString();
257
+                }
258
+                if (row["F_DeleteTime"] != null && row["F_DeleteTime"].ToString() != "")
259
+                {
260
+                    model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
261
+                }
192
             }
262
             }
193
             return model;
263
             return model;
194
         }
264
         }
199
         public DataSet GetList(string strWhere)
269
         public DataSet GetList(string strWhere)
200
         {
270
         {
201
             StringBuilder strSql = new StringBuilder();
271
             StringBuilder strSql = new StringBuilder();
202
-            strSql.Append("select F_MobileNum,F_ZipCode,F_CityDes,F_CardDes ");
272
+            strSql.Append("select F_Id,F_MobileNum,F_ZipCode,F_CityDes,F_CardDes,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
203
             strSql.Append(" FROM T_Sys_MobileData ");
273
             strSql.Append(" FROM T_Sys_MobileData ");
204
             if (strWhere.Trim() != "")
274
             if (strWhere.Trim() != "")
205
             {
275
             {
219
             {
289
             {
220
                 strSql.Append(" top " + Top.ToString());
290
                 strSql.Append(" top " + Top.ToString());
221
             }
291
             }
222
-            strSql.Append(" F_MobileNum,F_ZipCode,F_CityDes,F_CardDes ");
292
+            strSql.Append(" F_Id,F_MobileNum,F_ZipCode,F_CityDes,F_CardDes,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
223
             strSql.Append(" FROM T_Sys_MobileData ");
293
             strSql.Append(" FROM T_Sys_MobileData ");
224
             if (strWhere.Trim() != "")
294
             if (strWhere.Trim() != "")
225
             {
295
             {
264
             }
334
             }
265
             else
335
             else
266
             {
336
             {
267
-                strSql.Append("order by T.F_MobileNum desc");
337
+                strSql.Append("order by T.F_Id desc");
268
             }
338
             }
269
             strSql.Append(")AS Row, T.*  from T_Sys_MobileData T ");
339
             strSql.Append(")AS Row, T.*  from T_Sys_MobileData T ");
270
             if (!string.IsNullOrEmpty(strWhere.Trim()))
340
             if (!string.IsNullOrEmpty(strWhere.Trim()))
276
             return DbHelperSQL.Query(strSql.ToString());
346
             return DbHelperSQL.Query(strSql.ToString());
277
         }
347
         }
278
 
348
 
279
-
349
+        /*
350
+		/// <summary>
351
+		/// 分页获取数据列表
352
+		/// </summary>
353
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
354
+		{
355
+			SqlParameter[] parameters = {
356
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
357
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
358
+					new SqlParameter("@PageSize", SqlDbType.Int),
359
+					new SqlParameter("@PageIndex", SqlDbType.Int),
360
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
361
+					new SqlParameter("@OrderType", SqlDbType.Bit),
362
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
363
+					};
364
+			parameters[0].Value = "T_Sys_MobileData";
365
+			parameters[1].Value = "F_Id";
366
+			parameters[2].Value = PageSize;
367
+			parameters[3].Value = PageIndex;
368
+			parameters[4].Value = 0;
369
+			parameters[5].Value = 0;
370
+			parameters[6].Value = strWhere;	
371
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
372
+		}*/
280
 
373
 
281
         #endregion  BasicMethod
374
         #endregion  BasicMethod
282
         #region  ExtensionMethod
375
         #region  ExtensionMethod
284
         #endregion  ExtensionMethod
377
         #endregion  ExtensionMethod
285
     }
378
     }
286
 }
379
 }
380
+

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/CallOutOptController.cs

60
                 if (phone.Trim().Length == 11 && phone[0] == '1')
60
                 if (phone.Trim().Length == 11 && phone[0] == '1')
61
                 {//号码为11位,首位是1,为手机号
61
                 {//号码为11位,首位是1,为手机号
62
                     BLL.T_Sys_MobileData mobile_Bll = new BLL.T_Sys_MobileData();
62
                     BLL.T_Sys_MobileData mobile_Bll = new BLL.T_Sys_MobileData();
63
-                    Model.T_Sys_MobileData mobileModel = mobile_Bll.GetModel(phone.Substring(0, 7));
63
+                    Model.T_Sys_MobileData mobileModel = mobile_Bll.GetModelList(" F_MobileNum = '" + phone.Substring(0, 7) + "'").FirstOrDefault();
64
                     if (mobileModel != null)
64
                     if (mobileModel != null)
65
                     {
65
                     {
66
                         if (mobileModel.F_ZipCode.Equals(zipcode))
66
                         if (mobileModel.F_ZipCode.Equals(zipcode))

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/InfoController.cs

1137
                 if (end == null) { end = DateTime.Now; }
1137
                 if (end == null) { end = DateTime.Now; }
1138
                 where += $" and datediff(day,F_CreateTime,'{start.Value.ToString("yyyy-MM-dd")}')<=0 and datediff(day,F_CreateTime,'{end.Value.ToString("yyyy-MM-dd")}')>=0 ";
1138
                 where += $" and datediff(day,F_CreateTime,'{start.Value.ToString("yyyy-MM-dd")}')<=0 and datediff(day,F_CreateTime,'{end.Value.ToString("yyyy-MM-dd")}')>=0 ";
1139
             }
1139
             }
1140
-            string sql = "select * from (select F_ValueId Id,F_Value TypeName,(select COUNT(1) from T_Bus_WorkOrder where F_IsDelete=0 "
1140
+            string sql = "select * from (select F_ValueId Id,F_Value TypeName,(select COUNT(1) from T_Bus_WorkOrder where F_IsDelete=0 "+ where
1141
                        + "and ','+F_Key+',' like '%,'+CONVERT(varchar(100),F_ValueId)+',%') Count "
1141
                        + "and ','+F_Key+',' like '%,'+CONVERT(varchar(100),F_ValueId)+',%') Count "
1142
                        + "from dbo.T_Sys_DictionaryValue where F_ItemId = 3 and F_State = 0) a order by a.Count desc ";
1142
                        + "from dbo.T_Sys_DictionaryValue where F_ItemId = 3 and F_State = 0) a order by a.Count desc ";
1143
             DataTable dt = DbHelperSQL.Query(sql).Tables[0];
1143
             DataTable dt = DbHelperSQL.Query(sql).Tables[0];

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

169
             if (tel.Trim().Length == 11 && tel.Substring(0, 1) != "0")
169
             if (tel.Trim().Length == 11 && tel.Substring(0, 1) != "0")
170
             {
170
             {
171
                 BLL.T_Sys_MobileData mobile_Bll = new BLL.T_Sys_MobileData();
171
                 BLL.T_Sys_MobileData mobile_Bll = new BLL.T_Sys_MobileData();
172
-                Model.T_Sys_MobileData mobileModel = mobile_Bll.GetModel(tel.Substring(0, 7));
172
+                Model.T_Sys_MobileData mobileModel = mobile_Bll.GetModelList(" F_MobileNum = '" + tel.Substring(0, 7) + "'").FirstOrDefault(); 
173
 
173
 
174
                 if (mobileModel != null)
174
                 if (mobileModel != null)
175
                 {
175
                 {

+ 170 - 122
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/MobiledataController.cs

1
 using CallCenter.Utility;
1
 using CallCenter.Utility;
2
+using CallCenterApi.Common;
2
 using CallCenterApi.Interface.Controllers.Base;
3
 using CallCenterApi.Interface.Controllers.Base;
3
 using System;
4
 using System;
4
 using System.Collections.Generic;
5
 using System.Collections.Generic;
9
 
10
 
10
 namespace CallCenterApi.Interface.Controllers.tel
11
 namespace CallCenterApi.Interface.Controllers.tel
11
 {
12
 {
12
-    [Authority]
13
     public class MobiledataController : BaseController
13
     public class MobiledataController : BaseController
14
     {
14
     {
15
         //获取号码归属地列表
15
         //获取号码归属地列表
16
         public ActionResult GetList(string strtelnum)
16
         public ActionResult GetList(string strtelnum)
17
         {
17
         {
18
-            string sql = "";
19
-            DataTable dt = new DataTable();
20
-
21
-            string strpageindex = RequestString.GetQueryString("page");
22
-            int pageindex = 1;
23
-            string strpagesize = RequestString.GetQueryString("pagesize");
24
-            int pagesize = 10;
25
-
26
-            if (strtelnum != null && strtelnum.Trim() != "")
27
-            {
28
-                sql += " and (F_MobileNum= '" + strtelnum.Trim() + "' or F_ZipCode like '%" + strtelnum.Trim()
29
-                    + "%' or F_CityDes like '%" + strtelnum.Trim() + "%'or F_CardDes like '%" + strtelnum.Trim() + "%')";
30
-            }
31
-
32
-            if (strpageindex.Trim() != "")
33
-            {
34
-                pageindex = Convert.ToInt32(strpageindex);
35
-            }
36
-
37
-            if (strpagesize.Trim() != "")
18
+            ActionResult res = NoToken("未知错误,请重新登录");
19
+            if (Request.IsAuthenticated)
38
             {
20
             {
39
-                pagesize = Convert.ToInt32(strpagesize);
40
-            }
41
-            int recordCount = 0;
42
-            dt = BLL.PagerBLL.GetListPager(
43
-                "T_Sys_MobileData",
44
-                "F_MobileNum",
45
-                "*",
46
-                sql,
47
-                "ORDER BY F_MobileNum desc",
48
-                pagesize,
49
-                pageindex,
50
-                true,
51
-                out recordCount);
52
-
53
-            var obj = new
54
-            {
55
-                state = "success",
56
-                message = "成功",
57
-                rows = dt,
58
-                total = recordCount
59
-            };
21
+                string sql = " and F_IsDelete=0";
22
+                DataTable dt = new DataTable();
60
 
23
 
61
-            return Content(obj.ToJson());
24
+                string strpageindex = RequestString.GetQueryString("page");
25
+                int pageindex = 1;
26
+                string strpagesize = RequestString.GetQueryString("pagesize");
27
+                int pagesize = 10;
62
 
28
 
63
-        }
29
+                if (strtelnum != null && strtelnum.Trim() != "")
30
+                {
31
+                    sql += " and (F_MobileNum= '" + strtelnum.Trim() + "' or F_ZipCode like '%" + strtelnum.Trim()
32
+                        + "%' or F_CityDes like '%" + strtelnum.Trim() + "%'or F_CardDes like '%" + strtelnum.Trim() + "%')";
33
+                }
64
 
34
 
65
-        //获取号码归属地
66
-        public ActionResult GetMobiledata(string mobileNum)
67
-        {
68
-            if (mobileNum != null && mobileNum.Trim() != "")
69
-            {
70
-                BLL.T_Sys_MobileData dBLL = new BLL.T_Sys_MobileData();
71
-                Model.T_Sys_MobileData dModel = dBLL.GetModel(mobileNum.Trim());
72
-                if (dModel != null)
35
+                if (strpageindex.Trim() != "")
73
                 {
36
                 {
74
-                    return Success("获取号码归属地成功", dModel);
37
+                    pageindex = Convert.ToInt32(strpageindex);
75
                 }
38
                 }
76
-                else
39
+
40
+                if (strpagesize.Trim() != "")
77
                 {
41
                 {
78
-                    return Error("获取号码归属地失败");
42
+                    pagesize = Convert.ToInt32(strpagesize);
79
                 }
43
                 }
44
+                int recordCount = 0;
45
+                dt = BLL.PagerBLL.GetListPager(
46
+                    "T_Sys_MobileData",
47
+                    "F_Id",
48
+                    "*",
49
+                    sql,
50
+                    "ORDER BY F_Id desc",
51
+                    pagesize,
52
+                    pageindex,
53
+                    true,
54
+                    out recordCount);
55
+
56
+                var obj = new
57
+                {
58
+                    state = "success",
59
+                    message = "成功",
60
+                    rows = dt,
61
+                    total = recordCount
62
+                };
63
+
64
+                res = Content(obj.ToJson());
65
+
80
             }
66
             }
81
-            else
67
+            return res;
68
+        }
69
+        public ActionResult GetMobiledata(int id)
70
+        {
71
+            ActionResult res = NoToken("未知错误,请重新登录");
72
+            if (Request.IsAuthenticated)
82
             {
73
             {
83
-                return Error("获取参数失败");
74
+                BLL.T_Sys_MobileData dBLL = new BLL.T_Sys_MobileData();
75
+                Model.T_Sys_MobileData dModel = dBLL.GetModel(id);
76
+                res = Success("获取号码归属地成功", dModel);
84
             }
77
             }
85
-
78
+            return res;
86
         }
79
         }
87
 
80
 
88
-        //添加/编辑号码归属地
89
-        public ActionResult AddMobiledata(string mobileNum, string zipCode, string cityDes, string cardDes)
81
+        //获取号码归属地
82
+        public ActionResult GetMobiledataByNum(string mobileNum)
90
         {
83
         {
91
-            BLL.T_Sys_MobileData dBLL = new BLL.T_Sys_MobileData();
92
-            Model.T_Sys_MobileData dModel = dBLL.GetModel(mobileNum);
93
-            if (dModel != null)
84
+            ActionResult res = NoToken("未知错误,请重新登录");
85
+            if (Request.IsAuthenticated)
94
             {
86
             {
95
-                if (!string.IsNullOrWhiteSpace(mobileNum.Trim()))
96
-                {
97
-                    dModel.F_MobileNum = mobileNum.Trim();
98
-                }
99
-                if (!string.IsNullOrWhiteSpace(zipCode.Trim()))
100
-                {
101
-                    dModel.F_ZipCode = zipCode.Trim();
102
-                }
103
-                if (!string.IsNullOrWhiteSpace(cityDes.Trim()))
104
-                {
105
-                    dModel.F_CityDes = cityDes.Trim();
106
-                }
107
-                if (!string.IsNullOrWhiteSpace(cardDes.Trim()))
108
-                {
109
-                    dModel.F_CardDes = cardDes.Trim();
110
-                }
111
 
87
 
112
-                bool b = dBLL.Update(dModel);
113
-                if (b)
88
+                if (mobileNum != null && mobileNum.Trim() != "")
114
                 {
89
                 {
115
-                    return Success("编辑成功");
90
+                    BLL.T_Sys_MobileData dBLL = new BLL.T_Sys_MobileData();
91
+                    Model.T_Sys_MobileData dModel = dBLL.GetModelList(" F_MobileNum='" + mobileNum.Trim() + "' ").FirstOrDefault();
92
+                    if (dModel != null)
93
+                    {
94
+                        res = Success("获取号码归属地成功", dModel);
95
+                    }
96
+                    else
97
+                    {
98
+                        res = Error("获取号码归属地失败");
99
+                    }
116
                 }
100
                 }
117
                 else
101
                 else
118
                 {
102
                 {
119
-                    return Success("编辑失败");
103
+                    res = Error("获取参数失败");
120
                 }
104
                 }
105
+
121
             }
106
             }
107
+            return res;
108
+        }
122
 
109
 
123
-            else
110
+        //添加/编辑号码归属地
111
+        public ActionResult AddMobiledata(string mobileNum, string zipCode, string cityDes, string cardDes, int id = 0)
112
+        {
113
+            ActionResult res = NoToken("未知错误,请重新登录");
114
+            if (Request.IsAuthenticated)
124
             {
115
             {
125
-                dModel = new Model.T_Sys_MobileData();
126
-
127
-                if (!string.IsNullOrWhiteSpace(mobileNum.Trim()))
128
-                {
129
-                    dModel.F_MobileNum = mobileNum.Trim();
130
-                }
131
-                if (!string.IsNullOrWhiteSpace(zipCode.Trim()))
132
-                {
133
-                    dModel.F_ZipCode = zipCode.Trim();
134
-                }
135
-                if (!string.IsNullOrWhiteSpace(cityDes.Trim()))
136
-                {
137
-                    dModel.F_CityDes = cityDes.Trim();
138
-                }
139
-                if (!string.IsNullOrWhiteSpace(cardDes.Trim()))
140
-                {
141
-                    dModel.F_CardDes = cardDes.Trim();
142
-                }
143
-                bool b = new BLL.T_Sys_MobileData().Add(dModel);
144
-                if (b)
145
-                {
146
-                    return Success("添加成功");
116
+                int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
117
+                Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
118
+                BLL.T_Sys_MobileData dBLL = new BLL.T_Sys_MobileData();
119
+                Model.T_Sys_MobileData dModel = new Model.T_Sys_MobileData();
120
+
121
+                if (id != 0)
122
+                {
123
+
124
+                    dModel = dBLL.GetModel(id);
125
+                    if (dModel != null)
126
+                    {
127
+                        if (!string.IsNullOrWhiteSpace(mobileNum.Trim()))
128
+                        {
129
+                            dModel.F_MobileNum = mobileNum.Trim();
130
+                        }
131
+                        if (!string.IsNullOrWhiteSpace(zipCode.Trim()))
132
+                        {
133
+                            dModel.F_ZipCode = zipCode.Trim();
134
+                        }
135
+                        if (!string.IsNullOrWhiteSpace(cityDes.Trim()))
136
+                        {
137
+                            dModel.F_CityDes = cityDes.Trim();
138
+                        }
139
+                        if (!string.IsNullOrWhiteSpace(cardDes.Trim()))
140
+                        {
141
+                            dModel.F_CardDes = cardDes.Trim();
142
+                        }
143
+
144
+                        bool b = dBLL.Update(dModel);
145
+                        if (b)
146
+                        {
147
+                            res = Success("编辑成功");
148
+                        }
149
+                        else
150
+                        {
151
+                            res = Error("编辑失败");
152
+                        }
153
+                    }
154
+                    else
155
+                    {
156
+                        res = Error("编辑失败");
157
+                    }
147
                 }
158
                 }
148
                 else
159
                 else
149
                 {
160
                 {
150
-                    return Success("添加失败");
161
+                    dModel = new Model.T_Sys_MobileData();
162
+
163
+                    if (!string.IsNullOrWhiteSpace(mobileNum.Trim()))
164
+                    {
165
+                        dModel.F_MobileNum = mobileNum.Trim();
166
+                    }
167
+                    if (!string.IsNullOrWhiteSpace(zipCode.Trim()))
168
+                    {
169
+                        dModel.F_ZipCode = zipCode.Trim();
170
+                    }
171
+                    if (!string.IsNullOrWhiteSpace(cityDes.Trim()))
172
+                    {
173
+                        dModel.F_CityDes = cityDes.Trim();
174
+                    }
175
+                    if (!string.IsNullOrWhiteSpace(cardDes.Trim()))
176
+                    {
177
+                        dModel.F_CardDes = cardDes.Trim();
178
+                    }
179
+                    dModel.F_IsDelete = 0;
180
+                    dModel.F_CreateUser = ua.F_UserCode;
181
+                    dModel.F_CreateTime = DateTime.Now;
182
+                    int n = new BLL.T_Sys_MobileData().Add(dModel);
183
+                    if (n > 0)
184
+                    {
185
+                        res = Success("添加成功", n);
186
+                    }
187
+                    else
188
+                    {
189
+                        res = Error("添加失败");
190
+                    }
151
                 }
191
                 }
152
-            }
153
 
192
 
193
+            }
194
+            return res;
154
         }
195
         }
155
 
196
 
156
         //删除号码归属地记录
197
         //删除号码归属地记录
157
         public ActionResult DelMobiledata(string[] nums)
198
         public ActionResult DelMobiledata(string[] nums)
158
         {
199
         {
159
-            if (nums != null && nums.Length > 0)
200
+            ActionResult res = NoToken("未知错误,请重新登录");
201
+            if (Request.IsAuthenticated)
160
             {
202
             {
161
-                string idd = " ";
162
-                foreach (string str in nums)
163
-                {
164
-                    idd += "'" + str + "',";
203
+                int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
204
+                Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
205
+                if (nums != null && nums.Length > 0)
206
+                {
207
+                    string idd = " ";
208
+                    foreach (string str in nums)
209
+                    {
210
+                        idd += "'" + str + "',";
211
+                    }
212
+                    if (new BLL.T_Sys_MobileData().DeleteList(idd.TrimEnd(','), ua.F_UserCode))
213
+                    {
214
+                        res = Success("删除成功");
215
+                    }
216
+                    else
217
+                        res = Error("删除失败");
165
                 }
218
                 }
166
-                if (new BLL.T_Sys_MobileData().DeleteList(idd.TrimEnd(',')))
219
+                else
167
                 {
220
                 {
168
-                    return Success("删除成功");
221
+                    res = Error("请选择要删除的记录");
169
                 }
222
                 }
170
-                else
171
-                    return Error("删除失败");
172
-            }
173
-            else
174
-            {
175
-                return Error("请选择要删除的记录");
176
-            }
177
 
223
 
224
+            }
225
+            return res;
178
         }
226
         }
179
     }
227
     }
180
 }
228
 }

+ 56 - 5
CallCenterApi/CallCenterApi.Model/T_Sys_MobileData.cs

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
 namespace CallCenterApi.Model
2
 namespace CallCenterApi.Model
8
 {
3
 {
9
     /// <summary>
4
     /// <summary>
15
         public T_Sys_MobileData()
10
         public T_Sys_MobileData()
16
         { }
11
         { }
17
         #region Model
12
         #region Model
13
+        private int _f_id;
18
         private string _f_mobilenum;
14
         private string _f_mobilenum;
19
         private string _f_zipcode;
15
         private string _f_zipcode;
20
         private string _f_citydes;
16
         private string _f_citydes;
21
         private string _f_carddes;
17
         private string _f_carddes;
18
+        private string _f_createuser;
19
+        private DateTime? _f_createtime;
20
+        private int? _f_isdelete;
21
+        private string _f_deleteuser;
22
+        private DateTime? _f_deletetime;
23
+        /// <summary>
24
+        /// 
25
+        /// </summary>
26
+        public int F_Id
27
+        {
28
+            set { _f_id = value; }
29
+            get { return _f_id; }
30
+        }
22
         /// <summary>
31
         /// <summary>
23
         /// 
32
         /// 
24
         /// </summary>
33
         /// </summary>
51
             set { _f_carddes = value; }
60
             set { _f_carddes = value; }
52
             get { return _f_carddes; }
61
             get { return _f_carddes; }
53
         }
62
         }
63
+        /// <summary>
64
+        /// 
65
+        /// </summary>
66
+        public string F_CreateUser
67
+        {
68
+            set { _f_createuser = value; }
69
+            get { return _f_createuser; }
70
+        }
71
+        /// <summary>
72
+        /// 
73
+        /// </summary>
74
+        public DateTime? F_CreateTime
75
+        {
76
+            set { _f_createtime = value; }
77
+            get { return _f_createtime; }
78
+        }
79
+        /// <summary>
80
+        /// 
81
+        /// </summary>
82
+        public int? F_IsDelete
83
+        {
84
+            set { _f_isdelete = value; }
85
+            get { return _f_isdelete; }
86
+        }
87
+        /// <summary>
88
+        /// 
89
+        /// </summary>
90
+        public string F_DeleteUser
91
+        {
92
+            set { _f_deleteuser = value; }
93
+            get { return _f_deleteuser; }
94
+        }
95
+        /// <summary>
96
+        /// 
97
+        /// </summary>
98
+        public DateTime? F_DeleteTime
99
+        {
100
+            set { _f_deletetime = value; }
101
+            get { return _f_deletetime; }
102
+        }
54
         #endregion Model
103
         #endregion Model
104
+
55
     }
105
     }
56
 }
106
 }
107
+