duhongyu 3 lat temu
rodzic
commit
ea111437d1

+ 3 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SMSController.cs

@@ -43,6 +43,7 @@ namespace CallCenterApi.Interface.Controllers
43 43
                     return Error("请输入联系人电话");
44 44
                 if (string.IsNullOrEmpty(cusphone))
45 45
                     return Error("请输入发送号码");
46
+                //string msg = "您好!有关产品/服务详细问题可联系市场经理,姓名:" + name + ",电话:" + phone + "。也可以微信关注“心连心农资快讯”公众号进行咨询。祝您生活愉快!";
46 47
                 string msg = "您好!感谢您的来电,有关化肥详细问题可联系市场经理,姓名:" + name + ",电话:" + phone + "。您也可以微信关注“心连心农资快讯”公众号进行咨询。祝您生活愉快!";
47 48
                 string[] mag = { name, phone };
48 49
                 SmsSingleSenderResult result = SMSSingleshot(466863, mag, cusphone);
@@ -83,6 +84,7 @@ namespace CallCenterApi.Interface.Controllers
83 84
                     return Error("请输入联系人电话");
84 85
                 if (string.IsNullOrEmpty(cusphone))
85 86
                     return Error("请输入发送号码");
87
+                //string msg = "您好!有关产品/服务详细问题可联系市场经理,姓名:" + name + ",电话:" + phone + "。也可以微信关注“心连心农资快讯”公众号进行咨询。祝您生活愉快!";
86 88
                 string msg = "您好!感谢您的来电,有关化肥详细问题可联系市场经理,姓名:" + name + ",电话:" + phone + "。您也可以微信关注“心连心农资快讯”公众号进行咨询。祝您生活愉快!";
87 89
                 string[] mag = { name, phone };
88 90
                 SmsSingleSenderResult result = SMSSingleshot(466863, mag, cusphone);
@@ -225,6 +227,7 @@ namespace CallCenterApi.Interface.Controllers
225 227
                 if (string.IsNullOrEmpty(cusphone))
226 228
                     return Error("请输入发送号码");
227 229
                 string msg = "您好,刚有客户意向购买、咨询产品政策问题,客服已做简单解答,但该区域市场详细的产品价格政策及业务情况,还请您及时与客户联系提供具体服务。客户姓名:" + name + ",电话:" + phone + "。祝您工作顺利!";
230
+               // string msg = "您好,刚有客户致电400意向购买/代理,请联系接洽:" + name + ",电话" + name + "。祝你工作顺利";
228 231
                 string[] mag = { name, phone };
229 232
                 SmsSingleSenderResult result = SMSSingleshot(433866, mag, cusphone);
230 233
 

+ 58 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -1507,7 +1507,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1507 1507
         ///综合查询列表
1508 1508
         /// </summary>
1509 1509
         public ActionResult GetComprehensive(string description,string OpenId, string code, string createby, string createtel, string cusname, string keywords, string cusphone, string companyname, string province, string city,
1510
-            string country, string township, string category, string salebase, string touser, int source = 0, int state = -1, int type = 0, int pageindex = 1, int pagesize = 10)
1510
+            string country, string township, string category, string salebase, string touser,string question,string question1,string question2, int source = 0, int state = -1, int type = 0, int pageindex = 1, int pagesize = 10)
1511 1511
         {
1512 1512
 
1513 1513
             if (!string.IsNullOrEmpty(OpenId))
@@ -1572,6 +1572,44 @@ namespace CallCenterApi.Interface.Controllers.weixin
1572 1572
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
1573 1573
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
1574 1574
                     sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
1575
+                if (!string.IsNullOrEmpty(question2))
1576
+                {
1577
+                    string squsdf = string.Format("'{0}'", question2.Replace(",", "','"));
1578
+                    var QuestionManage = quesBLL.GetModelList("F_QuestionName in (" + squsdf + ")");
1579
+                    if (QuestionManage != null)
1580
+                    {
1581
+                        if (QuestionManage.FirstOrDefault().F_Type == EnumWOType.Complaint.ToString())
1582
+                        {
1583
+                            string queststrs = string.Format("'{0}'", string.Join(",", QuestionManage.Select(T => T.F_Id)).Replace(",", "','"));
1584
+                            sql += $"  and T_Wo_WorkOrder.F_QuestionType  in (" + queststrs + ")"; ;
1585
+                        }
1586
+                    }
1587
+                    //  
1588
+                }
1589
+                else if (!string.IsNullOrEmpty(question1))
1590
+                {
1591
+                    var QuestionManage = quesBLL.GetModelList("F_QuestionName='" + question1 + "'").FirstOrDefault();
1592
+                    if (QuestionManage != null)
1593
+                    {
1594
+                        if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
1595
+                        {
1596
+                            sql += $"  and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'" + question1 + "'", 1) + "')"; ;
1597
+                        }
1598
+                    }
1599
+                }
1600
+                else if (!string.IsNullOrEmpty(question))
1601
+                {
1602
+                    var QuestionManage = quesBLL.GetModelList("F_QuestionName='" + question + "'").FirstOrDefault();
1603
+                    if (QuestionManage != null)
1604
+                    {
1605
+                        if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
1606
+                        {
1607
+                            sql += $"  and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'" + question + "'", 0) + "')"; ;
1608
+                        }
1609
+                        else
1610
+                            sql += $"  and (T_Wo_WorkOrder.F_QuestionType  ='{ QuestionManage.F_Id }' or T_Wo_WorkOrder.F_QuestionType='{question}')"; ;
1611
+                    }
1612
+                }
1575 1613
                 if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
1576 1614
                 {
1577 1615
 
@@ -3035,6 +3073,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3035 3073
                         }
3036 3074
                     }
3037 3075
                 }
3076
+                int n = DbHelperSQL.ExecuteSql(" update T_Msg_List set State=1 where ToID ='" + model.F_ID + "' and IsDel=0 and State=0");
3038 3077
                 //var itemlasts = itembll.GetModelList("  F_WoID=" + +id + " ");
3039 3078
                 if (list.Count > 0)
3040 3079
                 {
@@ -3554,7 +3593,17 @@ namespace CallCenterApi.Interface.Controllers.weixin
3554 3593
                         model.F_CompanyName = cuModel.F_CompanyName;//公司名称
3555 3594
                         model.F_CustomerID = cuModel.F_CustomerCode;//客户编码
3556 3595
                         model.F_Salesman = cuModel.F_Salesman;
3557
-                        model.F_SalesPhone = cuModel.F_SalesPhone;
3596
+                        if (string.IsNullOrEmpty(cuModel.F_SalesPhone) && !string.IsNullOrEmpty(cuModel.F_Salesman))
3597
+                        {
3598
+                            var modellist = new BLL.T_Sys_UserAccount().
3599
+                                GetModelList("F_UserName ='" + cuModel.F_Salesman + "' and F_DeleteFlag =0");
3600
+                            if (modellist != null && modellist.Count > 0)
3601
+                            {
3602
+                                model.F_SalesPhone = modellist.FirstOrDefault().F_Mobile;
3603
+                            }
3604
+                        }
3605
+                        else
3606
+                            model.F_SalesPhone = cuModel.F_SalesPhone;
3558 3607
                         model.F_Legal = cuModel.F_Legal;
3559 3608
                         model.F_LegalPhone = cuModel.F_LegalPhone;
3560 3609
                         model.F_AddressProvince = cuModel.F_AddressProvince;
@@ -5051,12 +5100,13 @@ namespace CallCenterApi.Interface.Controllers.weixin
5051 5100
                 }
5052 5101
 
5053 5102
                 #region 暂存数据删除
5054
-                if (tempid > 0)
5055
-                {
5056
-                    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
5057
-                    if (tempmodel != null)
5058
-                        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
5059
-                }
5103
+                new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
5104
+                //if (tempid > 0)
5105
+                //{
5106
+                //    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
5107
+                //    if (tempmodel != null)
5108
+                //        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
5109
+                //}
5060 5110
                 #endregion
5061 5111
 
5062 5112
                 var model = new Model.T_Wo_WorkOrder();

+ 37 - 19
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -2561,6 +2561,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2561 2561
                         }
2562 2562
                     }                  
2563 2563
                 }
2564
+                int n = DbHelperSQL.ExecuteSql(" update T_Msg_List set State=1 where ToID ='" + model .F_ID + "' and IsDel=0 and State=0");
2565
+
2566
+
2567
+
2564 2568
                 var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
2565 2569
                 FileUrl = GetFileData(model.F_Files, configfj.F_ParamValue);
2566 2570
                 //var configfj = "http://192.168.8.9:1005/";
@@ -5879,12 +5883,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
5879 5883
                 }
5880 5884
 
5881 5885
                 #region 暂存数据删除
5882
-                if (tempid > 0)
5883
-                {
5884
-                    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
5885
-                    if (tempmodel != null)
5886
-                        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
5887
-                }
5886
+                new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
5887
+                //if (tempid > 0)
5888
+                //{
5889
+                //    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
5890
+                //    if (tempmodel != null)
5891
+                //        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
5892
+                //}
5888 5893
                 #endregion
5889 5894
                 var model = new Model.T_Wo_WorkOrder();
5890 5895
                 #region 保存客户基本信息
@@ -6531,7 +6536,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
6531 6536
                         }
6532 6537
                         model.F_CustomerID = cuModel.F_CustomerCode;//客户编码
6533 6538
                         model.F_Salesman = cuModel.F_Salesman;
6534
-                        model.F_SalesPhone = cuModel.F_SalesPhone;
6539
+                       
6540
+                        if(string .IsNullOrEmpty (cuModel.F_SalesPhone)&&!string .IsNullOrEmpty (cuModel.F_Salesman))
6541
+                        {
6542
+                            var modellist = new BLL.T_Sys_UserAccount().
6543
+                                GetModelList("F_UserName ='" + cuModel.F_Salesman + "' and F_DeleteFlag =0");
6544
+                            if (modellist!=null && modellist.Count >0)
6545
+                            {
6546
+                                model.F_SalesPhone = modellist.FirstOrDefault ().F_Mobile;
6547
+                            }
6548
+                        }
6549
+                        else
6550
+                            model.F_SalesPhone = cuModel.F_SalesPhone;
6535 6551
                         model.F_Legal = cuModel.F_Legal;
6536 6552
                         model.F_LegalPhone = cuModel.F_LegalPhone;
6537 6553
                         model.F_AddressProvince = cuModel.F_AddressProvince;
@@ -7838,12 +7854,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
7838 7854
                 #endregion
7839 7855
 
7840 7856
                 #region 暂存数据删除
7841
-                if (tempid > 0)
7842
-                {
7843
-                    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
7844
-                    if (tempmodel != null)
7845
-                        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
7846
-                }
7857
+                new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
7858
+                //if (tempid > 0)
7859
+                //{
7860
+                //    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
7861
+                //    if (tempmodel != null)
7862
+                //        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
7863
+                //}
7847 7864
                 #endregion
7848 7865
 
7849 7866
                 var model = new Model.T_Wo_WorkOrder();
@@ -8531,12 +8548,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
8531 8548
 
8532 8549
                 }
8533 8550
                 #region 暂存数据删除
8534
-                if (tempid > 0)
8535
-                {
8536
-                    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
8537
-                    if (tempmodel != null)
8538
-                        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
8539
-                }
8551
+                new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
8552
+                //if (tempid > 0)
8553
+                //{
8554
+                //    var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
8555
+                //    if (tempmodel != null)
8556
+                //        new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
8557
+                //}
8540 8558
                 #endregion
8541 8559
                 var model = new Model.T_Wo_WorkOrder();
8542 8560
                 #region 保存客户基本信息