Browse Source

增加客户资料类

zhengbingbing 7 years ago
parent
commit
3f6c682fc5
16 changed files with 1971 additions and 2286 deletions
  1. 2 0
      codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj
  2. 146 0
      codegit/CallCenterApi/CallCenterApi.BLL/T_Cus_ContactPersonNew.cs
  3. 140 0
      codegit/CallCenterApi/CallCenterApi.BLL/T_Cus_CustomerBaseNew.cs
  4. 2 0
      codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj
  5. 378 0
      codegit/CallCenterApi/CallCenterApi.DAL/T_Cus_ContactPersonNew.cs
  6. 428 0
      codegit/CallCenterApi/CallCenterApi.DAL/T_Cus_CustomerBaseNew.cs
  7. 3 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj
  8. 422 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs
  9. 0 599
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_BACKUP_17676.cs
  10. 0 546
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_BASE_17676.cs
  11. 0 591
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_LOCAL_17676.cs
  12. 0 550
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_REMOTE_17676.cs
  13. 120 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/CustomerBaseNewInput.cs
  14. 2 0
      codegit/CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj
  15. 128 0
      codegit/CallCenterApi/CallCenterApi.Model/T_Cus_ContactPersonNew.cs
  16. 200 0
      codegit/CallCenterApi/CallCenterApi.Model/T_Cus_CustomerBaseNew.cs

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

@@ -70,7 +70,9 @@
70 70
     <Compile Include="T_CTI_TaskPhonePart.cs" />
71 71
     <Compile Include="T_CTI_TaskRecord.cs" />
72 72
     <Compile Include="T_Cus_ContactPerson.cs" />
73
+    <Compile Include="T_Cus_ContactPersonNew.cs" />
73 74
     <Compile Include="T_Cus_CustomerBase.cs" />
75
+    <Compile Include="T_Cus_CustomerBaseNew.cs" />
74 76
     <Compile Include="T_Cus_CustomerExpand.cs" />
75 77
     <Compile Include="T_Cus_RegionCategory.cs" />
76 78
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />

+ 146 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Cus_ContactPersonNew.cs

@@ -0,0 +1,146 @@
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_Cus_ContactPersonNew
12
+	/// </summary>
13
+	public partial class T_Cus_ContactPersonNew
14
+    {
15
+        private readonly CallCenterApi.DAL.T_Cus_ContactPersonNew dal = new CallCenterApi.DAL.T_Cus_ContactPersonNew();
16
+        public T_Cus_ContactPersonNew()
17
+        { }
18
+        #region  BasicMethod
19
+        /// <summary>
20
+        /// 是否存在该记录
21
+        /// </summary>
22
+        public bool Exists(int F_ManId)
23
+        {
24
+            return dal.Exists(F_ManId);
25
+        }
26
+
27
+        /// <summary>
28
+        /// 增加一条数据
29
+        /// </summary>
30
+        public int Add(CallCenterApi.Model.T_Cus_ContactPersonNew model)
31
+        {
32
+            return dal.Add(model);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 更新一条数据
37
+        /// </summary>
38
+        public bool Update(CallCenterApi.Model.T_Cus_ContactPersonNew model)
39
+        {
40
+            return dal.Update(model);
41
+        }
42
+
43
+        /// <summary>
44
+        /// 删除一条数据
45
+        /// </summary>
46
+        public bool Delete(int F_ManId)
47
+        {
48
+
49
+            return dal.Delete(F_ManId);
50
+        }
51
+        /// <summary>
52
+        /// 删除一条数据
53
+        /// </summary>
54
+        public bool DeleteList(string F_ManIdlist)
55
+        {
56
+            return dal.DeleteList(F_ManIdlist);
57
+        }
58
+        /// <summary>
59
+        /// 根据客户id删除联系人信息
60
+        /// </summary>
61
+        public bool DeleteListByCusid(string cusid)
62
+        {
63
+            return dal.DeleteListByCusid(cusid);
64
+        }
65
+        /// <summary>
66
+        /// 得到一个对象实体
67
+        /// </summary>
68
+        public CallCenterApi.Model.T_Cus_ContactPersonNew GetModel(int F_ManId)
69
+        {
70
+
71
+            return dal.GetModel(F_ManId);
72
+        }
73
+
74
+        /// <summary>
75
+        /// 获得数据列表
76
+        /// </summary>
77
+        public DataSet GetList(string strWhere)
78
+        {
79
+            return dal.GetList(strWhere);
80
+        }
81
+        /// <summary>
82
+        /// 获得前几行数据
83
+        /// </summary>
84
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
85
+        {
86
+            return dal.GetList(Top, strWhere, filedOrder);
87
+        }
88
+        /// <summary>
89
+        /// 获得数据列表
90
+        /// </summary>
91
+        public List<CallCenterApi.Model.T_Cus_ContactPersonNew> GetModelList(string strWhere)
92
+        {
93
+            DataSet ds = dal.GetList(strWhere);
94
+            return DataTableToList(ds.Tables[0]);
95
+        }
96
+        /// <summary>
97
+        /// 获得数据列表
98
+        /// </summary>
99
+        public List<CallCenterApi.Model.T_Cus_ContactPersonNew> DataTableToList(DataTable dt)
100
+        {
101
+            List<CallCenterApi.Model.T_Cus_ContactPersonNew> modelList = new List<CallCenterApi.Model.T_Cus_ContactPersonNew>();
102
+            int rowsCount = dt.Rows.Count;
103
+            if (rowsCount > 0)
104
+            {
105
+                CallCenterApi.Model.T_Cus_ContactPersonNew model;
106
+                for (int n = 0; n < rowsCount; n++)
107
+                {
108
+                    model = dal.DataRowToModel(dt.Rows[n]);
109
+                    if (model != null)
110
+                    {
111
+                        modelList.Add(model);
112
+                    }
113
+                }
114
+            }
115
+            return modelList;
116
+        }
117
+
118
+        /// <summary>
119
+        /// 获得数据列表
120
+        /// </summary>
121
+        public DataSet GetAllList()
122
+        {
123
+            return GetList("");
124
+        }
125
+
126
+        /// <summary>
127
+        /// 分页获取数据列表
128
+        /// </summary>
129
+        public int GetRecordCount(string strWhere)
130
+        {
131
+            return dal.GetRecordCount(strWhere);
132
+        }
133
+        /// <summary>
134
+        /// 分页获取数据列表
135
+        /// </summary>
136
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
137
+        {
138
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
139
+        }
140
+
141
+        #endregion  BasicMethod
142
+        #region  ExtensionMethod
143
+
144
+        #endregion  ExtensionMethod
145
+    }
146
+}

+ 140 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Cus_CustomerBaseNew.cs

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

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

@@ -70,7 +70,9 @@
70 70
     <Compile Include="T_CTI_TaskPhonePart.cs" />
71 71
     <Compile Include="T_CTI_TaskRecord.cs" />
72 72
     <Compile Include="T_Cus_ContactPerson.cs" />
73
+    <Compile Include="T_Cus_ContactPersonNew.cs" />
73 74
     <Compile Include="T_Cus_CustomerBase.cs" />
75
+    <Compile Include="T_Cus_CustomerBaseNew.cs" />
74 76
     <Compile Include="T_Cus_CustomerExpand.cs" />
75 77
     <Compile Include="T_Cus_RegionCategory.cs" />
76 78
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />

+ 378 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Cus_ContactPersonNew.cs

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

+ 428 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Cus_CustomerBaseNew.cs

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

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

@@ -176,6 +176,7 @@
176 176
     <Compile Include="Controllers\callout\CallOutPlanController.cs" />
177 177
     <Compile Include="Controllers\callout\CallPlanController.cs" />
178 178
     <Compile Include="Controllers\customer\CustomerController.cs" />
179
+    <Compile Include="Controllers\customer\CustomerNewController.cs" />
179 180
     <Compile Include="Controllers\customer\RegionCategoryController.cs" />
180 181
     <Compile Include="Controllers\DepartmentController.cs" />
181 182
     <Compile Include="Controllers\DictionaryController.cs" />
@@ -282,6 +283,7 @@
282 283
     <Compile Include="Models\Input\CallPlanInput.cs" />
283 284
     <Compile Include="Models\Input\CategoryInput.cs" />
284 285
     <Compile Include="Models\Input\CustomerBaseInput.cs" />
286
+    <Compile Include="Models\Input\CustomerBaseNewInput.cs" />
285 287
     <Compile Include="Models\Input\Cus_RegionCategoryInput.cs" />
286 288
     <Compile Include="Models\Input\DepartmentInput.cs" />
287 289
     <Compile Include="Models\Input\DictionaryInput.cs" />
@@ -343,6 +345,7 @@
343 345
     <Folder Include="Views\CallPlan\" />
344 346
     <Folder Include="Views\Callrecords\" />
345 347
     <Folder Include="Views\CeShi\" />
348
+    <Folder Include="Views\CustomerNew\" />
346 349
     <Folder Include="Views\Customer\" />
347 350
     <Folder Include="Views\DaysTalkTime\" />
348 351
     <Folder Include="Views\Default\" />

+ 422 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

@@ -0,0 +1,422 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.Interface.Controllers.Base;
3
+using CallCenterApi.Interface.Models.Input;
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.customer
12
+{
13
+    public class CustomerNewController : BaseController
14
+    {
15
+        BLL.T_Cus_CustomerBaseNew cusbll = new BLL.T_Cus_CustomerBaseNew();
16
+        BLL.T_Cus_ContactPersonNew conbll = new BLL.T_Cus_ContactPersonNew();
17
+
18
+        /// <summary>
19
+        /// 获取客户列表
20
+        /// </summary>
21
+        /// <param name="code">客户编号</param>
22
+        /// <param name="cmpname">公司名称</param>
23
+        /// <param name="cmpaddress">公司地址</param>
24
+        /// <param name="legname">法人姓名</param>
25
+        /// <param name="legtel">法人电话</param>
26
+        /// <param name="subtrade">所属行业</param>
27
+        /// <param name="layer">客户信誉等级</param>
28
+        /// <param name="bedept">客户归属部门</param>
29
+        /// <param name="bereladd">客户归属涉税会计</param>
30
+        /// <param name="beaudacc">客户归属审核会计</param>
31
+        /// <param name="bemakeacc">客户归属做账会计</param>
32
+        /// <param name="conname">联系人姓名</param>
33
+        /// <param name="contel">联系人电话</param>
34
+        /// <returns></returns>
35
+        public ActionResult GetList(string code,string cmpname,string cmpaddress,
36
+            string legname,string legtel,string subtrade,string layer,string bedept,
37
+            string berelacc,string beaudacc,string bemakeacc,string conname,string contel,
38
+            int pageindex = 1, int pagesize = 10)
39
+        {
40
+            ActionResult res = NoToken("未知错误,请重新登录");
41
+            if (Request.IsAuthenticated)
42
+            {
43
+                string sql = " and F_DeleteFlag=0";
44
+                DataTable dt = new DataTable();
45
+                #region 筛选条件
46
+                if (!string.IsNullOrWhiteSpace(code))//客户编号
47
+                    sql += $" and F_CustomerCode like '%" + code.Trim() + "%'";
48
+                if (!string.IsNullOrWhiteSpace(cmpname))//公司名称
49
+                    sql += $" and F_CompanyName like '%" + cmpname.Trim() + "%'";
50
+                if (!string.IsNullOrWhiteSpace(cmpaddress))//公司地址
51
+                    sql += $" and F_CompanyAddress like '%" + cmpaddress.Trim() + "%'";
52
+                if (!string.IsNullOrWhiteSpace(legname))//法人姓名
53
+                    sql += $" and F_LegalName like '%" + legname.Trim() + "%'";
54
+                if (!string.IsNullOrWhiteSpace(legtel))//法人电话
55
+                    sql += $" and F_LegalTel like '%" + legtel.Trim() + "%'";
56
+                if (!string.IsNullOrWhiteSpace(subtrade))//所属行业
57
+                    sql += $" and isnull(F_SubTrade,'') = '" + subtrade.Trim() + "'";
58
+                if (!string.IsNullOrWhiteSpace(layer))//客户信誉等级
59
+                    sql += $" and isnull(F_Layer,'') = '" + layer.Trim() + "'";
60
+                if (!string.IsNullOrWhiteSpace(bedept))//客户所属部门
61
+                    sql += $" and isnull(F_BeDept,'') = '" + bedept.Trim() + "'";
62
+                if (!string.IsNullOrWhiteSpace(berelacc))//涉税会计
63
+                    sql += $" and F_BeRelatedAcc like '%" + berelacc.Trim() + "%'";
64
+                if (!string.IsNullOrWhiteSpace(beaudacc))//审核会计
65
+                    sql += $" and F_BeAuditAcc like '%" + beaudacc.Trim() + "%'";
66
+                if (!string.IsNullOrWhiteSpace(bemakeacc))//做账会计
67
+                    sql += $" and F_BeMakeAcc like '%" + bemakeacc.Trim() + "%'";
68
+                if(!string.IsNullOrWhiteSpace(conname) || !string.IsNullOrWhiteSpace(contel))
69
+                {
70
+                    var sqlcon = " where F_DeleteFlag=0 ";
71
+                    if (!string.IsNullOrWhiteSpace(conname)) // 联系人
72
+                        sqlcon += " and F_Name like '%" + conname + "%'";
73
+                    if (!string.IsNullOrWhiteSpace(contel)) //联系人电话
74
+                        sqlcon += " and F_Telephone like '%" + contel + "%'";
75
+                    sql += $" and F_CustomerId in (select F_CustomerId from T_Cus_ContactPersonNew "+ sqlcon + " )";
76
+                }
77
+                #endregion
78
+
79
+                int recordCount = 0;
80
+                dt = BLL.PagerBLL.GetListPager(
81
+                    "T_Cus_CustomerBaseNew",
82
+                    "F_CustomerId",
83
+                    "*",
84
+                    sql,
85
+                    "ORDER BY F_CustomerId desc",
86
+                    pagesize,
87
+                    pageindex,
88
+                    true,
89
+                    out recordCount);
90
+                #region 绑定联系人信息
91
+                dt.Columns.Add("F_Contact");
92
+                foreach (DataRow dr in dt.Rows)
93
+                {
94
+                    var contact = "";
95
+                    string cusid = dr["F_CustomerId"].ToString();
96
+                    var conlist = conbll.GetModelList(" F_CustomerId=" + cusid);
97
+                    if(conlist.Count>0)
98
+                    {
99
+                        foreach (var item in conlist)
100
+                        {
101
+                            contact += item.F_Name + "(" + item.F_Telephone + "),";
102
+                        }
103
+                    }
104
+                    dr["CusName"] = contact.TrimEnd(',');
105
+                }
106
+                #endregion
107
+                var obj = new
108
+                {
109
+                    state = "success",
110
+                    message = "成功",
111
+                    rows = dt,
112
+                    total = recordCount
113
+                };
114
+
115
+                res = Content(obj.ToJson());
116
+
117
+            }
118
+            return res;
119
+        }
120
+
121
+        /// <summary>
122
+        /// 获取客户信息
123
+        /// </summary>
124
+        /// <returns></returns>
125
+        public ActionResult GetCustomer(int cusid)
126
+        {
127
+            if (cusid != 0)
128
+            {
129
+                Model.T_Cus_CustomerBaseNew userModel = cusbll.GetModel(cusid);
130
+                if (userModel != null)
131
+                {
132
+                    var conlist = conbll.GetModelList(" F_DeleteFlag=0 and F_CustomerId=" + cusid);
133
+                    var obj = new
134
+                    {
135
+                        CustomerBase = userModel,
136
+                        ContactList = conlist,
137
+                    };
138
+                    return Success("获取成功", obj);
139
+                }
140
+                else
141
+                {
142
+                    return Error("获取失败");
143
+                }
144
+            }
145
+            else
146
+            {
147
+                return Error("参数传输失败");
148
+            }
149
+        }
150
+
151
+        /// <summary>
152
+        /// 通过来电号码获取来电弹屏左侧客户信息
153
+        /// </summary>
154
+        /// <returns></returns>
155
+        public ActionResult GetCustomerByTel(string tel)
156
+        {
157
+            if (!string.IsNullOrWhiteSpace(tel))
158
+            {
159
+                var sql= $" and (F_LegalTel like '%" + tel.Trim() + "%' or  F_CustomerId in (select F_CustomerId from T_Cus_ContactPersonNew where F_Telephone like '%" + tel.Trim() + "%')";
160
+                var userModel = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_DeleteFlag = 0 "+ sql);
161
+                if (userModel.Count() > 0)
162
+                {
163
+                    var model = userModel.Last();
164
+                    int cusid = model.F_CustomerId;
165
+                    var conlist = conbll.GetModelList(" F_DeleteFlag=0 and  F_CustomerId=" + cusid);
166
+                    var obj = new
167
+                    {
168
+                        CustomerBase = model,
169
+                        ContactList = conlist,
170
+                    };
171
+                    return Success("获取成功", obj);
172
+                }
173
+                else
174
+                {
175
+                    return Success("获取成功");
176
+                }
177
+            }
178
+            else
179
+            {
180
+                return Error("参数传输失败");
181
+            }
182
+        }
183
+        
184
+        /// <summary>
185
+        /// 添加客户信息
186
+        /// </summary>
187
+        /// <returns></returns>
188
+        public ActionResult Add(CustomerBaseNewInput input)
189
+        {
190
+            string usercode = CurrentUser.UserData.F_UserCode;
191
+            #region 添加验证判断
192
+            if (string.IsNullOrEmpty(input.F_CustomerCode))
193
+                return Error("编号不能为空!");
194
+            #endregion
195
+            var model = new Model.T_Cus_CustomerBaseNew();
196
+            #region 保存客户基本信息
197
+            model.F_CustomerCode = input.F_CustomerCode;
198
+            model.F_CompanyName = input.F_CompanyName;
199
+            model.F_CompanyAddress = input.F_CompanyAddress;
200
+            model.F_LegalName = input.F_LegalName;
201
+            model.F_LegalTel = input.F_LegalTel;
202
+            model.F_Layer = input.F_Layer;
203
+            model.F_InvoiceRange = input.F_InvoiceRange;
204
+            model.F_SubTrade = input.F_SubTrade;
205
+            model.F_TaxCategory = input.F_TaxCategory;
206
+            model.F_TaxPointDes = input.F_TaxPointDes;
207
+            model.F_WxPassword = input.F_WxPassword;
208
+            model.F_BeDept = input.F_BeDept;
209
+            model.F_BeRelatedAcc = input.F_BeRelatedAcc;
210
+            model.F_BeAuditAcc = input.F_BeAuditAcc;
211
+            model.F_BeMakeAcc = input.F_BeMakeAcc;
212
+            model.F_CreateBy = usercode;
213
+            model.F_CreatedOn = DateTime.Now;
214
+            model.F_DeleteFlag = 0;
215
+            #endregion
216
+            int n = cusbll.Add(model);
217
+            if (n > 0)
218
+            {
219
+                #region 添加联系人
220
+                if(input.ContactList.Count>0)
221
+                {
222
+                    var conmodel = new Model.T_Cus_ContactPersonNew();
223
+                    conmodel.F_CustomerId = n;
224
+                    conmodel.F_CreateBy = usercode;
225
+                    conmodel.F_CreateOn = DateTime.Now;
226
+                    conmodel.F_DeleteFlag = 0;
227
+                    foreach (var item in input.ContactList)
228
+                    {
229
+                        conmodel.F_Name = item.F_Name;
230
+                        conmodel.F_Telephone = item.F_Telephone;
231
+                        conmodel.F_Duties = item.F_Duties;
232
+                        conmodel.F_Email = item.F_Email;
233
+                        conmodel.F_MSN = item.F_MSN;
234
+                        conmodel.F_QQ = item.F_QQ;
235
+                        conmodel.F_Remark = item.F_Remark;
236
+
237
+                        conbll.Add(conmodel);
238
+                    }
239
+                }
240
+                #endregion
241
+                return Success("新增成功!");
242
+            }
243
+            else
244
+                return Error("新增失败!");
245
+        }
246
+
247
+        /// <summary>
248
+        /// 修改客户信息
249
+        /// </summary>
250
+        /// <returns></returns>
251
+        public ActionResult Update(CustomerBaseNewInput input)
252
+        {
253
+            string usercode = CurrentUser.UserData.F_UserCode;
254
+            #region 添加验证判断
255
+            if (input.F_CustomerId <= 0)
256
+                return Error("参数错误!");
257
+            #endregion
258
+            var model = cusbll.GetModel(input.F_CustomerId);
259
+            #region 保存客户基本信息
260
+            model.F_CustomerCode = input.F_CustomerCode;
261
+            model.F_CompanyName = input.F_CompanyName;
262
+            model.F_CompanyAddress = input.F_CompanyAddress;
263
+            model.F_LegalName = input.F_LegalName;
264
+            model.F_LegalTel = input.F_LegalTel;
265
+            model.F_Layer = input.F_Layer;
266
+            model.F_InvoiceRange = input.F_InvoiceRange;
267
+            model.F_SubTrade = input.F_SubTrade;
268
+            model.F_TaxCategory = input.F_TaxCategory;
269
+            model.F_TaxPointDes = input.F_TaxPointDes;
270
+            model.F_WxPassword = input.F_WxPassword;
271
+            model.F_BeDept = input.F_BeDept;
272
+            model.F_BeRelatedAcc = input.F_BeRelatedAcc;
273
+            model.F_BeAuditAcc = input.F_BeAuditAcc;
274
+            model.F_BeMakeAcc = input.F_BeMakeAcc;
275
+            model.F_CreateBy = usercode;
276
+            model.F_CreatedOn = DateTime.Now;
277
+            model.F_DeleteFlag = 0;
278
+            #endregion
279
+            bool n = cusbll.Update(model);
280
+            if (n)
281
+            {
282
+                return Success("保存成功!");
283
+            }
284
+            else
285
+                return Error("保存失败!");
286
+        }
287
+        
288
+        /// <summary>
289
+        /// 删除客户
290
+        /// </summary>
291
+        /// <param name="ids"></param>
292
+        /// <returns></returns>
293
+        public ActionResult DelCustomer(string[] ids)
294
+        {
295
+            if (ids != null && ids.Length > 0)
296
+            {
297
+                string idd = " ";
298
+                foreach (string str in ids)
299
+                {
300
+                    idd += str + ",";
301
+                }
302
+                if (!string.IsNullOrEmpty(idd.Trim()))
303
+                {
304
+                    if (cusbll.DeleteList(idd.TrimEnd(',')))
305
+                    {
306
+                        conbll.DeleteListByCusid(idd.TrimEnd(','));
307
+                        return Success("设置成功");
308
+                    }
309
+                    else
310
+                    {
311
+                        return Error("设置失败");
312
+                    }
313
+                }
314
+                else
315
+                {
316
+                    return Error("请选择用户");
317
+                }
318
+            }
319
+            else
320
+            {
321
+                return Error("获取参数失败");
322
+            }
323
+        }
324
+        
325
+        /// <summary>
326
+        /// 添加联系人
327
+        /// </summary>
328
+        /// <param name="coninput"></param>
329
+        /// <returns></returns>
330
+        public ActionResult AddContact(ContactPersonNewInput coninput)
331
+        {
332
+            string usercode = CurrentUser.UserData.F_UserCode;
333
+            #region 添加验证判断
334
+            if (coninput.F_CustomerId <= 0)
335
+                return Error("客户ID获取失败!");
336
+            #endregion
337
+            var conmodel = new Model.T_Cus_ContactPersonNew();
338
+            conmodel.F_CustomerId = coninput.F_CustomerId;
339
+            conmodel.F_Name = coninput.F_Name;
340
+            conmodel.F_Telephone = coninput.F_Telephone;
341
+            conmodel.F_Duties = coninput.F_Duties;
342
+            conmodel.F_Email = coninput.F_Email;
343
+            conmodel.F_MSN = coninput.F_MSN;
344
+            conmodel.F_QQ = coninput.F_QQ;
345
+            conmodel.F_Remark = coninput.F_Remark;
346
+            conmodel.F_CreateBy = usercode;
347
+            conmodel.F_CreateOn = DateTime.Now;
348
+            conmodel.F_DeleteFlag = 0;
349
+            int n = conbll.Add(conmodel);
350
+            if (n > 0)
351
+                return Success("联系人保存成功!");
352
+            else
353
+                return Error("联系人保存失败!");
354
+        }
355
+        
356
+        /// <summary>
357
+        /// 修改联系人
358
+        /// </summary>
359
+        /// <param name="coninput"></param>
360
+        /// <returns></returns>
361
+        public ActionResult UpdateContact(ContactPersonNewInput coninput)
362
+        {
363
+            string usercode = CurrentUser.UserData.F_UserCode;
364
+            #region 添加验证判断
365
+            if (coninput.F_ManId <= 0)
366
+                return Error("参数错误!");
367
+            if (coninput.F_CustomerId <= 0)
368
+                return Error("客户ID获取失败!");
369
+            #endregion
370
+            var conmodel = conbll.GetModel(coninput.F_ManId);
371
+            conmodel.F_CustomerId = coninput.F_CustomerId;
372
+            conmodel.F_Name = coninput.F_Name;
373
+            conmodel.F_Telephone = coninput.F_Telephone;
374
+            conmodel.F_Duties = coninput.F_Duties;
375
+            conmodel.F_Email = coninput.F_Email;
376
+            conmodel.F_MSN = coninput.F_MSN;
377
+            conmodel.F_QQ = coninput.F_QQ;
378
+            conmodel.F_Remark = coninput.F_Remark;
379
+            var n = conbll.Update(conmodel);
380
+            if (n)
381
+                return Success("联系人保存成功!");
382
+            else
383
+                return Error("联系人保存失败!");
384
+        }
385
+        
386
+        /// <summary>
387
+        /// 删除联系人
388
+        /// </summary>
389
+        /// <param name="ids"></param>
390
+        /// <returns></returns>
391
+        public ActionResult DelContact(string[] ids)
392
+        {
393
+            if (ids != null && ids.Length > 0)
394
+            {
395
+                string idd = " ";
396
+                foreach (string str in ids)
397
+                {
398
+                    idd += str + ",";
399
+                }
400
+                if (!string.IsNullOrEmpty(idd.Trim()))
401
+                {
402
+                    if (conbll.DeleteList(idd.TrimEnd(',')))
403
+                    {
404
+                        return Success("设置成功");
405
+                    }
406
+                    else
407
+                    {
408
+                        return Error("设置失败");
409
+                    }
410
+                }
411
+                else
412
+                {
413
+                    return Error("请选择联系人");
414
+                }
415
+            }
416
+            else
417
+            {
418
+                return Error("获取参数失败");
419
+            }
420
+        }
421
+    }
422
+}

File diff suppressed because it is too large
+ 0 - 599
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_BACKUP_17676.cs


File diff suppressed because it is too large
+ 0 - 546
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_BASE_17676.cs


File diff suppressed because it is too large
+ 0 - 591
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_LOCAL_17676.cs


File diff suppressed because it is too large
+ 0 - 550
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController_REMOTE_17676.cs


+ 120 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/CustomerBaseNewInput.cs

@@ -0,0 +1,120 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Web;
5
+
6
+namespace CallCenterApi.Interface.Models.Input
7
+{
8
+    public class CustomerBaseNewInput
9
+    {
10
+        /// <summary>
11
+        /// 自增ID
12
+        /// </summary>
13
+        public int F_CustomerId { set; get; }
14
+
15
+        /// <summary>
16
+        /// 客户编号
17
+        /// </summary>
18
+        public string F_CustomerCode { set; get; }
19
+        /// <summary>
20
+        /// 公司名称
21
+        /// </summary>
22
+        public string F_CompanyName { set; get; }
23
+        /// <summary>
24
+        /// 公司地址
25
+        /// </summary>
26
+        public string F_CompanyAddress { set; get; }
27
+        /// <summary>
28
+        /// 法人姓名
29
+        /// </summary>
30
+        public string F_LegalName { set; get; }
31
+        /// <summary>
32
+        /// 法人电话
33
+        /// </summary>
34
+        public string F_LegalTel { set; get; }
35
+        /// <summary>
36
+        /// 所属行业
37
+        /// </summary>
38
+        public int? F_SubTrade { set; get; }
39
+        /// <summary>
40
+        /// 税务类别
41
+        /// </summary>
42
+        public int? F_TaxCategory { set; get; }
43
+        /// <summary>
44
+        /// 税点描述
45
+        /// </summary>
46
+        public string F_TaxPointDes { set; get; }
47
+        /// <summary>
48
+        /// 开票范围
49
+        /// </summary>
50
+        public string F_InvoiceRange { set; get; }
51
+        /// <summary>
52
+        /// 客户信誉等级
53
+        /// </summary>
54
+        public int? F_Layer { set; get; }
55
+        /// <summary>
56
+        /// 客户归属部门
57
+        /// </summary>
58
+        public int? F_BeDept { set; get; }
59
+        /// <summary>
60
+        /// 客户归属涉税会计
61
+        /// </summary>
62
+        public string F_BeRelatedAcc { set; get; }
63
+        /// <summary>
64
+        /// 客户归属审核会计
65
+        /// </summary>
66
+        public string F_BeAuditAcc { set; get; }
67
+        /// <summary>
68
+        /// 客户归属做账会计
69
+        /// </summary>
70
+        public string F_BeMakeAcc { set; get; }
71
+        /// <summary>
72
+        /// 微信登录密码
73
+        /// </summary>
74
+        public string F_WxPassword { set; get; }
75
+        /// <summary>
76
+        /// 微信openid
77
+        /// </summary>
78
+        public string F_WxOpenId { set; get; }
79
+        /// <summary>
80
+        /// 联系人添加
81
+        /// </summary>
82
+        public List<ContactPersonNewInput> ContactList { set; get; }
83
+    }
84
+    public class ContactPersonNewInput
85
+    {
86
+        public int F_ManId { set; get; }
87
+        /// <summary>
88
+        /// 客户id
89
+        /// </summary>
90
+        public int F_CustomerId { set; get; }
91
+        /// <summary>
92
+        /// 联系人姓名
93
+        /// </summary>
94
+        public string F_Name { set; get; }
95
+        /// <summary>
96
+        /// 电话
97
+        /// </summary>
98
+        public string F_Telephone { set; get; }
99
+        /// <summary>
100
+        /// 邮箱
101
+        /// </summary>
102
+        public string F_Email { set; get; }
103
+        /// <summary>
104
+        /// 职务
105
+        /// </summary>
106
+        public string F_Duties { set; get; }
107
+        /// <summary>
108
+        /// QQ号码
109
+        /// </summary>
110
+        public string F_QQ { set; get; }
111
+        /// <summary>
112
+        /// MSN号码
113
+        /// </summary>
114
+        public string F_MSN { set; get; }
115
+        /// <summary>
116
+        /// 备注
117
+        /// </summary>
118
+        public string F_Remark { set; get; }
119
+    }
120
+}

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

@@ -76,7 +76,9 @@
76 76
     <Compile Include="T_CTI_TaskPhonePart.cs" />
77 77
     <Compile Include="T_CTI_TaskRecord.cs" />
78 78
     <Compile Include="T_Cus_ContactPerson.cs" />
79
+    <Compile Include="T_Cus_ContactPersonNew.cs" />
79 80
     <Compile Include="T_Cus_CustomerBase.cs" />
81
+    <Compile Include="T_Cus_CustomerBaseNew.cs" />
80 82
     <Compile Include="T_Cus_CustomerExpand.cs" />
81 83
     <Compile Include="T_Cus_RegionCategory.cs" />
82 84
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />

+ 128 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Cus_ContactPersonNew.cs

@@ -0,0 +1,128 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace CallCenterApi.Model
8
+{
9
+    /// <summary>
10
+	/// T_Cus_ContactPersonNew:实体类(属性说明自动提取数据库字段的描述信息)
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_Cus_ContactPersonNew
14
+    {
15
+        public T_Cus_ContactPersonNew()
16
+        { }
17
+        #region Model
18
+        private int _f_manid;
19
+        private int? _f_customerid;
20
+        private string _f_name;
21
+        private string _f_telephone;
22
+        private string _f_email;
23
+        private string _f_duties;
24
+        private string _f_qq;
25
+        private string _f_msn;
26
+        private string _f_remark;
27
+        private string _f_createby;
28
+        private DateTime? _f_createon;
29
+        private int? _f_deleteflag;
30
+        /// <summary>
31
+        /// 自增ID
32
+        /// </summary>
33
+        public int F_ManId
34
+        {
35
+            set { _f_manid = value; }
36
+            get { return _f_manid; }
37
+        }
38
+        /// <summary>
39
+        /// 客户ID
40
+        /// </summary>
41
+        public int? F_CustomerId
42
+        {
43
+            set { _f_customerid = value; }
44
+            get { return _f_customerid; }
45
+        }
46
+        /// <summary>
47
+        /// 联系人姓名
48
+        /// </summary>
49
+        public string F_Name
50
+        {
51
+            set { _f_name = value; }
52
+            get { return _f_name; }
53
+        }
54
+        /// <summary>
55
+        /// 电话
56
+        /// </summary>
57
+        public string F_Telephone
58
+        {
59
+            set { _f_telephone = value; }
60
+            get { return _f_telephone; }
61
+        }
62
+        /// <summary>
63
+        /// 邮箱
64
+        /// </summary>
65
+        public string F_Email
66
+        {
67
+            set { _f_email = value; }
68
+            get { return _f_email; }
69
+        }
70
+        /// <summary>
71
+        /// 职务
72
+        /// </summary>
73
+        public string F_Duties
74
+        {
75
+            set { _f_duties = value; }
76
+            get { return _f_duties; }
77
+        }
78
+        /// <summary>
79
+        /// QQ号码
80
+        /// </summary>
81
+        public string F_QQ
82
+        {
83
+            set { _f_qq = value; }
84
+            get { return _f_qq; }
85
+        }
86
+        /// <summary>
87
+        /// MSN号码
88
+        /// </summary>
89
+        public string F_MSN
90
+        {
91
+            set { _f_msn = value; }
92
+            get { return _f_msn; }
93
+        }
94
+        /// <summary>
95
+        /// 备注
96
+        /// </summary>
97
+        public string F_Remark
98
+        {
99
+            set { _f_remark = value; }
100
+            get { return _f_remark; }
101
+        }
102
+        /// <summary>
103
+        /// 创建者
104
+        /// </summary>
105
+        public string F_CreateBy
106
+        {
107
+            set { _f_createby = value; }
108
+            get { return _f_createby; }
109
+        }
110
+        /// <summary>
111
+        /// 创建时间
112
+        /// </summary>
113
+        public DateTime? F_CreateOn
114
+        {
115
+            set { _f_createon = value; }
116
+            get { return _f_createon; }
117
+        }
118
+        /// <summary>
119
+        /// 删除标志 1:删除 0:正常
120
+        /// </summary>
121
+        public int? F_DeleteFlag
122
+        {
123
+            set { _f_deleteflag = value; }
124
+            get { return _f_deleteflag; }
125
+        }
126
+        #endregion Model
127
+    }
128
+}

+ 200 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Cus_CustomerBaseNew.cs

@@ -0,0 +1,200 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace CallCenterApi.Model
8
+{
9
+    /// <summary>
10
+	/// T_Cus_CustomerBaseNew:实体类(属性说明自动提取数据库字段的描述信息)
11
+	/// </summary>
12
+	[Serializable]
13
+    public partial class T_Cus_CustomerBaseNew
14
+    {
15
+        public T_Cus_CustomerBaseNew()
16
+        { }
17
+        #region Model
18
+        private int _f_customerid;
19
+        private string _f_customercode;
20
+        private string _f_companyname;
21
+        private string _f_companyaddress;
22
+        private string _f_legalname;
23
+        private string _f_legaltel;
24
+        private int? _f_subtrade;
25
+        private int? _f_taxcategory;
26
+        private string _f_taxpointdes;
27
+        private string _f_invoicerange;
28
+        private int? _f_layer;
29
+        private int? _f_bedept;
30
+        private string _f_berelatedacc;
31
+        private string _f_beauditacc;
32
+        private string _f_bemakeacc;
33
+        private string _f_wxpassword;
34
+        private string _f_wxopenid;
35
+        private string _f_createby;
36
+        private DateTime? _f_createdon;
37
+        private int? _f_deleteflag;
38
+        /// <summary>
39
+        /// 自增ID
40
+        /// </summary>
41
+        public int F_CustomerId
42
+        {
43
+            set { _f_customerid = value; }
44
+            get { return _f_customerid; }
45
+        }
46
+        /// <summary>
47
+        /// 客户编号
48
+        /// </summary>
49
+        public string F_CustomerCode
50
+        {
51
+            set { _f_customercode = value; }
52
+            get { return _f_customercode; }
53
+        }
54
+        /// <summary>
55
+        /// 公司名称
56
+        /// </summary>
57
+        public string F_CompanyName
58
+        {
59
+            set { _f_companyname = value; }
60
+            get { return _f_companyname; }
61
+        }
62
+        /// <summary>
63
+        /// 公司地址
64
+        /// </summary>
65
+        public string F_CompanyAddress
66
+        {
67
+            set { _f_companyaddress = value; }
68
+            get { return _f_companyaddress; }
69
+        }
70
+        /// <summary>
71
+        /// 法人姓名
72
+        /// </summary>
73
+        public string F_LegalName
74
+        {
75
+            set { _f_legalname = value; }
76
+            get { return _f_legalname; }
77
+        }
78
+        /// <summary>
79
+        /// 法人电话
80
+        /// </summary>
81
+        public string F_LegalTel
82
+        {
83
+            set { _f_legaltel = value; }
84
+            get { return _f_legaltel; }
85
+        }
86
+        /// <summary>
87
+        /// 所属行业
88
+        /// </summary>
89
+        public int? F_SubTrade
90
+        {
91
+            set { _f_subtrade = value; }
92
+            get { return _f_subtrade; }
93
+        }
94
+        /// <summary>
95
+        /// 税务类别
96
+        /// </summary>
97
+        public int? F_TaxCategory
98
+        {
99
+            set { _f_taxcategory = value; }
100
+            get { return _f_taxcategory; }
101
+        }
102
+        /// <summary>
103
+        /// 税点描述
104
+        /// </summary>
105
+        public string F_TaxPointDes
106
+        {
107
+            set { _f_taxpointdes = value; }
108
+            get { return _f_taxpointdes; }
109
+        }
110
+        /// <summary>
111
+        /// 开票范围
112
+        /// </summary>
113
+        public string F_InvoiceRange
114
+        {
115
+            set { _f_invoicerange = value; }
116
+            get { return _f_invoicerange; }
117
+        }
118
+        /// <summary>
119
+        /// 客户信誉等级
120
+        /// </summary>
121
+        public int? F_Layer
122
+        {
123
+            set { _f_layer = value; }
124
+            get { return _f_layer; }
125
+        }
126
+        /// <summary>
127
+        /// 客户归属部门
128
+        /// </summary>
129
+        public int? F_BeDept
130
+        {
131
+            set { _f_bedept = value; }
132
+            get { return _f_bedept; }
133
+        }
134
+        /// <summary>
135
+        /// 客户归属涉税会计
136
+        /// </summary>
137
+        public string F_BeRelatedAcc
138
+        {
139
+            set { _f_berelatedacc = value; }
140
+            get { return _f_berelatedacc; }
141
+        }
142
+        /// <summary>
143
+        /// 客户归属审核会计
144
+        /// </summary>
145
+        public string F_BeAuditAcc
146
+        {
147
+            set { _f_beauditacc = value; }
148
+            get { return _f_beauditacc; }
149
+        }
150
+        /// <summary>
151
+        /// 客户归属做账会计
152
+        /// </summary>
153
+        public string F_BeMakeAcc
154
+        {
155
+            set { _f_bemakeacc = value; }
156
+            get { return _f_bemakeacc; }
157
+        }
158
+        /// <summary>
159
+        /// 微信登录密码
160
+        /// </summary>
161
+        public string F_WxPassword
162
+        {
163
+            set { _f_wxpassword = value; }
164
+            get { return _f_wxpassword; }
165
+        }
166
+        /// <summary>
167
+        /// 微信openid
168
+        /// </summary>
169
+        public string F_WxOpenId
170
+        {
171
+            set { _f_wxopenid = value; }
172
+            get { return _f_wxopenid; }
173
+        }
174
+        /// <summary>
175
+        /// 创建人工号
176
+        /// </summary>
177
+        public string F_CreateBy
178
+        {
179
+            set { _f_createby = value; }
180
+            get { return _f_createby; }
181
+        }
182
+        /// <summary>
183
+        /// 创建时间
184
+        /// </summary>
185
+        public DateTime? F_CreatedOn
186
+        {
187
+            set { _f_createdon = value; }
188
+            get { return _f_createdon; }
189
+        }
190
+        /// <summary>
191
+        /// 删除标志
192
+        /// </summary>
193
+        public int? F_DeleteFlag
194
+        {
195
+            set { _f_deleteflag = value; }
196
+            get { return _f_deleteflag; }
197
+        }
198
+        #endregion Model
199
+    }
200
+}