duhongyu 3 yıl önce
ebeveyn
işleme
3bacfa0544

+ 6 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

@@ -545,12 +545,16 @@ namespace CallCenterApi.Interface.Controllers.customer
545 545
             {
546 546
                 sql += $" and (F_Remark like '%{ model.F_AddressCountry.Trim()}%'";
547 547
                 if (!string.IsNullOrWhiteSpace(model.F_AddressCity))//市
548
-                    sql += $" or F_Remark like '%{model.F_AddressCity.Trim()}%')";
549
-                else
548
+                    sql += $" or F_Remark like '%{model.F_AddressCity.Trim()}%'";
549
+               else  if (!string.IsNullOrWhiteSpace(model.F_AddressProvince))//省
550
+                    sql += $" or F_Remark like '%{model.F_AddressProvince.Trim()}%'";
551
+                
550 552
                     sql += $")";
551 553
             }
552 554
             else if (!string.IsNullOrWhiteSpace(model.F_AddressCity))//市
555
+            {
553 556
                 sql += $" and F_Remark like '%{model.F_AddressCity.Trim()}%'";
557
+            }
554 558
             else
555 559
                 sql += $" and 1!=1";
556 560
             var modelist = new BLL.T_Sys_UserAccount().GetModelList(sql);

+ 36 - 5
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -1556,10 +1556,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
1556 1556
                     else
1557 1557
                         sql += $" and F_Source='" + source + "'";
1558 1558
                 }
1559
-                if (!string.IsNullOrWhiteSpace(createby))//创建人
1560
-                {
1561
-                    sql += $" and F_CustomerID  in(select F_CustomerCode from T_Cus_CustomerBaseNew where F_Salesman like '%" + createby + "%' and F_IsDelete =0) ";
1562
-                }
1559
+                //if (!string.IsNullOrWhiteSpace(createby))//创建人
1560
+                //{
1561
+                //    sql += $" and F_CustomerID  in(select F_CustomerCode from T_Cus_CustomerBaseNew where F_Salesman like '%" + createby + "%' and F_IsDelete =0) ";
1562
+                //}
1563 1563
                 if (!string.IsNullOrWhiteSpace(createtel))//创建人
1564 1564
                 {
1565 1565
                     sql += $" and F_CustomerID  in(select F_CustomerCode from T_Cus_CustomerBaseNew where F_SalesPhone like '%" + createtel + "%' and F_IsDelete =0) ";
@@ -1567,7 +1567,38 @@ namespace CallCenterApi.Interface.Controllers.weixin
1567 1567
                 if (!string.IsNullOrWhiteSpace(description))//问题描述
1568 1568
                     sql += $" and F_Description like '%" + description.Trim() + "%'";
1569 1569
                 if (!string.IsNullOrWhiteSpace(createby))//创建人
1570
-                    sql += $" and F_CreateBy like '%" + createby.Trim() + "%'";
1570
+                {
1571
+                    string F_WorkNumber = "";
1572
+                    string UserCode = "";
1573
+                    Model.T_Sys_UserAccount user = userAccountBLL.GetworkModel(createby);
1574
+                    if (user != null)
1575
+                    {
1576
+                        F_WorkNumber = user.F_WorkNumber;
1577
+                        UserCode = user.F_UserCode;
1578
+                    }
1579
+                    else
1580
+                    {
1581
+                        Model.T_Sys_UserAccount username = userAccountBLL.GetName(createby);
1582
+                        if (username != null)
1583
+                        {
1584
+                            F_WorkNumber = username.F_WorkNumber;
1585
+                            UserCode = username.F_UserCode;
1586
+                        }
1587
+                    }
1588
+                    if (!string.IsNullOrEmpty(F_WorkNumber) && !string.IsNullOrEmpty(UserCode))
1589
+                    {
1590
+                        sql += $"and F_CreateBy  in(" + UserCode + "," + F_WorkNumber + ") ";
1591
+                    }
1592
+                    else if (!string.IsNullOrEmpty(F_WorkNumber))
1593
+                    {
1594
+                        sql += $"and F_CreateBy  in(" + F_WorkNumber + ") ";
1595
+                    }
1596
+                    else if (!string.IsNullOrEmpty(UserCode))
1597
+                    {
1598
+                        sql += $"and F_CreateBy  in(" + UserCode + ") ";
1599
+                    }
1600
+
1601
+                }
1571 1602
                 if (!string.IsNullOrWhiteSpace(touser))//参与人
1572 1603
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
1573 1604
                 if (!string.IsNullOrWhiteSpace(code))//工单编号