瀏覽代碼

客户管理调整

zhengbingbing 6 年之前
父節點
當前提交
d28cbe57cc

File diff suppressed because it is too large
+ 292 - 284
codegit/CallCenterApi/CallCenterApi.DAL/T_Cus_CustomerBaseNew.cs


+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/CallOutPlanController.cs

@@ -732,7 +732,7 @@ namespace CallCenterApi.Interface.Controllers.callout
732 732
                     {
733 733
                         taskmodel.F_CusID = model.F_CusID.Value;//客户id                
734 734
                         //taskmodel.F_CityID = cusmodel.F_CityID??0;//乡镇id 
735
-                        taskmodel.F_Address = cusmodel.F_Address;//住址
735
+                        //taskmodel.F_Address = cusmodel.F_Address;//住址
736 736
                         //taskmodel.F_CusName = cusmodel.F_CustomerName;//客户姓名                
737 737
                         //taskmodel.F_Phone = cusmodel.F_Telephone;//号码                
738 738
                         //taskmodel.F_Telephone = cusmodel.F_Mobile;//手机号码        
@@ -978,7 +978,7 @@ namespace CallCenterApi.Interface.Controllers.callout
978 978
                         //taskmodel.F_Phone = cusmodel.F_Telephone;//号码                
979 979
                         //taskmodel.F_Telephone = cusmodel.F_Mobile;//手机号码        
980 980
                         //taskmodel.F_City = cusmodel.F_City;//乡镇   
981
-                        taskmodel.F_Address = cusmodel.F_Address;//住址
981
+                        //taskmodel.F_Address = cusmodel.F_Address;//住址
982 982
                     }
983 983
                 }
984 984
                 taskmodel.F_Id = model.F_Id;//号码id

+ 143 - 652
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

@@ -1,6 +1,8 @@
1 1
 using CallCenter.Utility;
2
+using CallCenterApi.Common;
2 3
 using CallCenterApi.Interface.Controllers.Base;
3 4
 using CallCenterApi.Interface.Models.Input;
5
+using CallCenterApi.Model;
4 6
 using Newtonsoft.Json;
5 7
 using NPOI.HSSF.UserModel;
6 8
 using NPOI.SS.UserModel;
@@ -10,6 +12,7 @@ using System.Collections.Generic;
10 12
 using System.Data;
11 13
 using System.IO;
12 14
 using System.Linq;
15
+using System.Text.RegularExpressions;
13 16
 using System.Web;
14 17
 using System.Web.Mvc;
15 18
 
@@ -40,98 +43,50 @@ namespace CallCenterApi.Interface.Controllers.customer
40 43
         /// <param name="conname">联系人姓名</param>
41 44
         /// <param name="contel">联系人电话</param>
42 45
         /// <returns></returns>
43
-        public ActionResult GetList(string keywords, string code, string cmpname, string cmpaddress,
44
-            string legname, string legtel, string subtrade, string layer, string bedept,
45
-            string berelacc, string beaudacc, string bemakeacc, string conname, string contel,
46
-            int pageindex = 1, int pagesize = 10)
46
+        public ActionResult GetList(string code, string cmpname, string legname, string legtel,string province, string city, 
47
+            string country, string township, int areaid = 0, int branchid = 0,int pageindex = 1, int pagesize = 10)
47 48
         {
48
-            string sql = "";
49
+            string sql = $" and F_DeleteFlag=0";
49 50
             DataTable dt = new DataTable();
50 51
             #region 筛选条件
51
-            if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
52
-                sql += $" and F_KeyWords like '%" + keywords.Trim() + "%'";
52
+            if (areaid > 0)//大区
53
+                sql += $" and F_AreaID=" + areaid;
54
+            if (branchid > 0)//分公司
55
+                sql += $" and F_BranchID=" + branchid;
53 56
             if (!string.IsNullOrWhiteSpace(code))//客户编号
54
-                sql += $" and F_CustomerCode like '%" + code.Trim() + "%'";
57
+            {
58
+                if (valcode(code))
59
+                    sql += $" and F_CustomerCode like '%" + code.Trim() + "%'";
60
+            }
55 61
             if (!string.IsNullOrWhiteSpace(cmpname))//公司名称
56 62
                 sql += $" and F_CompanyName like '%" + cmpname.Trim() + "%'";
57
-            if (!string.IsNullOrWhiteSpace(cmpaddress))//公司地址
58
-                sql += $" and (F_CompanyAddress like '%" + cmpaddress.Trim() 
59
-                    + "%' or F_RegisteredAddress like '%" + cmpaddress.Trim() 
60
-                    + "%' or F_Address like '%" + cmpaddress.Trim() 
61
-                    + "%' or F_Address1 like '%" + cmpaddress.Trim()
62
-                    + "%' or F_Address2 like '%" + cmpaddress.Trim()
63
-                    + "%' or F_Address3 like '%" + cmpaddress.Trim()
64
-                    + "%' or F_Address4 like '%" + cmpaddress.Trim()
65
-                    + "%')";
66 63
             if (!string.IsNullOrWhiteSpace(legname))//法人姓名
67
-                sql += $" and F_LegalName like '%" + legname.Trim() + "%'";
64
+                sql += $" and F_Legal like '%" + legname.Trim() + "%'";
68 65
             if (!string.IsNullOrWhiteSpace(legtel))//法人电话
69
-                sql += $" and F_LegalTel like '%" + legtel.Trim() + "%'";
70
-            if (!string.IsNullOrWhiteSpace(subtrade))//所属行业
71
-                sql += $" and isnull(F_SubTrade,'') = '" + subtrade.Trim() + "'";
72
-            if (!string.IsNullOrWhiteSpace(layer))//客户信誉等级
73
-                sql += $" and isnull(F_Layer,'') = '" + layer.Trim() + "'";
74
-            if (!string.IsNullOrWhiteSpace(bedept))//客户所属部门
75
-                sql += $" and isnull(F_BeDept,'') = '" + bedept.Trim() + "'";
76
-            if (!string.IsNullOrWhiteSpace(berelacc))//涉税会计
77
-                sql += $" and F_BeRelatedAcc like '%" + berelacc.Trim() + "%'";
78
-            if (!string.IsNullOrWhiteSpace(beaudacc))//审核会计
79
-                sql += $" and F_BeAuditAcc like '%" + beaudacc.Trim() + "%'";
80
-            if (!string.IsNullOrWhiteSpace(bemakeacc))//做账会计
81
-                sql += $" and F_BeMakeAcc like '%" + bemakeacc.Trim() + "%'";
82
-            if (!string.IsNullOrWhiteSpace(conname) || !string.IsNullOrWhiteSpace(contel))
83
-            {
84
-                var sqlcon = " where F_DeleteFlag=0 ";
85
-                if (!string.IsNullOrWhiteSpace(conname)) // 联系人
86
-                    sqlcon += " and F_Name like '%" + conname + "%'";
87
-                if (!string.IsNullOrWhiteSpace(contel)) //联系人电话
88
-                    sqlcon += " and F_Telephone like '%" + contel + "%'";
89
-                sql += $" and F_CustomerId in (select F_CustomerId from T_Cus_ContactPersonNew " + sqlcon + " )";
90
-            }
66
+                sql += $" and F_LegalPhone like '%" + legtel.Trim() + "%'";
67
+            if (!string.IsNullOrWhiteSpace(province))//省
68
+                sql += $" and F_AddressProvince like '%" + province.Trim() + "%'";
69
+            if (!string.IsNullOrWhiteSpace(province))//市
70
+                sql += $" and F_AddressCity like '%" + city.Trim() + "%'";
71
+            if (!string.IsNullOrWhiteSpace(province))//县
72
+                sql += $" and F_AddressCountry like '%" + country.Trim() + "%'";
73
+            if (!string.IsNullOrWhiteSpace(province))//乡
74
+                sql += $" and F_AddressTownship like '%" + township.Trim() + "%'";
91 75
             #endregion
92 76
 
93 77
             int recordCount = 0;
94
-            if(CurrentUser.UserData.F_RoleId==17)
95
-            {
96
-                sql += " and F_DeleteFlag=0";
97
-            }
98 78
             if (!string.IsNullOrWhiteSpace(sql))
99 79
             {
100
-                sql += " and F_DeleteFlag=0";
101 80
                 dt = BLL.PagerBLL.GetListPager(
102 81
                     "T_Cus_CustomerBaseNew",
103 82
                     "F_CustomerId",
104
-                    "*,dbo.GetDeptName(F_BeDept) as F_BeDeptName",
83
+                    "*,dbo.GetUserName(F_CreateBy) as F_CreateByName",
105 84
                     sql,
106 85
                     "ORDER BY F_CustomerId desc",
107 86
                     pagesize,
108 87
                     pageindex,
109 88
                     true,
110 89
                     out recordCount);
111
-                #region
112
-                dt.Columns.Add("F_Contact");
113
-                var dept = new BLL.T_Sys_Department().GetModelList("");
114
-                foreach (DataRow dr in dt.Rows)
115
-                {
116
-                    #region 绑定联系人信息
117
-                    var contact = "";
118
-                    string cusid = dr["F_CustomerId"] != null ? dr["F_CustomerId"].ToString() : "";
119
-                    if (cusid != "")
120
-                    {
121
-                        var conlist = conbll.GetModelList(" F_CustomerId=" + cusid);
122
-                        if (conlist.Count > 0)
123
-                        {
124
-                            foreach (var item in conlist)
125
-                            {
126
-                                contact += item.F_Name + "(" + item.F_Telephone + "),";
127
-                            }
128
-                        }
129
-                        dr["F_Contact"] = contact.TrimEnd(',');
130
-                    }
131
-                    #endregion
132
-                }
133
-
134
-                #endregion
135 90
             }
136 91
             var obj = new
137 92
             {
@@ -151,7 +106,7 @@ namespace CallCenterApi.Interface.Controllers.customer
151 106
         {
152 107
             string sql = "";
153 108
             if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
154
-                sql += $" F_KeyWords like '%" + keywords.Trim() + "%'";
109
+                sql += $" ( F_CompanyName like '%" + keywords.Trim() + "%' or F_CustomerCode like '%" + keywords.Trim() + "%' ) ";
155 110
             var list = new List<Model.T_Cus_CustomerBaseNew>();
156 111
             if (!string.IsNullOrWhiteSpace(sql))
157 112
             {
@@ -174,25 +129,7 @@ namespace CallCenterApi.Interface.Controllers.customer
174 129
                 Model.T_Cus_CustomerBaseNew userModel = cusbll.GetModel(cusid);
175 130
                 if (userModel != null)
176 131
                 {
177
-                    #region 绑定部门
178
-                    var deptname = "";
179
-                    if (userModel.F_BeDept != null)
180
-                    {
181
-                        var deptmodel = deptbll.GetModel(userModel.F_BeDept.Value);
182
-                        if (deptmodel != null)
183
-                            deptname = deptmodel.F_DeptName;
184
-                    }
185
-                    #endregion
186
-                    var conlist = conbll.GetModelList(" F_DeleteFlag=0 and F_CustomerId=" + cusid);
187
-                    var finlist = finbll.GetModelList(" F_DeleteFlag=0 and  F_CustomerId=" + cusid);
188
-                    var obj = new
189
-                    {
190
-                        CustomerBase = userModel,
191
-                        BeDeptName = deptname,
192
-                        ContactList = conlist,
193
-                        FinaceList = finlist,
194
-                    };
195
-                    return Success("获取成功", obj);
132
+                    return Success("获取成功", userModel);
196 133
                 }
197 134
                 else
198 135
                 {
@@ -213,31 +150,13 @@ namespace CallCenterApi.Interface.Controllers.customer
213 150
         {
214 151
             if (!string.IsNullOrWhiteSpace(tel))
215 152
             {
216
-                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() + "%')";
153
+                var sql = $" and (F_SalesPhone like '%" + tel.Trim() + "%' or F_LegalPhone like '%" + tel.Trim() + "%')";
217 154
                 var userModel = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_DeleteFlag = 0 " + sql);
218 155
                 if (userModel.Count() > 0)
219 156
                 {
220 157
                     var model = userModel.Last();
221
-                    int cusid = model.F_CustomerId;
222
-                    var conlist = conbll.GetModelList(" F_DeleteFlag=0 and  F_CustomerId=" + cusid);
223
-                    var finlist=finbll.GetModelList(" F_DeleteFlag=0 and  F_CustomerId=" + cusid);
224
-                    #region 绑定部门
225
-                    var deptname = "";
226
-                    if (model.F_BeDept != null)
227
-                    {
228
-                        var deptmodel = deptbll.GetModel(model.F_BeDept.Value);
229
-                        if (deptmodel != null)
230
-                            deptname = deptmodel.F_DeptName;
231
-                    }
232
-                    #endregion
233
-                    var obj = new
234
-                    {
235
-                        CustomerBase = model,
236
-                        BeDeptName = deptname,
237
-                        ContactList = conlist,
238
-                        FinaceList = finlist,
239
-                    };
240
-                    return Success("获取成功", obj);
158
+
159
+                    return Success("获取成功", model);
241 160
                 }
242 161
                 else
243 162
                 {
@@ -260,49 +179,21 @@ namespace CallCenterApi.Interface.Controllers.customer
260 179
             #region 添加验证判断
261 180
             if (string.IsNullOrEmpty(input.F_CustomerCode))
262 181
                 return Error("编号不能为空!");
263
-            if (getunique(0, input.F_CustomerCode, input.F_CompanyName))
182
+            if (!valcode(input.F_CustomerCode))
183
+                return Error("编号必须是10位数字");
184
+            if (getunique(0, input.F_CustomerCode))
264 185
                 return Error("编号已被占用,请重新输入!");
265 186
             #endregion
266 187
             var model = new Model.T_Cus_CustomerBaseNew();
267 188
             #region 保存客户基本信息
268 189
             model = inputtoobj(model, input);
269 190
             model.F_CreateBy = usercode;
270
-            model.F_CreatedOn = DateTime.Now;
271
-            model.F_DeleteFlag = 0;
191
+            model.F_CreateOn = DateTime.Now;
192
+            model.F_IsDelete = 0;
272 193
             #endregion
273 194
             int n = cusbll.Add(model);
274 195
             if (n > 0)
275 196
             {
276
-                #region 添加联系人
277
-                if (input.ContactList != null && input.ContactList.Count > 0)
278
-                {
279
-                    var conmodel = new Model.T_Cus_ContactPersonNew();
280
-                    conmodel.F_CustomerId = n;
281
-                    conmodel.F_CreateBy = usercode;
282
-                    conmodel.F_CreateOn = DateTime.Now;
283
-                    conmodel.F_DeleteFlag = 0;
284
-                    foreach (var item in input.ContactList)
285
-                    {
286
-                        conmodel.F_IsMain = item.F_IsMain;
287
-                        conmodel.F_Name = item.F_Name;
288
-                        conmodel.F_Telephone = item.F_Telephone;
289
-                        conmodel.F_Duties = item.F_Duties;
290
-                        conmodel.F_Email = item.F_Email;
291
-                        conmodel.F_MSN = item.F_MSN;
292
-                        conmodel.F_QQ = item.F_QQ;
293
-                        conmodel.F_Remark = item.F_Remark;
294
-
295
-                        conbll.Add(conmodel);
296
-                    }
297
-                }
298
-                #endregion
299
-                #region 添加财税情况
300
-                var fincmodel = new CustomerFinanceInput();
301
-                fincmodel.F_CustomerId = n;
302
-                fincmodel.F_CustomerCode = model.F_CustomerCode;
303
-                fincmodel.F_CreateBy = usercode;
304
-                savefin(input.FinanceInfos);
305
-                #endregion
306 197
                 return Success("新增成功!");
307 198
             }
308 199
             else
@@ -319,7 +210,7 @@ namespace CallCenterApi.Interface.Controllers.customer
319 210
             #region 添加验证判断
320 211
             if (input.F_CustomerId <= 0)
321 212
                 return Error("参数错误!");
322
-            if (getunique(input.F_CustomerId, input.F_CustomerCode, input.F_CompanyName))
213
+            if (getunique(input.F_CustomerId, input.F_CustomerCode))
323 214
                 return Error("编号已被占用,请重新输入!");
324 215
             #endregion
325 216
             var model = cusbll.GetModel(input.F_CustomerId);
@@ -342,110 +233,23 @@ namespace CallCenterApi.Interface.Controllers.customer
342 233
         {
343 234
             var newmodel = model;
344 235
             if (!string.IsNullOrWhiteSpace(input.F_CustomerCode))
345
-            {
346 236
                 model.F_CustomerCode = input.F_CustomerCode;
347
-            }
348 237
             else
349 238
                 model.F_CustomerCode = model.F_CustomerCode;
350 239
             if (!string.IsNullOrWhiteSpace(input.F_CompanyName))
351
-            {
352 240
                 model.F_CompanyName = input.F_CompanyName;
353
-                #region 处理关键字
354
-                var keyword = model.F_CompanyName;
355
-                var keyconfig = Configs.GetValue("keystring");
356
-                var keystring = keyconfig.Split(',');
357
-                foreach (var item in keystring)
358
-                {
359
-                    if (model.F_CompanyName.Contains(item))
360
-                        keyword = keyword.Replace(item, "");
361
-                }
362
-                model.F_KeyWords = keyword;
363
-                #endregion
364
-            }
365
-            if (!string.IsNullOrWhiteSpace(input.F_RegisteredAddress))
366
-                model.F_RegisteredAddress = input.F_RegisteredAddress;
367
-            if (!string.IsNullOrWhiteSpace(input.F_CompanyAddress))
368
-                model.F_CompanyAddress = input.F_CompanyAddress;
369
-            if (!string.IsNullOrWhiteSpace(input.F_LegalName))
370
-                model.F_LegalName = input.F_LegalName;
371
-            if (!string.IsNullOrWhiteSpace(input.F_LegalIDCards))
372
-                model.F_LegalIDCards = input.F_LegalIDCards;
373
-            if (!string.IsNullOrWhiteSpace(input.F_LegalTel))
374
-                model.F_LegalTel = input.F_LegalTel;
375
-            if (!string.IsNullOrWhiteSpace(input.F_Qualification))
376
-                model.F_Qualification = input.F_Qualification;
377
-            if (!string.IsNullOrWhiteSpace(input.F_Layer))
378
-                model.F_Layer = input.F_Layer;
379
-            if (!string.IsNullOrWhiteSpace(input.F_InvoiceRange))
380
-                model.F_InvoiceRange = input.F_InvoiceRange;
381
-            if (!string.IsNullOrWhiteSpace(input.F_SubTrade))
382
-                model.F_SubTrade = input.F_SubTrade;
383
-            if (!string.IsNullOrWhiteSpace(input.F_TaxCategory))
384
-                model.F_TaxCategory = input.F_TaxCategory;
385
-            if (!string.IsNullOrWhiteSpace(input.F_TaxPointDes))
386
-                model.F_TaxPointDes = input.F_TaxPointDes;
387
-            if (!string.IsNullOrWhiteSpace(input.F_WxPassword))
388
-                model.F_WxPassword = input.F_WxPassword;
389
-            if (input.F_BeDept > 0)
390
-                model.F_BeDept = input.F_BeDept;
391
-            if (!string.IsNullOrWhiteSpace(input.F_FinancialManager))
392
-                model.F_FinancialManager = input.F_FinancialManager;
393
-            if (!string.IsNullOrWhiteSpace(input.F_BusinessOwner))
394
-                model.F_BusinessOwner = input.F_BusinessOwner;
395
-            if (!string.IsNullOrWhiteSpace(input.F_BeRelatedAcc))
396
-                model.F_BeRelatedAcc = input.F_BeRelatedAcc;
397
-            if (!string.IsNullOrWhiteSpace(input.F_BeAuditAcc))
398
-                model.F_BeAuditAcc = input.F_BeAuditAcc;
399
-            if (!string.IsNullOrWhiteSpace(input.F_BeMakeAcc))
400
-                model.F_BeMakeAcc = input.F_BeMakeAcc;
401
-            if (!string.IsNullOrWhiteSpace(input.F_Remark1))
402
-                model.F_Remark1 = input.F_Remark1;
403
-            if (!string.IsNullOrWhiteSpace(input.F_Remark2))
404
-                model.F_Remark2 = input.F_Remark2;
405
-            if (!string.IsNullOrWhiteSpace(input.F_Remark3))
406
-                model.F_Remark3 = input.F_Remark3;
407
-            if (!string.IsNullOrWhiteSpace(input.F_CusService))
408
-                model.F_CusService = input.F_CusService;
409
-            if (!string.IsNullOrWhiteSpace(input.F_HandoverDate))
410
-                model.F_HandoverDate = input.F_HandoverDate;
411
-            if (input.F_ISBankSlips > 0)
412
-                model.F_ISBankSlips = input.F_ISBankSlips;
413
-            else
414
-                model.F_ISBankSlips = 0;
415
-            if (!string.IsNullOrWhiteSpace(input.F_Address))
416
-                model.F_Address = input.F_Address;
417
-            if (!string.IsNullOrWhiteSpace(input.F_Address1))
418
-                model.F_Address1 = input.F_Address1;
419
-            if (!string.IsNullOrWhiteSpace(input.F_Address2))
420
-                model.F_Address2 = input.F_Address2;
421
-            if (!string.IsNullOrWhiteSpace(input.F_Address3))
422
-                model.F_Address3 = input.F_Address3;
423
-            if (!string.IsNullOrWhiteSpace(input.F_Address4))
424
-                model.F_Address4 = input.F_Address4;
425
-            if (!string.IsNullOrWhiteSpace(input.F_Charges))
426
-                model.F_Charges = input.F_Charges;
427
-            if (input.F_ChargeType > 0)
428
-                model.F_ChargeType = input.F_ChargeType;
429
-            if (!string.IsNullOrWhiteSpace(input.F_CompanyLogo))
430
-                model.F_CompanyLogo = input.F_CompanyLogo;
431
-            if (input.F_CycleStart != null)
432
-                model.F_CycleStart = input.F_CycleStart;
433
-            if (input.F_CycleEnd != null)
434
-                model.F_CycleEnd = input.F_CycleEnd;
435
-            if (!string.IsNullOrWhiteSpace(input.F_TaxNumber))
436
-                model.F_TaxNumber = input.F_TaxNumber;
437
-            if (input.F_FeeExpires != null)
438
-                model.F_FeeExpires = input.F_FeeExpires;
241
+            #region 基本字段
242
+            #endregion
439 243
             return model;
440 244
         }
441 245
 
442 246
         /// <summary>
443 247
         /// 验证客户编号是否唯一
444 248
         /// </summary>
445
-        private bool getunique(int id, string code,string name)
249
+        private bool getunique(int id, string code)
446 250
         {
447 251
             var sql = " F_DeleteFlag=0 ";
448
-            sql += "and (F_CustomerCode='" + code + "' or F_CompanyName='"+ name + "')";
252
+            sql += "and (F_CustomerCode='" + code + "')";
449 253
             if (id > 0)
450 254
                 sql += " and F_CustomerId<>"+id;
451 255
             var count=cusbll.GetModelList(sql).Count();
@@ -488,288 +292,42 @@ namespace CallCenterApi.Interface.Controllers.customer
488 292
                 return Error("获取参数失败");
489 293
             }
490 294
         }
491
-
492
-        /// <summary>
493
-        /// 重置密码
494
-        /// </summary>
495
-        /// <param name="ids"></param>
496
-        /// <returns></returns>
497
-        public ActionResult UpdatePWD(string[] ids)
498
-        {
499
-            if (ids != null && ids.Length > 0)
500
-            {
501
-                string idd = " ";
502
-                foreach (string str in ids)
503
-                {
504
-                    idd += str + ",";
505
-                }
506
-                if (!string.IsNullOrEmpty(idd.Trim()))
507
-                {
508
-                    if (cusbll.UpdatePWD(idd.TrimEnd(','),"123456"))
509
-                    {
510
-                        return Success("设置成功");
511
-                    }
512
-                    else
513
-                    {
514
-                        return Error("设置失败");
515
-                    }
516
-                }
517
-                else
518
-                {
519
-                    return Error("请选择用户");
520
-                }
521
-            }
522
-            else
523
-            {
524
-                return Error("获取参数失败");
525
-            }
526
-        }
527
-        #endregion
528
-        #region 联系人
529
-        /// <summary>
530
-        /// 获取客户联系人列表
531
-        /// </summary>
532
-        public ActionResult GetConList(string tel, string cusid, int pageindex = 1, int pagesize = 10)
533
-        {
534
-            string sql = "";
535
-            DataTable dt = new DataTable();
536
-            #region 筛选条件
537
-            if (!string.IsNullOrWhiteSpace(cusid))
538
-                sql += " and F_CustomerId=" + cusid + "";
539
-            if (!string.IsNullOrWhiteSpace(tel)) //联系人电话
540
-                sql += " and F_Telephone like '%" + tel + "%'";
541
-            #endregion
542
-            int recordCount = 0;
543
-            if (!string.IsNullOrWhiteSpace(sql))
544
-            {
545
-                sql += " and F_DeleteFlag=0";
546
-                dt = BLL.PagerBLL.GetListPager(
547
-                    "T_Cus_ContactPersonNew",
548
-                    "F_ManId",
549
-                    "*",
550
-                    sql,
551
-                    "ORDER BY F_ManId desc",
552
-                    pagesize,
553
-                    pageindex,
554
-                    true,
555
-                    out recordCount);
556
-            }
557
-            var obj = new
558
-            {
559
-                state = "success",
560
-                message = "成功",
561
-                rows = dt,
562
-                total = recordCount
563
-            };
564
-
565
-            return Content(obj.ToJson());
566
-
567
-        }
568
-        /// <summary>
569
-        /// 添加联系人
570
-        /// </summary>
571
-        /// <param name="coninput"></param>
572
-        /// <returns></returns>
573
-        public ActionResult AddContact(ContactPersonNewInput coninput)
574
-        {
575
-            string usercode = CurrentUser.UserData.F_UserCode;
576
-            #region 添加验证判断
577
-            if (coninput.F_CustomerId <= 0)
578
-                return Error("客户ID获取失败!");
579
-            #endregion
580
-            var conmodel = new Model.T_Cus_ContactPersonNew();
581
-            conmodel.F_CustomerId = coninput.F_CustomerId;
582
-            conmodel.F_IsMain = coninput.F_IsMain;
583
-            conmodel.F_Name = coninput.F_Name;
584
-            conmodel.F_Telephone = coninput.F_Telephone;
585
-            conmodel.F_Duties = coninput.F_Duties;
586
-            conmodel.F_Email = coninput.F_Email;
587
-            conmodel.F_MSN = coninput.F_MSN;
588
-            conmodel.F_QQ = coninput.F_QQ;
589
-            conmodel.F_Remark = coninput.F_Remark;
590
-            conmodel.F_CreateBy = usercode;
591
-            conmodel.F_CreateOn = DateTime.Now;
592
-            conmodel.F_DeleteFlag = 0;
593
-            int n = conbll.Add(conmodel);
594
-            if (n > 0)
595
-                return Success("联系人保存成功!");
596
-            else
597
-                return Error("联系人保存失败!");
598
-        }
599
-
600
-        /// <summary>
601
-        /// 修改联系人
602
-        /// </summary>
603
-        /// <param name="coninput"></param>
604
-        /// <returns></returns>
605
-        public ActionResult UpdateContact(ContactPersonNewInput coninput)
606
-        {
607
-            string usercode = CurrentUser.UserData.F_UserCode;
608
-            #region 添加验证判断
609
-            if (coninput.F_ManId <= 0)
610
-                return Error("参数错误!");
611
-            if (coninput.F_CustomerId <= 0)
612
-                return Error("客户ID获取失败!");
613
-            #endregion
614
-            var conmodel = conbll.GetModel(coninput.F_ManId);
615
-            conmodel.F_CustomerId = coninput.F_CustomerId;
616
-            conmodel.F_IsMain = coninput.F_IsMain;
617
-            conmodel.F_Name = coninput.F_Name;
618
-            conmodel.F_Telephone = coninput.F_Telephone;
619
-            conmodel.F_Duties = coninput.F_Duties;
620
-            conmodel.F_Email = coninput.F_Email;
621
-            conmodel.F_MSN = coninput.F_MSN;
622
-            conmodel.F_QQ = coninput.F_QQ;
623
-            conmodel.F_Remark = coninput.F_Remark;
624
-            var n = conbll.Update(conmodel);
625
-            if (n)
626
-                return Success("联系人保存成功!");
627
-            else
628
-                return Error("联系人保存失败!");
629
-        }
630
-
631
-        /// <summary>
632
-        /// 删除联系人
633
-        /// </summary>
634
-        /// <param name="ids"></param>
635
-        /// <returns></returns>
636
-        public ActionResult DelContact(string[] ids)
637
-        {
638
-            if (ids != null && ids.Length > 0)
639
-            {
640
-                string idd = " ";
641
-                foreach (string str in ids)
642
-                {
643
-                    idd += str + ",";
644
-                }
645
-                if (!string.IsNullOrEmpty(idd.Trim()))
646
-                {
647
-                    if (conbll.DeleteList(idd.TrimEnd(',')))
648
-                    {
649
-                        return Success("设置成功");
650
-                    }
651
-                    else
652
-                    {
653
-                        return Error("设置失败");
654
-                    }
655
-                }
656
-                else
657
-                {
658
-                    return Error("请选择联系人");
659
-                }
660
-            }
661
-            else
662
-            {
663
-                return Error("获取参数失败");
664
-            }
665
-        }
666
-        #endregion
667
-        #region 财税情况
668
-        /// <summary>
669
-        /// 根据客户id获取财税情况
670
-        /// </summary>
671
-        public ActionResult GetFinc(int cusid)
672
-        {
673
-            if (cusid != 0)
674
-            {
675
-                var model = finbll.GetModelList(" F_CustomerId=" + cusid).FirstOrDefault();
676
-                if (model != null)
677
-                    return Success("获取财税情况成功", model);
678
-            }
679
-            return Error("获取财税情况失败");
680
-        }
681
-        /// <summary>
682
-        /// 保存财税情况
683
-        /// </summary>
684
-        public ActionResult SaveFinance(CustomerFinanceInput input)
685
-        {
686
-            string usercode = CurrentUser.UserData.F_UserCode;
687
-            input.F_CreateBy = usercode;
688
-            var res = savefin(input);
689
-            if (res)
690
-                return Success("保存成功");
691
-            else
692
-                return Error("保存失败");
693
-        }
694
-        /// <summary>
695
-        /// 公用方法保存财税情况
696
-        /// </summary>
697
-        public bool savefin(CustomerFinanceInput input)
698
-        {
699
-            Model.T_Cus_CustomerFinance model = new Model.T_Cus_CustomerFinance();
700
-            if (input.F_CusFinId > 0)
701
-            {
702
-                model = finbll.GetModel(input.F_CusFinId);
703
-                if (model == null)
704
-                    model = new Model.T_Cus_CustomerFinance();
705
-            }
706
-            #region 设置信息
707
-            model.F_MonthState = input.F_MonthState;
708
-            model.F_AnnualIncome = input.F_AnnualIncome;
709
-            model.F_AnnualProfit = input.F_AnnualProfit;
710
-            model.F_AnnualPersonCount = input.F_AnnualPersonCount;
711
-            model.F_AnnualWages = input.F_AnnualWages;
712
-            model.F_AnnualCost = input.F_AnnualCost;
713
-            model.F_QuarterlyCost = input.F_QuarterlyCost;
714
-            model.F_QuarterlyPersonCount = input.F_QuarterlyPersonCount;
715
-            model.F_QuarterlyWages = input.F_QuarterlyWages;
716
-            model.F_QuarterlyIncome = input.F_QuarterlyIncome;
717
-            model.F_QPVAT = input.F_QPVAT;
718
-            model.F_QPSurtax = input.F_QPSurtax;
719
-            model.F_QPTaxes = input.F_QPTaxes;
720
-            model.F_QPConTax = input.F_QPConTax;
721
-            model.F_QPPerinTax = input.F_QPPerinTax;
722
-            model.F_QPStampTax = input.F_QPStampTax;
723
-            model.F_QPOtherTax = input.F_QPOtherTax;
724
-            #endregion
725
-            var res = false;
726
-            if (input.F_CusFinId > 0)
727
-            {
728
-                res = finbll.Update(model);
729
-            }
730
-            else
731
-            {
732
-                model.F_CustomerId = input.F_CustomerId;
733
-                model.F_CustomerCode = input.F_CustomerCode;
734
-                model.F_CreateBy = input.F_CreateBy;
735
-                model.F_CreatedOn = DateTime.Now;
736
-                model.F_DeleteFlag = 0;
737
-                res = finbll.Add(model)>0;
738
-            }
739
-            if (res)
740
-                savefinlog(input);
741
-            return res;
742
-        }
743
-        #region 财税情况日志
744
-        private void savefinlog(CustomerFinanceInput input)
745
-        {
746
-            var model = new Model.T_Cus_CustomerFinanceLog();
747
-            #region 设置信息
748
-            model.F_CustomerId = input.F_CustomerId;
749
-            model.F_CustomerCode = input.F_CustomerCode;
750
-            model.F_CreateBy = input.F_CreateBy;
751
-            model.F_CreatedOn = DateTime.Now;
752
-            model.F_DeleteFlag = 0;
753
-            model.F_MonthState = input.F_MonthState;
754
-            model.F_AnnualIncome = input.F_AnnualIncome;
755
-            model.F_AnnualProfit = input.F_AnnualProfit;
756
-            model.F_AnnualPersonCount = input.F_AnnualPersonCount;
757
-            model.F_AnnualWages = input.F_AnnualWages;
758
-            model.F_AnnualCost = input.F_AnnualCost;
759
-            model.F_QuarterlyCost = input.F_QuarterlyCost;
760
-            model.F_QuarterlyPersonCount = input.F_QuarterlyPersonCount;
761
-            model.F_QuarterlyWages = input.F_QuarterlyWages;
762
-            model.F_QuarterlyIncome = input.F_QuarterlyIncome;
763
-            model.F_QPVAT = input.F_QPVAT;
764
-            model.F_QPSurtax = input.F_QPSurtax;
765
-            model.F_QPTaxes = input.F_QPTaxes;
766
-            model.F_QPConTax = input.F_QPConTax;
767
-            model.F_QPPerinTax = input.F_QPPerinTax;
768
-            model.F_QPStampTax = input.F_QPStampTax;
769
-            model.F_QPOtherTax = input.F_QPOtherTax;
770
-            #endregion
771
-            new BLL.T_Cus_CustomerFinanceLog().Add(model);
772
-        }
295
+        #region 客户使用微信端才会使用
296
+        ///// <summary>
297
+        ///// 重置密码
298
+        ///// </summary>
299
+        ///// <param name="ids"></param>
300
+        ///// <returns></returns>
301
+        //public ActionResult UpdatePWD(string[] ids)
302
+        //{
303
+        //    if (ids != null && ids.Length > 0)
304
+        //    {
305
+        //        string idd = " ";
306
+        //        foreach (string str in ids)
307
+        //        {
308
+        //            idd += str + ",";
309
+        //        }
310
+        //        if (!string.IsNullOrEmpty(idd.Trim()))
311
+        //        {
312
+        //            if (cusbll.UpdatePWD(idd.TrimEnd(','),"123456"))
313
+        //            {
314
+        //                return Success("设置成功");
315
+        //            }
316
+        //            else
317
+        //            {
318
+        //                return Error("设置失败");
319
+        //            }
320
+        //        }
321
+        //        else
322
+        //        {
323
+        //            return Error("请选择用户");
324
+        //        }
325
+        //    }
326
+        //    else
327
+        //    {
328
+        //        return Error("获取参数失败");
329
+        //    }
330
+        //}
773 331
         #endregion
774 332
         #endregion
775 333
         #region 导入客户资料
@@ -779,6 +337,7 @@ namespace CallCenterApi.Interface.Controllers.customer
779 337
         public ActionResult ImportExcel()
780 338
         {
781 339
             string usercode = CurrentUser.UserData.F_UserCode;
340
+            string ip = DTRequest.GetIP();
782 341
             if (!string.IsNullOrWhiteSpace(usercode))
783 342
             {
784 343
                 HttpPostedFile _upFile = RequestString.GetFile("upFile");
@@ -788,7 +347,8 @@ namespace CallCenterApi.Interface.Controllers.customer
788 347
                     #region 上传文件
789 348
                     string filepath = "";
790 349
                     string datepath = DateTime.Now.ToString("yyyyMMddHHMMss");
791
-                    string aLastName = _upFile.FileName.Substring(_upFile.FileName.LastIndexOf(".") + 1, (_upFile.FileName.Length - _upFile.FileName.LastIndexOf(".") - 1)); //扩展名
350
+                    string aLastName = Path.GetExtension(_upFile.FileName);
351
+                    string oriname = Path.GetFileNameWithoutExtension(_upFile.FileName);
792 352
                     if (aLastName != "xls" && aLastName != "xlsx")
793 353
                     {
794 354
                         return Error("文件类型错误,请选择Excel文件");
@@ -802,156 +362,87 @@ namespace CallCenterApi.Interface.Controllers.customer
802 362
                     string PhysicalPath = Server.MapPath(filepath);
803 363
                     _upFile.SaveAs(PhysicalPath);
804 364
                     #endregion
805
-                    DataTable dt = new DataTable();
806
-                    #region 读取excel中内容
807
-                    IWorkbook workbook = null;
808
-
809
-                    using (FileStream file = new FileStream(PhysicalPath, FileMode.Open, FileAccess.Read))
810
-                    {
811
-                        if (aLastName == "xlsx") // 2007版本
812
-                        {
813
-                            workbook = new XSSFWorkbook(file);
814
-                        }
815
-                        else if (aLastName == "xls") // 2003版本
816
-                        {
817
-                            workbook = new HSSFWorkbook(file);
818
-                        }
819
-                    }
820
-                    ISheet sheet = workbook.GetSheetAt(0);
821
-                    
822
-                    System.Collections.IEnumerator rows = sheet.GetRowEnumerator();
823
-                    //获取sheet的第一行
824
-                    IRow headerRow = sheet.GetRow(headrow);
825
-                    int cellCount = headerRow.LastCellNum;
826
-                    if (cellCount < 1)
827
-                        return Error("文件标题没有数据");
828
-                    for (int j = 0; j < cellCount; j++)
829
-                    {
830
-                        ICell cell = headerRow.GetCell(j);
831
-                        dt.Columns.Add(cell.ToString());
832
-                    }
365
+                    #region 添加附件日志
366
+                    Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
367
+                    model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
368
+                    model_T_Sys_Accessories.F_FileName = newpath;//附件名称
369
+                    model_T_Sys_Accessories.F_FileType = aLastName;//附件类型
370
+                    model_T_Sys_Accessories.F_FileUrl = filepath;//附件地址
371
+                    model_T_Sys_Accessories.F_UserCode = usercode;//上传人  
372
+                    model_T_Sys_Accessories.F_OriName = oriname;
373
+                    int fid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
833 374
                     #endregion
834
-                    int count = 0;
835
-                    for (int i = (sheet.FirstRowNum + headrow + 1); i <= sheet.LastRowNum; i++)
375
+                    NPOIHelper np = new NPOIHelper();
376
+                    DataTable dt = np.ExcelToTable(_upFile, headrow);
377
+                    string msg = string.Empty;
378
+                    if (dt == null || dt.Rows.Count == 0)
379
+                        return Error("文件没有数据");
380
+                    else
836 381
                     {
837
-                        #region 数据入库
838
-                        IRow row = sheet.GetRow(i);
839
-                        DataRow dataRow = dt.NewRow();
840
-
841
-                        for (int j = row.FirstCellNum; j < cellCount; j++)
842
-                        {
843
-                            if (row.GetCell(j) != null)
844
-                                dataRow[j] = row.GetCell(j).ToString();
845
-                        }
846
-                        dt.Rows.Add(dataRow);
847
-                        if (dt.Rows.Count < 1)
848
-                            return Error("文件内容没有数据");
849
-                        
850
-                        var cusmodel = new Model.T_Cus_CustomerBaseNew();
851
-                        var conmodel = new Model.T_Cus_ContactPersonNew();
852
-                        #region  信息对应
853
-                        //报税会计  做账会计  编号  客服  公司名称  负责人电话       交接日期
854
-                        if ((dataRow["编号"] == null || dataRow["编号"].ToString() == "")
855
-                            || (dataRow["公司名称"] == null || dataRow["公司名称"].ToString() == ""))
856
-                        { continue; }
857
-                        cusmodel.F_CustomerCode = dataRow["编号"].ToString();
858
-                        cusmodel.F_CompanyName = dataRow["公司名称"].ToString();
859
-                        //判断编号唯一
860
-                        if (getunique(0, cusmodel.F_CustomerCode, cusmodel.F_CompanyName))
861
-                            continue;
862
-                        #region 处理关键字
863
-                        var keyword = cusmodel.F_CompanyName;
864
-                        var keyconfig = Configs.GetValue("keystring");
865
-                        var keystring = keyconfig.Split(',');
866
-                        foreach (var item in keystring)
867
-                        {
868
-                            if (cusmodel.F_CompanyName.Contains(item))
869
-                                keyword = keyword.Replace(item, "");
870
-                        }
871
-                        cusmodel.F_KeyWords = keyword;
872
-                        #endregion
873
-                        cusmodel.F_BeRelatedAcc = dataRow["报税会计"].ToString();
874
-                        cusmodel.F_BeMakeAcc = dataRow["做账会计"].ToString();
875
-                        cusmodel.F_HandoverDate = dataRow["交接日期"].ToString();
876
-                        cusmodel.F_CusService = dataRow["客服"].ToString();
877
-                        cusmodel.F_CompanyAddress= dataRow["公司地址"].ToString();
878
-                        cusmodel.F_RegisteredAddress = dataRow["注册地址"].ToString();
879
-                        cusmodel.F_Address = dataRow["地址"].ToString();
880
-                        cusmodel.F_Address1 = dataRow["地址1"].ToString();
881
-                        cusmodel.F_Address2 = dataRow["地址2"].ToString();
882
-                        cusmodel.F_Address3 = dataRow["地址3"].ToString();
883
-                        cusmodel.F_Address4 = dataRow["地址4"].ToString();
884
-                        cusmodel.F_WxPassword = "123456";
885
-                        cusmodel.F_CreateBy = usercode;
886
-                        cusmodel.F_CreatedOn = DateTime.Now;
887
-                        cusmodel.F_DeleteFlag = 0;
888
-                        #endregion
889
-                        int n = cusbll.Add(cusmodel);
890
-
891
-                        if (n > 0)
382
+                        Model.T_Cus_CustomerBaseNew dModel = new Model.T_Cus_CustomerBaseNew();
383
+                        dModel.F_CreateBy = usercode;
384
+                        dModel.F_IsDelete = 0;
385
+                        dModel.F_FileId = fid;
386
+                        foreach (DataRow dr in dt.Rows)
892 387
                         {
893
-                            #region 添加联系人
894
-                            conmodel.F_CustomerId = n;
895
-                            conmodel.F_CreateBy = usercode;
896
-                            conmodel.F_CreateOn = DateTime.Now;
897
-                            conmodel.F_DeleteFlag = 0;
898
-                            conmodel.F_IsMain = true;
899
-                            if ((dataRow["负责人电话"] != null && dataRow["负责人电话"].ToString() != "")
900
-                                   || (dataRow["负责人姓名"] != null && dataRow["负责人姓名"].ToString() != ""))
388
+                            #region 数据入库
389
+                            headrow = headrow + 1;
390
+                            
391
+                            if (dr["客户编号"].ToString() != "" && valcode(dr["客户编号"].ToString()))
901 392
                             {
902
-                                if (dataRow["负责人电话"] != null && dataRow["负责人电话"].ToString() != "")
903
-                                    conmodel.F_Telephone = dataRow["负责人电话"].ToString();
904
-                                if (dataRow["负责人姓名"] != null && dataRow["负责人姓名"].ToString() != "")
905
-                                    conmodel.F_Name = dataRow["负责人姓名"].ToString();
906
-                                conbll.Add(conmodel);
907
-                            }
908
-                            for (int nn = 0; nn <= 10; nn++)
909
-                            {
910
-                                if ((dataRow["负责人电话" + nn.ToString()] != null && dataRow["负责人电话" + nn.ToString()].ToString() != "") 
911
-                                    || (dataRow["负责人姓名" + nn.ToString()] != null && dataRow["负责人姓名" + nn.ToString()].ToString() != ""))
393
+                                dModel.F_CustomerCode = dr["客户编号"].ToString();
394
+                                #region
395
+                                #endregion
396
+                                dModel.F_CreateOn = DateTime.Now;
397
+                                var res = cusbll.Add(dModel);
398
+                                if (res > 0)
912 399
                                 {
913
-                                    if (dataRow["负责人电话" + nn.ToString()] != null && dataRow["负责人电话" + nn.ToString()].ToString() != "")
914
-                                        conmodel.F_Telephone = dataRow["负责人电话" + nn.ToString()].ToString();
915
-                                    if (dataRow["负责人姓名" + nn.ToString()] != null && dataRow["负责人姓名" + nn.ToString()].ToString() != "")
916
-                                        conmodel.F_Name = dataRow["负责人姓名" + nn.ToString()].ToString();
917
-                                    conbll.Add(conmodel);
400
+                                    addoptlog(usercode, ip, EnumOpt.import.ToString(), res.ToString(), "导入成功,导入的文件为:" + newpath + ",当前为第" + headrow + "行");
918 401
                                 }
919
-                            }
402
+                                else
403
+                                {
920 404
 
405
+                                    msg = msg + "第" + headrow + "行,导入失败<br>";
406
+                                }
407
+                            }
408
+                            else
409
+                                msg = msg + "第" + headrow + "行,物料编号为空或格式不正确,未导入<br>";
921 410
                             #endregion
922
-                            #region 添加财税情况
923
-                            var finmodel = new Model.T_Cus_CustomerFinance();
924
-                            finmodel.F_CustomerId = n;
925
-                            finbll.Add(finmodel);
926
-                            #endregion
927
-                            count++;
928
-                        }
929
-                        #endregion
930
-                    }
931
-                    if (dt == null || dt.Rows.Count == 0)
932
-                        return Error("文件没有数据");
933
-                    else
934
-                    {
935
-                        var jstr = DataTableToJson(dt);
936
-                        if (count > 0)
937
-                        {
938
-                            return Success("导入成功 " + count + "条信息", jstr);
939 411
                         }
412
+                        if (string.IsNullOrEmpty(msg))
413
+                            return Success("导入成功 " );
940 414
                         else
941
-                        {
942
-                            return Success("导入成功 " + count + "条信息", jstr);
943
-                        }
415
+                            return Error(msg);
944 416
                     }
945 417
                 }
946 418
                 return Error("数据源上传失败");
947 419
             }
948 420
             return Error("用户登录失败,请重新登录");
949 421
         }
950
-        public string DataTableToJson(DataTable dt)
422
+        #endregion
423
+        #region 私有方法
424
+        /// <summary>
425
+        /// 验证物料编码为10位纯数字
426
+        /// </summary>
427
+        private bool valcode(string code)
428
+        {
429
+            var res = false;
430
+            //11位数字
431
+            if (code.Length == 11 && Regex.IsMatch(code, @"^\d{10}$"))
432
+                res = true;
433
+            return res;
434
+        }
435
+        /// <summary>
436
+        /// 操作日志
437
+        /// </summary>
438
+        /// <param name="usercode">操作人工号</param>
439
+        /// <param name="ip">操作人IP</param>
440
+        /// <param name="optcode">操作编号</param>
441
+        /// <param name="optid">操作id</param>
442
+        /// <param name="des">操作描述</param>
443
+        private void addoptlog(string usercode, string ip, string optcode, string optid, string des)
951 444
         {
952
-            string JsonString = string.Empty;
953
-            JsonString = JsonConvert.SerializeObject(dt);
954
-            return JsonString;
445
+            new BLL.T_Sys_OperateLogs().AddOptLog("客户管理", usercode, ip, des, optcode, "T_Cus_CustomerBaseNew", optid);
955 446
         }
956 447
         #endregion
957 448
     }

+ 9 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -123,25 +123,26 @@ namespace CallCenterApi.Interface.Controllers.tel
123 123
             if (Request.IsAuthenticated)
124 124
             {
125 125
                 string tel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
126
-                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() + "%')";
126
+                //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() + "%')";
127
+                var sql = $" ( F_CompanyName like '%" + tel.Trim() + "%' or F_CustomerCode like '%" + tel.Trim() + "%' ) ";
127 128
 
128 129
                 var userModel = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_DeleteFlag = 0 " + sql);
129 130
                 if (userModel.Count() > 0)
130 131
                 {
131 132
                     var model = userModel.Last();
132 133
                     int cusid = model.F_CustomerId;
133
-                    var conlist = new BLL.T_Cus_ContactPersonNew().GetModelList(" F_DeleteFlag=0 and  F_CustomerId=" + cusid);
134
+                    //var conlist = new BLL.T_Cus_ContactPersonNew().GetModelList(" F_DeleteFlag=0 and  F_CustomerId=" + cusid);
134 135
                     #region 绑定部门
135
-                    var deptname = "";
136
-                    var deptmodel = new BLL.T_Sys_Department().GetModel(model.F_BeDept.Value);
137
-                    if (deptmodel != null)
138
-                        deptname = deptmodel.F_DeptName;
136
+                    //var deptname = "";
137
+                    //var deptmodel = new BLL.T_Sys_Department().GetModel(model.F_BeDept.Value);
138
+                    //if (deptmodel != null)
139
+                    //    deptname = deptmodel.F_DeptName;
139 140
                     #endregion
140 141
                     var obj = new
141 142
                     {
142 143
                         CustomerBase = model,
143
-                        BeDeptName = deptname,
144
-                        ContactList = conlist,
144
+                        //BeDeptName = deptname,
145
+                        //ContactList = conlist,
145 146
                     };
146 147
                     return Success("获取成功", obj);
147 148
                 }

+ 121 - 121
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -143,42 +143,42 @@ namespace CallCenterApi.Interface.Controllers.weixin
143 143
                 }
144 144
                 return Error("账号或密码错误,请重新登录");
145 145
             }
146
-            else if (login.UserType == 5)
147
-            {
148
-                //客户档案登录 - 用戶信息不存在时,登录客户档案业主账号
149
-                Dictionary<string, string> paras_Customer = new Dictionary<string, string>();
150
-                // F_RelationShipClassID IN (1,2) 用户类型:0来电用户; 1准业主; 2不是准业主或是亲戚朋友
151
-                //首次密码默认为身份证后6位信息
152
-                //F_CustomerClassID >= 0 为业主或租户,且F_RelationShipClassID = 0为会员账号 2、登录最早的信息
153
-                string sql_Customer = " select * from dbo.T_Cus_CustomerBaseNew (NOLOCK) where F_CustomerCode=@F_UserCode and F_WxPassword=@F_PassWord and F_DeleteFlag = 0 ORDER BY F_CreatedOn ASC ";
154
-                paras_Customer.Add("@F_UserCode", login.UserCode);
155
-                paras_Customer.Add("@F_PassWord", login.Password);
156
-                var dt_Customer = DbHelperSQL.Query(sql_Customer, paras_Customer).Tables[0];
157
-
158
-                if (dt_Customer != null && dt_Customer.Rows.Count > 0)
159
-                {
160
-                    //var customer = customerBaseBLL.GetModel(login.UserCode);  //20180926 次方法查询有漏洞
161
-                    var customer = customerBaseBLL.DataTableToList(dt_Customer).ToList().FirstOrDefault();
162
-                    customer.F_WxOpenId = login.OpenId;
163
-
164
-                    #region 新加 - 登录后同时获取用户账号,openid,和角色
165
-                    //5--业主(客户档案会员) 
166
-                    //int UserType = 5;
167
-                    var obj = new
168
-                    {
169
-                        openid = login.OpenId,
170
-                        usercode = login.UserCode,
171
-                        companyname = customer.F_CompanyName,
172
-                        companyaddress=customer.F_CompanyAddress,
173
-                    };
174
-                    #endregion
175
-                    if (customerBaseBLL.Update(customer))
176
-                        return Success("绑定成功!", obj);
177
-                    else
178
-                        return Error("绑定失败!");
179
-                }
180
-                return Error("账号或密码错误或者没有注册,请重新登录");
181
-            }
146
+            //else if (login.UserType == 5)
147
+            //{
148
+            //    //客户档案登录 - 用戶信息不存在时,登录客户档案业主账号
149
+            //    Dictionary<string, string> paras_Customer = new Dictionary<string, string>();
150
+            //    // F_RelationShipClassID IN (1,2) 用户类型:0来电用户; 1准业主; 2不是准业主或是亲戚朋友
151
+            //    //首次密码默认为身份证后6位信息
152
+            //    //F_CustomerClassID >= 0 为业主或租户,且F_RelationShipClassID = 0为会员账号 2、登录最早的信息
153
+            //    string sql_Customer = " select * from dbo.T_Cus_CustomerBaseNew (NOLOCK) where F_CustomerCode=@F_UserCode and F_WxPassword=@F_PassWord and F_DeleteFlag = 0 ORDER BY F_CreatedOn ASC ";
154
+            //    paras_Customer.Add("@F_UserCode", login.UserCode);
155
+            //    paras_Customer.Add("@F_PassWord", login.Password);
156
+            //    var dt_Customer = DbHelperSQL.Query(sql_Customer, paras_Customer).Tables[0];
157
+
158
+            //    if (dt_Customer != null && dt_Customer.Rows.Count > 0)
159
+            //    {
160
+            //        //var customer = customerBaseBLL.GetModel(login.UserCode);  //20180926 次方法查询有漏洞
161
+            //        var customer = customerBaseBLL.DataTableToList(dt_Customer).ToList().FirstOrDefault();
162
+            //        customer.F_WxOpenId = login.OpenId;
163
+
164
+            //        #region 新加 - 登录后同时获取用户账号,openid,和角色
165
+            //        //5--业主(客户档案会员) 
166
+            //        //int UserType = 5;
167
+            //        var obj = new
168
+            //        {
169
+            //            openid = login.OpenId,
170
+            //            usercode = login.UserCode,
171
+            //            companyname = customer.F_CompanyName,
172
+            //            //companyaddress=customer.F_CompanyAddress,
173
+            //        };
174
+            //        #endregion
175
+            //        if (customerBaseBLL.Update(customer))
176
+            //            return Success("绑定成功!", obj);
177
+            //        else
178
+            //            return Error("绑定失败!");
179
+            //    }
180
+            //    return Error("账号或密码错误或者没有注册,请重新登录");
181
+            //}
182 182
             return Error("绑定失败");
183 183
         }
184 184
 
@@ -605,92 +605,92 @@ namespace CallCenterApi.Interface.Controllers.weixin
605 605
         //}
606 606
         #endregion
607 607
         #region 获取公司详情
608
-        //获取公司信息
609
-        [WechatActionFilter]
610
-        public ActionResult GetInfo()
611
-        {
612
-            string stropenid = HttpUtility.UrlDecode(RequestString.GetQueryString("openid"));
613
-            if (string.IsNullOrEmpty(stropenid))
614
-                return Error("参数错误!");
615
-            var model=customerBaseBLL.GetModelByOpenid(stropenid);
616
-            if (model != null)
617
-            {
618
-                var sqlwo = " IsDel=0 and State <>2 "; var sqlno = " F_isDel=0 ";
619
-                var nowUser = userAccountBLL.GetModelByOpenid(stropenid);
620
-                var nowCus = customerBaseBLL.GetModelByOpenid(stropenid);
621
-                if (nowUser != null)
622
-                {
623
-                    workorder.WorkOrderController wo = new workorder.WorkOrderController();
624
-                    sqlwo += " and State =1 and WorkOrderID in ( '" + wo.GetDWCWorkOrderID(nowUser.F_UserCode) + "') ";
625
-                    sqlno += " and (ISNULL(F_UserId,'') = '' or ISNULL(F_UserId,'') like '%," + nowUser.F_UserId + ",%')";
626
-                }
627
-                else if (nowCus != null)
628
-                {
629
-                    sqlwo += " and ( CustomerID=" + model.F_CustomerId + " or County like '%" + model.F_CompanyName + "%' )";
630
-                    sqlno += " and F_isCus=1 and F_NoticeId not in (select toid from T_Msg_List where Type=6 and ToUser='"+nowCus.F_CustomerCode+ "' and state=1 and IsDel=0)";
631
-                }
632
-                var ordercount = woBLL.GetRecordCount(sqlwo);
633
-                var noticecount = new BLL.T_Msg_NoticeInfo().GetRecordCount(sqlno);
634
-
635
-                var obj = new
636
-                {
637
-                    model.F_CompanyName,//公司名称
638
-                    model.F_CompanyLogo,//logo
639
-                    model.F_CustomerCode,//编号
640
-                    model.F_CycleStart,//服务周期-开始时间
641
-                    model.F_CycleEnd,//服务周期-结束时间
642
-                    model.F_ChargeType,//收费类型:1月度,2季度,3年度
643
-                    model.F_Charges,//收费
644
-                    model.F_TaxNumber,//公司税号
645
-                    model.F_CompanyAddress,//公司地址
646
-                    ordercount,//待处理工单数量
647
-                    noticecount,//未读公告数量
648
-                };
649
-                return Success("获取成功", obj);
650
-            }
651
-            return Error("获取失败");
652
-        }
653
-        //获取财税信息
608
+        ////获取公司信息
654 609
         //[WechatActionFilter]
655
-        public ActionResult GetFinc()
656
-        {
657
-            string stropenid = HttpUtility.UrlDecode(RequestString.GetQueryString("openid"));
658
-            var model = customerBaseBLL.GetModelByOpenid(stropenid);
659
-            if (model != null)
660
-            {
661
-                var finmodel = finbll.GetModelList(" F_CustomerId=" + model.F_CustomerId).FirstOrDefault();
662
-                if (finmodel != null)
663
-                {
664
-                    var obj = new
665
-                    {
666
-                        model.F_CompanyName,//公司名称
667
-                        model.F_CompanyLogo,//logo
668
-                        model.F_CustomerCode,//编号
669
-                        finmodel.F_CusFinId,
670
-                        finmodel.F_CustomerId,
671
-                        finmodel.F_MonthState,
672
-                        finmodel.F_AnnualIncome,
673
-                        finmodel.F_AnnualProfit,
674
-                        finmodel.F_AnnualCost,
675
-                        finmodel.F_AnnualPersonCount,
676
-                        finmodel.F_AnnualWages,
677
-                        finmodel.F_QuarterlyCost,
678
-                        finmodel.F_QuarterlyPersonCount,
679
-                        finmodel.F_QuarterlyWages,
680
-                        finmodel.F_QuarterlyIncome,
681
-                        finmodel.F_QPVAT,
682
-                        finmodel.F_QPSurtax,
683
-                        finmodel.F_QPTaxes,
684
-                        finmodel.F_QPConTax,
685
-                        finmodel.F_QPPerinTax,
686
-                        finmodel.F_QPStampTax,
687
-                        finmodel.F_QPOtherTax
688
-                    };
689
-                    return Success("获取成功", obj);
690
-                }
691
-            }
692
-            return Error("获取失败");
693
-        }
610
+        //public ActionResult GetInfo()
611
+        //{
612
+        //    string stropenid = HttpUtility.UrlDecode(RequestString.GetQueryString("openid"));
613
+        //    if (string.IsNullOrEmpty(stropenid))
614
+        //        return Error("参数错误!");
615
+        //    var model=customerBaseBLL.GetModelByOpenid(stropenid);
616
+        //    if (model != null)
617
+        //    {
618
+        //        var sqlwo = " IsDel=0 and State <>2 "; var sqlno = " F_isDel=0 ";
619
+        //        var nowUser = userAccountBLL.GetModelByOpenid(stropenid);
620
+        //        var nowCus = customerBaseBLL.GetModelByOpenid(stropenid);
621
+        //        if (nowUser != null)
622
+        //        {
623
+        //            workorder.WorkOrderController wo = new workorder.WorkOrderController();
624
+        //            sqlwo += " and State =1 and WorkOrderID in ( '" + wo.GetDWCWorkOrderID(nowUser.F_UserCode) + "') ";
625
+        //            sqlno += " and (ISNULL(F_UserId,'') = '' or ISNULL(F_UserId,'') like '%," + nowUser.F_UserId + ",%')";
626
+        //        }
627
+        //        else if (nowCus != null)
628
+        //        {
629
+        //            sqlwo += " and ( CustomerID=" + model.F_CustomerId + " or County like '%" + model.F_CompanyName + "%' )";
630
+        //            sqlno += " and F_isCus=1 and F_NoticeId not in (select toid from T_Msg_List where Type=6 and ToUser='"+nowCus.F_CustomerCode+ "' and state=1 and IsDel=0)";
631
+        //        }
632
+        //        var ordercount = woBLL.GetRecordCount(sqlwo);
633
+        //        var noticecount = new BLL.T_Msg_NoticeInfo().GetRecordCount(sqlno);
634
+
635
+        //        var obj = new
636
+        //        {
637
+        //            model.F_CompanyName,//公司名称
638
+        //            model.F_CompanyLogo,//logo
639
+        //            model.F_CustomerCode,//编号
640
+        //            model.F_CycleStart,//服务周期-开始时间
641
+        //            model.F_CycleEnd,//服务周期-结束时间
642
+        //            model.F_ChargeType,//收费类型:1月度,2季度,3年度
643
+        //            model.F_Charges,//收费
644
+        //            model.F_TaxNumber,//公司税号
645
+        //            model.F_CompanyAddress,//公司地址
646
+        //            ordercount,//待处理工单数量
647
+        //            noticecount,//未读公告数量
648
+        //        };
649
+        //        return Success("获取成功", obj);
650
+        //    }
651
+        //    return Error("获取失败");
652
+        //}
653
+        ////获取财税信息
654
+        ////[WechatActionFilter]
655
+        //public ActionResult GetFinc()
656
+        //{
657
+        //    string stropenid = HttpUtility.UrlDecode(RequestString.GetQueryString("openid"));
658
+        //    var model = customerBaseBLL.GetModelByOpenid(stropenid);
659
+        //    if (model != null)
660
+        //    {
661
+        //        var finmodel = finbll.GetModelList(" F_CustomerId=" + model.F_CustomerId).FirstOrDefault();
662
+        //        if (finmodel != null)
663
+        //        {
664
+        //            var obj = new
665
+        //            {
666
+        //                model.F_CompanyName,//公司名称
667
+        //                model.F_CompanyLogo,//logo
668
+        //                model.F_CustomerCode,//编号
669
+        //                finmodel.F_CusFinId,
670
+        //                finmodel.F_CustomerId,
671
+        //                finmodel.F_MonthState,
672
+        //                finmodel.F_AnnualIncome,
673
+        //                finmodel.F_AnnualProfit,
674
+        //                finmodel.F_AnnualCost,
675
+        //                finmodel.F_AnnualPersonCount,
676
+        //                finmodel.F_AnnualWages,
677
+        //                finmodel.F_QuarterlyCost,
678
+        //                finmodel.F_QuarterlyPersonCount,
679
+        //                finmodel.F_QuarterlyWages,
680
+        //                finmodel.F_QuarterlyIncome,
681
+        //                finmodel.F_QPVAT,
682
+        //                finmodel.F_QPSurtax,
683
+        //                finmodel.F_QPTaxes,
684
+        //                finmodel.F_QPConTax,
685
+        //                finmodel.F_QPPerinTax,
686
+        //                finmodel.F_QPStampTax,
687
+        //                finmodel.F_QPOtherTax
688
+        //            };
689
+        //            return Success("获取成功", obj);
690
+        //        }
691
+        //    }
692
+        //    return Error("获取失败");
693
+        //}
694 694
         #endregion
695 695
         #region 工单
696 696
         /// <summary>

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/MaterialManageController.cs

@@ -219,6 +219,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
219 219
         public ActionResult ImportExcel()
220 220
         {
221 221
             string userscode = CurrentUser.UserData.F_UserCode;
222
+            string ip = DTRequest.GetIP();
222 223
             HttpPostedFile _upFile = RequestString.GetFile("upFile");
223 224
             if (_upFile != null)
224 225
             {
@@ -263,10 +264,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
263 264
                         #region 数据入库
264 265
                         headrow = headrow + 1;
265 266
                         
266
-                        if (dr["物料管理"].ToString() != "" && valcode(dr["物料管理"].ToString()))
267
+                        if (dr["物料编号"].ToString() != "" && valcode(dr["物料编号"].ToString()))
267 268
                         {
268 269
                             Model.T_Wo_MaterialManage dModel = new Model.T_Wo_MaterialManage();
269
-                            dModel.F_MaterialCode = dr["物料管理"].ToString();//物料编号
270
+                            dModel.F_MaterialCode = dr["物料编号"].ToString();//物料编号
270 271
                             dModel.F_MaterialName = dr["物料名称"].ToString();//物料名称
271 272
                             dModel.F_Model = dr["型号"].ToString();//型号
272 273
                             dModel.F_Specs = dr["规格"].ToString();//规格
@@ -283,11 +284,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
283 284
                             var res = mmBLL.Add(dModel);
284 285
                             if(res>0)
285 286
                             {
286
-                                addoptlog(userscode, DTRequest.GetIP(), EnumOpt.import.ToString(), res.ToString(), "导入成功,导入的文件为:"+ newpath+",当前为第"+ headrow + "行");
287
+                                addoptlog(userscode, ip, EnumOpt.import.ToString(), res.ToString(), "导入成功,导入的文件为:"+ newpath+",当前为第"+ headrow + "行");
287 288
                             }
288 289
                             else
289 290
                             {
290
-                                
291 291
                                 msg = msg + "第" + headrow + "行,导入失败<br>";
292 292
                             }
293 293
                         }

+ 63 - 267
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/CustomerBaseNewInput.cs

@@ -11,9 +11,8 @@ namespace CallCenterApi.Interface.Models.Input
11 11
         /// 自增ID
12 12
         /// </summary>
13 13
         public int F_CustomerId { set; get; }
14
-
15 14
         /// <summary>
16
-        /// 客户编号
15
+        /// 客户编号:10位数字
17 16
         /// </summary>
18 17
         public string F_CustomerCode { set; get; }
19 18
         /// <summary>
@@ -21,335 +20,132 @@ namespace CallCenterApi.Interface.Models.Input
21 20
         /// </summary>
22 21
         public string F_CompanyName { set; get; }
23 22
         /// <summary>
24
-        /// 关键字
25
-        /// </summary>
26
-        public string F_KeyWords { set; get; }
27
-        /// <summary>
28
-        /// 公司地址
29
-        /// </summary>
30
-        public string F_CompanyAddress { set; get; }
31
-        /// <summary>
32
-        /// 注册地址
33
-        /// </summary>
34
-        public string F_RegisteredAddress { set; get; }
35
-        /// <summary>
36
-        /// 法人姓名
37
-        /// </summary>
38
-        public string F_LegalName { set; get; }
39
-        /// <summary>
40
-        /// 法人身份证
41
-        /// </summary>
42
-        public string F_LegalIDCards { set; get; }
43
-        /// <summary>
44
-        /// 法人电话
45
-        /// </summary>
46
-        public string F_LegalTel { set; get; }
47
-        /// <summary>
48
-        /// 所属行业 KHSSHY
49
-        /// </summary>
50
-        public string F_SubTrade { set; get; }
51
-        /// <summary>
52
-        /// 税务类别 SWLB
53
-        /// </summary>
54
-        public string F_TaxCategory { set; get; }
55
-        /// <summary>
56
-        /// 税点描述
57
-        /// </summary>
58
-        public string F_TaxPointDes { set; get; }
59
-        /// <summary>
60
-        /// 开票范围
61
-        /// </summary>
62
-        public string F_InvoiceRange { set; get; }
63
-        /// <summary>
64
-        /// 企业资质荣誉
65
-        /// </summary>
66
-        public string F_Qualification { set; get; }
67
-        /// <summary>
68
-        /// 客户信誉等级 KHLayer
69
-        /// </summary>
70
-        public string F_Layer { set; get; }
71
-        /// <summary>
72
-        /// 客户归属部门
23
+        /// 大区ID
73 24
         /// </summary>
74
-        public int? F_BeDept { set; get; }
25
+        public string F_AreaID { set; get; }
75 26
         /// <summary>
76
-        /// 客户公司财务负责人
27
+        /// 分公司ID
77 28
         /// </summary>
78
-        public string F_FinancialManager { set; get; }
29
+        public string F_BranchID { set; get; }
79 30
         /// <summary>
80
-        /// 客户归属业务负责人
31
+        /// 业务员
81 32
         /// </summary>
82
-        public string F_BusinessOwner { set; get; }
33
+        public string F_Salesman { set; get; }
83 34
         /// <summary>
84
-        /// 客户归属涉税会计
35
+        /// 业务员电话
85 36
         /// </summary>
86
-        public string F_BeRelatedAcc { set; get; }
37
+        public string F_SalesPhone { set; get; }
87 38
         /// <summary>
88
-        /// 客户归属审核会计
39
+        /// 客户性质
89 40
         /// </summary>
90
-        public string F_BeAuditAcc { set; get; }
41
+        public string F_CustomerNature { set; get; }
91 42
         /// <summary>
92
-        /// 客户归属做账会计
43
+        /// 渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工
93 44
         /// </summary>
94
-        public string F_BeMakeAcc { set; get; }
45
+        public string F_Channel { set; get; }
95 46
         /// <summary>
96
-        /// 微信登录密码
47
+        /// 信用等级:一星、二星、三星、四星、五星、空
97 48
         /// </summary>
98
-        public string F_WxPassword { set; get; }
49
+        public string F_Credit { set; get; }
99 50
         /// <summary>
100
-        /// 微信openid
51
+        /// 法人
101 52
         /// </summary>
102
-        public string F_WxOpenId { set; get; }
53
+        public string F_Legal { set; get; }
103 54
         /// <summary>
104
-        /// 备注1
105
-        /// </summary>
106
-        public string F_Remark1 { set; get; }
107
-        /// <summary>
108
-        /// 备注2
109
-        /// </summary>
110
-        public string F_Remark2 { set; get; }
111
-        /// <summary>
112
-        /// 备注3
113
-        /// </summary>
114
-        public string F_Remark3 { set; get; }
115
-        /// <summary>
116
-		/// 客服
117
-		/// </summary>
118
-		public string F_CusService { set; get; }
119
-        /// <summary>
120
-        /// 交接日期
55
+        /// 法人电话
121 56
         /// </summary>
122
-        public string F_HandoverDate { set; get; }
57
+        public string F_LegalPhone { set; get; }
123 58
         /// <summary>
124
-        /// 是否需要去银行拿回单(一般纳税人)
59
+        /// 省
125 60
         /// </summary>
126
-        public int? F_ISBankSlips { set; get; }
61
+        public string F_AddressProvince { set; get; }
127 62
         /// <summary>
128
-        /// 联系地址
63
+        /// 市
129 64
         /// </summary>
130
-        public string F_Address { set; get; }
65
+        public string F_AddressCity { set; get; }
131 66
         /// <summary>
132
-        /// 联系地址1
67
+        /// 县
133 68
         /// </summary>
134
-        public string F_Address1 { set; get; }
69
+        public string F_AddressCountry { set; get; }
135 70
         /// <summary>
136
-        /// 联系地址2
71
+        /// 乡
137 72
         /// </summary>
138
-        public string F_Address2 { set; get; }
73
+        public string F_AddressTownship { set; get; }
139 74
         /// <summary>
140
-        /// 联系地址3
75
+        /// 详细地址
141 76
         /// </summary>
142
-        public string F_Address3 { set; get; }
77
+        public string F_AddressFull { set; get; }
143 78
         /// <summary>
144
-        /// 联系地址4
79
+        /// 经营品牌:心连心、手拉手、沃利沃、双心、空
145 80
         /// </summary>
146
-        public string F_Address4 { set; get; }
147
-        /// <summary>
148
-		/// 公司logo
149
-		/// </summary>
150
-		public string F_CompanyLogo { set; get; }
81
+        public string F_Brands { set; get; }
151 82
         /// <summary>
152
-        /// 服务周期-开始时间
83
+        /// 产品:复合肥心连心、复合肥手拉手、复合肥沃利沃、复合肥双心、尿素心连心、尿素手拉手、尿素沃利沃、尿素双心
153 84
         /// </summary>
154
-        public DateTime? F_CycleStart { set; get; }
85
+        public string F_Product { set; get; }
155 86
         /// <summary>
156
-        /// 服务周期-结束时间
87
+        /// 冻结标志
157 88
         /// </summary>
158
-        public DateTime? F_CycleEnd { set; get; }
89
+        public string F_FrozenFlag { set; get; }
159 90
         /// <summary>
160
-        /// 收费类型:1月度,2季度,3年度
91
+        /// 是否开户:已开户、未开户
161 92
         /// </summary>
162
-        public int? F_ChargeType { set; get; }
93
+        public string F_IsOpenAccount { set; get; }
163 94
         /// <summary>
164
-        /// 收费
95
+        /// 上级客户编码
165 96
         /// </summary>
166
-        public string F_Charges { set; get; }
97
+        public string F_LevelCode { set; get; }
167 98
         /// <summary>
168
-        /// 公司税号
99
+        /// 上级客户名称
169 100
         /// </summary>
170
-        public string F_TaxNumber { set; get; }
101
+        public string F_LevelName { set; get; }
171 102
         /// <summary>
172
-        /// 代理费到期日期
103
+        /// 助记码
173 104
         /// </summary>
174
-        public DateTime? F_FeeExpires { set; get; }
105
+        public string F_MnemonicCode { set; get; }
175 106
         /// <summary>
176
-        /// 联系人添加
107
+        /// 开票银行名称
177 108
         /// </summary>
178
-        public List<ContactPersonNewInput> ContactList { set; get; }
109
+        public string F_InvoiceBank { set; get; }
179 110
         /// <summary>
180
-        /// 财税情况
111
+        /// 开票银行账号
181 112
         /// </summary>
182
-        public CustomerFinanceInput FinanceInfos { set; get; }
183
-
184
-    }
185
-    /// <summary>
186
-    /// 联系人
187
-    /// </summary>
188
-    public class ContactPersonNewInput
189
-    {
190
-        public int F_ManId { set; get; }
113
+        public string F_InvoiceBankAccount { set; get; }
191 114
         /// <summary>
192
-        /// 客户id
115
+        /// 纳税人登记号
193 116
         /// </summary>
194
-        public int F_CustomerId { set; get; }
117
+        public string F_TaxRegCode { set; get; }
195 118
         /// <summary>
196
-        /// 是否主要联系人
119
+        /// 是否经营心连心:是、否
197 120
         /// </summary>
198
-        public bool F_IsMain { set; get; }
121
+        public string F_IsRunXLX { set; get; }
199 122
         /// <summary>
200
-        /// 联系人姓名
123
+        /// 年销量
201 124
         /// </summary>
202
-        public string F_Name { set; get; }
125
+        public string F_AnnualSales { set; get; }
203 126
         /// <summary>
204
-        /// 电话
127
+        /// 配方
205 128
         /// </summary>
206
-        public string F_Telephone { set; get; }
129
+        public string F_Formula { set; get; }
207 130
         /// <summary>
208
-        /// 邮箱
131
+        /// 种植作物
209 132
         /// </summary>
210
-        public string F_Email { set; get; }
133
+        public string F_RaiseCrops { set; get; }
211 134
         /// <summary>
212
-        /// 职务
135
+        /// 种植面积
213 136
         /// </summary>
214
-        public string F_Duties { set; get; }
137
+        public string F_PlantingArea { set; get; }
215 138
         /// <summary>
216
-        /// QQ号码
139
+        /// 用肥品牌
217 140
         /// </summary>
218
-        public string F_QQ { set; get; }
141
+        public string F_FertilizerBrand { set; get; }
219 142
         /// <summary>
220
-        /// MSN号码
143
+        /// 
221 144
         /// </summary>
222
-        public string F_MSN { set; get; }
145
+        public int? F_FileId { set; get; }
223 146
         /// <summary>
224 147
         /// 备注
225 148
         /// </summary>
226 149
         public string F_Remark { set; get; }
227 150
     }
228
-    public class CustomerFinanceInput
229
-    {
230
-        /// <summary>
231
-        /// 自增ID
232
-        /// </summary>
233
-        public int F_CusFinId { get; set; }
234
-        /// <summary>
235
-        /// 客户ID
236
-        /// </summary>
237
-        public int? F_CustomerId { get; set; }
238
-        /// <summary>
239
-        /// 客户编号
240
-        /// </summary>
241
-        public string F_CustomerCode { get; set; }
242
-        /// <summary>
243
-        /// 本月财税情况
244
-        /// </summary>
245
-        public string F_MonthState { get; set; }
246
-        /// <summary>
247
-        /// 本年收入(元)
248
-        /// </summary>
249
-        public string F_AnnualIncome { get; set; }
250
-        /// <summary>
251
-        /// 本年利润
252
-        /// </summary>
253
-        public string F_AnnualProfit { get; set; }
254
-        /// <summary>
255
-        /// 本年费用
256
-        /// </summary>
257
-        public string F_AnnualCost { get; set; }
258
-        /// <summary>
259
-        /// 本年人数
260
-        /// </summary>
261
-        public string F_AnnualPersonCount { get; set; }
262
-        /// <summary>
263
-        /// 本年工资
264
-        /// </summary>
265
-        public string F_AnnualWages { get; set; }
266
-        /// <summary>
267
-        /// 本季费用
268
-        /// </summary>
269
-        public string F_QuarterlyCost { get; set; }
270
-        /// <summary>
271
-        /// 本季人数
272
-        /// </summary>
273
-        public string F_QuarterlyPersonCount { get; set; }
274
-        /// <summary>
275
-        /// 本季工资
276
-        /// </summary>
277
-        public string F_QuarterlyWages { get; set; }
278
-        /// <summary>
279
-        /// 本季收入
280
-        /// </summary>
281
-        public string F_QuarterlyIncome { get; set; }
282
-        /// <summary>
283
-        /// 本季应交税额-增值税
284
-        /// </summary>
285
-        public string F_QPVAT { get; set; }
286
-        /// <summary>
287
-        /// 本季应交税额-附加税
288
-        /// </summary>
289
-        public string F_QPSurtax { get; set; }
290
-        /// <summary>
291
-        /// 本季应交税额-企业所得税
292
-        /// </summary>
293
-        public string F_QPTaxes { get; set; }
294
-        /// <summary>
295
-        /// 本季应交税额-文化事业建设税
296
-        /// </summary>
297
-        public string F_QPConTax { get; set; }
298
-        /// <summary>
299
-        /// 本季应交税额-个税
300
-        /// </summary>
301
-        public string F_QPPerinTax { get; set; }
302
-        /// <summary>
303
-        /// 本季应交税额-印花税
304
-        /// </summary>
305
-        public string F_QPStampTax { get; set; }
306
-        /// <summary>
307
-        /// 本季应交税额-其他税额
308
-        /// </summary>
309
-        public string F_QPOtherTax { get; set; }
310
-        /// <summary>
311
-        /// 扩展字段1
312
-        /// </summary>
313
-        public string F_Extend1 { get; set; }
314
-        /// <summary>
315
-        /// 扩展字段2
316
-        /// </summary>
317
-        public string F_Extend2 { get; set; }
318
-        /// <summary>
319
-        /// 扩展字段3
320
-        /// </summary>
321
-        public string F_Extend3 { get; set; }
322
-        /// <summary>
323
-        /// 扩展字段4
324
-        /// </summary>
325
-        public string F_Extend4 { get; set; }
326
-        /// <summary>
327
-        /// 扩展字段5
328
-        /// </summary>
329
-        public string F_Extend5 { get; set; }
330
-        /// <summary>
331
-        /// 备注1
332
-        /// </summary>
333
-        public string F_Remark1 { get; set; }
334
-        /// <summary>
335
-        /// 备注2
336
-        /// </summary>
337
-        public string F_Remark2 { get; set; }
338
-        /// <summary>
339
-        /// 备注3
340
-        /// </summary>
341
-        public string F_Remark3 { get; set; }
342
-        /// <summary>
343
-        /// 创建人工号
344
-        /// </summary>
345
-        public string F_CreateBy { get; set; }
346
-        /// <summary>
347
-        /// 创建时间
348
-        /// </summary>
349
-        public DateTime? F_CreatedOn { get; set; }
350
-        /// <summary>
351
-        /// 删除标志
352
-        /// </summary>
353
-        public int? F_DeleteFlag { get; set; }
354
-    }
355 151
 }

+ 215 - 213
codegit/CallCenterApi/CallCenterApi.Model/T_Cus_CustomerBaseNew.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
7 7
 namespace CallCenterApi.Model
8 8
 {
9 9
     /// <summary>
10
-	/// T_Cus_CustomerBaseNew:实体类(属性说明自动提取数据库字段的描述信息)
10
+	/// 客户管理表
11 11
 	/// </summary>
12 12
 	[Serializable]
13 13
     public partial class T_Cus_CustomerBaseNew
@@ -18,47 +18,48 @@ namespace CallCenterApi.Model
18 18
         private int _f_customerid;
19 19
         private string _f_customercode;
20 20
         private string _f_companyname;
21
-        private string _f_keywords;
22
-        private string _f_companyaddress;
23
-        private string _f_registeredaddress;
24
-        private string _f_legalname;
25
-        private string _f_legalidcards;
26
-        private string _f_legaltel;
27
-        private string _f_subtrade;
28
-        private string _f_taxcategory;
29
-        private string _f_taxpointdes;
30
-        private string _f_invoicerange;
31
-        private string _f_qualification;
32
-        private string _f_layer;
33
-        private int? _f_bedept;
34
-        private string _f_financialmanager;
35
-        private string _f_businessowner;
36
-        private string _f_berelatedacc;
37
-        private string _f_beauditacc;
38
-        private string _f_bemakeacc;
21
+        private string _f_areaid;
22
+        private string _f_branchid;
23
+        private string _f_salesman;
24
+        private string _f_salesphone;
25
+        private string _f_customernature;
26
+        private string _f_channel;
27
+        private string _f_credit;
28
+        private string _f_legal;
29
+        private string _f_legalphone;
30
+        private string _f_addressprovince;
31
+        private string _f_addresscity;
32
+        private string _f_addresscountry;
33
+        private string _f_addresstownship;
34
+        private string _f_addressfull;
35
+        private string _f_brands;
36
+        private string _f_product;
37
+        private string _f_frozenflag;
38
+        private string _f_isopenaccount;
39
+        private string _f_levelcode;
40
+        private string _f_levelname;
41
+        private string _f_mnemoniccode;
42
+        private string _f_invoicebank;
43
+        private string _f_invoicebankaccount;
44
+        private string _f_taxregcode;
45
+        private string _f_isrunxlx;
46
+        private string _f_annualsales;
47
+        private string _f_formula;
48
+        private string _f_raisecrops;
49
+        private string _f_plantingarea;
50
+        private string _f_fertilizerbrand;
51
+        private int? _f_fileid;
39 52
         private string _f_wxpassword;
40 53
         private string _f_wxopenid;
41
-        private string _f_remark1;
42
-        private string _f_remark2;
43
-        private string _f_remark3;
54
+        private string _f_remark;
44 55
         private string _f_createby;
45
-        private DateTime? _f_createdon;
46
-        private int? _f_deleteflag;
47
-        private string _f_cusservice;
48
-        private string _f_handoverdate;
49
-        private int? _f_isbankslips;
50
-        private string _f_address;
51
-        private string _f_address1;
52
-        private string _f_address2;
53
-        private string _f_address3;
54
-        private string _f_address4;
55
-        private string _f_companylogo;
56
-        private DateTime? _f_cyclestart;
57
-        private DateTime? _f_cycleend;
58
-        private int? _f_chargetype;
59
-        private string _f_charges;
60
-        private string _f_taxnumber;
61
-        private DateTime? _f_feeexpires;
56
+        private DateTime? _f_createon;
57
+        private int? _f_updatecount;
58
+        private string _f_updateby;
59
+        private DateTime? _f_updateon;
60
+        private int? _f_isdelete;
61
+        private string _f_deleteby;
62
+        private DateTime? _f_deleteon;
62 63
         /// <summary>
63 64
         /// 自增ID
64 65
         /// </summary>
@@ -68,7 +69,7 @@ namespace CallCenterApi.Model
68 69
             get { return _f_customerid; }
69 70
         }
70 71
         /// <summary>
71
-        /// 客户编号
72
+        /// 客户编号:10位数字
72 73
         /// </summary>
73 74
         public string F_CustomerCode
74 75
         {
@@ -84,339 +85,340 @@ namespace CallCenterApi.Model
84 85
             get { return _f_companyname; }
85 86
         }
86 87
         /// <summary>
87
-        /// 关键字
88
+        /// 大区ID
88 89
         /// </summary>
89
-        public string F_KeyWords
90
+        public string F_AreaID
90 91
         {
91
-            set { _f_keywords = value; }
92
-            get { return _f_keywords; }
92
+            set { _f_areaid = value; }
93
+            get { return _f_areaid; }
93 94
         }
94 95
         /// <summary>
95
-        /// 公司地址
96
+        /// 分公司ID
96 97
         /// </summary>
97
-        public string F_CompanyAddress
98
+        public string F_BranchID
98 99
         {
99
-            set { _f_companyaddress = value; }
100
-            get { return _f_companyaddress; }
100
+            set { _f_branchid = value; }
101
+            get { return _f_branchid; }
101 102
         }
102 103
         /// <summary>
103
-        /// 注册地址
104
+        /// 业务员
104 105
         /// </summary>
105
-        public string F_RegisteredAddress
106
+        public string F_Salesman
106 107
         {
107
-            set { _f_registeredaddress = value; }
108
-            get { return _f_registeredaddress; }
108
+            set { _f_salesman = value; }
109
+            get { return _f_salesman; }
109 110
         }
110 111
         /// <summary>
111
-        /// 法人姓名
112
+        /// 业务员电话
112 113
         /// </summary>
113
-        public string F_LegalName
114
+        public string F_SalesPhone
114 115
         {
115
-            set { _f_legalname = value; }
116
-            get { return _f_legalname; }
116
+            set { _f_salesphone = value; }
117
+            get { return _f_salesphone; }
117 118
         }
118 119
         /// <summary>
119
-        /// 法人身份证
120
+        /// 客户性质
120 121
         /// </summary>
121
-        public string F_LegalIDCards
122
+        public string F_CustomerNature
122 123
         {
123
-            set { _f_legalidcards = value; }
124
-            get { return _f_legalidcards; }
124
+            set { _f_customernature = value; }
125
+            get { return _f_customernature; }
125 126
         }
126 127
         /// <summary>
127
-        /// 法人电话
128
+        /// 渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工
128 129
         /// </summary>
129
-        public string F_LegalTel
130
+        public string F_Channel
130 131
         {
131
-            set { _f_legaltel = value; }
132
-            get { return _f_legaltel; }
132
+            set { _f_channel = value; }
133
+            get { return _f_channel; }
133 134
         }
134 135
         /// <summary>
135
-        /// 所属行业
136
+        /// 信用等级:一星、二星、三星、四星、五星、空
136 137
         /// </summary>
137
-        public string F_SubTrade
138
+        public string F_Credit
138 139
         {
139
-            set { _f_subtrade = value; }
140
-            get { return _f_subtrade; }
140
+            set { _f_credit = value; }
141
+            get { return _f_credit; }
141 142
         }
142 143
         /// <summary>
143
-        /// 税务类别
144
+        /// 法人
144 145
         /// </summary>
145
-        public string F_TaxCategory
146
+        public string F_Legal
146 147
         {
147
-            set { _f_taxcategory = value; }
148
-            get { return _f_taxcategory; }
148
+            set { _f_legal = value; }
149
+            get { return _f_legal; }
149 150
         }
150 151
         /// <summary>
151
-        /// 税点描述
152
+        /// 法人电话
152 153
         /// </summary>
153
-        public string F_TaxPointDes
154
+        public string F_LegalPhone
154 155
         {
155
-            set { _f_taxpointdes = value; }
156
-            get { return _f_taxpointdes; }
156
+            set { _f_legalphone = value; }
157
+            get { return _f_legalphone; }
157 158
         }
158 159
         /// <summary>
159
-        /// 开票范围
160
+        /// 
160 161
         /// </summary>
161
-        public string F_InvoiceRange
162
+        public string F_AddressProvince
162 163
         {
163
-            set { _f_invoicerange = value; }
164
-            get { return _f_invoicerange; }
164
+            set { _f_addressprovince = value; }
165
+            get { return _f_addressprovince; }
165 166
         }
166 167
         /// <summary>
167
-        /// 企业资质荣誉
168
+        /// 
168 169
         /// </summary>
169
-        public string F_Qualification
170
+        public string F_AddressCity
170 171
         {
171
-            set { _f_qualification = value; }
172
-            get { return _f_qualification; }
172
+            set { _f_addresscity = value; }
173
+            get { return _f_addresscity; }
173 174
         }
174 175
         /// <summary>
175
-        /// 客户信誉等级
176
+        /// 
176 177
         /// </summary>
177
-        public string F_Layer
178
+        public string F_AddressCountry
178 179
         {
179
-            set { _f_layer = value; }
180
-            get { return _f_layer; }
180
+            set { _f_addresscountry = value; }
181
+            get { return _f_addresscountry; }
181 182
         }
182 183
         /// <summary>
183
-        /// 客户归属部门
184
+        /// 
184 185
         /// </summary>
185
-        public int? F_BeDept
186
+        public string F_AddressTownship
186 187
         {
187
-            set { _f_bedept = value; }
188
-            get { return _f_bedept; }
188
+            set { _f_addresstownship = value; }
189
+            get { return _f_addresstownship; }
189 190
         }
190 191
         /// <summary>
191
-        /// 客户公司财务负责人
192
+        /// 详细地址
192 193
         /// </summary>
193
-        public string F_FinancialManager
194
+        public string F_AddressFull
194 195
         {
195
-            set { _f_financialmanager = value; }
196
-            get { return _f_financialmanager; }
196
+            set { _f_addressfull = value; }
197
+            get { return _f_addressfull; }
197 198
         }
198 199
         /// <summary>
199
-        /// 客户归属业务负责人
200
+        /// 经营品牌:心连心、手拉手、沃利沃、双心、空
200 201
         /// </summary>
201
-        public string F_BusinessOwner
202
+        public string F_Brands
202 203
         {
203
-            set { _f_businessowner = value; }
204
-            get { return _f_businessowner; }
204
+            set { _f_brands = value; }
205
+            get { return _f_brands; }
205 206
         }
206 207
         /// <summary>
207
-        /// 客户归属涉税会计
208
+        /// 产品:复合肥心连心、复合肥手拉手、复合肥沃利沃、复合肥双心、尿素心连心、尿素手拉手、尿素沃利沃、尿素双心
208 209
         /// </summary>
209
-        public string F_BeRelatedAcc
210
+        public string F_Product
210 211
         {
211
-            set { _f_berelatedacc = value; }
212
-            get { return _f_berelatedacc; }
212
+            set { _f_product = value; }
213
+            get { return _f_product; }
213 214
         }
214 215
         /// <summary>
215
-        /// 客户归属审核会计
216
+        /// 冻结标志
216 217
         /// </summary>
217
-        public string F_BeAuditAcc
218
+        public string F_FrozenFlag
218 219
         {
219
-            set { _f_beauditacc = value; }
220
-            get { return _f_beauditacc; }
220
+            set { _f_frozenflag = value; }
221
+            get { return _f_frozenflag; }
221 222
         }
222 223
         /// <summary>
223
-        /// 客户归属做账会计
224
+        /// 是否开户:已开户、未开户
224 225
         /// </summary>
225
-        public string F_BeMakeAcc
226
+        public string F_IsOpenAccount
226 227
         {
227
-            set { _f_bemakeacc = value; }
228
-            get { return _f_bemakeacc; }
228
+            set { _f_isopenaccount = value; }
229
+            get { return _f_isopenaccount; }
229 230
         }
230 231
         /// <summary>
231
-        /// 微信登录密
232
+        /// 上级客户编
232 233
         /// </summary>
233
-        public string F_WxPassword
234
+        public string F_LevelCode
234 235
         {
235
-            set { _f_wxpassword = value; }
236
-            get { return _f_wxpassword; }
236
+            set { _f_levelcode = value; }
237
+            get { return _f_levelcode; }
237 238
         }
238 239
         /// <summary>
239
-        /// 微信openid
240
+        /// 上级客户名称
240 241
         /// </summary>
241
-        public string F_WxOpenId
242
+        public string F_LevelName
242 243
         {
243
-            set { _f_wxopenid = value; }
244
-            get { return _f_wxopenid; }
244
+            set { _f_levelname = value; }
245
+            get { return _f_levelname; }
245 246
         }
246 247
         /// <summary>
247
-        /// 备注1
248
+        /// 助记码
248 249
         /// </summary>
249
-        public string F_Remark1
250
+        public string F_MnemonicCode
250 251
         {
251
-            set { _f_remark1 = value; }
252
-            get { return _f_remark1; }
252
+            set { _f_mnemoniccode = value; }
253
+            get { return _f_mnemoniccode; }
253 254
         }
254 255
         /// <summary>
255
-        /// 备注2
256
+        /// 开票银行名称
256 257
         /// </summary>
257
-        public string F_Remark2
258
+        public string F_InvoiceBank
258 259
         {
259
-            set { _f_remark2 = value; }
260
-            get { return _f_remark2; }
260
+            set { _f_invoicebank = value; }
261
+            get { return _f_invoicebank; }
261 262
         }
262 263
         /// <summary>
263
-        /// 备注3
264
+        /// 开票银行账号
264 265
         /// </summary>
265
-        public string F_Remark3
266
+        public string F_InvoiceBankAccount
266 267
         {
267
-            set { _f_remark3 = value; }
268
-            get { return _f_remark3; }
268
+            set { _f_invoicebankaccount = value; }
269
+            get { return _f_invoicebankaccount; }
269 270
         }
270 271
         /// <summary>
271
-        /// 创建人工
272
+        /// 纳税人登记
272 273
         /// </summary>
273
-        public string F_CreateBy
274
+        public string F_TaxRegCode
274 275
         {
275
-            set { _f_createby = value; }
276
-            get { return _f_createby; }
276
+            set { _f_taxregcode = value; }
277
+            get { return _f_taxregcode; }
277 278
         }
278 279
         /// <summary>
279
-        /// 创建时间
280
+        /// 是否经营心连心:是、否
280 281
         /// </summary>
281
-        public DateTime? F_CreatedOn
282
+        public string F_IsRunXLX
282 283
         {
283
-            set { _f_createdon = value; }
284
-            get { return _f_createdon; }
284
+            set { _f_isrunxlx = value; }
285
+            get { return _f_isrunxlx; }
285 286
         }
286 287
         /// <summary>
287
-        /// 删除标志
288
+        /// 年销量
288 289
         /// </summary>
289
-        public int? F_DeleteFlag
290
+        public string F_AnnualSales
290 291
         {
291
-            set { _f_deleteflag = value; }
292
-            get { return _f_deleteflag; }
292
+            set { _f_annualsales = value; }
293
+            get { return _f_annualsales; }
293 294
         }
294 295
         /// <summary>
295
-		/// 客服
296
-		/// </summary>
297
-		public string F_CusService
296
+        /// 配方
297
+        /// </summary>
298
+        public string F_Formula
298 299
         {
299
-            set { _f_cusservice = value; }
300
-            get { return _f_cusservice; }
300
+            set { _f_formula = value; }
301
+            get { return _f_formula; }
301 302
         }
302 303
         /// <summary>
303
-        /// 交接日期
304
+        /// 种植作物
304 305
         /// </summary>
305
-        public string F_HandoverDate
306
+        public string F_RaiseCrops
306 307
         {
307
-            set { _f_handoverdate = value; }
308
-            get { return _f_handoverdate; }
308
+            set { _f_raisecrops = value; }
309
+            get { return _f_raisecrops; }
309 310
         }
310 311
         /// <summary>
311
-        /// 是否需要去银行拿回单(一般纳税人)
312
+        /// 种植面积
312 313
         /// </summary>
313
-        public int? F_ISBankSlips
314
+        public string F_PlantingArea
314 315
         {
315
-            set { _f_isbankslips = value; }
316
-            get { return _f_isbankslips; }
316
+            set { _f_plantingarea = value; }
317
+            get { return _f_plantingarea; }
317 318
         }
318 319
         /// <summary>
319
-        /// 联系地址
320
+        /// 用肥品牌
320 321
         /// </summary>
321
-        public string F_Address
322
+        public string F_FertilizerBrand
322 323
         {
323
-            set { _f_address = value; }
324
-            get { return _f_address; }
324
+            set { _f_fertilizerbrand = value; }
325
+            get { return _f_fertilizerbrand; }
325 326
         }
326 327
         /// <summary>
327
-        /// 联系地址1
328
+        /// 
328 329
         /// </summary>
329
-        public string F_Address1
330
+        public int? F_FileId
330 331
         {
331
-            set { _f_address1 = value; }
332
-            get { return _f_address1; }
332
+            set { _f_fileid = value; }
333
+            get { return _f_fileid; }
333 334
         }
334 335
         /// <summary>
335
-        /// 联系地址2
336
+        /// 微信登录密码
336 337
         /// </summary>
337
-        public string F_Address2
338
+        public string F_WxPassword
338 339
         {
339
-            set { _f_address2 = value; }
340
-            get { return _f_address2; }
340
+            set { _f_wxpassword = value; }
341
+            get { return _f_wxpassword; }
341 342
         }
342 343
         /// <summary>
343
-        /// 联系地址3
344
+        /// 微信openid
344 345
         /// </summary>
345
-        public string F_Address3
346
+        public string F_WxOpenId
346 347
         {
347
-            set { _f_address3 = value; }
348
-            get { return _f_address3; }
348
+            set { _f_wxopenid = value; }
349
+            get { return _f_wxopenid; }
349 350
         }
350 351
         /// <summary>
351
-        /// 联系地址4
352
+        /// 备注
352 353
         /// </summary>
353
-        public string F_Address4
354
+        public string F_Remark
354 355
         {
355
-            set { _f_address4 = value; }
356
-            get { return _f_address4; }
356
+            set { _f_remark = value; }
357
+            get { return _f_remark; }
357 358
         }
358 359
         /// <summary>
359
-		/// 公司logo
360
-		/// </summary>
361
-		public string F_CompanyLogo
360
+        /// 创建人工号
361
+        /// </summary>
362
+        public string F_CreateBy
362 363
         {
363
-            set { _f_companylogo = value; }
364
-            get { return _f_companylogo; }
364
+            set { _f_createby = value; }
365
+            get { return _f_createby; }
365 366
         }
366 367
         /// <summary>
367
-        /// 服务周期-开始时间
368
+        /// 创建时间
368 369
         /// </summary>
369
-        public DateTime? F_CycleStart
370
+        public DateTime? F_CreateOn
370 371
         {
371
-            set { _f_cyclestart = value; }
372
-            get { return _f_cyclestart; }
372
+            set { _f_createon = value; }
373
+            get { return _f_createon; }
373 374
         }
374 375
         /// <summary>
375
-        /// 服务周期-结束时间
376
+        /// 修改次数
376 377
         /// </summary>
377
-        public DateTime? F_CycleEnd
378
+        public int? F_UpdateCount
378 379
         {
379
-            set { _f_cycleend = value; }
380
-            get { return _f_cycleend; }
380
+            set { _f_updatecount = value; }
381
+            get { return _f_updatecount; }
381 382
         }
382 383
         /// <summary>
383
-        /// 收费类型:1月度,2季度,3年度
384
+        /// 修改人工号
384 385
         /// </summary>
385
-        public int? F_ChargeType
386
+        public string F_UpdateBy
386 387
         {
387
-            set { _f_chargetype = value; }
388
-            get { return _f_chargetype; }
388
+            set { _f_updateby = value; }
389
+            get { return _f_updateby; }
389 390
         }
390 391
         /// <summary>
391
-        /// 收费
392
+        /// 修改时间
392 393
         /// </summary>
393
-        public string F_Charges
394
+        public DateTime? F_UpdateOn
394 395
         {
395
-            set { _f_charges = value; }
396
-            get { return _f_charges; }
396
+            set { _f_updateon = value; }
397
+            get { return _f_updateon; }
397 398
         }
398 399
         /// <summary>
399
-        /// 公司税号
400
+        /// 是否删除:0否,1是
400 401
         /// </summary>
401
-        public string F_TaxNumber
402
+        public int? F_IsDelete
402 403
         {
403
-            set { _f_taxnumber = value; }
404
-            get { return _f_taxnumber; }
404
+            set { _f_isdelete = value; }
405
+            get { return _f_isdelete; }
405 406
         }
406 407
         /// <summary>
407
-        /// 代理费到期日期
408
+        /// 删除人工号
408 409
         /// </summary>
409
-        public DateTime? F_FeeExpires
410
+        public string F_DeleteBy
410 411
         {
411
-            get
412
-            {
413
-                return _f_feeexpires;
414
-            }
415
-
416
-            set
417
-            {
418
-                _f_feeexpires = value;
419
-            }
412
+            set { _f_deleteby = value; }
413
+            get { return _f_deleteby; }
414
+        }
415
+        /// <summary>
416
+        /// 删除时间
417
+        /// </summary>
418
+        public DateTime? F_DeleteOn
419
+        {
420
+            set { _f_deleteon = value; }
421
+            get { return _f_deleteon; }
420 422
         }
421 423
         #endregion Model
422 424
     }