Sfoglia il codice sorgente

Merge branch 'master' of http://192.168.1.222:3000/zhengbingbing/XinXiangXLX_API

duhongyu 5 anni fa
parent
commit
e6782286ab

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

@@ -153,7 +153,7 @@ namespace CallCenterApi.Interface.Controllers
153 153
                 return Error("区域名称不能为空");
154 154
             var model = bllCus_Region.GetModel(input.F_RegionId);
155 155
             if (model == null)
156
-                return Error("字典对象不存在");
156
+                return Error("字典标志不要修改");   //字典对象不存在
157 157
             model.F_RegionName = input.F_RegionName;
158 158
             model.F_City = input.F_City;
159 159
             model.F_Property = input.F_Property;

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

@@ -124,7 +124,7 @@ namespace CallCenterApi.Interface.Controllers
124 124
                 BLL.T_Sys_DictionaryBase orderBll = new BLL.T_Sys_DictionaryBase();
125 125
                 Model.T_Sys_DictionaryBase orderModel = orderBll.GetModel(input.DicFlag.Trim());
126 126
                 if (orderModel == null)
127
-                    return Error("字典对象不存在");
127
+                    return Error("字典标志不要修改");   //字典对象不存在
128 128
                 orderModel.F_DictionaryFlag = input.DicFlag;
129 129
                 orderModel.F_DictionaryName = input.Name;
130 130
                 orderModel.F_Describe = input.Remark;

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

@@ -69,7 +69,7 @@ namespace CallCenterApi.Interface.Controllers
69 69
                 if (!string.IsNullOrEmpty(endtime))
70 70
                     sql += " and datediff(day,RecvTime,'" + endtime + "')>=0   ";
71 71
                 if (!string.IsNullOrEmpty(phone))
72
-                    sql += " and CallerNum= "+ phone;
72
+                    sql += " and CallerNum= '" + phone + "'";
73 73
                 
74 74
                 int recordCount = 0;
75 75
                 dt = BLL.PagerBLL.GetListPager(

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

@@ -32,7 +32,7 @@ namespace CallCenterApi.Interface.Controllers
32 32
             string sql = "";
33 33
             if (strcontent!=null&&strcontent != "")
34 34
             {
35
-                sql = " and( F_ZXZCode like '" + strcontent + "' or F_ZXZName  like '" + strcontent + "'  or F_WHBDKey like '" + strcontent + "%'  or F_WHWDKey  like '" + strcontent + "%'  or F_ZXAtt like '" + strcontent + "'  or F_Des like '" + strcontent + "')";
35
+                sql = " and( F_ZXZCode like '" + strcontent + "' or F_ZXZName  like '%" + strcontent + "%'  or F_WHBDKey like '" + strcontent + "%'  or F_WHWDKey  like '" + strcontent + "%'  or F_ZXAtt like '" + strcontent + "'  or F_Des like '" + strcontent + "')";
36 36
             }
37 37
                 if (strpageindex.Trim() != "")
38 38
                 {

+ 7 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

@@ -397,9 +397,9 @@ namespace CallCenterApi.Interface.Controllers.customer
397 397
                 if (getunique(0, input.F_CustomerCode))
398 398
                     return Error("编号已被占用,请重新输入!");
399 399
             }
400
-            if (string.IsNullOrEmpty(input.F_LegalPhone))
400
+            if (string.IsNullOrEmpty(input.F_LegalPhone.Trim()))
401 401
                 return Error("请输入客户电话");
402
-            if (getunphone(0, input.F_LegalPhone))
402
+            if (getunphone(0, input.F_LegalPhone.Trim()))
403 403
                 return Error("已存在该客户请勿重复添加");
404 404
             int i = 0;
405 405
             if (string.IsNullOrEmpty(input.F_CustomerCode))
@@ -530,7 +530,7 @@ namespace CallCenterApi.Interface.Controllers.customer
530 530
                     Input1.F_Channel = model[i].F_Channel;// 渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工
531 531
                     Input1.F_Credit = model[i].F_Credit;//信用等级:一星、二星、三星、四星、五星、空
532 532
                     Input1.F_Legal = model[i].F_Legal;//法人 
533
-                    Input1.F_LegalPhone = model[i].F_LegalPhone;//法人电话
533
+                    Input1.F_LegalPhone = model[i].F_LegalPhone.Trim();//法人电话
534 534
                     Input1.F_AddressProvince = model[i].F_AddressProvince;//省
535 535
                     Input1.F_AddressCity = model[i].F_AddressCity;//市
536 536
                     Input1.F_AddressCountry = model[i].F_AddressCountry;//县
@@ -601,7 +601,7 @@ namespace CallCenterApi.Interface.Controllers.customer
601 601
             model.F_Channel = input.F_Channel;// 渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工
602 602
             model.F_Credit = input.F_Credit;//信用等级:一星、二星、三星、四星、五星、空
603 603
             model.F_Legal = input.F_Legal;//法人 
604
-            model.F_LegalPhone = input.F_LegalPhone;//法人电话
604
+            model.F_LegalPhone = input.F_LegalPhone.Trim();//法人电话
605 605
             model.F_AddressProvince = input.F_AddressProvince;//省
606 606
             model.F_AddressCity = input.F_AddressCity;//市
607 607
             model.F_AddressCountry = input.F_AddressCountry;//县
@@ -640,7 +640,7 @@ namespace CallCenterApi.Interface.Controllers.customer
640 640
         private bool getunphone(int id, string phone)
641 641
         {
642 642
             var sql = " F_IsDelete=0 ";
643
-            sql += "and (F_LegalPhone='" + phone + "')";
643
+            sql += "and (F_LegalPhone='" + phone.Trim() + "')";
644 644
             if (id > 0)
645 645
                 sql += " and F_CustomerId<>" + id;
646 646
             var count = cusbll.GetModelList(sql).Count();
@@ -812,7 +812,7 @@ namespace CallCenterApi.Interface.Controllers.customer
812 812
                                             dModel.F_Gender = "1";
813 813
                                         }
814 814
                                     }
815
-                                    dModel.F_LegalPhone = dr["客户电话"].ToString();
815
+                                    dModel.F_LegalPhone = dr["客户电话"].ToString().Trim();
816 816
                                     dModel.F_AddressProvince = dr["省"].ToString();
817 817
                                     dModel.F_AddressCity = dr["市"].ToString();
818 818
                                     dModel.F_AddressCountry = dr["县"].ToString();
@@ -873,7 +873,7 @@ namespace CallCenterApi.Interface.Controllers.customer
873 873
                                                 CustomerBase.F_Gender = "1";
874 874
                                             }
875 875
                                         }
876
-                                        CustomerBase.F_LegalPhone = dr["客户电话"].ToString();
876
+                                        CustomerBase.F_LegalPhone = dr["客户电话"].ToString().Trim();
877 877
                                         CustomerBase.F_AddressProvince = dr["省"].ToString();
878 878
                                         CustomerBase.F_AddressCity = dr["市"].ToString();
879 879
                                         CustomerBase.F_AddressCountry = dr["县"].ToString();

+ 3 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallleaveController.cs

@@ -81,8 +81,9 @@ namespace CallCenterApi.Interface.Controllers.tel
81 81
                         {
82 82
                             dr["F_RecFileUrl"] = config.F_ParamValue + path;
83 83
                         }
84
-                       
85
-                      var prono =dr["F_Phone"].ToString().Substring(0, 7);
84
+
85
+                    var phone = dr["F_Phone"].ToString();
86
+                    var prono = phone.Trim().Length >= 7 ? dr["F_Phone"].ToString().Substring(0, 7) : dr["F_Phone"].ToString();
86 87
                     var MobileData = new BLL.T_Sys_MobileData().GetModelList("F_MobileNum='"+ prono+"'").FirstOrDefault ();
87 88
                     if (MobileData != null)
88 89
                         dr["F_Remark"] = MobileData.F_CityDes;

+ 5 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -201,19 +201,16 @@ namespace CallCenterApi.Interface.Controllers.tel
201 201
                 }
202 202
                 if (!string.IsNullOrEmpty(tephone))
203 203
                 {
204
-                    Model.T_Cus_CustomerBaseNew cus = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='" + tephone + "'  ")
205
-         .FirstOrDefault();
206
-                    Model.T_Cus_CustomerBaseNew cusll = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='0" + tephone + "'  ")
207
-        .FirstOrDefault();
204
+                    //12:08 2020/2/27 过滤字段F_LegalPhone字段中的空格
205
+                    Model.T_Cus_CustomerBaseNew cus = new BLL.T_Cus_CustomerBaseNew().GetModelList(" REPLACE(F_LegalPhone,' ','') ='" + tephone + "'  ").FirstOrDefault();
206
+                    Model.T_Cus_CustomerBaseNew cusll = new BLL.T_Cus_CustomerBaseNew().GetModelList(" REPLACE(F_LegalPhone,' ','') ='0" + tephone + "'  ").FirstOrDefault();
208 207
                     if (cus != null)
209 208
                     {
210
-                        dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='" + tephone + "'  ")
211
-               .FirstOrDefault().F_Legal;
209
+                        dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList(" REPLACE(F_LegalPhone,' ','') ='" + tephone + "'  ").FirstOrDefault().F_Legal;
212 210
                     }
213 211
                     else if (cusll!=null )
214 212
                     {
215
-                        dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='0" + tephone + "'  ")
216
-               .FirstOrDefault().F_Legal;
213
+                        dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList(" REPLACE(F_LegalPhone,' ','') ='0" + tephone + "'  ").FirstOrDefault().F_Legal;
217 214
                     }
218 215
                 }
219 216
 

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -52,7 +52,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
52 52
                 if (source > 0)//工单来源
53 53
                 {
54 54
                     if (source==1)
55
-                        sql += $"( and F_Source in (1,'') or F_Source is null)";
55
+                        sql += $" and (F_Source in (1,'') or F_Source is null)";
56 56
                     else 
57 57
                     sql += $" and F_Source='" + source + "'";
58 58
                 }
@@ -94,11 +94,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
94 94
                     }
95 95
                     if (!string.IsNullOrEmpty(F_WorkNumber))
96 96
                     {
97
-                        sql += $"and F_CreateBy  in(" + createby + "," + F_WorkNumber + ") ";
97
+                        sql += $" and F_CreateBy  in('" + createby + "','" + F_WorkNumber + "') ";
98 98
                     }
99 99
                     else
100 100
                     {
101
-                        sql += $"and F_CreateBy  in(" + createby + ") ";
101
+                        sql += $" and F_CreateBy  in('" + createby + "') ";
102 102
                     }
103 103
 
104 104
                 }