Browse Source

读取部门

zhengbingbing 7 years ago
parent
commit
2df426648f

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

@@ -51,7 +51,7 @@ namespace CallCenterApi.Interface.Controllers.customer
51 51
             if (!string.IsNullOrWhiteSpace(code))//客户编号
52 52
                 sql += $" and F_CustomerCode like '%" + code.Trim() + "%'";
53 53
             if (!string.IsNullOrWhiteSpace(cmpname))//公司名称
54
-                sql += $" and F_CompanyName like '%" + cmpname.Trim() + "%'";
54
+                sql += $" and F_KeyWords like '%" + cmpname.Trim() + "%'";
55 55
             if (!string.IsNullOrWhiteSpace(cmpaddress))//公司地址
56 56
                 sql += $" and F_CompanyAddress like '%" + cmpaddress.Trim() + "%'";
57 57
             if (!string.IsNullOrWhiteSpace(legname))//法人姓名
@@ -88,7 +88,7 @@ namespace CallCenterApi.Interface.Controllers.customer
88 88
                 dt = BLL.PagerBLL.GetListPager(
89 89
                     "T_Cus_CustomerBaseNew",
90 90
                     "F_CustomerId",
91
-                    "*,dbo.GetDeptName(F_BeDept) as F_DeptName",
91
+                    "*,dbo.GetDeptName(F_BeDept) as F_BeDeptName",
92 92
                     sql,
93 93
                     "ORDER BY F_CustomerId desc",
94 94
                     pagesize,
@@ -237,7 +237,7 @@ namespace CallCenterApi.Interface.Controllers.customer
237 237
             #region 添加验证判断
238 238
             if (string.IsNullOrEmpty(input.F_CustomerCode))
239 239
                 return Error("编号不能为空!");
240
-            if (!getunique(0, input.F_CustomerCode))
240
+            if (getunique(0, input.F_CustomerCode))
241 241
                 return Error("编号已被占用,请重新输入!");
242 242
             #endregion
243 243
             var model = new Model.T_Cus_CustomerBaseNew();
@@ -323,7 +323,7 @@ namespace CallCenterApi.Interface.Controllers.customer
323 323
             #region 添加验证判断
324 324
             if (input.F_CustomerId <= 0)
325 325
                 return Error("参数错误!");
326
-            if (!getunique(input.F_CustomerId, input.F_CustomerCode))
326
+            if (getunique(input.F_CustomerId, input.F_CustomerCode))
327 327
                 return Error("编号已被占用,请重新输入!");
328 328
             #endregion
329 329
             var model = cusbll.GetModel(input.F_CustomerId);
@@ -379,7 +379,7 @@ namespace CallCenterApi.Interface.Controllers.customer
379 379
         {
380 380
             var sql = " F_DeleteFlag=0 and F_CustomerCode='" + code + "'";
381 381
             if (id > 0)
382
-                sql += " and F_CustomerId="+id;
382
+                sql += " and F_CustomerId<>"+id;
383 383
             var count=cusbll.GetModelList(sql).Count();
384 384
             
385 385
             return count > 0;